Mercurial > libavcodec.hg
comparison wmv2.c @ 1163:0951691c4225 libavcodec
fixing msmpeg4v2 encoding
author | michaelni |
---|---|
date | Tue, 01 Apr 2003 15:38:01 +0000 |
parents | 21c85c4ab2f0 |
children | fea03d2c4946 |
comparison
equal
deleted
inserted
replaced
1162:8c15d82c1893 | 1163:0951691c4225 |
---|---|
129 s->mspel= 0; | 129 s->mspel= 0; |
130 w->per_mb_abt=0; | 130 w->per_mb_abt=0; |
131 w->abt_type=0; | 131 w->abt_type=0; |
132 w->j_type=0; | 132 w->j_type=0; |
133 | 133 |
134 assert(s->flipflop_rounding); | |
135 | |
134 if (s->pict_type == I_TYPE) { | 136 if (s->pict_type == I_TYPE) { |
137 assert(s->no_rounding==1); | |
135 if(w->j_type_bit) put_bits(&s->pb, 1, w->j_type); | 138 if(w->j_type_bit) put_bits(&s->pb, 1, w->j_type); |
136 | 139 |
137 if(w->per_mb_rl_bit) put_bits(&s->pb, 1, s->per_mb_rl_table); | 140 if(w->per_mb_rl_bit) put_bits(&s->pb, 1, s->per_mb_rl_table); |
138 | 141 |
139 if(!s->per_mb_rl_table){ | 142 if(!s->per_mb_rl_table){ |
142 } | 145 } |
143 | 146 |
144 put_bits(&s->pb, 1, s->dc_table_index); | 147 put_bits(&s->pb, 1, s->dc_table_index); |
145 | 148 |
146 s->inter_intra_pred= 0; | 149 s->inter_intra_pred= 0; |
147 s->no_rounding = 1; | |
148 }else{ | 150 }else{ |
149 int cbp_index; | 151 int cbp_index; |
150 | 152 |
151 put_bits(&s->pb, 2, SKIP_TYPE_NONE); | 153 put_bits(&s->pb, 2, SKIP_TYPE_NONE); |
152 | 154 |
179 } | 181 } |
180 put_bits(&s->pb, 1, s->dc_table_index); | 182 put_bits(&s->pb, 1, s->dc_table_index); |
181 put_bits(&s->pb, 1, s->mv_table_index); | 183 put_bits(&s->pb, 1, s->mv_table_index); |
182 | 184 |
183 s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE); | 185 s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE); |
184 s->no_rounding ^= 1; | |
185 } | 186 } |
186 s->esc3_level_length= 0; | 187 s->esc3_level_length= 0; |
187 s->esc3_run_length= 0; | 188 s->esc3_run_length= 0; |
188 | 189 |
189 return 0; | 190 return 0; |