swscale: Add GRAY12

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Luca Barbato 2016-11-03 16:10:03 +01:00 committed by Michael Niedermayer
parent 638b216d4f
commit 19be5fb728
16 changed files with 28 additions and 0 deletions

View File

@ -1323,6 +1323,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case AV_PIX_FMT_YUV422P16LE: case AV_PIX_FMT_YUV422P16LE:
case AV_PIX_FMT_YUV444P16LE: case AV_PIX_FMT_YUV444P16LE:
case AV_PIX_FMT_GRAY12LE:
case AV_PIX_FMT_GRAY16LE: case AV_PIX_FMT_GRAY16LE:
c->lumToYV12 = bswap16Y_c; c->lumToYV12 = bswap16Y_c;
break; break;
@ -1357,6 +1358,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case AV_PIX_FMT_YUV422P16BE: case AV_PIX_FMT_YUV422P16BE:
case AV_PIX_FMT_YUV444P16BE: case AV_PIX_FMT_YUV444P16BE:
case AV_PIX_FMT_GRAY12BE:
case AV_PIX_FMT_GRAY16BE: case AV_PIX_FMT_GRAY16BE:
c->lumToYV12 = bswap16Y_c; c->lumToYV12 = bswap16Y_c;
break; break;

View File

@ -695,6 +695,8 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt)
#define isGray(x) \ #define isGray(x) \
((x) == AV_PIX_FMT_GRAY8 || \ ((x) == AV_PIX_FMT_GRAY8 || \
(x) == AV_PIX_FMT_YA8 || \ (x) == AV_PIX_FMT_YA8 || \
(x) == AV_PIX_FMT_GRAY12BE || \
(x) == AV_PIX_FMT_GRAY12LE || \
(x) == AV_PIX_FMT_GRAY16BE || \ (x) == AV_PIX_FMT_GRAY16BE || \
(x) == AV_PIX_FMT_GRAY16LE || \ (x) == AV_PIX_FMT_GRAY16LE || \
(x) == AV_PIX_FMT_YA16BE || \ (x) == AV_PIX_FMT_YA16BE || \

View File

@ -1796,6 +1796,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR555) || IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR555) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR565) || IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR565) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGRA64) || IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGRA64) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GRAY12) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GRAY16) || IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GRAY16) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_YA16) || IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_YA16) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_AYUV64) || IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_AYUV64) ||

View File

@ -131,6 +131,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_RGB0] = { 1, 1 }, [AV_PIX_FMT_RGB0] = { 1, 1 },
[AV_PIX_FMT_0BGR] = { 1, 1 }, [AV_PIX_FMT_0BGR] = { 1, 1 },
[AV_PIX_FMT_BGR0] = { 1, 1 }, [AV_PIX_FMT_BGR0] = { 1, 1 },
[AV_PIX_FMT_GRAY12BE] = { 1, 1 },
[AV_PIX_FMT_GRAY12LE] = { 1, 1 },
[AV_PIX_FMT_GRAY16BE] = { 1, 1 }, [AV_PIX_FMT_GRAY16BE] = { 1, 1 },
[AV_PIX_FMT_GRAY16LE] = { 1, 1 }, [AV_PIX_FMT_GRAY16LE] = { 1, 1 },
[AV_PIX_FMT_YUV440P] = { 1, 1 }, [AV_PIX_FMT_YUV440P] = { 1, 1 },

View File

@ -0,0 +1 @@
pixdesc-gray12be 70e9407f889eff43c03fb7820be6b036

View File

@ -0,0 +1 @@
pixdesc-gray12le 9695430c20d61979c628f2a0b3a4adc7

View File

@ -33,6 +33,8 @@ gbrp14le 1607f5c8f13360b53b8186f523996b1b
gbrp9be a4dc6f6f9bb051de2dc348b592ad4282 gbrp9be a4dc6f6f9bb051de2dc348b592ad4282
gbrp9le 699da3a3b324f3fd001a56aee9683384 gbrp9le 699da3a3b324f3fd001a56aee9683384
gray 188590b1231afd231ea910815aef2b25 gray 188590b1231afd231ea910815aef2b25
gray12be 8375654261417e91589008bc7b7872d5
gray12le e4adfe848d5c55f8765619d4117d1b75
gray16be 08d997a3faa25a3db9d6be272d282eef gray16be 08d997a3faa25a3db9d6be272d282eef
gray16le df65eb804360795e3e38a2701fa9641a gray16le df65eb804360795e3e38a2701fa9641a
monob 8b04f859fee6a0be856be184acd7a0b5 monob 8b04f859fee6a0be856be184acd7a0b5

View File

@ -33,6 +33,8 @@ gbrp14le d4764dba3c3efd1263c2c8e0f5ac9f6a
gbrp9be 4af43999e5e9742992b6550ea5ad9b23 gbrp9be 4af43999e5e9742992b6550ea5ad9b23
gbrp9le b4cbfa7878706a14295f09212e41f7fe gbrp9le b4cbfa7878706a14295f09212e41f7fe
gray 0d70b54b4b888ec4dbd89713620ac1ee gray 0d70b54b4b888ec4dbd89713620ac1ee
gray12be dba5691dea1c70b7b595c908ee739319
gray12le 8000def742a6786371226cbd44bb5623
gray16be 38f599da990224de86e3dc7a543121a9 gray16be 38f599da990224de86e3dc7a543121a9
gray16le 9ff7c866bd98def4e6c91542c1c45f80 gray16le 9ff7c866bd98def4e6c91542c1c45f80
nv12 92cda427f794374731ec0321ee00caac nv12 92cda427f794374731ec0321ee00caac

View File

@ -33,6 +33,8 @@ gbrp14le ed9ccbc7a4f3e269a2ec37d210359fd8
gbrp9be 170da3a8644cbea61c3caeadc45354c5 gbrp9be 170da3a8644cbea61c3caeadc45354c5
gbrp9le da5d80e6f12cabaa7081bb85d3b7fd30 gbrp9le da5d80e6f12cabaa7081bb85d3b7fd30
gray 57fd8e6e00f6be8752726005974cce1b gray 57fd8e6e00f6be8752726005974cce1b
gray12be 0e21613faa5cbc694fd1890af7c94eba
gray12le 900bb0c8a2393304db57c0387cc06655
gray16be e1700e056de9917744a7ff4ab2ca63fd gray16be e1700e056de9917744a7ff4ab2ca63fd
gray16le 338de7ac5f7d36d5ad5ac2c8d5bbea68 gray16le 338de7ac5f7d36d5ad5ac2c8d5bbea68
monob 2129cc72a484d7e10a44de9117aa9f80 monob 2129cc72a484d7e10a44de9117aa9f80

View File

@ -33,6 +33,8 @@ gbrp14le b01b1a05d8de36f51a133d25102fe1f3
gbrp9be b8d294d4bc81ceef1fb529e917c02e48 gbrp9be b8d294d4bc81ceef1fb529e917c02e48
gbrp9le 0d42cc9e222d806c33172781b45cb3e3 gbrp9le 0d42cc9e222d806c33172781b45cb3e3
gray d96e0f1c73d3f0b9506d691b5cd36c73 gray d96e0f1c73d3f0b9506d691b5cd36c73
gray12be 735e47ae85f878954a07c817996d289a
gray12le 6a56b7f5b010a18a4abe12a5d80f6d30
gray16be 293a36548ce16543494790f8f7f76a05 gray16be 293a36548ce16543494790f8f7f76a05
gray16le 84f83f5fcbb5d458efb8395a50a3797e gray16le 84f83f5fcbb5d458efb8395a50a3797e
rgb0 2e3d8c91c7a83d451593dfd06607ff39 rgb0 2e3d8c91c7a83d451593dfd06607ff39

View File

@ -33,6 +33,8 @@ gbrp14le 91bb636f4e1f5d50312b136c185542e9
gbrp9be 174de037c2a9f2b6fb4d9444ae0ff82f gbrp9be 174de037c2a9f2b6fb4d9444ae0ff82f
gbrp9le ba7c2631fb2967aa909c66509bd243fe gbrp9le ba7c2631fb2967aa909c66509bd243fe
gray 8bd4ece1dbf89b20ee785e0515356e07 gray 8bd4ece1dbf89b20ee785e0515356e07
gray12be c2ef1cde6ea344aafe5704acd6647bd0
gray12le 0da963962f2c58e3cb0389e9747fc739
gray16be cf7294d9aa23e1b838692ec01ade587b gray16be cf7294d9aa23e1b838692ec01ade587b
gray16le d91ce41e304419bcf32ac792f01bd64f gray16le d91ce41e304419bcf32ac792f01bd64f
nv12 801e58f1be5fd0b5bc4bf007c604b0b4 nv12 801e58f1be5fd0b5bc4bf007c604b0b4

View File

@ -33,6 +33,8 @@ gbrp14le bf3d5dec9b58cecd4ca1c5d3a4d57c31
gbrp9be f029d87fa642f4261160471ad27fd53f gbrp9be f029d87fa642f4261160471ad27fd53f
gbrp9le b310d3cf37f7b41d706155993f8f0584 gbrp9le b310d3cf37f7b41d706155993f8f0584
gray 52ae18648161ac43144f5c9cd2127786 gray 52ae18648161ac43144f5c9cd2127786
gray12be 40aa2f5c03092d3fb62756b79764806f
gray12le 18cc77553b14f9591db48fa9a7384ade
gray16be 92c3b09f371b610cc1b6a9776034f4d0 gray16be 92c3b09f371b610cc1b6a9776034f4d0
gray16le 1db278d23a554e01910cedacc6c02521 gray16le 1db278d23a554e01910cedacc6c02521
monob faba75df28033ba7ce3d82ff2a99ee68 monob faba75df28033ba7ce3d82ff2a99ee68

View File

@ -33,6 +33,8 @@ gbrp14le 1607f5c8f13360b53b8186f523996b1b
gbrp9be a4dc6f6f9bb051de2dc348b592ad4282 gbrp9be a4dc6f6f9bb051de2dc348b592ad4282
gbrp9le 699da3a3b324f3fd001a56aee9683384 gbrp9le 699da3a3b324f3fd001a56aee9683384
gray 188590b1231afd231ea910815aef2b25 gray 188590b1231afd231ea910815aef2b25
gray12be 8375654261417e91589008bc7b7872d5
gray12le e4adfe848d5c55f8765619d4117d1b75
gray16be 08d997a3faa25a3db9d6be272d282eef gray16be 08d997a3faa25a3db9d6be272d282eef
gray16le df65eb804360795e3e38a2701fa9641a gray16le df65eb804360795e3e38a2701fa9641a
monob 8b04f859fee6a0be856be184acd7a0b5 monob 8b04f859fee6a0be856be184acd7a0b5

View File

@ -14,6 +14,7 @@ gbrp12le 91fdad0d1edf7bfa2805e2041e8da3cd
gbrp14le deb2c3af6b48faa52f6a1f6590a0cdf7 gbrp14le deb2c3af6b48faa52f6a1f6590a0cdf7
gbrp9le 9e827f438e081d334a6cae7e282698b0 gbrp9le 9e827f438e081d334a6cae7e282698b0
gray ddc663a0491df3959d9c5795dceaa72e gray ddc663a0491df3959d9c5795dceaa72e
gray12le c8a531d125f738530cef6a307e29413b
gray16le 468bda6155bdc7a7a20c34d6e599fd16 gray16le 468bda6155bdc7a7a20c34d6e599fd16
nv12 381574979cb04be10c9168540310afad nv12 381574979cb04be10c9168540310afad
nv21 0fdeb2cdd56cf5a7147dc273456fa217 nv21 0fdeb2cdd56cf5a7147dc273456fa217

View File

@ -33,6 +33,8 @@ gbrp14le 456f7d1ff5990aa6379137d84dd63862
gbrp9be d9c88968001e1452ff31fbc8d16b18a0 gbrp9be d9c88968001e1452ff31fbc8d16b18a0
gbrp9le 2ccfed0816bf6bd4bb3a5b7591d9603a gbrp9le 2ccfed0816bf6bd4bb3a5b7591d9603a
gray 221201cc7cfc4964eacd8b3e426fd276 gray 221201cc7cfc4964eacd8b3e426fd276
gray12be b2da9b7739444cfaf88af7e005beea03
gray12le 236e83ecc19a3bc74f8857e24482667c
gray16be 32891cb0928b1119d8d43a6e1bef0e2b gray16be 32891cb0928b1119d8d43a6e1bef0e2b
gray16le f96cfb5652b090dad52615930f0ce65f gray16le f96cfb5652b090dad52615930f0ce65f
monob f01cb0b623357387827902d9d0963435 monob f01cb0b623357387827902d9d0963435

View File

@ -33,6 +33,8 @@ gbrp14le 6e93b87047e433995111eb5397751c3f
gbrp9be 99c694dd47d12ae48fc8f47a0c410333 gbrp9be 99c694dd47d12ae48fc8f47a0c410333
gbrp9le 26e103a4ab99fb3f58667df490997a36 gbrp9le 26e103a4ab99fb3f58667df490997a36
gray 41811422d5819ed69389357294384c10 gray 41811422d5819ed69389357294384c10
gray12be 012299269000e424670e711f811c2d63
gray12le d62aeaaf4974b934fd2c783892e38b96
gray16be 29f24ba7cb0fc4fd2ae78963d008f6e6 gray16be 29f24ba7cb0fc4fd2ae78963d008f6e6
gray16le a37e9c4ea76e8eeddc2af8f600ba2c10 gray16le a37e9c4ea76e8eeddc2af8f600ba2c10
monob 7810c4857822ccfc844d78f5e803269a monob 7810c4857822ccfc844d78f5e803269a