From 707e2184cadaf9cce85492658ff55f7901a47d64 Mon Sep 17 00:00:00 2001 From: James Almer Date: Wed, 23 Oct 2024 13:42:48 -0300 Subject: [PATCH] avformat/riff: map Y416 fourcc to RAWVIDEO decoder 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 --- libavcodec/raw.c | 1 + libavformat/riff.c | 1 + tests/ref/fate/filter-pixdesc-xv48le | 2 +- tests/ref/fate/filter-pixfmts-copy | 2 +- tests/ref/fate/filter-pixfmts-crop | 2 +- tests/ref/fate/filter-pixfmts-field | 2 +- tests/ref/fate/filter-pixfmts-fieldorder | 2 +- tests/ref/fate/filter-pixfmts-hflip | 2 +- tests/ref/fate/filter-pixfmts-il | 2 +- tests/ref/fate/filter-pixfmts-null | 2 +- tests/ref/fate/filter-pixfmts-scale | 2 +- tests/ref/fate/filter-pixfmts-transpose | 2 +- tests/ref/fate/filter-pixfmts-vflip | 2 +- 13 files changed, 13 insertions(+), 11 deletions(-) diff --git a/libavcodec/raw.c b/libavcodec/raw.c index f3c1dcd059..578794cb7a 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -74,6 +74,7 @@ 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_XV48LE, MKTAG('Y', '4', '1', '6') }, { AV_PIX_FMT_Y210LE, MKTAG('Y', '2', '1', '0') }, { AV_PIX_FMT_Y216LE, MKTAG('Y', '2', '1', '6') }, diff --git a/libavformat/riff.c b/libavformat/riff.c index 6dc63426fa..739a4a5542 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -222,6 +222,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { 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', '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-xv48le b/tests/ref/fate/filter-pixdesc-xv48le index 4b69a41ab2..9982d7a375 100644 --- a/tests/ref/fate/filter-pixdesc-xv48le +++ b/tests/ref/fate/filter-pixdesc-xv48le @@ -1 +1 @@ -pixdesc-xv48le 35c1874574e1cf438ea3e97ef2a5a85e +pixdesc-xv48le 57282e6865accac431d05d0c54038e82 diff --git a/tests/ref/fate/filter-pixfmts-copy b/tests/ref/fate/filter-pixfmts-copy index 0ac7ba1d6e..46ba0cbac2 100644 --- a/tests/ref/fate/filter-pixfmts-copy +++ b/tests/ref/fate/filter-pixfmts-copy @@ -110,7 +110,7 @@ xv30le 7dfdd664a9792bb06a19a63353828da0 xv36be 9f556ee59a672fd8725f0bb36ce3e4b0 xv36le e08dcbde02f1c28a3554f372ad1278e2 xv48be ce34993b4b4411bba1d852b9b86aa39e -xv48le 30b5271d569d1ad6aba916fa5cdf82bd +xv48le df913a7e61b162aa98303e5393e60c63 xyz12be a1ef56bf746d71f59669c28e48fc8450 xyz12le 831ff03c1ba4ef19374686f16a064d8c y210le 04e9487b6cce38e7531437e946cdd586 diff --git a/tests/ref/fate/filter-pixfmts-crop b/tests/ref/fate/filter-pixfmts-crop index dcb992226c..d2d45498b9 100644 --- a/tests/ref/fate/filter-pixfmts-crop +++ b/tests/ref/fate/filter-pixfmts-crop @@ -107,7 +107,7 @@ xv30le 7e2350aea136c6fb76dae54e9d3fe1f8 xv36be 23b6f253fcb375e4145cfcb562268c5f xv36le 778286003497f92b84d0bd8258d6b85d xv48be c90889b2cf54cc78bd58e8c47d4eb791 -xv48le 60d81aa388fd40e5bf8aa3323bc4e60f +xv48le 2c15c1254449ec5f9135ae61bdf4e1d5 xyz12be cb4571f9aaa7b59f999ef327276104b7 xyz12le cd6aae8d26b18bdb4b9d068586276d91 ya16be a3d18014454942a96f15a49947c0c55d diff --git a/tests/ref/fate/filter-pixfmts-field b/tests/ref/fate/filter-pixfmts-field index aac4e0adfa..b95d90d416 100644 --- a/tests/ref/fate/filter-pixfmts-field +++ b/tests/ref/fate/filter-pixfmts-field @@ -110,7 +110,7 @@ xv30le a8e8bfb66178ad5cbef5c82cedc1d3da xv36be bcc7bda2d0a5d43db4464af6a4cb5d65 xv36le ba99f258370f2a56993e8760e6b30194 xv48be 2abcd986a34789ba4310be3969020d0d -xv48le 90591fca801a6d0ee3fb19bf3c8587f8 +xv48le f6f2e33f260f48334197538f3331f7bc xyz12be d2fa69ec91d3ed862f2dac3f8e7a3437 xyz12le 02bccd5e0b6824779a1f848b0ea3e3b5 y210le 4c2fba1dc40322584977d15dd07c9146 diff --git a/tests/ref/fate/filter-pixfmts-fieldorder b/tests/ref/fate/filter-pixfmts-fieldorder index f5dddd0a37..104e268572 100644 --- a/tests/ref/fate/filter-pixfmts-fieldorder +++ b/tests/ref/fate/filter-pixfmts-fieldorder @@ -99,7 +99,7 @@ xv30le 8d1921d4a210d8107c20a805cb9a8117 xv36be 962386c88268f4382004c3a7a82c5eb8 xv36le bcceffc985aaa8414c4b8072aa0889bd xv48be 4d6e4004b03767f12df8bb4e76c98ddf -xv48le f1b19076ff69cb8d587454615015297a +xv48le 9e94d82461a2131063157ac0dbe9467b xyz12be 15f5cda71de5fef9cec5e75e3833b6bc xyz12le 7be6c8781f38c21a6b8f602f62ca31e6 y210le 22b1a02a39c4b325726bf8793bf1e8f2 diff --git a/tests/ref/fate/filter-pixfmts-hflip b/tests/ref/fate/filter-pixfmts-hflip index a4630144e3..679f0105e7 100644 --- a/tests/ref/fate/filter-pixfmts-hflip +++ b/tests/ref/fate/filter-pixfmts-hflip @@ -107,7 +107,7 @@ xv30le 7370eadd13a2fc79186443713a639332 xv36be 98f578df965eed369f46cb135e2d1345 xv36le e478b4b54698beb3ce1b9a2dd691d544 xv48be e030a2c7b1b600cfacb691b6e90c2e3d -xv48le d2fd726fcd96a696ea67cb6281c45b6b +xv48le fbd7f8c65cd6fc9f9108dc9a1f977dc3 xyz12be 25f90259ff8a226befdaec3dfe82996e xyz12le 926c0791d59aaff61b2778e8ada3316d ya16be d5b342355bdd9e3197e01b13b7c6301e diff --git a/tests/ref/fate/filter-pixfmts-il b/tests/ref/fate/filter-pixfmts-il index 981fe287fd..4135eb98c0 100644 --- a/tests/ref/fate/filter-pixfmts-il +++ b/tests/ref/fate/filter-pixfmts-il @@ -109,7 +109,7 @@ xv30le ccd81ba2ba845917d5d1c9fa2a6e2fc6 xv36be 3bbb949278ea55cc947ee03bd9c27c2d xv36le 102c0e817d375ddd6b2cfbb4262dec95 xv48be 4d7376651fb7b3e84d00abad6c785aad -xv48le 7280a114df023964bdba651a9c2ca752 +xv48le a1a8ff16d9a864568e5e557734bf3d6d xyz12be 7c7d54c55f136cbbc50b18029f3be0b3 xyz12le 090ba6b1170baf2b1358b43b971d33b0 y210le d4cf9b53cd7ff22f087743d483e88480 diff --git a/tests/ref/fate/filter-pixfmts-null b/tests/ref/fate/filter-pixfmts-null index 0ac7ba1d6e..46ba0cbac2 100644 --- a/tests/ref/fate/filter-pixfmts-null +++ b/tests/ref/fate/filter-pixfmts-null @@ -110,7 +110,7 @@ xv30le 7dfdd664a9792bb06a19a63353828da0 xv36be 9f556ee59a672fd8725f0bb36ce3e4b0 xv36le e08dcbde02f1c28a3554f372ad1278e2 xv48be ce34993b4b4411bba1d852b9b86aa39e -xv48le 30b5271d569d1ad6aba916fa5cdf82bd +xv48le df913a7e61b162aa98303e5393e60c63 xyz12be a1ef56bf746d71f59669c28e48fc8450 xyz12le 831ff03c1ba4ef19374686f16a064d8c y210le 04e9487b6cce38e7531437e946cdd586 diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale index 689ed6ba9a..8e5526935f 100644 --- a/tests/ref/fate/filter-pixfmts-scale +++ b/tests/ref/fate/filter-pixfmts-scale @@ -110,7 +110,7 @@ xv30le a2a351cbf936651b558abfc70a925057 xv36be 4d084adca0228d7750d1e2e877e0d79b xv36le de9c74e94dc19c828e1572aa283d8aca xv48be 9e58d1a045df100b0dec116e13be5b4e -xv48le c739efbfc98e9944911ffb7861b176b7 +xv48le fd873d53609b2fbdfe99470f515a234c xyz12be c7ba8345998c0141ddc079cdd29b1a40 xyz12le 95f5d3a0de834cc495c9032a14987cde y210le 7c2aef142d88ab343ec01acd45f38466 diff --git a/tests/ref/fate/filter-pixfmts-transpose b/tests/ref/fate/filter-pixfmts-transpose index 16fdba1140..985c63fca9 100644 --- a/tests/ref/fate/filter-pixfmts-transpose +++ b/tests/ref/fate/filter-pixfmts-transpose @@ -99,7 +99,7 @@ xv30le ebe26bf75c64406dea8b8a160c978fd9 xv36be 2261a0e3db5ee607d37f68d19704ae15 xv36le 9202133de91bf64c76ca27d5cd0c816a xv48be 14373b7fe123225689e76fe2ce43fb93 -xv48le ad174a65871cacf64275f7f7cef8467d +xv48le 319df9724a067c7b5efa215f9f54d127 xyz12be 68e5cba640f6e4ef72dff950e88b5342 xyz12le 8b6b6a6db4d7561e80db88ccaecce7a9 ya16be 3e161cb5f225922a80fefdc9cc02a4f9 diff --git a/tests/ref/fate/filter-pixfmts-vflip b/tests/ref/fate/filter-pixfmts-vflip index 032f3b58bb..c0d836a094 100644 --- a/tests/ref/fate/filter-pixfmts-vflip +++ b/tests/ref/fate/filter-pixfmts-vflip @@ -110,7 +110,7 @@ xv30le f61ddeb49ba8fb7c92294ad621cbf896 xv36be c0272372d3e1a59adb3931ee433a5d5b xv36le ffe6ab75ebc09134c3451f8f6ef0d501 xv48be bdfc3217ae456b370dbdcf4d52606a3f -xv48le 5e603d6635ddeba02f3201c70437cb9d +xv48le 53dbebab73a66539c04644ef56dc6bbb xyz12be 23fa9fb36d49dce61e284d41b83e0e6b xyz12le ef73e6d1f932a9a355df1eedd628394f y210le f8847bedd3ae6e1c0cf84a823f275e31