Commit 5cad9709 authored by Paul B Mahol's avatar Paul B Mahol Committed by Ronald S. Bultje

swscale: RGB4444 and BGR444 input

Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent d41d7773
......@@ -1537,12 +1537,16 @@ rgb16_32_wrapper(PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0
rgb16_32_wrapper(PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8)
rgb16_32_wrapper(PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8)
rgb16_32_wrapper(PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7)
rgb16_32_wrapper(PIX_FMT_BGR444LE, bgr12le, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT+4)
rgb16_32_wrapper(PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8)
rgb16_32_wrapper(PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7)
rgb16_32_wrapper(PIX_FMT_RGB444LE, rgb12le, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT+4)
rgb16_32_wrapper(PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8)
rgb16_32_wrapper(PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7)
rgb16_32_wrapper(PIX_FMT_BGR444BE, bgr12be, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT+4)
rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8)
rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7)
rgb16_32_wrapper(PIX_FMT_RGB444BE, rgb12be, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT+4)
static void abgrToA_c(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
{
......@@ -2748,6 +2752,8 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
case PIX_FMT_BGR565BE: c->chrToYV12 = bgr16beToUV_half_c; break;
case PIX_FMT_BGR555LE: c->chrToYV12 = bgr15leToUV_half_c; break;
case PIX_FMT_BGR555BE: c->chrToYV12 = bgr15beToUV_half_c; break;
case PIX_FMT_BGR444LE: c->chrToYV12 = bgr12leToUV_half_c; break;
case PIX_FMT_BGR444BE: c->chrToYV12 = bgr12beToUV_half_c; break;
case PIX_FMT_BGR32 : c->chrToYV12 = rgb32ToUV_half_c; break;
case PIX_FMT_BGR32_1 : c->chrToYV12 = rgb321ToUV_half_c; break;
case PIX_FMT_RGB24 : c->chrToYV12 = rgb24ToUV_half_c; break;
......@@ -2755,6 +2761,8 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
case PIX_FMT_RGB565BE: c->chrToYV12 = rgb16beToUV_half_c; break;
case PIX_FMT_RGB555LE: c->chrToYV12 = rgb15leToUV_half_c; break;
case PIX_FMT_RGB555BE: c->chrToYV12 = rgb15beToUV_half_c; break;
case PIX_FMT_RGB444LE: c->chrToYV12 = rgb12leToUV_half_c; break;
case PIX_FMT_RGB444BE: c->chrToYV12 = rgb12beToUV_half_c; break;
}
} else {
switch(srcFormat) {
......@@ -2769,6 +2777,8 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
case PIX_FMT_BGR565BE: c->chrToYV12 = bgr16beToUV_c; break;
case PIX_FMT_BGR555LE: c->chrToYV12 = bgr15leToUV_c; break;
case PIX_FMT_BGR555BE: c->chrToYV12 = bgr15beToUV_c; break;
case PIX_FMT_BGR444LE: c->chrToYV12 = bgr12leToUV_c; break;
case PIX_FMT_BGR444BE: c->chrToYV12 = bgr12beToUV_c; break;
case PIX_FMT_BGR32 : c->chrToYV12 = rgb32ToUV_c; break;
case PIX_FMT_BGR32_1 : c->chrToYV12 = rgb321ToUV_c; break;
case PIX_FMT_RGB24 : c->chrToYV12 = rgb24ToUV_c; break;
......@@ -2776,6 +2786,8 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
case PIX_FMT_RGB565BE: c->chrToYV12 = rgb16beToUV_c; break;
case PIX_FMT_RGB555LE: c->chrToYV12 = rgb15leToUV_c; break;
case PIX_FMT_RGB555BE: c->chrToYV12 = rgb15beToUV_c; break;
case PIX_FMT_RGB444LE: c->chrToYV12 = rgb12leToUV_c; break;
case PIX_FMT_RGB444BE: c->chrToYV12 = rgb12beToUV_c; break;
}
}
......@@ -2820,11 +2832,15 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
case PIX_FMT_BGR565BE : c->lumToYV12 = bgr16beToY_c; break;
case PIX_FMT_BGR555LE : c->lumToYV12 = bgr15leToY_c; break;
case PIX_FMT_BGR555BE : c->lumToYV12 = bgr15beToY_c; break;
case PIX_FMT_BGR444LE : c->lumToYV12 = bgr12leToY_c; break;
case PIX_FMT_BGR444BE : c->lumToYV12 = bgr12beToY_c; break;
case PIX_FMT_RGB24 : c->lumToYV12 = rgb24ToY_c; break;
case PIX_FMT_RGB565LE : c->lumToYV12 = rgb16leToY_c; break;
case PIX_FMT_RGB565BE : c->lumToYV12 = rgb16beToY_c; break;
case PIX_FMT_RGB555LE : c->lumToYV12 = rgb15leToY_c; break;
case PIX_FMT_RGB555BE : c->lumToYV12 = rgb15beToY_c; break;
case PIX_FMT_RGB444LE : c->lumToYV12 = rgb12leToY_c; break;
case PIX_FMT_RGB444BE : c->lumToYV12 = rgb12beToY_c; break;
case PIX_FMT_RGB8 :
case PIX_FMT_BGR8 :
case PIX_FMT_PAL8 :
......
......@@ -120,10 +120,10 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
[PIX_FMT_YUV422P16BE] = { 1 , 1 },
[PIX_FMT_YUV444P16LE] = { 1 , 1 },
[PIX_FMT_YUV444P16BE] = { 1 , 1 },
[PIX_FMT_RGB444LE] = { 0 , 1 },
[PIX_FMT_RGB444BE] = { 0 , 1 },
[PIX_FMT_BGR444LE] = { 0 , 1 },
[PIX_FMT_BGR444BE] = { 0 , 1 },
[PIX_FMT_RGB444LE] = { 1 , 1 },
[PIX_FMT_RGB444BE] = { 1 , 1 },
[PIX_FMT_BGR444LE] = { 1 , 1 },
[PIX_FMT_BGR444BE] = { 1 , 1 },
[PIX_FMT_Y400A] = { 1 , 0 },
[PIX_FMT_BGR48BE] = { 1 , 1 },
[PIX_FMT_BGR48LE] = { 1 , 1 },
......
abgr 037bf9df6a765520ad6d490066bf4b89
argb c442a8261c2265a07212ef0f72e35f5a
bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
bgr444be d9ea9307d21b162225b8b2c524cf9477
bgr444le 88035350e9da3a8f67387890b956f0bc
bgr48be 00624e6c7ec7ab19897ba2f0a3257fe8
bgr48le d02c235ebba7167881ca2d576497ff84
bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
......@@ -18,6 +20,8 @@ monow 9251497f3b0634f1165d12d5a289d943
nv12 e0af357888584d36eec5aa0f673793ef
nv21 9a3297f3b34baa038b1f37cb202b512f
rgb24 b41eba9651e1b5fe386289b506188105
rgb444be 9e89db334568c6b2e3d5d0540f4ba960
rgb444le 0a68cb6de8bf530aa30c5c1205c25155
rgb48be cc139ec1dd9451f0e049c0cb3a0c8aa2
rgb48le 86c5608904f75360d492dbc5c9589969
rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
......
abgr 037bf9df6a765520ad6d490066bf4b89
argb c442a8261c2265a07212ef0f72e35f5a
bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
bgr444be d9ea9307d21b162225b8b2c524cf9477
bgr444le 88035350e9da3a8f67387890b956f0bc
bgr48be 00624e6c7ec7ab19897ba2f0a3257fe8
bgr48le d02c235ebba7167881ca2d576497ff84
bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
......@@ -18,6 +20,8 @@ monow 9251497f3b0634f1165d12d5a289d943
nv12 e0af357888584d36eec5aa0f673793ef
nv21 9a3297f3b34baa038b1f37cb202b512f
rgb24 b41eba9651e1b5fe386289b506188105
rgb444be 9e89db334568c6b2e3d5d0540f4ba960
rgb444le 0a68cb6de8bf530aa30c5c1205c25155
rgb48be cc139ec1dd9451f0e049c0cb3a0c8aa2
rgb48le 86c5608904f75360d492dbc5c9589969
rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
......
abgr 037bf9df6a765520ad6d490066bf4b89
argb c442a8261c2265a07212ef0f72e35f5a
bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
bgr444be d9ea9307d21b162225b8b2c524cf9477
bgr444le 88035350e9da3a8f67387890b956f0bc
bgr48be 00624e6c7ec7ab19897ba2f0a3257fe8
bgr48le d02c235ebba7167881ca2d576497ff84
bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
......@@ -18,6 +20,8 @@ monow 9251497f3b0634f1165d12d5a289d943
nv12 e0af357888584d36eec5aa0f673793ef
nv21 9a3297f3b34baa038b1f37cb202b512f
rgb24 b41eba9651e1b5fe386289b506188105
rgb444be 9e89db334568c6b2e3d5d0540f4ba960
rgb444le 0a68cb6de8bf530aa30c5c1205c25155
rgb48be cc139ec1dd9451f0e049c0cb3a0c8aa2
rgb48le 86c5608904f75360d492dbc5c9589969
rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
......
abgr d894cb97f6c80eb21bdbe8a4eea62d86
argb 54346f2b2eef10919e0f247241df3b24
bgr24 570f8d6b51a838aed022ef67535f6bdc
bgr444be 25fe04f73a3bad4140d1c4f96ca5b670
bgr444le 2fde227e6cea6dca5decdd0b7c0866f7
bgr48be 390d3058a12a99c2b153ed7922508bea
bgr48le 39fe06feb4ec1d9730dccc04a0cfac4c
bgr4_byte ee1d35a7baf8e9016891929a2f565c0b
......@@ -18,6 +20,8 @@ monow d31772ebaa877fc2a78565937f7f9673
nv12 4676d59db43d657dc12841f6bc3ab452
nv21 69c699510ff1fb777b118ebee1002f14
rgb24 514692e28e8ff6860e415ce4fcf6eb8c
rgb444be 12254053ae93373869fca18b2afcba31
rgb444le badbd68b59c87df6ae73248309637634
rgb48be 8fac63787a711886030f8e056872b488
rgb48le ab92f2763a2eb264c3870cc758f97149
rgb4_byte d81ffd3add95842a618eec81024f0b5c
......
abgr 25e72e9dbd01ab00727c976d577f7be5
argb 19869bf1a5ac0b6af4d8bbe2c104533c
bgr24 89108a4ba00201f79b75b9305c42352d
bgr444be 9ef12c42fb791948ca4423c452dc6b9a
bgr444le 3650ecfc163abd1596c0cd29d130c4b0
bgr48be 2f23931844f57641f3737348182d118c
bgr48le 4242a026012b6c135a6aa138a6d67031
bgr4_byte 407fcf564ed764c38e1d748f700ab921
......@@ -18,6 +20,8 @@ monow ff9869d067ecb94eb9d90c9750c31fea
nv12 046f00f598ce14d9854a3534a5c99114
nv21 01ea369dd2d0d3ed7451dc5c8d61497f
rgb24 eaefabc168d0b14576bab45bc1e56e1e
rgb444be 06722e03f8404e7d2226665ed2444a32
rgb444le 185c9a5d9c2877484310d4196ef4cd6f
rgb48be 62dd185862ed142283bd300eb6dbd216
rgb48le dcb76353268bc5862194d131762220da
rgb4_byte 8c6ff02df0b06dd2d574836c3741b2a2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment