Mercurial > libavcodec.hg
comparison h263.c @ 294:944632089814 libavcodec
4MV motion estimation (not finished yet)
SAD functions rewritten (8x8 support & MMX2 optimizations)
HQ inter/intra decission
msmpeg4 encoding bugfix (MV where too long)
author | michaelni |
---|---|
date | Wed, 27 Mar 2002 21:25:22 +0000 |
parents | 6eaf5da091fa |
children | 6622b0fd036c |
comparison
equal
deleted
inserted
replaced
293:6eaf5da091fa | 294:944632089814 |
---|---|
467 cbpy = cbp >> 2; | 467 cbpy = cbp >> 2; |
468 put_bits(&s->pb, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]); | 468 put_bits(&s->pb, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]); |
469 } | 469 } |
470 | 470 |
471 /* encode each block */ | 471 /* encode each block */ |
472 if (s->h263_pred) { | 472 for (i = 0; i < 6; i++) { |
473 for (i = 0; i < 6; i++) { | 473 h263_encode_block(s, block[i], i); |
474 // mpeg4_encode_block(s, block[i], i); | |
475 } | |
476 } else { | |
477 for (i = 0; i < 6; i++) { | |
478 h263_encode_block(s, block[i], i); | |
479 } | |
480 } | 474 } |
481 } | 475 } |
482 | 476 |
483 void h263_pred_acdc(MpegEncContext * s, INT16 *block, int n) | 477 void h263_pred_acdc(MpegEncContext * s, INT16 *block, int n) |
484 { | 478 { |
776 init_mv_penalty_and_fcode(s); | 770 init_mv_penalty_and_fcode(s); |
777 } | 771 } |
778 s->mv_penalty= mv_penalty; //FIXME exact table for msmpeg4 & h263p | 772 s->mv_penalty= mv_penalty; //FIXME exact table for msmpeg4 & h263p |
779 | 773 |
780 // use fcodes >1 only for mpeg4 & h263 & h263p FIXME | 774 // use fcodes >1 only for mpeg4 & h263 & h263p FIXME |
781 if(s->h263_plus) s->fcode_tab= umv_fcode_tab; | 775 if(s->h263_plus) s->fcode_tab= umv_fcode_tab; |
782 else if(s->h263_pred) s->fcode_tab= fcode_tab; | 776 else if(s->h263_pred && !s->h263_msmpeg4) s->fcode_tab= fcode_tab; |
783 } | 777 } |
784 | 778 |
785 static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n) | 779 static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n) |
786 { | 780 { |
787 int level, run, last, i, j, last_index, last_non_zero, sign, slevel; | 781 int level, run, last, i, j, last_index, last_non_zero, sign, slevel; |