annotate libmpcodecs/vd_vfw.c @ 28671:4790f4ca73e5

Update some statements: 1) Suggest larger read ahead buffer. 2) Note how sdparm may be used to adjust scsi device speed.
author bircoph
date Mon, 23 Feb 2009 05:23:12 +0000
parents 9e739bdb049c
children 0f1b5b68af32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
1 #include <stdio.h>
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
2 #include <stdlib.h>
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
3
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
4 #include "config.h"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
5 #include "mp_msg.h"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
6 #include "help_mp.h"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
7
7471
5e56ce70b551 wine headers cleanup
arpi
parents: 7390
diff changeset
8 #include "vd_internal.h"
5e56ce70b551 wine headers cleanup
arpi
parents: 7390
diff changeset
9
22577
a033e5519802 Include loader/ prefix in #include path everywhere.
diego
parents: 18771
diff changeset
10 #include "loader/wine/driver.h"
a033e5519802 Include loader/ prefix in #include path everywhere.
diego
parents: 18771
diff changeset
11 #include "loader/wine/vfw.h"
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
12
7176
42222161de9b 2*10l to me
arpi
parents: 7175
diff changeset
13 static vd_info_t info = {
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
14 #ifdef BUILD_VFWEX
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
15 "Win32/VfWex video codecs",
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
16 "vfwex",
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
17 #else
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
18 "Win32/VfW video codecs",
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
19 "vfw",
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
20 #endif
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
21 "A'rpi & Alex",
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
22 "avifile.sf.net",
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
23 "win32 codecs"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
24 };
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
25
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
26 #ifdef BUILD_VFWEX
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
27 LIBVD_EXTERN(vfwex)
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
28 #else
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
29 LIBVD_EXTERN(vfw)
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
30 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
31
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
32 typedef struct {
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
33 BITMAPINFOHEADER *o_bih;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
34 HIC handle;
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
35 unsigned char *palette;
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
36 } vd_vfw_ctx;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
37
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
38 static int vfw_set_postproc(sh_video_t* sh, int quality)
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
39 {
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
40 vd_vfw_ctx *priv = sh->context;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
41 // Works only with opendivx/divx4 based DLL
7273
6cca0ab10e19 NULL->0 (warning fix)
arpi
parents: 7262
diff changeset
42 return ICSendMessage(priv->handle, ICM_USER+80, (long)(&quality), 0);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
43 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
44
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
45 static void set_csp(BITMAPINFOHEADER *o_bih,unsigned int outfmt){
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
46 int yuv = 0;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
47
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
48 switch (outfmt)
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
49 {
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
50 /* planar format */
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
51 case IMGFMT_YV12:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
52 case IMGFMT_I420:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
53 case IMGFMT_IYUV:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
54 o_bih->biBitCount=12;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
55 yuv=1;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
56 break;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
57 case IMGFMT_YVU9:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
58 case IMGFMT_IF09:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
59 o_bih->biBitCount=9;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
60 yuv=1;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
61 break;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
62 /* packed format */
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
63 case IMGFMT_YUY2:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
64 case IMGFMT_UYVY:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
65 case IMGFMT_YVYU:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
66 o_bih->biBitCount=16;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
67 yuv=1;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
68 break;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
69 /* rgb/bgr format */
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
70 case IMGFMT_RGB8:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
71 case IMGFMT_BGR8:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
72 o_bih->biBitCount=8;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
73 break;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
74 case IMGFMT_RGB15:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
75 case IMGFMT_RGB16:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
76 case IMGFMT_BGR15:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
77 case IMGFMT_BGR16:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
78 o_bih->biBitCount=16;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
79 break;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
80 case IMGFMT_RGB24:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
81 case IMGFMT_BGR24:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
82 o_bih->biBitCount=24;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
83 break;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
84 case IMGFMT_RGB32:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
85 case IMGFMT_BGR32:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
86 o_bih->biBitCount=32;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
87 break;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
88 default:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
89 mp_msg(MSGT_WIN32,MSGL_ERR,"Unsupported image format: %s\n", vo_format_name(outfmt));
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
90 return;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
91 }
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
92
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
93 o_bih->biSizeImage = abs(o_bih->biWidth * o_bih->biHeight * (o_bih->biBitCount/8));
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
94
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
95 // Note: we cannot rely on sh->outfmtidx here, it's undefined at this stage!!!
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
96 // if (yuv && !(sh->codec->outflags[sh->outfmtidx] & CODECS_FLAG_YUVHACK))
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
97 if (yuv)
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
98 o_bih->biCompression = outfmt;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
99 else
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
100 o_bih->biCompression = 0;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
101 }
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
102
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
103 // to set/get/query special features/parameters
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
104 static int control(sh_video_t *sh,int cmd,void* arg,...){
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
105 vd_vfw_ctx *priv = sh->context;
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
106 switch(cmd){
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
107 case VDCTRL_QUERY_MAX_PP_LEVEL:
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
108 return 9;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
109 case VDCTRL_SET_PP_LEVEL:
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
110 vfw_set_postproc(sh,10*(*((int*)arg)));
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
111 return CONTROL_OK;
7262
5fc42290c305 enabled csp-query support, but only for formats with 'query' flag set
arpi
parents: 7260
diff changeset
112 #if 1
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
113 // FIXME: make this optional...
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
114 case VDCTRL_QUERY_FORMAT:
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
115 {
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
116 HRESULT ret;
7262
5fc42290c305 enabled csp-query support, but only for formats with 'query' flag set
arpi
parents: 7260
diff changeset
117 if(!(sh->codec->outflags[sh->outfmtidx]&CODECS_FLAG_QUERY))
5fc42290c305 enabled csp-query support, but only for formats with 'query' flag set
arpi
parents: 7260
diff changeset
118 return CONTROL_UNKNOWN; // do not query!
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
119 set_csp(priv->o_bih,*((int*)arg));
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
120 #ifdef BUILD_VFWEX
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
121 ret = ICDecompressQueryEx(priv->handle, sh->bih, priv->o_bih);
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
122 #else
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
123 ret = ICDecompressQuery(priv->handle, sh->bih, priv->o_bih);
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
124 #endif
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
125 if (ret)
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
126 {
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
127 mp_msg(MSGT_WIN32, MSGL_DBG2, "ICDecompressQuery failed:: Error %d\n", (int)ret);
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
128 return CONTROL_FALSE;
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
129 }
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
130 return CONTROL_TRUE;
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
131 }
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
132 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
133 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
134 return CONTROL_UNKNOWN;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
135 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
136
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 24801
diff changeset
137 void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
8123
9fc45fe0d444 *HUGE* set of compiler warning fixes, unused variables removal
arpi
parents: 8027
diff changeset
138
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
139 // init driver
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
140 static int init(sh_video_t *sh){
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
141 HRESULT ret;
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
142 // unsigned int outfmt=sh->codec->outfmt[sh->outfmtidx];
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
143 int i, o_bih_len;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
144 vd_vfw_ctx *priv;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
145
15344
6a7adf41e4fe Support for new vssh dll, patch by adland
rtognimp
parents: 8123
diff changeset
146 /* Hack for VSSH codec: new dll can't decode old files
6a7adf41e4fe Support for new vssh dll, patch by adland
rtognimp
parents: 8123
diff changeset
147 * In my samples old files have no extradata, so use that info
6a7adf41e4fe Support for new vssh dll, patch by adland
rtognimp
parents: 8123
diff changeset
148 * to decide what dll should be used (here and in vd_dshow).
6a7adf41e4fe Support for new vssh dll, patch by adland
rtognimp
parents: 8123
diff changeset
149 */
6a7adf41e4fe Support for new vssh dll, patch by adland
rtognimp
parents: 8123
diff changeset
150 if (!strcmp(sh->codec->dll, "vssh264.dll") && (sh->bih->biSize > 40))
6a7adf41e4fe Support for new vssh dll, patch by adland
rtognimp
parents: 8123
diff changeset
151 return 0;
6a7adf41e4fe Support for new vssh dll, patch by adland
rtognimp
parents: 8123
diff changeset
152
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
153 priv = malloc(sizeof(vd_vfw_ctx));
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
154 if (!priv)
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
155 return 0;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
156 memset(priv, 0, sizeof(vd_vfw_ctx));
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
157 sh->context = priv;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
158
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
159 mp_msg(MSGT_WIN32,MSGL_V,"======= Win32 (VFW) VIDEO Codec init =======\n");
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
160
7390
2357ee501582 fixed to comply with new loader
alex
parents: 7275
diff changeset
161
2357ee501582 fixed to comply with new loader
alex
parents: 7275
diff changeset
162 // win32_codec_name = sh->codec->dll;
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
163 // sh->hic = ICOpen( 0x63646976, sh->bih->biCompression, ICMODE_FASTDECOMPRESS);
7390
2357ee501582 fixed to comply with new loader
alex
parents: 7275
diff changeset
164 // priv->handle = ICOpen( 0x63646976, sh->bih->biCompression, ICMODE_DECOMPRESS);
7471
5e56ce70b551 wine headers cleanup
arpi
parents: 7390
diff changeset
165 priv->handle = ICOpen( (long)(sh->codec->dll), sh->bih->biCompression, ICMODE_DECOMPRESS);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
166 if(!priv->handle){
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
167 mp_msg(MSGT_WIN32,MSGL_ERR,"ICOpen failed! unknown codec / wrong parameters?\n");
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
168 return 0;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
169 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
170
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
171 // sh->bih->biBitCount=32;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
172
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
173 o_bih_len = ICDecompressGetFormatSize(priv->handle, sh->bih);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
174
24801
d555579c8c98 Check ICDecompressGetFormatSize to avoid crashes.
reimar
parents: 24146
diff changeset
175 if(o_bih_len < sizeof(BITMAPINFOHEADER)){
d555579c8c98 Check ICDecompressGetFormatSize to avoid crashes.
reimar
parents: 24146
diff changeset
176 mp_msg(MSGT_WIN32,MSGL_ERR,"ICDecompressGetFormatSize returned a bogus value: %d\n", o_bih_len);
d555579c8c98 Check ICDecompressGetFormatSize to avoid crashes.
reimar
parents: 24146
diff changeset
177 return 0;
d555579c8c98 Check ICDecompressGetFormatSize to avoid crashes.
reimar
parents: 24146
diff changeset
178 }
d555579c8c98 Check ICDecompressGetFormatSize to avoid crashes.
reimar
parents: 24146
diff changeset
179
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
180 priv->o_bih = malloc(o_bih_len);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
181 memset(priv->o_bih, 0, o_bih_len);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
182
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
183 mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressGetFormatSize ret: %d\n", o_bih_len);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
184
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
185 ret = ICDecompressGetFormat(priv->handle, sh->bih, priv->o_bih);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
186 if(ret < 0){
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
187 mp_msg(MSGT_WIN32,MSGL_ERR,"ICDecompressGetFormat failed: Error %d\n", (int)ret);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
188 for (i=0; i < o_bih_len; i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02x ", priv->o_bih[i]);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
189 return 0;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
190 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
191 mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressGetFormat OK\n");
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
192
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
193 #if 0
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
194 // workaround for pegasus MJPEG:
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
195 if(!sh_video->o_bih.biWidth) sh_video->o_bih.biWidth=sh_video->bih->biWidth;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
196 if(!sh_video->o_bih.biHeight) sh_video->o_bih.biHeight=sh_video->bih->biHeight;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
197 if(!sh_video->o_bih.biPlanes) sh_video->o_bih.biPlanes=sh_video->bih->biPlanes;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
198 #endif
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
199
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
200 // ok let libvo and vd core to handshake and decide the optimal csp:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
201 if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0;
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
202
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
203 if (!(sh->codec->outflags[sh->outfmtidx]&CODECS_FLAG_FLIP)) {
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
204 priv->o_bih->biHeight=-sh->bih->biHeight; // flip image!
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
205 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
206
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
207 // ok, let's set the choosen colorspace:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
208 set_csp(priv->o_bih,sh->codec->outfmt[sh->outfmtidx]);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
209
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
210 // fake it to RGB for broken DLLs (divx3)
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
211 if(sh->codec->outflags[sh->outfmtidx] & CODECS_FLAG_YUVHACK)
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
212 priv->o_bih->biCompression = 0;
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
213
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
214 // sanity check:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
215 #if 1
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
216 #ifdef BUILD_VFWEX
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
217 ret = ICDecompressQueryEx(priv->handle, sh->bih, priv->o_bih);
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
218 #else
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
219 ret = ICDecompressQuery(priv->handle, sh->bih, priv->o_bih);
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
220 #endif
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
221 if (ret)
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
222 {
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
223 mp_msg(MSGT_WIN32,MSGL_WARN,"ICDecompressQuery failed: Error %d\n", (int)ret);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
224 // return 0;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
225 } else
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
226 mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressQuery OK\n");
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
227 #endif
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
228
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
229 #ifdef BUILD_VFWEX
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
230 ret = ICDecompressBeginEx(priv->handle, sh->bih, priv->o_bih);
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
231 #else
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
232 ret = ICDecompressBegin(priv->handle, sh->bih, priv->o_bih);
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
233 #endif
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
234 if (ret)
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
235 {
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
236 mp_msg(MSGT_WIN32,MSGL_WARN,"ICDecompressBegin failed: Error %d\n", (int)ret);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
237 // return 0;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
238 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
239
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
240 // for broken codecs set it again:
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
241 if(sh->codec->outflags[sh->outfmtidx] & CODECS_FLAG_YUVHACK)
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
242 set_csp(priv->o_bih,sh->codec->outfmt[sh->outfmtidx]);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
243
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
244 mp_msg(MSGT_WIN32, MSGL_V, "Input format:\n");
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 17932
diff changeset
245 if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh->bih,MSGL_V);
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
246 mp_msg(MSGT_WIN32, MSGL_V, "Output format:\n");
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 17932
diff changeset
247 if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(priv->o_bih,MSGL_V);
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
248
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
249 // set postprocessing level in xvid/divx4 .dll
7273
6cca0ab10e19 NULL->0 (warning fix)
arpi
parents: 7262
diff changeset
250 ICSendMessage(priv->handle, ICM_USER+80, (long)(&divx_quality), 0);
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
251
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
252 // don't do this palette mess always, it makes div3 dll crashing...
7789
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
253 if(sh->codec->outfmt[sh->outfmtidx]==IMGFMT_BGR8){
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
254 if(ICDecompressGetPalette(priv->handle, sh->bih, priv->o_bih)){
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
255 priv->palette = (unsigned char*)(priv->o_bih+1);
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
256 mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressGetPalette OK\n");
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
257 } else {
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
258 if(sh->bih->biSize>=40+4*4)
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
259 priv->palette = (unsigned char*)(sh->bih+1);
17956aff04e1 bypass palette from bih, when codec cannot give it in o_bih
arpi
parents: 7471
diff changeset
260 }
7249
06a8e6a01180 fixed some problems with colorspace/init order, some cleanup
arpi
parents: 7243
diff changeset
261 }
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
262
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
263 mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");
5153
7091d4c46685 fixed colorspace detection
arpi
parents: 5124
diff changeset
264 return 1;
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
265 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
266
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
267 // uninit driver
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
268 static void uninit(sh_video_t *sh){
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
269 HRESULT ret;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
270 vd_vfw_ctx *priv = sh->context;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
271
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
272 #ifdef BUILD_VFWEX
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
273 ret = ICDecompressEndEx(priv->handle);
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
274 #else
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
275 ret = ICDecompressEnd(priv->handle);
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
276 #endif
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
277 if (ret)
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
278 {
17366
934380353fd6 massive attack: mp_msg printf format fixes
rathann
parents: 15344
diff changeset
279 mp_msg(MSGT_WIN32, MSGL_WARN, "ICDecompressEnd failed: %ld\n", ret);
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
280 return;
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
281 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
282
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
283 ret = ICClose(priv->handle);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
284 if (ret)
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
285 {
17366
934380353fd6 massive attack: mp_msg printf format fixes
rathann
parents: 15344
diff changeset
286 mp_msg(MSGT_WIN32, MSGL_WARN, "ICClose failed: %ld\n", ret);
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
287 return;
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
288 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
289
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
290 free(priv->o_bih);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
291 free(priv);
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
292 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
293
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
294 // decode a frame
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
295 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
296 vd_vfw_ctx *priv = sh->context;
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
297 mp_image_t* mpi;
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
298 HRESULT ret;
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
299
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
300 if(len<=0) return NULL; // skipped frame
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
301
6105
b77b984120f9 iive is right - we shouldn't use IP buffering for vfw. it was changed
arpi
parents: 5769
diff changeset
302 mpi=mpcodecs_get_image(sh,
b77b984120f9 iive is right - we shouldn't use IP buffering for vfw. it was changed
arpi
parents: 5769
diff changeset
303 (sh->codec->outflags[sh->outfmtidx] & CODECS_FLAG_STATIC) ?
b77b984120f9 iive is right - we shouldn't use IP buffering for vfw. it was changed
arpi
parents: 5769
diff changeset
304 MP_IMGTYPE_STATIC : MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_WIDTH,
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
305 sh->disp_w, sh->disp_h);
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
306 if(!mpi){ // temporary!
18004
bcd805923554 Part2 of several printf2mp_msg changes in patch from Otvos Attila oattila AT chello DOT hu with LOTS of modifications by me
reynaldo
parents: 17977
diff changeset
307 mp_msg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec);
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
308 return NULL;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
309 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
310
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
311 // set stride: (trick discovered by Andreas Ackermann - thanx!)
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
312 sh->bih->biWidth=mpi->width; //mpi->stride[0]/(mpi->bpp/8);
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
313 priv->o_bih->biWidth=mpi->width; //mpi->stride[0]/(mpi->bpp/8);
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
314
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
315 sh->bih->biSizeImage = len;
7390
2357ee501582 fixed to comply with new loader
alex
parents: 7275
diff changeset
316
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
317 #ifdef BUILD_VFWEX
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
318 ret = ICDecompressEx(priv->handle,
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
319 #else
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
320 ret = ICDecompress(priv->handle,
7260
3e7a601c5874 - vfwex redundancy removed
arpi
parents: 7249
diff changeset
321 #endif
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
322 ( (sh->ds->flags&1) ? 0 : ICDECOMPRESS_NOTKEYFRAME ) |
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
323 ( ((flags&3)==2 && !(sh->ds->flags&1))?(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL):0 ),
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
324 sh->bih, data, priv->o_bih, (flags&3) ? 0 : mpi->planes[0]);
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
325
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
326 if ((int)ret){
17366
934380353fd6 massive attack: mp_msg printf format fixes
rathann
parents: 15344
diff changeset
327 mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error decompressing frame, err=%ld\n",ret);
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
328 return NULL;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
329 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
330
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
331 // export palette:
7275
fb25090e525d 1000l - planar YUV support fixed (indeo 3,4,5, i263 etc)
arpi
parents: 7273
diff changeset
332 if(mpi->imgfmt==IMGFMT_RGB8 || mpi->imgfmt==IMGFMT_BGR8){
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
333 if (priv->palette)
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
334 {
7243
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
335 mpi->planes[1] = priv->palette;
5f1f724f7046 correct palette handling and query_format support (now huffyuv, cram and mwv1 is working nice)
alex
parents: 7230
diff changeset
336 mpi->flags |= MP_IMGFLAG_RGB_PALETTE;
7229
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
337 mp_dbg(MSGT_DECVIDEO, MSGL_DBG2, "Found and copied palette\n");
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
338 }
b4d025d64eb3 merged with dll_init
alex
parents: 7180
diff changeset
339 else
6232
f8e0eac1256c grayscaled palette support
arpi
parents: 6105
diff changeset
340 mpi->planes[1]=NULL;
7275
fb25090e525d 1000l - planar YUV support fixed (indeo 3,4,5, i263 etc)
arpi
parents: 7273
diff changeset
341 }
fb25090e525d 1000l - planar YUV support fixed (indeo 3,4,5, i263 etc)
arpi
parents: 7273
diff changeset
342
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
343 return mpi;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
344 }