Lines Matching defs:avctx

78     if ((ret = ff_thread_get_ext_buffer(s->avctx, &f->tf,
83 if (s->avctx->hwaccel) {
84 const AVHWAccel *hwaccel = s->avctx->hwaccel;
96 ff_thread_release_ext_buffer(s->avctx, &f->tf);
105 ff_thread_release_ext_buffer(s->avctx, &f->tf);
133 static void vp8_decode_flush_impl(AVCodecContext *avctx, int free_mem)
135 VP8Context *s = avctx->priv_data;
146 static void vp8_decode_flush(AVCodecContext *avctx)
148 vp8_decode_flush_impl(avctx, 0);
166 av_log(s->avctx, AV_LOG_FATAL, "Ran out of free frames!\n");
188 return ff_get_format(s->avctx, pix_fmts);
194 AVCodecContext *avctx = s->avctx;
197 if (width != s->avctx->width || ((width+15)/16 != s->mb_width || (height+15)/16 != s->mb_height) && s->macroblocks_base ||
198 height != s->avctx->height) {
199 vp8_decode_flush_impl(s->avctx, 1);
201 ret = ff_set_dimensions(s->avctx, width, height);
213 avctx->pix_fmt = s->pix_fmt;
216 s->mb_width = (s->avctx->coded_width + 15) / 16;
217 s->mb_height = (s->avctx->coded_height + 15) / 16;
219 s->mb_layout = is_vp7 || avctx->active_thread_type == FF_THREAD_SLICE &&
220 avctx->thread_count > 1;
523 av_log(s->avctx, AV_LOG_WARNING, "Discarding interframe without a prior keyframe!\n");
553 int width = s->avctx->width;
554 int height = s->avctx->height;
564 avpriv_request_sample(s->avctx, "Unknown profile %d", s->profile);
573 av_log(s->avctx, AV_LOG_ERROR, "Buffer size %d is too small, needed : %d\n", buf_size, 4 - s->profile + part1_size);
595 avpriv_request_sample(s->avctx, "Upscaling");
641 width != s->avctx->width || height != s->avctx->height ||
717 int width = s->avctx->width;
718 int height = s->avctx->height;
721 av_log(s->avctx, AV_LOG_ERROR, "Insufficent data (%d) for header\n", buf_size);
735 av_log(s->avctx, AV_LOG_WARNING, "Unknown profile %d\n", s->profile);
745 av_log(s->avctx, AV_LOG_ERROR, "Header size larger than data provided\n");
751 av_log(s->avctx, AV_LOG_ERROR,
763 avpriv_request_sample(s->avctx, "Upscaling");
786 av_log(s->avctx, AV_LOG_WARNING, "Unspecified colorspace\n");
806 av_log(s->avctx, AV_LOG_ERROR, "Invalid partitions\n");
811 width != s->avctx->width || height != s->avctx->height ||
1265 av_log(s->avctx, AV_LOG_WARNING,
2282 int vp78_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *curframe,
2285 VP8Context *s = avctx->priv_data;
2319 static int vp7_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *cur_frame,
2322 return vp78_decode_mv_mb_modes(avctx, cur_frame, prev_frame, IS_VP7);
2325 static int vp8_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *cur_frame,
2328 return vp78_decode_mv_mb_modes(avctx, cur_frame, prev_frame, IS_VP8);
2351 int sliced_threading = (avctx->active_thread_type == FF_THREAD_SLICE) && \
2369 static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata,
2372 VP8Context *s = avctx->priv_data;
2497 static int vp7_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata,
2500 return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 1);
2503 static int vp8_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata,
2506 return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 0);
2509 static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata,
2512 VP8Context *s = avctx->priv_data;
2568 static void vp7_filter_mb_row(AVCodecContext *avctx, void *tdata,
2571 filter_mb_row(avctx, tdata, jobnr, threadnr, 1);
2574 static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata,
2577 filter_mb_row(avctx, tdata, jobnr, threadnr, 0);
2581 int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr,
2584 VP8Context *s = avctx->priv_data;
2596 ret = s->decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr);
2602 s->filter_mb_row(avctx, tdata, jobnr, threadnr);
2608 if (avctx->active_thread_type == FF_THREAD_FRAME)
2615 static int vp7_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata,
2618 return vp78_decode_mb_row_sliced(avctx, tdata, jobnr, threadnr, IS_VP7);
2621 static int vp8_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata,
2624 return vp78_decode_mb_row_sliced(avctx, tdata, jobnr, threadnr, IS_VP8);
2628 int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame,
2631 VP8Context *s = avctx->priv_data;
2645 // avctx->pix_fmt already set in caller.
2652 avctx->pix_fmt = s->pix_fmt;
2664 if (avctx->skip_frame >= skip_thresh) {
2669 s->deblock_filter = s->filter.level && avctx->skip_loop_filter < skip_thresh;
2683 avctx->colorspace = AVCOL_SPC_BT470BG;
2685 avctx->color_range = AVCOL_RANGE_JPEG;
2687 avctx->color_range = AVCOL_RANGE_MPEG;
2696 av_log(avctx, AV_LOG_WARNING,
2726 if (ffcodec(avctx->codec)->update_thread_context)
2727 ff_thread_finish_setup(avctx);
2729 if (avctx->hwaccel) {
2730 ret = avctx->hwaccel->start_frame(avctx, avpkt->data, avpkt->size);
2734 ret = avctx->hwaccel->decode_slice(avctx, avpkt->data, avpkt->size);
2738 ret = avctx->hwaccel->end_frame(avctx);
2764 ret = vp7_decode_mv_mb_modes(avctx, curframe, prev_frame);
2766 ret = vp8_decode_mv_mb_modes(avctx, curframe, prev_frame);
2771 if (avctx->active_thread_type == FF_THREAD_FRAME)
2774 num_jobs = FFMIN(s->num_coeff_partitions, avctx->thread_count);
2786 avctx->execute2(avctx, vp7_decode_mb_row_sliced, s->thread_data, NULL,
2789 avctx->execute2(avctx, vp8_decode_mb_row_sliced, s->thread_data, NULL,
2814 int ff_vp8_decode_frame(AVCodecContext *avctx, AVFrame *frame,
2817 return vp78_decode_frame(avctx, frame, got_frame, avpkt, IS_VP8);
2821 static int vp7_decode_frame(AVCodecContext *avctx, AVFrame *frame,
2824 return vp78_decode_frame(avctx, frame, got_frame, avpkt, IS_VP7);
2828 av_cold int ff_vp8_decode_free(AVCodecContext *avctx)
2830 VP8Context *s = avctx->priv_data;
2833 vp8_decode_flush_impl(avctx, 1);
2852 int vp78_decode_init(AVCodecContext *avctx, int is_vp7)
2854 VP8Context *s = avctx->priv_data;
2857 s->avctx = avctx;
2858 s->vp7 = avctx->codec->id == AV_CODEC_ID_VP7;
2860 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
2881 ff_vp8_decode_free(avctx);
2889 static int vp7_decode_init(AVCodecContext *avctx)
2891 return vp78_decode_init(avctx, IS_VP7);
2895 av_cold int ff_vp8_decode_init(AVCodecContext *avctx)
2897 return vp78_decode_init(avctx, IS_VP8);