Mercurial > mplayer.hg
annotate libmpcodecs/ve_divx4.c @ 13499:9b1ea3639c17
sync
author | wight |
---|---|
date | Tue, 28 Sep 2004 09:08:35 +0000 |
parents | 656a1b45b309 |
children | acf3241be19b |
rev | line source |
---|---|
5550 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 | |
5 #include "../config.h" | |
6 #include "../mp_msg.h" | |
7 | |
8 #ifdef HAVE_DIVX4ENCORE | |
9 | |
10 #include "codec-cfg.h" | |
11 #include "stream.h" | |
12 #include "demuxer.h" | |
13 #include "stheader.h" | |
14 | |
8585 | 15 #include "muxer.h" |
5550 | 16 |
5607 | 17 #include "img_format.h" |
18 #include "mp_image.h" | |
5550 | 19 #include "vf.h" |
20 | |
7332 | 21 /* About XviD VBR Library, Edouard Gomez (GomGom) said: |
22 <GomGom> header bytes == frame header bytes :-) | |
23 <GomGom> total bytes = frame bytes == texture + header | |
24 <GomGom> quant = quant returned by xvidcore | |
25 <GomGom> it's possible that xvid lowers or increases the passed quant because of lumimasking | |
26 <GomGom> kblks = blocks coded as intra blocks | |
27 <GomGom> mblks = blocks coded as predicted blocks | |
28 <GomGom> ublks = skipped blocks | |
29 <GomGom> at the moemnt le vbr lib uses total bytes, and quant | |
30 <GomGom> so it's easy to use it with divx5 (wo bframes) | |
31 <klOUg> bframes breaks what assumptions? | |
32 <GomGom> quant estimation for next frame | |
33 <GomGom> because of the bframe quant multiplier given to divx5 | |
34 <GomGom> that the vbr lib does not "know" | |
35 */ | |
36 | |
5550 | 37 //===========================================================================// |
38 | |
8032
136e7e515764
removed -pass nonsense from mencoder! it's now a suboption to -divx4opts
rfelker
parents:
7368
diff
changeset
|
39 static int pass; |
5550 | 40 extern char* passtmpfile; |
41 | |
9300
32be26de0d7c
cleanup detection of various divx4 versions/alternatives
arpi
parents:
9014
diff
changeset
|
42 #ifdef ENCORE_XVID |
32be26de0d7c
cleanup detection of various divx4 versions/alternatives
arpi
parents:
9014
diff
changeset
|
43 #include <divx4.h> |
32be26de0d7c
cleanup detection of various divx4 versions/alternatives
arpi
parents:
9014
diff
changeset
|
44 #else |
5550 | 45 #include <encore2.h> |
9300
32be26de0d7c
cleanup detection of various divx4 versions/alternatives
arpi
parents:
9014
diff
changeset
|
46 #endif |
5550 | 47 |
5854 | 48 #ifndef ENCORE_MAJOR_VERSION |
49 #define ENCORE_MAJOR_VERSION 4000 | |
50 #endif | |
51 | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
52 #if ENCORE_MAJOR_VERSION < 5200 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
53 #include "divx4_vbr.h" |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
54 #define HAVE_XVID_VBR |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
55 #ifdef HAVE_XVID_VBR |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
56 #include "xvid_vbr.h" |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
57 #endif |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
58 #endif |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
59 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
60 #if ENCORE_MAJOR_VERSION >= 5200 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
61 SETTINGS divx4_param; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
62 #else |
5550 | 63 ENC_PARAM divx4_param; |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
64 #endif |
5550 | 65 int divx4_crispness; |
7332 | 66 #ifdef HAVE_XVID_VBR |
67 static int vbrpass = -1; | |
68 static int vbrdebug = 0; | |
69 #endif | |
5550 | 70 |
10594
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10252
diff
changeset
|
71 #include "m_option.h" |
5550 | 72 |
10594
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10252
diff
changeset
|
73 m_option_t divx4opts_conf[]={ |
8032
136e7e515764
removed -pass nonsense from mencoder! it's now a suboption to -divx4opts
rfelker
parents:
7368
diff
changeset
|
74 {"pass", &pass, CONF_TYPE_INT, CONF_RANGE,0,2, NULL}, |
5550 | 75 {"br", &divx4_param.bitrate, CONF_TYPE_INT, CONF_RANGE, 4, 24000000, NULL}, |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
76 #if ENCORE_MAJOR_VERSION < 5200 |
5550 | 77 {"rc_period", &divx4_param.rc_period, CONF_TYPE_INT, 0,0,0, NULL}, |
78 {"rc_reaction_period", &divx4_param.rc_reaction_period, CONF_TYPE_INT, 0,0,0, NULL}, | |
79 {"rc_reaction_ratio", &divx4_param.rc_reaction_ratio, CONF_TYPE_INT, 0,0,0, NULL}, | |
80 {"min_quant", &divx4_param.min_quantizer, CONF_TYPE_INT, CONF_RANGE,0,32, NULL}, | |
81 {"max_quant", &divx4_param.max_quantizer, CONF_TYPE_INT, CONF_RANGE,0,32, NULL}, | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
82 #endif |
5550 | 83 {"key", &divx4_param.max_key_interval, CONF_TYPE_INT, CONF_MIN,0,0, NULL}, |
84 {"deinterlace", &divx4_param.deinterlace, CONF_TYPE_FLAG, 0,0,1, NULL}, | |
85 {"q", &divx4_param.quality, CONF_TYPE_INT, CONF_RANGE, 1, 5, NULL}, | |
86 {"crispness", &divx4_crispness, CONF_TYPE_INT, CONF_RANGE,0,100, NULL}, | |
5854 | 87 #if ENCORE_MAJOR_VERSION >= 5010 |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
88 #if ENCORE_MAJOR_VERSION >= 5200 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
89 /* rate control modes: |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
90 0 (VBV 1-pass) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
91 1 (1-pass constant quality) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
92 2 (VBV multipass 1st-pass) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
93 3 (VBV multipass nth-pass) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
94 4 (original 1-pass) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
95 5 (original 1st pass) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
96 6 (original 2nd pass) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
97 7 (1-pass constant frame size) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
98 */ |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
99 {"vbr", &divx4_param.vbr_mode, CONF_TYPE_INT, CONF_RANGE,0,7, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
100 {"bidirect", &divx4_param.use_bidirect, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
101 {"key_frame_threshold", &divx4_param.key_frame_threshold, CONF_TYPE_INT, CONF_RANGE,1,100, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
102 /* default values from the DivX Help Guide: |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
103 bitrate size occupancy |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
104 128000 262144 196608 (Handheld) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
105 768000 1048576 786432 (Portable) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
106 4000000 3145728 2359296 (Home Theatre) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
107 8000000 6291456 4718592 (High Definition) |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
108 Do not mess with these values unless you are absolutely sure of what you are doing! |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
109 */ |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
110 {"vbv_bitrate", &divx4_param.vbv_bitrate, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
111 {"vbv_size", &divx4_param.vbv_size, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
112 {"vbv_occupancy", &divx4_param.vbv_occupancy, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
113 {"complexity", &divx4_param.complexity_modulation, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
114 {"readlog", &divx4_param.log_file_read, CONF_TYPE_STRING, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
115 {"writelog", &divx4_param.log_file_write, CONF_TYPE_STRING, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
116 {"mv_file", &divx4_param.mv_file, CONF_TYPE_STRING, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
117 {"data_partitioning", &divx4_param.data_partitioning, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
118 {"qpel", &divx4_param.quarter_pel, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
119 {"gmc", &divx4_param.use_gmc, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
120 {"pv", &divx4_param.psychovisual, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
121 {"pv_strength_frame", &divx4_param.pv_strength_frame, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
122 {"pv_strength_MB", &divx4_param.pv_strength_MB, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
123 {"interlace_mode", &divx4_param.interlace_mode, CONF_TYPE_INT, CONF_RANGE,0,3, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
124 {"crop", &divx4_param.enable_crop, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
125 {"resize", &divx4_param.enable_resize, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
126 {"width", &divx4_param.resize_width, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
127 {"height", &divx4_param.resize_height, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
128 {"left", &divx4_param.crop_left, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
129 {"right", &divx4_param.crop_right, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
130 {"top", &divx4_param.crop_top, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
131 {"bottom", &divx4_param.crop_bottom, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
132 {"resize_mode", &divx4_param.resize_mode, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
133 {"temporal", &divx4_param.temporal_enable, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
134 {"spatial", &divx4_param.spatial_passes, CONF_TYPE_INT, CONF_RANGE,0,3, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
135 {"temporal_level", &divx4_param.temporal_level, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
136 {"spatial_level", &divx4_param.spatial_level, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
137 #else |
5854 | 138 {"bidirect", &divx4_param.extensions.use_bidirect, CONF_TYPE_FLAG, 0,0,1, NULL}, |
139 {"obmc", &divx4_param.extensions.obmc, CONF_TYPE_FLAG, 0,0,1, NULL}, | |
140 {"data_partitioning", &divx4_param.extensions.data_partitioning, CONF_TYPE_FLAG, 0,0,1, NULL}, | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
141 // {"mpeg2", &divx4_param.extensions.mpeg2_quant, CONF_TYPE_FLAG, 0,0,1, NULL}, |
5854 | 142 {"qpel", &divx4_param.extensions.quarter_pel, CONF_TYPE_FLAG, 0,0,1, NULL}, |
143 {"intra_frame_threshold", &divx4_param.extensions.intra_frame_threshold, CONF_TYPE_INT, CONF_RANGE,1,100, NULL}, | |
144 {"psychovisual", &divx4_param.extensions.psychovisual, CONF_TYPE_FLAG, 0,0,1, NULL}, | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
145 {"pv", &divx4_param.extensions.psychovisual, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
146 {"pv_strength_frame", &divx4_param.extensions.pv_strength_frame, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
147 {"pv_strength_MB", &divx4_param.extensions.pv_strength_MB, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
5854 | 148 {"testing_param", &divx4_param.extensions.testing_param, CONF_TYPE_FLAG, 0,0,1, NULL}, |
149 {"gmc", &divx4_param.extensions.use_gmc, CONF_TYPE_FLAG, 0,0,1, NULL}, | |
150 {"interlace_mode", &divx4_param.extensions.interlace_mode, CONF_TYPE_INT, CONF_RANGE,0,2, NULL}, | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
151 {"crop", &divx4_param.extensions.enable_crop, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
152 {"resize", &divx4_param.extensions.enable_resize, CONF_TYPE_FLAG, 0,0,1, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
153 {"width", &divx4_param.extensions.resize_width, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
154 {"height", &divx4_param.extensions.resize_height, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
155 {"left", &divx4_param.extensions.crop_left, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
156 {"right", &divx4_param.extensions.crop_right, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
157 {"top", &divx4_param.extensions.crop_top, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
158 {"bottom", &divx4_param.extensions.crop_bottom, CONF_TYPE_INT, 0,0,0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
159 {"resize_mode", &divx4_param.extensions.resize_mode, CONF_TYPE_FLAG, 0,0,1, NULL}, |
5854 | 160 {"temporal", &divx4_param.extensions.temporal_enable, CONF_TYPE_FLAG, 0,0,1, NULL}, |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
161 {"spatial", &divx4_param.extensions.spatial_passes, CONF_TYPE_INT, CONF_RANGE,0,3, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
162 {"temporal_level", &divx4_param.extensions.temporal_level, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
163 {"spatial_level", &divx4_param.extensions.spatial_level, CONF_TYPE_FLOAT, CONF_RANGE,0.0,1.0, NULL}, |
5854 | 164 {"mv_file", &divx4_param.extensions.mv_file, CONF_TYPE_STRING, 0,0,1, NULL}, |
165 #endif | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
166 #endif |
7332 | 167 #ifdef HAVE_XVID_VBR |
168 {"vbrpass", &vbrpass, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL}, | |
169 {"vbrdebug", &vbrdebug, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL}, | |
170 #endif | |
5550 | 171 {"help", "TODO: divx4opts help!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, |
172 {NULL, NULL, 0, 0, 0, 0, NULL} | |
173 }; | |
174 | |
175 struct vf_priv_s { | |
8585 | 176 muxer_stream_t* mux; |
5550 | 177 ENC_RESULT enc_result; |
178 ENC_FRAME enc_frame; | |
179 void* enc_handle; | |
7332 | 180 #ifdef HAVE_XVID_VBR |
181 vbr_control_t vbr_state; | |
182 #endif | |
5550 | 183 }; |
184 | |
185 #define mux_v (vf->priv->mux) | |
186 | |
187 static int config(struct vf_instance_s* vf, | |
188 int width, int height, int d_width, int d_height, | |
189 unsigned int flags, unsigned int outfmt){ | |
190 | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
191 #if ENCORE_MAJOR_VERSION >= 5200 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
192 DivXBitmapInfoHeader format; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
193 char profile = (char) encore(0, ENC_OPT_PROFILE, 0, 0); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
194 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
195 mp_msg(MSGT_MENCODER, MSGL_INFO, "encoder binary profile: %c\n", profile); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
196 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
197 if((pass <= 1 && (divx4_param.vbr_mode == RCMODE_VBV_MULTIPASS_NTH || |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
198 divx4_param.vbr_mode == RCMODE_502_2PASS_2ND)) || |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
199 (pass == 2 && (divx4_param.vbr_mode == RCMODE_VBV_1PASS || |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
200 divx4_param.vbr_mode == RCMODE_1PASS_CONSTANT_Q || |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
201 divx4_param.vbr_mode == RCMODE_VBV_MULTIPASS_1ST || |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
202 divx4_param.vbr_mode == RCMODE_502_1PASS || |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
203 divx4_param.vbr_mode == RCMODE_502_2PASS_1ST || |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
204 divx4_param.vbr_mode == RCMODE_IMAGE_COMPRESS))) { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
205 mp_msg(MSGT_MENCODER, MSGL_ERR, "pass (%i) and rate control mode (%i) doesn't match, please consult encore2.h\n", |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
206 pass, divx4_param.vbr_mode); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
207 abort(); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
208 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
209 #endif |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
210 |
5550 | 211 mux_v->bih->biWidth=width; |
212 mux_v->bih->biHeight=height; | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
213 mux_v->bih->biSizeImage=width*height*3; |
12061 | 214 mux_v->aspect = (float)d_width/d_height; |
5550 | 215 |
216 if(!divx4_param.bitrate) divx4_param.bitrate=800000; | |
217 else if(divx4_param.bitrate<=16000) divx4_param.bitrate*=1000; | |
218 if(!divx4_param.quality) divx4_param.quality=5; // the quality of compression ( 1 - fastest, 5 - best ) | |
219 | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
220 #if ENCORE_MAJOR_VERSION >= 5200 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
221 format.biSize=sizeof(DivXBitmapInfoHeader); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
222 format.biWidth=width; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
223 format.biHeight=height; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
224 format.biSizeImage=mux_v->bih->biSizeImage; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
225 if(divx4_param.vbv_bitrate > 0) { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
226 divx4_param.vbv_bitrate = ((divx4_param.vbv_bitrate - 1) / 400 + 1) * 400; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
227 divx4_param.vbv_size = ((divx4_param.vbv_size - 1) / 16384 + 1) * 16384; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
228 divx4_param.vbv_occupancy = ((divx4_param.vbv_occupancy - 1) / 64 + 1) * 64; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
229 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
230 #else |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
231 divx4_param.x_dim=width; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
232 divx4_param.y_dim=height; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
233 divx4_param.framerate=(float)mux_v->h.dwRate/mux_v->h.dwScale; |
5551 | 234 // set some usefull defaults: |
235 if(!divx4_param.min_quantizer) divx4_param.min_quantizer=2; | |
236 if(!divx4_param.max_quantizer) divx4_param.max_quantizer=31; | |
237 if(!divx4_param.rc_period) divx4_param.rc_period=2000; | |
238 if(!divx4_param.rc_reaction_period) divx4_param.rc_reaction_period=10; | |
239 if(!divx4_param.rc_reaction_ratio) divx4_param.rc_reaction_ratio=20; | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
240 #endif |
5551 | 241 |
7332 | 242 #ifdef HAVE_XVID_VBR |
243 if (vbrpass >= 0) { | |
244 vbrSetDefaults(&vf->priv->vbr_state); | |
245 vf->priv->vbr_state.desired_bitrate = divx4_param.bitrate; | |
246 switch (vbrpass) { | |
247 case 0: | |
248 vf->priv->vbr_state.mode = VBR_MODE_1PASS; | |
249 break; | |
250 case 1: | |
251 vf->priv->vbr_state.mode = VBR_MODE_2PASS_1; | |
252 break; | |
253 case 2: | |
254 vf->priv->vbr_state.mode = VBR_MODE_2PASS_2; | |
255 break; | |
256 default: | |
257 abort(); | |
258 } | |
259 vf->priv->vbr_state.debug = vbrdebug; | |
260 if (vbrInit(&vf->priv->vbr_state) == -1) | |
261 abort(); | |
262 /* XXX - kludge to workaround some DivX encoder limitations */ | |
263 if (vf->priv->vbr_state.mode != VBR_MODE_2PASS_2) | |
264 divx4_param.min_quantizer = divx4_param.max_quantizer = vbrGetQuant(&vf->priv->vbr_state); | |
265 } | |
266 #endif | |
267 | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
268 #if ENCORE_MAJOR_VERSION >= 5200 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
269 switch(outfmt){ |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
270 case IMGFMT_YV12: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
271 format.biCompression=mmioFOURCC('Y','V','1','2'); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
272 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
273 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
274 case IMGFMT_IYUV: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
275 format.biCompression=mmioFOURCC('I','Y','U','V'); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
276 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
277 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
278 case IMGFMT_I420: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
279 format.biCompression=mmioFOURCC('I','4','2','0'); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
280 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
281 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
282 case IMGFMT_YUY2: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
283 format.biCompression=mmioFOURCC('Y','U','Y','2'); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
284 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
285 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
286 case IMGFMT_V422: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
287 format.biCompression=mmioFOURCC('V','4','2','2'); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
288 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
289 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
290 case IMGFMT_UYVY: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
291 format.biCompression=mmioFOURCC('U','Y','V','Y'); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
292 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
293 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
294 case IMGFMT_YVYU: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
295 format.biCompression=mmioFOURCC('Y','V','Y','U'); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
296 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
297 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
298 case IMGFMT_BGR24: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
299 format.biCompression=0; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
300 format.biBitCount=24; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
301 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
302 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
303 case IMGFMT_BGR32: { |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
304 format.biCompression=0; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
305 format.biBitCount=32; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
306 break; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
307 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
308 default: |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
309 mp_msg(MSGT_MENCODER,MSGL_ERR,"divx4: unsupported picture format (%s)!\n", |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
310 vo_format_name(outfmt)); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
311 return 0; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
312 } |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
313 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
314 encore(&vf->priv->enc_handle, ENC_OPT_INIT, &format, &divx4_param); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
315 #else |
5550 | 316 divx4_param.handle=NULL; |
317 encore(NULL,ENC_OPT_INIT,&divx4_param,NULL); | |
318 vf->priv->enc_handle=divx4_param.handle; | |
319 switch(outfmt){ | |
320 case IMGFMT_YV12: vf->priv->enc_frame.colorspace=ENC_CSP_YV12; break; | |
321 case IMGFMT_IYUV: | |
322 case IMGFMT_I420: vf->priv->enc_frame.colorspace=ENC_CSP_I420; break; | |
323 case IMGFMT_YUY2: vf->priv->enc_frame.colorspace=ENC_CSP_YUY2; break; | |
324 case IMGFMT_UYVY: vf->priv->enc_frame.colorspace=ENC_CSP_UYVY; break; | |
325 case IMGFMT_RGB24: | |
326 case IMGFMT_BGR24: | |
327 vf->priv->enc_frame.colorspace=ENC_CSP_RGB24; break; | |
328 default: | |
329 mp_msg(MSGT_MENCODER,MSGL_ERR,"divx4: unsupported picture format (%s)!\n", | |
330 vo_format_name(outfmt)); | |
331 return 0; | |
332 } | |
333 | |
334 switch(pass){ | |
335 case 1: | |
336 if (VbrControl_init_2pass_vbr_analysis(passtmpfile, divx4_param.quality) == -1){ | |
337 mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile); | |
338 pass=0; | |
339 } | |
340 break; | |
341 case 2: | |
342 if (VbrControl_init_2pass_vbr_encoding(passtmpfile, | |
343 divx4_param.bitrate, | |
344 divx4_param.framerate, | |
345 divx4_crispness, | |
346 divx4_param.quality) == -1){ | |
347 mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile); | |
348 pass=0; | |
349 } | |
350 break; | |
351 } | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
352 #endif |
5550 | 353 |
354 return 1; | |
355 } | |
356 | |
7332 | 357 #ifdef HAVE_XVID_VBR |
358 static void uninit(struct vf_instance_s* vf){ | |
359 if (vbrpass >= 0 && vbrFinish(&vf->priv->vbr_state) == -1) | |
360 abort(); | |
361 } | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
362 #else |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
363 static void uninit(struct vf_instance_s* vf){ |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
364 encore(vf->priv->enc_handle, ENC_OPT_RELEASE, 0, 0); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
365 vf->priv->enc_handle = NULL; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
366 } |
7332 | 367 #endif |
368 | |
5550 | 369 static int control(struct vf_instance_s* vf, int request, void* data){ |
370 | |
371 return CONTROL_UNKNOWN; | |
372 } | |
373 | |
374 static int query_format(struct vf_instance_s* vf, unsigned int fmt){ | |
375 switch(fmt){ | |
376 case IMGFMT_YV12: | |
377 case IMGFMT_IYUV: | |
378 case IMGFMT_I420: | |
379 return 3; // no conversion | |
380 case IMGFMT_YUY2: | |
381 case IMGFMT_UYVY: | |
5706 | 382 return 1; // conversion |
5550 | 383 case IMGFMT_RGB24: |
384 case IMGFMT_BGR24: | |
5706 | 385 return 1 | VFCAP_FLIPPED; // conversion+flipped |
5550 | 386 } |
387 return 0; | |
388 } | |
389 | |
7368 | 390 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ |
5550 | 391 ENC_RESULT enc_result; |
392 vf->priv->enc_frame.image=mpi->planes[0]; | |
393 vf->priv->enc_frame.bitstream=mux_v->buffer; | |
394 vf->priv->enc_frame.length=mux_v->buffer_size; | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
395 #if ENCORE_MAJOR_VERSION >= 5200 |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
396 vf->priv->enc_frame.produce_empty_frame = 0; |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
397 encore(vf->priv->enc_handle, ENC_OPT_ENCODE, &vf->priv->enc_frame, &enc_result); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
398 if(enc_result.cType == 'I') |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
399 muxer_write_chunk(mux_v,vf->priv->enc_frame.length,0x10); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
400 else |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
401 muxer_write_chunk(mux_v,vf->priv->enc_frame.length,0); |
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
402 #else |
5550 | 403 vf->priv->enc_frame.mvs=NULL; |
7332 | 404 #ifdef HAVE_XVID_VBR |
405 if (vbrpass >= 0) { | |
406 int quant = vbrGetQuant(&vf->priv->vbr_state); | |
407 int intra = vbrGetIntra(&vf->priv->vbr_state); | |
408 vf->priv->enc_frame.quant = quant ? quant : 1; | |
409 vf->priv->enc_frame.intra = intra; | |
410 /* XXX - kludge to workaround some DivX encoder limitations: | |
411 only pass 2 needs to call encore with VBR, and then it does | |
412 not report quantizer and intra*/ | |
413 if (vf->priv->vbr_state.mode != VBR_MODE_2PASS_2) | |
414 encore(vf->priv->enc_handle, ENC_OPT_ENCODE, &vf->priv->enc_frame, &enc_result); | |
415 else { | |
416 encore(vf->priv->enc_handle, ENC_OPT_ENCODE_VBR, &vf->priv->enc_frame, &enc_result); | |
417 enc_result.quantizer = quant; | |
418 if (intra >= 0) | |
419 enc_result.is_key_frame = intra; | |
420 } | |
421 if (vbrUpdate(&vf->priv->vbr_state, enc_result.quantizer, enc_result.is_key_frame, | |
422 (enc_result.total_bits - enc_result.texture_bits) / 8, enc_result.total_bits / 8, | |
423 0, 0, 0) == -1) | |
424 abort(); | |
425 } | |
426 else | |
427 #endif | |
5550 | 428 if(pass==2){ // handle 2-pass: |
429 vf->priv->enc_frame.quant = VbrControl_get_quant(); | |
430 vf->priv->enc_frame.intra = VbrControl_get_intra(); | |
431 encore(vf->priv->enc_handle,ENC_OPT_ENCODE_VBR,&vf->priv->enc_frame,&enc_result); | |
432 VbrControl_update_2pass_vbr_encoding(enc_result.motion_bits, | |
433 enc_result.texture_bits, | |
434 enc_result.total_bits); | |
435 } else { | |
436 vf->priv->enc_frame.quant=0; | |
437 vf->priv->enc_frame.intra=0; | |
438 encore(vf->priv->enc_handle,ENC_OPT_ENCODE,&vf->priv->enc_frame,&enc_result); | |
439 if(pass==1){ | |
440 VbrControl_update_2pass_vbr_analysis(enc_result.is_key_frame, | |
441 enc_result.motion_bits, | |
442 enc_result.texture_bits, | |
443 enc_result.total_bits, | |
444 enc_result.quantizer); | |
445 } | |
446 } | |
9014
c671e9adbe22
Cleanup of the muxer API, func parameters muxer & muxer_f eliminated.
arpi
parents:
8585
diff
changeset
|
447 muxer_write_chunk(mux_v,vf->priv->enc_frame.length,enc_result.is_key_frame?0x10:0); |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
448 #endif |
7368 | 449 return 1; |
5550 | 450 } |
451 | |
452 //===========================================================================// | |
453 | |
454 static int vf_open(vf_instance_t *vf, char* args){ | |
455 vf->config=config; | |
456 vf->control=control; | |
457 vf->query_format=query_format; | |
458 vf->put_image=put_image; | |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
459 //#ifdef HAVE_XVID_VBR |
7332 | 460 vf->uninit = uninit; |
10252
d275152390ee
I've found some time to implement the encoding support for the new
arpi
parents:
9300
diff
changeset
|
461 //#endif |
5550 | 462 vf->priv=malloc(sizeof(struct vf_priv_s)); |
463 memset(vf->priv,0,sizeof(struct vf_priv_s)); | |
8585 | 464 vf->priv->mux=(muxer_stream_t*)args; |
5550 | 465 |
466 mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)); | |
467 mux_v->bih->biSize=sizeof(BITMAPINFOHEADER); | |
468 mux_v->bih->biWidth=0; | |
469 mux_v->bih->biHeight=0; | |
470 mux_v->bih->biPlanes=1; | |
471 mux_v->bih->biBitCount=24; | |
5854 | 472 #if ENCORE_MAJOR_VERSION >= 5010 |
473 mux_v->bih->biCompression=mmioFOURCC('D','X','5','0'); | |
474 #else | |
5550 | 475 mux_v->bih->biCompression=mmioFOURCC('d','i','v','x'); |
5854 | 476 #endif |
5550 | 477 |
478 return 1; | |
479 } | |
480 | |
481 vf_info_t ve_info_divx4 = { | |
482 "divx4 encoder", | |
483 "divx4", | |
484 "A'rpi", | |
485 "for internal use by mencoder", | |
486 vf_open | |
487 }; | |
488 | |
489 //===========================================================================// | |
490 #endif |