diff mbox

[FFmpeg-devel] avcodec/h263dec: Fixed VA API, VDPAU, and VideoToolbox hardware acceleration due to missing `hw_configs` property.

Message ID 20190429211233.80610-1-fumoboy007@me.com
State New
Headers show

Commit Message

fumoboy007 April 29, 2019, 9:12 p.m. UTC
Bug originally introduced in commit 758fbc54fef2f31957b5c5f22e05e5fd9b04f631.
---
 libavcodec/h263dec.c | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

Comments

fumoboy007 April 29, 2019, 9:16 p.m. UTC | #1
Btw, what’s the difference between `h263` and `h263p`?

> On Apr 29, 2019, at 2:12 PM, fumoboy007 <fumoboy007@me.com> wrote:
> 
> Bug originally introduced in commit 758fbc54fef2f31957b5c5f22e05e5fd9b04f631.
> ---
> libavcodec/h263dec.c | 27 +++++++++++++++------------
> 1 file changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> index 8385ddfe2e..6f001f6d47 100644
> --- a/libavcodec/h263dec.c
> +++ b/libavcodec/h263dec.c
> @@ -743,6 +743,19 @@ 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_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 +771,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 +789,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,
> };
> -- 
> 2.21.0
>
Michael Niedermayer April 29, 2019, 11:52 p.m. UTC | #2
On Mon, Apr 29, 2019 at 02:16:53PM -0700, fumoboy007@me.com wrote:
> Btw, what’s the difference between `h263` and `h263p`?

Its described probably best with the encoders:
    .name           = "h263p",
    .long_name      = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"),    
vs.    
    .name           = "h263",
    .long_name      = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"),


[...]
fumoboy007 April 30, 2019, 10:50 p.m. UTC | #3
Ah, I see.

> On Apr 29, 2019, at 4:52 PM, Michael Niedermayer <michael@niedermayer.cc> wrote:
> 
> On Mon, Apr 29, 2019 at 02:16:53PM -0700, fumoboy007@me.com wrote:
>> Btw, what’s the difference between `h263` and `h263p`?
> 
> Its described probably best with the encoders:
>    .name           = "h263p",
>    .long_name      = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"),    
> vs.    
>    .name           = "h263",
>    .long_name      = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"),
> 
> 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> If you fake or manipulate statistics in a paper in physics you will never
> get a job again.
> If you fake or manipulate statistics in a paper in medicin you will get
> a job for life at the pharma industry.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 8385ddfe2e..6f001f6d47 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -743,6 +743,19 @@  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_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 +771,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 +789,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,
 };