Lines Matching defs:avctx
37 void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
41 s->avctx = avctx;
42 s->width = avctx->coded_width;
43 s->height = avctx->coded_height;
44 s->codec_id = avctx->codec->id;
45 s->workaround_bugs = avctx->workaround_bugs;
48 s->codec_tag = ff_toupper4(avctx->codec_tag);
70 s->avctx = dst;
81 s->avctx = dst;
95 s->avctx->coded_height = s1->avctx->coded_height;
96 s->avctx->coded_width = s1->avctx->coded_width;
97 s->avctx->width = s1->avctx->width;
98 s->avctx->height = s1->avctx->height;
108 ff_mpeg_unref_picture(s->avctx, &s->picture[i]);
110 (ret = ff_mpeg_ref_picture(s->avctx, &s->picture[i], &s1->picture[i])) < 0)
116 ff_mpeg_unref_picture(s->avctx, &s->pic);\
118 ret = ff_mpeg_ref_picture(s->avctx, &s->pic, &s1->pic);\
176 if (ff_mpeg_framesize_alloc(s->avctx, &s->me,
178 av_log(s->avctx, AV_LOG_ERROR, "Failed to allocate context "
183 av_log(s->avctx, AV_LOG_ERROR, "Context scratch buffers could not "
218 (err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
222 err = av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
250 return ff_alloc_picture(s->avctx, pic, &s->me, &s->sc, 0, 0,
276 int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
283 if (!ff_thread_can_start_frame(avctx)) {
284 av_log(avctx, AV_LOG_ERROR, "Attempt to start a frame outside SETUP state\n");
292 ff_mpeg_unref_picture(s->avctx, s->last_picture_ptr);
301 ff_mpeg_unref_picture(s->avctx, &s->picture[i]);
305 ff_mpeg_unref_picture(s->avctx, &s->current_picture);
306 ff_mpeg_unref_picture(s->avctx, &s->last_picture);
307 ff_mpeg_unref_picture(s->avctx, &s->next_picture);
312 ff_mpeg_unref_picture(s->avctx, &s->picture[i]);
320 idx = ff_find_unused_picture(s->avctx, s->picture, 0);
322 av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n");
355 if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture,
364 ff_dlog(s->avctx, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n",
374 av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
377 av_log(avctx, AV_LOG_DEBUG,
380 av_log(avctx, AV_LOG_ERROR,
384 idx = ff_find_unused_picture(s->avctx, s->picture, 0);
386 av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n");
400 if (!avctx->hwaccel) {
401 for (int i = 0; i < avctx->height; i++)
403 0x80, avctx->width);
405 for (int i = 0; i < AV_CEIL_RSHIFT(avctx->height, v_chroma_shift); i++) {
407 0x80, AV_CEIL_RSHIFT(avctx->width, h_chroma_shift));
409 0x80, AV_CEIL_RSHIFT(avctx->width, h_chroma_shift));
414 for (int i = 0; i < avctx->height; i++)
416 16, avctx->width);
426 idx = ff_find_unused_picture(s->avctx, s->picture, 0);
428 av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n");
451 (ret = ff_mpeg_ref_picture(s->avctx, &s->last_picture,
457 (ret = ff_mpeg_ref_picture(s->avctx, &s->next_picture,
491 if (s->avctx->debug & FF_DEBUG_NOMC)
508 ff_print_debug_info2(s->avctx, pict, s->mbskip_table, p->mb_type,
519 if (!(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS))
545 ff_draw_horiz_band(s->avctx, s->current_picture_ptr->f,
551 void ff_mpeg_flush(AVCodecContext *avctx)
553 MpegEncContext *const s = avctx->priv_data;
559 ff_mpeg_unref_picture(s->avctx, &s->picture[i]);
562 ff_mpeg_unref_picture(s->avctx, &s->current_picture);
563 ff_mpeg_unref_picture(s->avctx, &s->last_picture);
564 ff_mpeg_unref_picture(s->avctx, &s->next_picture);