add ffmpeg patch for mjpeg vdpau hw accel
authorGood Guy <good1.2guy@gmail.com>
Wed, 15 Apr 2020 19:14:36 +0000 (13:14 -0600)
committerGood Guy <good1.2guy@gmail.com>
Wed, 15 Apr 2020 19:14:36 +0000 (13:14 -0600)
cinelerra-5.1/thirdparty/src/ffmpeg-4.2.patchA [new file with mode: 0644]

diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-4.2.patchA b/cinelerra-5.1/thirdparty/src/ffmpeg-4.2.patchA
new file mode 100644 (file)
index 0000000..6d175cb
--- /dev/null
@@ -0,0 +1,23 @@
+diff -ru a/libavutil/hwcontext_vdpau.c b/libavutil/hwcontext_vdpau.c
+--- a/libavutil/hwcontext_vdpau.c      2019-08-05 14:52:21.000000000 -0600
++++ b/libavutil/hwcontext_vdpau.c      2020-04-15 10:59:45.793687570 -0600
+@@ -64,6 +64,11 @@
+     { 0,                     AV_PIX_FMT_NONE,   },
+ };
++static const VDPAUPixFmtMap pix_fmts_420j[] = {
++    { VDP_YCBCR_FORMAT_YV12, AV_PIX_FMT_YUVJ420P },
++    { 0,                     AV_PIX_FMT_NONE,   },
++};
++
+ static const VDPAUPixFmtMap pix_fmts_422[] = {
+     { VDP_YCBCR_FORMAT_NV12, AV_PIX_FMT_NV16    },
+     { VDP_YCBCR_FORMAT_YV12, AV_PIX_FMT_YUV422P },
+@@ -85,6 +90,7 @@
+     const VDPAUPixFmtMap *map;
+ } vdpau_pix_fmts[] = {
+     { VDP_CHROMA_TYPE_420, AV_PIX_FMT_YUV420P, pix_fmts_420 },
++    { VDP_CHROMA_TYPE_420, AV_PIX_FMT_YUVJ420P, pix_fmts_420j },
+     { VDP_CHROMA_TYPE_422, AV_PIX_FMT_YUV422P, pix_fmts_422 },
+     { VDP_CHROMA_TYPE_444, AV_PIX_FMT_YUV444P, pix_fmts_444 },
+ };