From ec0e92002b72496923ef6044cfb7f4b3f8bfabf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 26 Jan 2013 22:47:54 +0200 Subject: [PATCH 1/4] vdpau: add missing pixel format for H.264 Signed-off-by: Luca Barbato --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 38a6f5e060..62288b007e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -63,6 +63,7 @@ static const enum AVPixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = { AV_PIX_FMT_DXVA2_VLD, AV_PIX_FMT_VAAPI_VLD, AV_PIX_FMT_VDA_VLD, + AV_PIX_FMT_VDPAU, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE }; From 78bc4d69ebe6189395e5c7e4719ddef50bc943ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 26 Jan 2013 22:47:55 +0200 Subject: [PATCH 2/4] hwaccel: do not offer unsupported pixel formats Signed-off-by: Luca Barbato --- libavcodec/h264.c | 8 ++++++++ libavcodec/mpegvideo.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 62288b007e..ffe7586ad8 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -60,10 +60,18 @@ static const uint8_t div6[QP_MAX_NUM + 1] = { }; static const enum AVPixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = { +#if CONFIG_H264_DXVA2_HWACCEL AV_PIX_FMT_DXVA2_VLD, +#endif +#if CONFIG_H264_VAAPI_HWACCEL AV_PIX_FMT_VAAPI_VLD, +#endif +#if CONFIG_H264_VDA_HWACCEL AV_PIX_FMT_VDA_VLD, +#endif +#if CONFIG_H264_VDPAU_HWACCEL AV_PIX_FMT_VDPAU, +#endif AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE }; diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 6320fbc138..a4105a5dcd 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -131,10 +131,18 @@ const enum AVPixelFormat ff_pixfmt_list_420[] = { }; const enum AVPixelFormat ff_hwaccel_pixfmt_list_420[] = { +#if CONFIG_DXVA2 AV_PIX_FMT_DXVA2_VLD, +#endif +#if CONFIG_VAAPI AV_PIX_FMT_VAAPI_VLD, +#endif +#if CONFIG_VDA AV_PIX_FMT_VDA_VLD, +#endif +#if CONFIG_VDPAU AV_PIX_FMT_VDPAU, +#endif AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }; From 0eedf5d74dcef868668f73568760615c1b25cc60 Mon Sep 17 00:00:00 2001 From: Daniel Kang Date: Sun, 27 Jan 2013 02:14:53 -0500 Subject: [PATCH 3/4] dsputil: add missing HAVE_YASM guard Fix compile error under "--disable-optimizations --disable-yasm --disable-inline-asm" Signed-off-by: Luca Barbato --- libavcodec/x86/dsputil_mmx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 743a7c116f..3ccef6226d 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -81,6 +81,7 @@ DECLARE_ALIGNED(16, const double, ff_pd_1)[2] = { 1.0, 1.0 }; DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 }; +#if HAVE_YASM void ff_put_pixels8_x2_mmxext(uint8_t *block, const uint8_t *pixels, int line_size, int h); void ff_put_pixels8_x2_3dnow(uint8_t *block, const uint8_t *pixels, @@ -179,6 +180,7 @@ void ff_put_no_rnd_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src, int dstStride, int srcStride); #define ff_put_no_rnd_pixels16_mmxext ff_put_pixels16_mmxext #define ff_put_no_rnd_pixels8_mmxext ff_put_pixels8_mmxext +#endif /* HAVE_YASM */ #if HAVE_INLINE_ASM From 96753bd00d6d4046db6818c0aadc21bf2a11d77b Mon Sep 17 00:00:00 2001 From: Daniel Kang Date: Sun, 27 Jan 2013 02:22:54 -0500 Subject: [PATCH 4/4] dsputil: x86: Correct the number of registers used in put_no_rnd_pixels16_l2 put_no_rnd_pixels16_l2 allocated 5 instead of 6 registers. Signed-off-by: Luca Barbato --- libavcodec/x86/mpeg4qpel.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/mpeg4qpel.asm b/libavcodec/x86/mpeg4qpel.asm index 39c9fc803f..a5525d22fd 100644 --- a/libavcodec/x86/mpeg4qpel.asm +++ b/libavcodec/x86/mpeg4qpel.asm @@ -99,7 +99,7 @@ PUT_NO_RND_PIXELS8_L2 ; put_no_rnd_pixels16_l2(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) %macro PUT_NO_RND_PIXELS16_l2 0 -cglobal put_no_rnd_pixels16_l2, 5,5 +cglobal put_no_rnd_pixels16_l2, 6,6 movsxdifnidn r3, r3 movsxdifnidn r4, r4d pcmpeqb m6, m6