diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-04-01 15:38:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-04-01 15:38:01 +0000 |
commit | 1f9aea9b91c653c6ad95e84b2ff250738e352eec (patch) | |
tree | cc316f2a7ae37e508d262854dd210bcc0ff196d2 /libavcodec/wmv2.c | |
parent | 309522372c481dea3d9f6f33eacc6d200cce10cb (diff) | |
download | ffmpeg-streaming-1f9aea9b91c653c6ad95e84b2ff250738e352eec.zip ffmpeg-streaming-1f9aea9b91c653c6ad95e84b2ff250738e352eec.tar.gz |
fixing msmpeg4v2 encoding
Originally committed as revision 1723 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmv2.c')
-rw-r--r-- | libavcodec/wmv2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 99780f6..2c15694 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -131,7 +131,10 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number) w->abt_type=0; w->j_type=0; + assert(s->flipflop_rounding); + if (s->pict_type == I_TYPE) { + assert(s->no_rounding==1); if(w->j_type_bit) put_bits(&s->pb, 1, w->j_type); if(w->per_mb_rl_bit) put_bits(&s->pb, 1, s->per_mb_rl_table); @@ -144,7 +147,6 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number) put_bits(&s->pb, 1, s->dc_table_index); s->inter_intra_pred= 0; - s->no_rounding = 1; }else{ int cbp_index; @@ -181,7 +183,6 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number) put_bits(&s->pb, 1, s->mv_table_index); s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE); - s->no_rounding ^= 1; } s->esc3_level_length= 0; s->esc3_run_length= 0; |