[FFmpeg-cvslog] swscale: alpha less rgb32 support.

Michael Niedermayer git at videolan.org
Mon Nov 28 04:30:01 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 28 02:50:21 2011 +0100| [b89ce2d6af851f79c6a0d17f712ead54f523c891] | committer: Michael Niedermayer

swscale: alpha less rgb32 support.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b89ce2d6af851f79c6a0d17f712ead54f523c891
---

 libswscale/utils.c            |    8 ++++++++
 tests/ref/lavfi/pixdesc       |    4 ++++
 tests/ref/lavfi/pixfmts_copy  |    4 ++++
 tests/ref/lavfi/pixfmts_null  |    4 ++++
 tests/ref/lavfi/pixfmts_scale |    4 ++++
 tests/ref/lavfi/pixfmts_vflip |    4 ++++
 6 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 347b990..e27144e 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -100,6 +100,10 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
     [PIX_FMT_RGBA]        = { 1 , 1 },
     [PIX_FMT_ABGR]        = { 1 , 1 },
     [PIX_FMT_BGRA]        = { 1 , 1 },
+    [PIX_FMT_0RGB]        = { 1 , 1 },
+    [PIX_FMT_RGB0]        = { 1 , 1 },
+    [PIX_FMT_0BGR]        = { 1 , 1 },
+    [PIX_FMT_BGR0]        = { 1 , 1 },
     [PIX_FMT_GRAY16BE]    = { 1 , 1 },
     [PIX_FMT_GRAY16LE]    = { 1 , 1 },
     [PIX_FMT_YUV440P]     = { 1 , 1 },
@@ -742,6 +746,10 @@ static int handle_jpeg(enum PixelFormat *format)
     case PIX_FMT_YUVJ422P: *format = PIX_FMT_YUV422P; return 1;
     case PIX_FMT_YUVJ444P: *format = PIX_FMT_YUV444P; return 1;
     case PIX_FMT_YUVJ440P: *format = PIX_FMT_YUV440P; return 1;
+    case PIX_FMT_0BGR    : *format = PIX_FMT_ABGR   ; return 0;
+    case PIX_FMT_BGR0    : *format = PIX_FMT_BGRA   ; return 0;
+    case PIX_FMT_0RGB    : *format = PIX_FMT_ARGB   ; return 0;
+    case PIX_FMT_RGB0    : *format = PIX_FMT_RGBA   ; return 0;
     default:                                          return 0;
     }
 }
diff --git a/tests/ref/lavfi/pixdesc b/tests/ref/lavfi/pixdesc
index 59f8b94..63e2980 100644
--- a/tests/ref/lavfi/pixdesc
+++ b/tests/ref/lavfi/pixdesc
@@ -1,5 +1,8 @@
+0bgr                8fb023c3c8f8e64254e807543b29ad61
+0rgb                0570cd4801a1c613a9815e98872246d4
 abgr                037bf9df6a765520ad6d490066bf4b89
 argb                c442a8261c2265a07212ef0f72e35f5a
+bgr0                0ef8ffe42bfe53be74973a0c118b775e
 bgr24               0d0cb38ab3fa0b2ec0865c14f78b217b
 bgr48be             00624e6c7ec7ab19897ba2f0a3257fe8
 bgr48le             d02c235ebba7167881ca2d576497ff84
@@ -17,6 +20,7 @@ monob               668ebe8b8103b9046b251b2fa8a1d88f
 monow               9251497f3b0634f1165d12d5a289d943
 nv12                e0af357888584d36eec5aa0f673793ef
 nv21                9a3297f3b34baa038b1f37cb202b512f
+rgb0                7c03f81f5e5346bf8ea42c4187f20605
 rgb24               b41eba9651e1b5fe386289b506188105
 rgb48be             cc139ec1dd9451f0e049c0cb3a0c8aa2
 rgb48le             86c5608904f75360d492dbc5c9589969
diff --git a/tests/ref/lavfi/pixfmts_copy b/tests/ref/lavfi/pixfmts_copy
index 59f8b94..5abb346 100644
--- a/tests/ref/lavfi/pixfmts_copy
+++ b/tests/ref/lavfi/pixfmts_copy
@@ -1,5 +1,8 @@
+0bgr                73847fb78ab01d040bc65307aa2e772d
+0rgb                68262dbda747e9552cf04a06632a7cee
 abgr                037bf9df6a765520ad6d490066bf4b89
 argb                c442a8261c2265a07212ef0f72e35f5a
+bgr0                328a76e72c55508cdf04dc93a5b056fc
 bgr24               0d0cb38ab3fa0b2ec0865c14f78b217b
 bgr48be             00624e6c7ec7ab19897ba2f0a3257fe8
 bgr48le             d02c235ebba7167881ca2d576497ff84
@@ -17,6 +20,7 @@ monob               668ebe8b8103b9046b251b2fa8a1d88f
 monow               9251497f3b0634f1165d12d5a289d943
 nv12                e0af357888584d36eec5aa0f673793ef
 nv21                9a3297f3b34baa038b1f37cb202b512f
+rgb0                ff1a9f355d43f9d25f07a191b5aa906c
 rgb24               b41eba9651e1b5fe386289b506188105
 rgb48be             cc139ec1dd9451f0e049c0cb3a0c8aa2
 rgb48le             86c5608904f75360d492dbc5c9589969
diff --git a/tests/ref/lavfi/pixfmts_null b/tests/ref/lavfi/pixfmts_null
index 59f8b94..5abb346 100644
--- a/tests/ref/lavfi/pixfmts_null
+++ b/tests/ref/lavfi/pixfmts_null
@@ -1,5 +1,8 @@
+0bgr                73847fb78ab01d040bc65307aa2e772d
+0rgb                68262dbda747e9552cf04a06632a7cee
 abgr                037bf9df6a765520ad6d490066bf4b89
 argb                c442a8261c2265a07212ef0f72e35f5a
+bgr0                328a76e72c55508cdf04dc93a5b056fc
 bgr24               0d0cb38ab3fa0b2ec0865c14f78b217b
 bgr48be             00624e6c7ec7ab19897ba2f0a3257fe8
 bgr48le             d02c235ebba7167881ca2d576497ff84
@@ -17,6 +20,7 @@ monob               668ebe8b8103b9046b251b2fa8a1d88f
 monow               9251497f3b0634f1165d12d5a289d943
 nv12                e0af357888584d36eec5aa0f673793ef
 nv21                9a3297f3b34baa038b1f37cb202b512f
+rgb0                ff1a9f355d43f9d25f07a191b5aa906c
 rgb24               b41eba9651e1b5fe386289b506188105
 rgb48be             cc139ec1dd9451f0e049c0cb3a0c8aa2
 rgb48le             86c5608904f75360d492dbc5c9589969
diff --git a/tests/ref/lavfi/pixfmts_scale b/tests/ref/lavfi/pixfmts_scale
index f843a3e..9239198 100644
--- a/tests/ref/lavfi/pixfmts_scale
+++ b/tests/ref/lavfi/pixfmts_scale
@@ -1,5 +1,8 @@
+0bgr                1c9ce2c650cc9afc669e3a9a15842c9d
+0rgb                87749d52eb3056848cccea5875622a86
 abgr                cff82561a074874027ac1cc896fd2730
 argb                756dd1eaa5baca2238ce23dbdc452684
+bgr0                ff6e1dfa26d4c2ada3a59e8b0b600d1f
 bgr24               e44192347a45586c6c157e3059610cd1
 bgr48be             390d3058a12a99c2b153ed7922508bea
 bgr48le             39fe06feb4ec1d9730dccc04a0cfac4c
@@ -17,6 +20,7 @@ monob               cb62f31b701c6e987b574974d1b31e32
 monow               fd5d417ab7728acddffc06870661df61
 nv12                4676d59db43d657dc12841f6bc3ab452
 nv21                69c699510ff1fb777b118ebee1002f14
+rgb0                1bd6f54ad067503ac9783a70062c8f87
 rgb24               13ff53ebeab74dc05492836f1cfbd2c1
 rgb48be             8fac63787a711886030f8e056872b488
 rgb48le             ab92f2763a2eb264c3870cc758f97149
diff --git a/tests/ref/lavfi/pixfmts_vflip b/tests/ref/lavfi/pixfmts_vflip
index cdaa4b5..193e153 100644
--- a/tests/ref/lavfi/pixfmts_vflip
+++ b/tests/ref/lavfi/pixfmts_vflip
@@ -1,5 +1,8 @@
+0bgr                39270c968598bac0ef53faaa5f9ab7cd
+0rgb                099dc071d7385b2958e36604c2fbf4ef
 abgr                25e72e9dbd01ab00727c976d577f7be5
 argb                19869bf1a5ac0b6af4d8bbe2c104533c
+bgr0                e03d3ee0b977f6d86e5116b20494bef5
 bgr24               89108a4ba00201f79b75b9305c42352d
 bgr48be             2f23931844f57641f3737348182d118c
 bgr48le             4242a026012b6c135a6aa138a6d67031
@@ -17,6 +20,7 @@ monob               d0cf8732677a5360b6160133043590d8
 monow               ff9869d067ecb94eb9d90c9750c31fea
 nv12                046f00f598ce14d9854a3534a5c99114
 nv21                01ea369dd2d0d3ed7451dc5c8d61497f
+rgb0                330bd6168e46c0d5eb4acbdbb50afa2e
 rgb24               eaefabc168d0b14576bab45bc1e56e1e
 rgb48be             62dd185862ed142283bd300eb6dbd216
 rgb48le             dcb76353268bc5862194d131762220da



More information about the ffmpeg-cvslog mailing list