Mercurial > libavcodec.hg
comparison mpegvideo.c @ 575:23eee7d73c4b libavcodec
minor optimizations
fixing numbers.avi
fixing ac prediction between MBs with different QP
author | michaelni |
---|---|
date | Sun, 21 Jul 2002 01:34:05 +0000 |
parents | 274d9c5a75ee |
children | 5132a4ee50cd |
comparison
equal
deleted
inserted
replaced
574:c9b17c1a02e0 | 575:23eee7d73c4b |
---|---|
268 CHECKED_ALLOCZ(s->bitstream_buffer, BITSTREAM_BUFFER_SIZE); | 268 CHECKED_ALLOCZ(s->bitstream_buffer, BITSTREAM_BUFFER_SIZE); |
269 | 269 |
270 /* cbp, ac_pred, pred_dir */ | 270 /* cbp, ac_pred, pred_dir */ |
271 CHECKED_ALLOCZ(s->cbp_table , s->mb_num * sizeof(UINT8)) | 271 CHECKED_ALLOCZ(s->cbp_table , s->mb_num * sizeof(UINT8)) |
272 CHECKED_ALLOCZ(s->pred_dir_table, s->mb_num * sizeof(UINT8)) | 272 CHECKED_ALLOCZ(s->pred_dir_table, s->mb_num * sizeof(UINT8)) |
273 | 273 } |
274 CHECKED_ALLOCZ(s->qscale_table , s->mb_num * sizeof(UINT8)) | 274 CHECKED_ALLOCZ(s->qscale_table , s->mb_num * sizeof(UINT8)) |
275 } | 275 |
276 /* default structure is frame */ | 276 /* default structure is frame */ |
277 s->picture_structure = PICT_FRAME; | 277 s->picture_structure = PICT_FRAME; |
278 | 278 |
279 /* init macroblock skip table */ | 279 /* init macroblock skip table */ |
280 CHECKED_ALLOCZ(s->mbskip_table, s->mb_num); | 280 CHECKED_ALLOCZ(s->mbskip_table, s->mb_num); |
1412 #ifdef FF_POSTPROCESS | 1412 #ifdef FF_POSTPROCESS |
1413 /* Obsolete. Exists for compatibility with mplayer only. */ | 1413 /* Obsolete. Exists for compatibility with mplayer only. */ |
1414 quant_store[mb_y][mb_x]=s->qscale; | 1414 quant_store[mb_y][mb_x]=s->qscale; |
1415 //printf("[%02d][%02d] %d\n",mb_x,mb_y,s->qscale); | 1415 //printf("[%02d][%02d] %d\n",mb_x,mb_y,s->qscale); |
1416 #else | 1416 #else |
1417 /* even more obsolete, exists for mplayer xp only */ | |
1417 if(s->avctx->quant_store) s->avctx->quant_store[mb_y*s->avctx->qstride+mb_x] = s->qscale; | 1418 if(s->avctx->quant_store) s->avctx->quant_store[mb_y*s->avctx->qstride+mb_x] = s->qscale; |
1418 #endif | 1419 #endif |
1420 s->qscale_table[mb_xy]= s->qscale; | |
1419 | 1421 |
1420 /* update DC predictors for P macroblocks */ | 1422 /* update DC predictors for P macroblocks */ |
1421 if (!s->mb_intra) { | 1423 if (!s->mb_intra) { |
1422 if (s->h263_pred || s->h263_aic) { | 1424 if (s->h263_pred || s->h263_aic) { |
1423 if(s->mbintra_table[mb_xy]) | 1425 if(s->mbintra_table[mb_xy]) |