1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
diff -Naur libquicktime-1.1.1.orig/plugins/ffmpeg/video.c libquicktime-1.1.1/plugins/ffmpeg/video.c
--- libquicktime-1.1.1.orig/plugins/ffmpeg/video.c 2008-12-01 17:45:29.000000000 -0200
+++ libquicktime-1.1.1/plugins/ffmpeg/video.c 2009-05-04 10:56:11.000000000 -0300
@@ -102,7 +102,11 @@
colormodels[] =
{
{ PIX_FMT_YUV420P, BC_YUV420P, 1 }, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
+#if LIBAVUTIL_VERSION_INT < (50<<16)
{ PIX_FMT_YUV422, BC_YUV422, 1 },
+#else
+ { PIX_FMT_YUYV422, BC_YUV422, 1 },
+#endif
{ PIX_FMT_RGB24, BC_RGB888, 1 }, ///< Packed pixel, 3 bytes per pixel, RGBRGB...
{ PIX_FMT_BGR24, BC_BGR888, 1 }, ///< Packed pixel, 3 bytes per pixel, BGRBGR...
{ PIX_FMT_YUV422P, BC_YUV422P, 1 }, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
@@ -112,7 +116,11 @@
{ PIX_FMT_YUVJ420P, BC_YUVJ420P, 1 }, ///< Planar YUV 4:2:0 full scale (jpeg)
{ PIX_FMT_YUVJ422P, BC_YUVJ422P, 1 }, ///< Planar YUV 4:2:2 full scale (jpeg)
{ PIX_FMT_YUVJ444P, BC_YUVJ444P, 1 }, ///< Planar YUV 4:4:4 full scale (jpeg)
+#if LIBAVUTIL_VERSION_INT < (50<<16)
{ PIX_FMT_RGBA32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
+#else
+ { PIX_FMT_RGB32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
+#endif
{ PIX_FMT_RGB555, BC_RGB888, 0 }, ///< always stored in cpu endianness, most significant bit to 1
{ PIX_FMT_GRAY8, BC_RGB888, 0 },
{ PIX_FMT_MONOWHITE, BC_RGB888, 0 },///< 0 is white
@@ -296,7 +304,11 @@
* Could someone please tell me, how people can make such a brain dead
* RGBA format like in ffmpeg??
*/
+#if LIBAVUTIL_VERSION_INT < (50<<16)
if((in_format == PIX_FMT_RGBA32) && (out_format == BC_RGBA8888))
+#else
+ if((in_format == PIX_FMT_RGB32) && (out_format == BC_RGBA8888))
+#endif
{
convert_image_decode_rgba(in_frame, out_frame, width, height);
return;
@@ -537,8 +549,13 @@
#ifdef HAVE_LIBSWSCALE
+#if LIBAVUTIL_VERSION_INT < (50<<16)
if(!((codec->avctx->pix_fmt == PIX_FMT_RGBA32) &&
(vtrack->stream_cmodel == BC_RGBA8888)))
+#else
+ if(!((codec->avctx->pix_fmt == PIX_FMT_RGB32) &&
+ (vtrack->stream_cmodel == BC_RGBA8888)))
+#endif
{
codec->swsContext =
sws_getContext(width, height,
|