Commit dff5a835 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Ronald Bultje
Browse files

swscale: re-add support for non-native endianness.

This works through some non-obvious hacks in utils.c.
parent 3d3c8149
......@@ -2133,20 +2133,26 @@ find_c_packed_planar_out_funcs(SwsContext *c,
*yuv2packed2 = yuv2bgr24_2_c;
*yuv2packedX = yuv2bgr24_X_c;
break;
case PIX_FMT_RGB565:
case PIX_FMT_BGR565:
case PIX_FMT_RGB565LE:
case PIX_FMT_RGB565BE:
case PIX_FMT_BGR565LE:
case PIX_FMT_BGR565BE:
*yuv2packed1 = yuv2rgb16_1_c;
*yuv2packed2 = yuv2rgb16_2_c;
*yuv2packedX = yuv2rgb16_X_c;
break;
case PIX_FMT_RGB555:
case PIX_FMT_BGR555:
case PIX_FMT_RGB555LE:
case PIX_FMT_RGB555BE:
case PIX_FMT_BGR555LE:
case PIX_FMT_BGR555BE:
*yuv2packed1 = yuv2rgb15_1_c;
*yuv2packed2 = yuv2rgb15_2_c;
*yuv2packedX = yuv2rgb15_X_c;
break;
case PIX_FMT_RGB444:
case PIX_FMT_BGR444:
case PIX_FMT_RGB444LE:
case PIX_FMT_RGB444BE:
case PIX_FMT_BGR444LE:
case PIX_FMT_BGR444BE:
*yuv2packed1 = yuv2rgb12_1_c;
*yuv2packed2 = yuv2rgb12_2_c;
*yuv2packedX = yuv2rgb12_X_c;
......
......@@ -146,12 +146,18 @@ int sws_isSupportedInput(enum PixelFormat pix_fmt)
|| (x)==PIX_FMT_YUVJ444P \
|| isRGBinBytes(x) \
|| isBGRinBytes(x) \
|| (x)==PIX_FMT_RGB565 \
|| (x)==PIX_FMT_RGB555 \
|| (x)==PIX_FMT_RGB444 \
|| (x)==PIX_FMT_BGR565 \
|| (x)==PIX_FMT_BGR555 \
|| (x)==PIX_FMT_BGR444 \
|| (x)==PIX_FMT_RGB565LE \
|| (x)==PIX_FMT_RGB565BE \
|| (x)==PIX_FMT_RGB555LE \
|| (x)==PIX_FMT_RGB555BE \
|| (x)==PIX_FMT_RGB444LE \
|| (x)==PIX_FMT_RGB444BE \
|| (x)==PIX_FMT_BGR565LE \
|| (x)==PIX_FMT_BGR565BE \
|| (x)==PIX_FMT_BGR555LE \
|| (x)==PIX_FMT_BGR555BE \
|| (x)==PIX_FMT_BGR444LE \
|| (x)==PIX_FMT_BGR444BE \
|| (x)==PIX_FMT_RGB8 \
|| (x)==PIX_FMT_BGR8 \
|| (x)==PIX_FMT_RGB4_BYTE \
......
......@@ -4,7 +4,9 @@ bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f
bgr48le d022bfdd6a07d5dcc693799322a386b4
bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280
bgr555le 378d6ac4223651a1adcbf94a3d0d807b
bgr565be 257cf78afa35dc31e9696f139c916715
bgr565le 1dfdd03995c287e3c754b164bf26a355
bgr8 24bd566170343d06fec6fccfff5abc54
bgra 76a18a5151242fa137133f604cd624d2
......@@ -19,7 +21,9 @@ rgb24 b41eba9651e1b5fe386289b506188105
rgb48be 460b6de89b156290a12d3941db8bd731
rgb48le cd93cb34d15996987367dabda3a10128
rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
rgb555be 912a62c5e53bfcbac2a0340e10973cf2
rgb555le a937a0fc764fb57dc1b3af87cba0273c
rgb565be 9cadf742e05ddc23a3b5b270f89aad3c
rgb565le d39aa298bb525e9be8860351c6f62dab
rgb8 4a9d8e4f2f154e83a7e1735be6300700
rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12
......
......@@ -4,7 +4,9 @@ bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f
bgr48le d022bfdd6a07d5dcc693799322a386b4
bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280
bgr555le 378d6ac4223651a1adcbf94a3d0d807b
bgr565be 257cf78afa35dc31e9696f139c916715
bgr565le 1dfdd03995c287e3c754b164bf26a355
bgr8 24bd566170343d06fec6fccfff5abc54
bgra 76a18a5151242fa137133f604cd624d2
......@@ -19,7 +21,9 @@ rgb24 b41eba9651e1b5fe386289b506188105
rgb48be 460b6de89b156290a12d3941db8bd731
rgb48le cd93cb34d15996987367dabda3a10128
rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
rgb555be 912a62c5e53bfcbac2a0340e10973cf2
rgb555le a937a0fc764fb57dc1b3af87cba0273c
rgb565be 9cadf742e05ddc23a3b5b270f89aad3c
rgb565le d39aa298bb525e9be8860351c6f62dab
rgb8 4a9d8e4f2f154e83a7e1735be6300700
rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12
......
......@@ -4,7 +4,9 @@ bgr24 3450fd00cf1493d1ded75544d82ba3ec
bgr48be 90cb5d373a1123432d63c6a10c101afa
bgr48le 9371f54ceda9010f1199e86f4930ac3f
bgr4_byte 2f6ac3cdd4676ab4e2982bdf0664945b
bgr555be d3a7c273604723adeb7e5f5dd1c4272b
bgr555le d22442fc13b464f9ba455b08df4e981f
bgr565be fadceef4a64ad6873fcb43ddee0deb3c
bgr565le 891664e5a54ae5968901347da92bc5e9
bgr8 4b7159e05765bd4703180072d86423c8
bgra 395c9f706fccda721471acaa5c96c16c
......@@ -15,7 +17,9 @@ rgb24 3b90ed64b687d3dc186c6ef521dc71a8
rgb48be a808128041a1962deaa8620c7448feba
rgb48le ce92d02cc322608d5be377cb1940677b
rgb4_byte 6958029f73c6cdfed4f71020d816f027
rgb555be 41a7d1836837bc90f2cae19a9c9df3b3
rgb555le eeb78f8ce6186fba55c941469e60ba67
rgb565be b2d1cb525f3a0cfe27753c0d479b2fa9
rgb565le 6a49700680be9a0d434411825a769556
rgb8 88b0398c265d1ed7a837dc084fa0917c
rgba fd00b24c7597268c32759a84a1de2de4
......
......@@ -4,7 +4,9 @@ bgr24 cc53d2011d097972db0d22756c3699e3
bgr48be 11641cf0f4516a9aed98f7872720f801
bgr48le b5440734eed128554dd9f83b34ba582f
bgr4_byte aac987e7d1a6a96477cfc0b48a4285de
bgr555be bc07265898440116772200390d70c092
bgr555le ccee08679bac84a1f960c6c9070c5538
bgr565be e088789ce46224b87c6e46610ef19add
bgr565le 3703466e19e1b52e03a34fd244a8e8e4
bgr8 50b505a889f0428242305acb642da107
bgra 01ca21e7e6a8d1281b4553bde8e8a404
......@@ -15,7 +17,9 @@ rgb24 754f1722fc738590cc407ac65749bfe8
rgb48be 10743e1577dc3198dbbc7c0b3b8f429e
rgb48le dd945a44f39119221407bf7a04f1bc49
rgb4_byte c8a3f995fcf3e0919239ea2c413ddc29
rgb555be 045ce8607d3910586f4d97481dda8632
rgb555le 8778ee0cf58ce9ad1d99a1eca9f95e87
rgb565be c8022a1b2470e72f124e4389fad4c372
rgb565le 2cb690eb3fcb72da3771ad6a48931158
rgb8 9e462b811b9b6173397b9cfc1f6b2f17
rgba d3d0dc1ecef3ed72f26a2986d0efc204
......
......@@ -4,7 +4,9 @@ bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f
bgr48le d022bfdd6a07d5dcc693799322a386b4
bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280
bgr555le 378d6ac4223651a1adcbf94a3d0d807b
bgr565be 257cf78afa35dc31e9696f139c916715
bgr565le 1dfdd03995c287e3c754b164bf26a355
bgr8 24bd566170343d06fec6fccfff5abc54
bgra 76a18a5151242fa137133f604cd624d2
......@@ -19,7 +21,9 @@ rgb24 b41eba9651e1b5fe386289b506188105
rgb48be 460b6de89b156290a12d3941db8bd731
rgb48le cd93cb34d15996987367dabda3a10128
rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
rgb555be 912a62c5e53bfcbac2a0340e10973cf2
rgb555le a937a0fc764fb57dc1b3af87cba0273c
rgb565be 9cadf742e05ddc23a3b5b270f89aad3c
rgb565le d39aa298bb525e9be8860351c6f62dab
rgb8 4a9d8e4f2f154e83a7e1735be6300700
rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12
......
......@@ -4,7 +4,9 @@ bgr24 570f8d6b51a838aed022ef67535f6bdc
bgr48be fcc0f2dbf45d325f84f816c74cbeeebe
bgr48le 3f9c2b23eed3b8d196d1c14b38ce50f5
bgr4_byte ee1d35a7baf8e9016891929a2f565c0b
bgr555be de8901c1358834fddea060fcb3a67beb
bgr555le 36b745067197f9ca8c1731cac51329c9
bgr565be 922a2503767036ae9536f4f7823c04ee
bgr565le 3a514a298c6161a071ddf9963c06509d
bgr8 7f007fa6c153a16e808a9c51605a4016
bgra a5e7040f9a80cccd65e5acf2ca09ace5
......@@ -19,7 +21,9 @@ rgb24 514692e28e8ff6860e415ce4fcf6eb8c
rgb48be 1894cd30dabcd3180518e4d5f09f25e7
rgb48le 1354e6e27ce3c1d4d4989ee56030c94b
rgb4_byte d81ffd3add95842a618eec81024f0b5c
rgb555be 4607309f9f217d51cbb53d13b84b4537
rgb555le a350ef1dc2c9688ed49e7ba018843795
rgb565be 678ce231c4ea13629c1353b1df4ffbef
rgb565le 6f4bb711238baa762d73305213f8d035
rgb8 091d0170b354ef0e97312b95feb5483f
rgba a3d362f222098a00e63867f612018659
......
......@@ -4,7 +4,9 @@ bgr24 89108a4ba00201f79b75b9305c42352d
bgr48be ed82382da09b64a8e04728fcf76e6814
bgr48le 0f1f135608c2ff24d26d03e939fc2112
bgr4_byte 407fcf564ed764c38e1d748f700ab921
bgr555be f739d2519f7e9d494359bf67a3821537
bgr555le bd7b3ec4d684dfad075d89a606cb8b74
bgr565be f19e9a4786395e1ddcd51399c98c9f6c
bgr565le fdb617533e1e7ff512ea5b6b6233e738
bgr8 c60f93fd152c6903391d1fe9decd3547
bgra 7f9b799fb48544e49ce93e91d7f9fca8
......@@ -19,7 +21,9 @@ rgb24 eaefabc168d0b14576bab45bc1e56e1e
rgb48be 4e0c384163ebab06a08e74637beb02bc
rgb48le a77bfeefcd96750cf0e1917a2e2bf1e7
rgb4_byte 8c6ff02df0b06dd2d574836c3741b2a2
rgb555be 40dc33cfb5cf56aac1c5a290ac486c36
rgb555le 4f8eaad29a17e0f8e9d8ab743e76b999
rgb565be b57623ad9df74648339311a0edcebc7b
rgb565le 73f247a3315dceaea3022ac7c197c5ef
rgb8 13a8d89ef78d8127297d899005456ff0
rgba 1fc6e920a42ec812aaa3b2aa02f37987
......
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