[FFmpeg-devel] [PATCH 4/6] avformat/riff: map Y210 and Y216 fourcc to RAWVIDEO decoder
James Almer
jamrial at gmail.com
Tue Oct 22 15:48:45 EEST 2024
As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/raw.c | 2 ++
libavformat/riff.c | 2 ++
tests/ref/fate/filter-pixdesc-y210le | 2 +-
tests/ref/fate/filter-pixdesc-y216le | 2 +-
tests/ref/fate/filter-pixfmts-copy | 4 ++--
tests/ref/fate/filter-pixfmts-field | 4 ++--
tests/ref/fate/filter-pixfmts-fieldorder | 4 ++--
tests/ref/fate/filter-pixfmts-il | 4 ++--
tests/ref/fate/filter-pixfmts-null | 4 ++--
tests/ref/fate/filter-pixfmts-scale | 4 ++--
tests/ref/fate/filter-pixfmts-vflip | 4 ++--
11 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index b6c1dea8c1..f3c1dcd059 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -74,6 +74,8 @@ static const PixelFormatTag raw_pix_fmt_tags[] = {
{ AV_PIX_FMT_NV21, MKTAG('N', 'V', '2', '1') },
{ AV_PIX_FMT_VUYA, MKTAG('A', 'Y', 'U', 'V') }, /* MS 4:4:4:4 */
{ AV_PIX_FMT_XV30LE, MKTAG('Y', '4', '1', '0') },
+ { AV_PIX_FMT_Y210LE, MKTAG('Y', '2', '1', '0') },
+ { AV_PIX_FMT_Y216LE, MKTAG('Y', '2', '1', '6') },
/* nut */
{ AV_PIX_FMT_RGB555LE, MKTAG('R', 'G', 'B', 15) },
diff --git a/libavformat/riff.c b/libavformat/riff.c
index a882602220..6dc63426fa 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -220,6 +220,8 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{ AV_CODEC_ID_RAWVIDEO, MKTAG( 3 , 0 , 0 , 0 ) },
{ AV_CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') },
{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '2', '1', '0') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '2', '1', '6') },
{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },
{ AV_CODEC_ID_RAWVIDEO, MKTAG('V', '4', '2', '2') },
{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', '0') },
diff --git a/tests/ref/fate/filter-pixdesc-y210le b/tests/ref/fate/filter-pixdesc-y210le
index c6dc202948..fdedb58d0d 100644
--- a/tests/ref/fate/filter-pixdesc-y210le
+++ b/tests/ref/fate/filter-pixdesc-y210le
@@ -1 +1 @@
-pixdesc-y210le 7b0ba4b531e7dccca7f2a49102b23991
+pixdesc-y210le a66dba4aa4dca748a2dc2bd5f3619e5f
diff --git a/tests/ref/fate/filter-pixdesc-y216le b/tests/ref/fate/filter-pixdesc-y216le
index dd80ad0ad4..9088c3419b 100644
--- a/tests/ref/fate/filter-pixdesc-y216le
+++ b/tests/ref/fate/filter-pixdesc-y216le
@@ -1 +1 @@
-pixdesc-y216le ff17fa6e341a5cfe0d549faa25c24257
+pixdesc-y216le a7d1e552815201d1df4d731b32968e8a
diff --git a/tests/ref/fate/filter-pixfmts-copy b/tests/ref/fate/filter-pixfmts-copy
index 335eac9ad3..bd44c34fe0 100644
--- a/tests/ref/fate/filter-pixfmts-copy
+++ b/tests/ref/fate/filter-pixfmts-copy
@@ -111,9 +111,9 @@ xv36be 9f556ee59a672fd8725f0bb36ce3e4b0
xv36le e08dcbde02f1c28a3554f372ad1278e2
xyz12be a1ef56bf746d71f59669c28e48fc8450
xyz12le 831ff03c1ba4ef19374686f16a064d8c
-y210le 0736b017e0814daf38d3350c42796f7a
+y210le 04e9487b6cce38e7531437e946cdd586
y212le 825768be8fe92708ae80be84855066ed
-y216le 610cc638e695eb64f3004cc5f24c5a7b
+y216le 0e99aeddfee304e72d525d72998d9e9b
ya16be 37c07787e544f900c87b853253bfc8dd
ya16le e8cab8fad88cba6d285b224d8bf0d4df
ya8 dbb99fbcdc204aaa1a7397ff561f1a67
diff --git a/tests/ref/fate/filter-pixfmts-field b/tests/ref/fate/filter-pixfmts-field
index 0ecfa34e64..d35eec2a2f 100644
--- a/tests/ref/fate/filter-pixfmts-field
+++ b/tests/ref/fate/filter-pixfmts-field
@@ -111,9 +111,9 @@ xv36be bcc7bda2d0a5d43db4464af6a4cb5d65
xv36le ba99f258370f2a56993e8760e6b30194
xyz12be d2fa69ec91d3ed862f2dac3f8e7a3437
xyz12le 02bccd5e0b6824779a1f848b0ea3e3b5
-y210le 025beb25f047a762e3788dbea4b60864
+y210le 4c2fba1dc40322584977d15dd07c9146
y212le ac2a47c45187dd54d0f55293cbffd954
-y216le 332801737b0f779bdf14ff535fd925fd
+y216le e65b5bfae1b40edbbed2012e9cd45e31
ya16be 40403b5277364777e0671da4d38e01ac
ya16le 54f3295f5326a13d456ac53e973ba398
ya8 28cea4f98ed452bd3da9c752e5e3399c
diff --git a/tests/ref/fate/filter-pixfmts-fieldorder b/tests/ref/fate/filter-pixfmts-fieldorder
index 4e7a8c5f43..a19f58e73d 100644
--- a/tests/ref/fate/filter-pixfmts-fieldorder
+++ b/tests/ref/fate/filter-pixfmts-fieldorder
@@ -100,9 +100,9 @@ xv36be 962386c88268f4382004c3a7a82c5eb8
xv36le bcceffc985aaa8414c4b8072aa0889bd
xyz12be 15f5cda71de5fef9cec5e75e3833b6bc
xyz12le 7be6c8781f38c21a6b8f602f62ca31e6
-y210le ee45acfb1386288af98af5313162ff3e
+y210le 22b1a02a39c4b325726bf8793bf1e8f2
y212le 2f08fb195b948056c844acb1eee8d649
-y216le 4176a190d167f0f6d7dbca7ff65d3f48
+y216le 360cb98ac80b13d3a8ec61c9f1ff3bac
ya16be 0f13e0f52586d172aaa07710fa3e8f31
ya16le d481d93ea1a1a04d759d9994958983de
ya8 055ac5ab5ff8533dd319edc17a398af1
diff --git a/tests/ref/fate/filter-pixfmts-il b/tests/ref/fate/filter-pixfmts-il
index 4d2affa190..67a44ef361 100644
--- a/tests/ref/fate/filter-pixfmts-il
+++ b/tests/ref/fate/filter-pixfmts-il
@@ -110,9 +110,9 @@ xv36be 3bbb949278ea55cc947ee03bd9c27c2d
xv36le 102c0e817d375ddd6b2cfbb4262dec95
xyz12be 7c7d54c55f136cbbc50b18029f3be0b3
xyz12le 090ba6b1170baf2b1358b43b971d33b0
-y210le 306ec4238b49dbc8625a97b678ea1c5f
+y210le d4cf9b53cd7ff22f087743d483e88480
y212le d5a2b4677ddb4a3bc3e5cd5cbb20f426
-y216le ef6d5ebd8bf99809fb8ac658cf7acbf8
+y216le 9e44c6d76b09bcbe71738423b4b3d67a
ya16be 7bc720918bc0132e9717acbde89874e0
ya16le 61203295a8d39601b841de90f2c9797b
ya8 a38d6e288f582f1a04310232ed764afc
diff --git a/tests/ref/fate/filter-pixfmts-null b/tests/ref/fate/filter-pixfmts-null
index 335eac9ad3..bd44c34fe0 100644
--- a/tests/ref/fate/filter-pixfmts-null
+++ b/tests/ref/fate/filter-pixfmts-null
@@ -111,9 +111,9 @@ xv36be 9f556ee59a672fd8725f0bb36ce3e4b0
xv36le e08dcbde02f1c28a3554f372ad1278e2
xyz12be a1ef56bf746d71f59669c28e48fc8450
xyz12le 831ff03c1ba4ef19374686f16a064d8c
-y210le 0736b017e0814daf38d3350c42796f7a
+y210le 04e9487b6cce38e7531437e946cdd586
y212le 825768be8fe92708ae80be84855066ed
-y216le 610cc638e695eb64f3004cc5f24c5a7b
+y216le 0e99aeddfee304e72d525d72998d9e9b
ya16be 37c07787e544f900c87b853253bfc8dd
ya16le e8cab8fad88cba6d285b224d8bf0d4df
ya8 dbb99fbcdc204aaa1a7397ff561f1a67
diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale
index 8a99cf3fac..0cb96c0e1c 100644
--- a/tests/ref/fate/filter-pixfmts-scale
+++ b/tests/ref/fate/filter-pixfmts-scale
@@ -111,9 +111,9 @@ xv36be 4d084adca0228d7750d1e2e877e0d79b
xv36le de9c74e94dc19c828e1572aa283d8aca
xyz12be c7ba8345998c0141ddc079cdd29b1a40
xyz12le 95f5d3a0de834cc495c9032a14987cde
-y210le 1c2708a520477f955d1fedf6ca7a41bd
+y210le 7c2aef142d88ab343ec01acd45f38466
y212le 39a3c0c843041ad4501b3107dd91ef17
-y216le 21ead8be695827822e627df20ab49b1f
+y216le 17be2999e97d36b8ed903f07ef428c09
ya16be 20d4842899d61068f5fb6af478bf26a6
ya16le 6a05895adce85143ae1c1b3470cb4070
ya8 0a9db5bb4b009de9197eede5e9d19e16
diff --git a/tests/ref/fate/filter-pixfmts-vflip b/tests/ref/fate/filter-pixfmts-vflip
index ed8f6980e8..e9ffa48cae 100644
--- a/tests/ref/fate/filter-pixfmts-vflip
+++ b/tests/ref/fate/filter-pixfmts-vflip
@@ -111,9 +111,9 @@ xv36be c0272372d3e1a59adb3931ee433a5d5b
xv36le ffe6ab75ebc09134c3451f8f6ef0d501
xyz12be 23fa9fb36d49dce61e284d41b83e0e6b
xyz12le ef73e6d1f932a9a355df1eedd628394f
-y210le 9544c81f8e1fc95e9fa4009dbecfea25
+y210le f8847bedd3ae6e1c0cf84a823f275e31
y212le c801725ae31e3b8f5be269359d49f191
-y216le 0ca0f60d7fd78ec32f417d6209f18a5b
+y216le 985db498aedf3fb1c547ad07442b7258
ya16be 55b1dbbe4d56ed0d22461685ce85520d
ya16le d5bf02471823a16dc523a46cace0101a
ya8 4299c6ca3b470a7d8a420e26eb485b1d
--
2.47.0
More information about the ffmpeg-devel
mailing list