comparison h263dec.c @ 1048:75a659fae7e0 libavcodec

divx503 decoding fix
author michaelni
date Sun, 02 Feb 2003 23:34:30 +0000
parents 9fbad5cf7e9e
children f07fd48c23d4
comparison
equal deleted inserted replaced
1047:3f316a471019 1048:75a659fae7e0
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 #include "avcodec.h" 19 #include "avcodec.h"
20 #include "dsputil.h" 20 #include "dsputil.h"
21 #include "mpegvideo.h" 21 #include "mpegvideo.h"
22
23 #if 1
24 #define PRINT_QP(a, b) {}
25 #else
26 #define PRINT_QP(a, b) printf(a, b)
27 #endif
28 22
29 //#define DEBUG 23 //#define DEBUG
30 //#define PRINT_FRAME_TIME 24 //#define PRINT_FRAME_TIME
31 #ifdef PRINT_FRAME_TIME 25 #ifdef PRINT_FRAME_TIME
32 static inline long long rdtsc() 26 static inline long long rdtsc()
203 s->mv_type = MV_TYPE_16X16; 197 s->mv_type = MV_TYPE_16X16;
204 // s->mb_skiped = 0; 198 // s->mb_skiped = 0;
205 //printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24)); 199 //printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24));
206 ret= s->decode_mb(s, s->block); 200 ret= s->decode_mb(s, s->block);
207 201
208 PRINT_QP("%2d", s->qscale);
209 MPV_decode_mb(s, s->block); 202 MPV_decode_mb(s, s->block);
210 203
211 if(ret<0){ 204 if(ret<0){
212 const int xy= s->mb_x + s->mb_y*s->mb_width; 205 const int xy= s->mb_x + s->mb_y*s->mb_width;
213 if(ret==SLICE_END){ 206 if(ret==SLICE_END){
237 } 230 }
238 } 231 }
239 232
240 ff_draw_horiz_band(s); 233 ff_draw_horiz_band(s);
241 234
242 PRINT_QP("%s", "\n");
243
244 s->mb_x= 0; 235 s->mb_x= 0;
245 } 236 }
246 237
247 assert(s->mb_x==0 && s->mb_y==s->mb_height); 238 assert(s->mb_x==0 && s->mb_y==s->mb_height);
248 239
491 s->workaround_bugs|= FF_BUG_AC_VLC; 482 s->workaround_bugs|= FF_BUG_AC_VLC;
492 } 483 }
493 484
494 if(s->divx_version){ 485 if(s->divx_version){
495 s->workaround_bugs|= FF_BUG_QPEL_CHROMA; 486 s->workaround_bugs|= FF_BUG_QPEL_CHROMA;
487 }
488
489 if(s->divx_version>502){
490 s->workaround_bugs|= FF_BUG_QPEL_CHROMA2;
496 } 491 }
497 492
498 if(s->avctx->fourcc == ff_get_fourcc("XVID") && s->xvid_build==0) 493 if(s->avctx->fourcc == ff_get_fourcc("XVID") && s->xvid_build==0)
499 s->workaround_bugs|= FF_BUG_QPEL_CHROMA; 494 s->workaround_bugs|= FF_BUG_QPEL_CHROMA;
500 495