diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-07-09 02:51:13 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-07-09 02:51:13 +0000 |
commit | 3a3f1cf3f8801a5bd53a80ec52ed80fb234fc28b (patch) | |
tree | 0a51a3a433673552e5e146f48c3a35a8191a07c5 | |
parent | 65c7bb9ec4f521a46577a1e87d71ad9a8deee6cd (diff) | |
download | ffmpeg-3a3f1cf3f8801a5bd53a80ec52ed80fb234fc28b.tar.gz |
Fix mquant selection for ALL_MBS mode
Originally committed as revision 5686 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vc1.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 62ccee9788..2b43070c6f 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -704,7 +704,7 @@ static int vop_dquant_decoding(VC1Context *v) v->dqbilevel = get_bits(gb, 1); default: break; //Forbidden ? } - if (!v->dqbilevel || v->dqprofile != DQPROFILE_ALL_MBS) + if (v->dqbilevel || v->dqprofile != DQPROFILE_ALL_MBS) { pqdiff = get_bits(gb, 3); if (pqdiff == 7) v->altpq = get_bits(gb, 5); @@ -1449,7 +1449,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) { \ if (v->dqbilevel) \ { \ - mquant = (get_bits(gb, 1)) ? v->pq : v->altpq; \ + mquant = (get_bits(gb, 1)) ? v->altpq : v->pq; \ } \ else \ { \ @@ -1464,10 +1464,9 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) edges = (3 << v->dqsbedge) % 15; \ else if(v->dqprofile == DQPROFILE_FOUR_EDGES) \ edges = 15; \ - mquant = v->pq; \ if((edges&1) && !s->mb_x) \ mquant = v->altpq; \ - if((edges&2) && !s->mb_y) \ + if((edges&2) && s->first_slice_line) \ mquant = v->altpq; \ if((edges&4) && s->mb_x == (s->mb_width - 1)) \ mquant = v->altpq; \ |