X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh263dec.c;h=8ee844e298e928d45abc21c87de96c97c8aeec29;hb=f3dfd34f27ae11279baa9e2e2525e990b7c858f4;hp=2cf01e3d985aae374bcb0bf5c93fe05a70e3a561;hpb=f32d2939555706365ad1d39aadd5ee7ce1d9fa4f;p=ffmpeg diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 2cf01e3d985..8ee844e298e 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -500,9 +500,9 @@ retry: GetBitContext gb; if (init_get_bits8(&gb, s->avctx->extradata, s->avctx->extradata_size) >= 0 ) - ff_mpeg4_decode_picture_header(avctx->priv_data, &gb); + ff_mpeg4_decode_picture_header(avctx->priv_data, &gb, 1); } - ret = ff_mpeg4_decode_picture_header(avctx->priv_data, &s->gb); + ret = ff_mpeg4_decode_picture_header(avctx->priv_data, &s->gb, 0); } else if (CONFIG_H263I_DECODER && s->codec_id == AV_CODEC_ID_H263I) { ret = ff_intel_h263_decode_picture_header(s); } else if (CONFIG_FLV_DECODER && s->h263_flv) { @@ -614,7 +614,7 @@ retry: if ((ret = ff_mpv_frame_start(s, avctx)) < 0) return ret; - if (!s->divx_packed) + if (!s->divx_packed && !avctx->hwaccel) ff_thread_finish_setup(avctx); if (avctx->hwaccel) { @@ -743,6 +743,22 @@ const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = { AV_PIX_FMT_NONE }; +const AVCodecHWConfigInternal *ff_h263_hw_config_list[] = { +#if CONFIG_H263_VAAPI_HWACCEL + HWACCEL_VAAPI(h263), +#endif +#if CONFIG_MPEG4_NVDEC_HWACCEL + HWACCEL_NVDEC(mpeg4), +#endif +#if CONFIG_MPEG4_VDPAU_HWACCEL + HWACCEL_VDPAU(mpeg4), +#endif +#if CONFIG_H263_VIDEOTOOLBOX_HWACCEL + HWACCEL_VIDEOTOOLBOX(h263), +#endif + NULL +}; + AVCodec ff_h263_decoder = { .name = "h263", .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), @@ -758,6 +774,7 @@ AVCodec ff_h263_decoder = { .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, + .hw_configs = ff_h263_hw_config_list, }; AVCodec ff_h263p_decoder = { @@ -775,16 +792,5 @@ AVCodec ff_h263p_decoder = { .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, - .hw_configs = (const AVCodecHWConfigInternal*[]) { -#if CONFIG_H263_VAAPI_HWACCEL - HWACCEL_VAAPI(h263), -#endif -#if CONFIG_MPEG4_VDPAU_HWACCEL - HWACCEL_VDPAU(mpeg4), -#endif -#if CONFIG_H263_VIDEOTOOLBOX_HWACCEL - HWACCEL_VIDEOTOOLBOX(h263), -#endif - NULL - }, + .hw_configs = ff_h263_hw_config_list, };