annotate libmpcodecs/vd_divx4.c @ 9392:7bbe4bce6293

cleanup (unsigned stride -> int stride)
author michael
date Tue, 11 Feb 2003 12:57:53 +0000
parents 32be26de0d7c
children d275152390ee
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>
5003
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
3 #include <stdarg.h>
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
4 #include <assert.h>
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
5
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
6 #include "config.h"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
7 #include "mp_msg.h"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
8 #include "help_mp.h"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
9
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
10 #ifdef USE_DIVX
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
11 #ifdef NEW_DECORE
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
12
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
13 #include "vd_internal.h"
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
14
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
15 static vd_info_t info = {
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
16 #ifdef DECORE_DIVX5
9300
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
17 "DivX5Linux lib",
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
18 #else
9300
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
19 #ifdef DECORE_XVID
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
20 "XviD lib (divx4 compat.)",
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
21 #else
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
22 "DivX4Linux lib",
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
23 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
24 #endif
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
25 "divx4",
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
26 "A'rpi",
9300
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
27 #ifdef DECORE_XVID
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
28 "http://www.xvid.com",
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
29 #else
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
30 "http://www.divx.com",
9300
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
31 #endif
7191
1eadce15446c -afm/-vfm help implemenetd, some cosmetics of ad/vd codec names/comments
arpi
parents: 7180
diff changeset
32 "native binary codec"
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
33 };
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
34
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
35 LIBVD_EXTERN(divx4)
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
36
9300
32be26de0d7c cleanup detection of various divx4 versions/alternatives
arpi
parents: 7191
diff changeset
37 #ifdef DECORE_XVID
6701
522713337297 Support for Xvid using their new api. If divx4 compatiblity is disabeled
albeu
parents: 5247
diff changeset
38 #include <divx4.h>
522713337297 Support for Xvid using their new api. If divx4 compatiblity is disabeled
albeu
parents: 5247
diff changeset
39 #else
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
40 #include <decore.h>
6701
522713337297 Support for Xvid using their new api. If divx4 compatiblity is disabeled
albeu
parents: 5247
diff changeset
41 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
42
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
43 #define USE_DIVX_BUILTIN_PP
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
44
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
45 // to set/get/query special features/parameters
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
46 static int control(sh_video_t *sh,int cmd,void* arg,...){
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
47 switch(cmd){
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
48 #ifdef USE_DIVX_BUILTIN_PP
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
49 case VDCTRL_QUERY_MAX_PP_LEVEL:
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
50 return 9; // for divx4linux
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
51 case VDCTRL_SET_PP_LEVEL: {
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
52 DEC_SET dec_set;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
53 int quality=*((int*)arg);
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
54 if(quality<0 || quality>9) quality=9;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
55 dec_set.postproc_level=quality*10;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
56 decore(0x123,DEC_OPT_SETPP,&dec_set,NULL);
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
57 return CONTROL_OK;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
58 }
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
59 #endif
5003
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
60 #ifdef DECORE_VERSION
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
61 #if DECORE_VERSION >= 20011010
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
62 case VDCTRL_SET_EQUALIZER: {
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
63 va_list ap;
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
64 int value;
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
65 int option;
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
66 va_start(ap, arg);
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
67 value=va_arg(ap, int);
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
68 va_end(ap);
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
69
6803
05571867bf3d video eq:
arpi
parents: 6708
diff changeset
70 if(!strcasecmp(arg,"Brightness")) option=DEC_GAMMA_BRIGHTNESS;
05571867bf3d video eq:
arpi
parents: 6708
diff changeset
71 else if(!strcasecmp(arg, "Contrast")) option=DEC_GAMMA_CONTRAST;
05571867bf3d video eq:
arpi
parents: 6708
diff changeset
72 else if(!strcasecmp(arg,"Saturation")) option=DEC_GAMMA_SATURATION;
5003
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
73 else return CONTROL_FALSE;
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
74
6803
05571867bf3d video eq:
arpi
parents: 6708
diff changeset
75 value = (value * 128) / 100;
5003
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
76 decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value);
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
77 return CONTROL_OK;
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
78 }
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
79 #endif
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
80 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
81
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
82 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
83
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
84 return CONTROL_UNKNOWN;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
85 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
86
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
87 // init driver
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
88 static int init(sh_video_t *sh){
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
89 DEC_PARAM dec_param;
5003
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
90 DEC_SET dec_set;
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
91 int bits=16;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
92
5168
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
93 #ifndef NEW_DECORE
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
94 if(sh->format==mmioFOURCC('D','I','V','3')){
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
95 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"DivX 3.x not supported by opendivx decore - it requires divx4linux\n");
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
96 return 0; // not supported
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
97 }
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
98 #endif
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
99 #ifndef DECORE_DIVX5
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
100 if(sh->format==mmioFOURCC('D','X','5','0')){
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
101 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"DivX 5.00 not supported by divx4linux decore - it requires divx5linux\n");
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
102 return 0; // not supported
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
103 }
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
104 #endif
c56853195dd6 decore version check for divx3 and divx5
arpi
parents: 5124
diff changeset
105
5124
3dcbf67c0de0 handle error from mpcodecs_config_vo()
arpi
parents: 5037
diff changeset
106 if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0;
3dcbf67c0de0 handle error from mpcodecs_config_vo()
arpi
parents: 5037
diff changeset
107
3dcbf67c0de0 handle error from mpcodecs_config_vo()
arpi
parents: 5037
diff changeset
108 memset(&dec_param,0,sizeof(dec_param));
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
109
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
110 switch(sh->codec->outfmt[sh->outfmtidx]){
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
111 case IMGFMT_YV12: dec_param.output_format=DEC_YV12;bits=12;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
112 case IMGFMT_YUY2: dec_param.output_format=DEC_YUY2;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
113 case IMGFMT_UYVY: dec_param.output_format=DEC_UYVY;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
114 case IMGFMT_I420: dec_param.output_format=DEC_420;bits=12;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
115 case IMGFMT_BGR15: dec_param.output_format=DEC_RGB555_INV;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
116 case IMGFMT_BGR16: dec_param.output_format=DEC_RGB565_INV;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
117 case IMGFMT_BGR24: dec_param.output_format=DEC_RGB24_INV;bits=24;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
118 case IMGFMT_BGR32: dec_param.output_format=DEC_RGB32_INV;bits=32;break;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
119 default:
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
120 mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Unsupported out_fmt: 0x%X\n",sh->codec->outfmt[sh->outfmtidx]);
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
121 return 0;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
122 }
4997
5efa42dd4cd8 divx5 support into libmpcodecs (untested)
atmos4
parents: 4986
diff changeset
123 #ifdef DECORE_DIVX5
5247
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
124 switch(sh->format) {
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
125 case mmioFOURCC('D','I','V','3'):
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
126 dec_param.codec_version = 311;
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
127 break;
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
128 case mmioFOURCC('D','I','V','X'):
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
129 dec_param.codec_version = 400;
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
130 break;
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
131 case mmioFOURCC('D','X','5','0'):
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
132 default: // Fallback to DivX 5 behaviour
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
133 dec_param.codec_version = 500;
b68774024821 Im proved Build Version selection for DivX 5.
atmos4
parents: 5168
diff changeset
134 }
4997
5efa42dd4cd8 divx5 support into libmpcodecs (untested)
atmos4
parents: 4986
diff changeset
135 dec_param.build_number = 0;
5efa42dd4cd8 divx5 support into libmpcodecs (untested)
atmos4
parents: 4986
diff changeset
136 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
137 dec_param.x_dim = sh->disp_w;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
138 dec_param.y_dim = sh->disp_h;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
139 decore(0x123, DEC_OPT_INIT, &dec_param, NULL);
5003
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
140
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
141 #ifdef USE_DIVX_BUILTIN_PP
5003
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
142 dec_set.postproc_level = divx_quality;
88481d4b9e0e divx_quality and equalizer support done
arpi
parents: 4997
diff changeset
143 decore(0x123, DEC_OPT_SETPP, &dec_set, NULL);
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
144 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
145
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
146 mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: DivX4Linux video codec init OK!\n");
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
147
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
148 return 1;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
149 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
150
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
151 // uninit driver
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
152 static void uninit(sh_video_t *sh){
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
153 decore(0x123,DEC_OPT_RELEASE,NULL,NULL);
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
154 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
155
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
156 //mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
157
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
158 // decode a frame
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
159 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
160 mp_image_t* mpi;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
161 DEC_FRAME dec_frame;
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
162 #ifndef USE_DIVX_BUILTIN_PP
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
163 DEC_FRAME_INFO frameinfo;
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
164 #endif
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
165
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
166 if(len<=0) return NULL; // skipped frame
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
167
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
168 dec_frame.length = len;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
169 dec_frame.bitstream = data;
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
170 dec_frame.render_flag = (flags&VDFLAGS_DROPFRAME)?0:1;
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
171
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
172 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_PRESERVE | MP_IMGFLAG_ACCEPT_WIDTH,
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
173 sh->disp_w, sh->disp_h);
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
174 if(!mpi) return NULL;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
175
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
176 dec_frame.bmp=mpi->planes[0];
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
177 dec_frame.stride=mpi->width;
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
178
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
179 decore(0x123,
5037
0ef48d850bc9 hopefully fixed divx5 header + xvid conflict
arpi
parents: 5003
diff changeset
180 #ifndef DEC_OPT_FRAME_311
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
181 DEC_OPT_FRAME,
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
182 #else
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
183 (sh->format==mmioFOURCC('D','I','V','3'))?DEC_OPT_FRAME_311:DEC_OPT_FRAME,
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
184 #endif
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
185 &dec_frame,
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
186 #ifndef USE_DIVX_BUILTIN_PP
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
187 &frameinfo
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
188 #else
6708
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
189 NULL
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
190 #endif
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
191 );
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
192
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
193 #ifndef USE_DIVX_BUILTIN_PP
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
194 mpi->qscale = frameinfo.quant_store;
8058078f1248 support for external pp by divx4. some fixes/cosmetics?
alex
parents: 6701
diff changeset
195 mpi->qstride = frameinfo.quant_stride;
4968
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
196 #endif
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
197
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
198 return mpi;
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
199 }
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
200 #endif
236b06410b03 vfw, vfwex, odivx, divx4 added
arpi
parents:
diff changeset
201 #endif