Lines Matching defs:avctx
59 static int truemotion2rt_decode_header(AVCodecContext *avctx, const AVPacket *avpkt)
61 TrueMotion2RTContext *s = avctx->priv_data;
70 av_log(avctx, AV_LOG_ERROR, "input packet too small (%d)\n", size);
76 av_log(avctx, AV_LOG_ERROR, "invalid header size (%d)\n", header_size);
81 av_log(avctx, AV_LOG_ERROR, "input packet too small (%d)\n", size);
97 ret = ff_set_dimensions(avctx, width, height);
101 av_log(avctx, AV_LOG_DEBUG, "Header size: %d\n", header_size);
105 static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p,
108 TrueMotion2RTContext *s = avctx->priv_data;
114 ret = truemotion2rt_decode_header(avctx, avpkt);
118 if ((avctx->width + s->hscale - 1)/ s->hscale * avctx->height * s->delta_size > avpkt->size * 8LL * 4)
125 ret = ff_get_buffer(avctx, p, 0);
132 for (y = 0; y < avctx->height; y++) {
134 for (x = 0; x < avctx->width; x += s->hscale) {
143 for (y = 0; y < avctx->height; y++) {
144 for (x = 1; x < avctx->width; x += s->hscale)
151 for (y = 0; y < avctx->height; y++) {
152 for (x = 0; x < avctx->width; x++)
158 for (y = 0; y < avctx->height >> 2; y++) {
160 for (x = 0; x < avctx->width >> 2; x += s->hscale) {
169 for (y = 0; y < avctx->height >> 2; y++) {
170 for (x = 1; x < avctx->width >> 2; x += s->hscale)
177 for (y = 0; y < avctx->height >> 2; y++) {
178 for (x = 0; x < avctx->width >> 2; x++)
184 for (y = 0; y < avctx->height >> 2; y++) {
186 for (x = 0; x < avctx->width >> 2; x += s->hscale) {
195 for (y = 0; y < avctx->height >> 2; y++) {
196 for (x = 1; x < avctx->width >> 2; x += s->hscale)
203 for (y = 0; y < avctx->height >> 2; y++) {
204 for (x = 0; x < avctx->width >> 2; x++)
216 static av_cold int truemotion2rt_decode_init(AVCodecContext *avctx)
218 avctx->pix_fmt = AV_PIX_FMT_YUV410P;