Mercurial > libavcodec.hg
changeset 3451:45724ba8d666 libavcodec
Fix mquant selection for ALL_MBS mode
author | kostya |
---|---|
date | Sun, 09 Jul 2006 02:51:13 +0000 |
parents | 906c58dcb6ea |
children | f024ca7c768b |
files | vc1.c |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/vc1.c Sun Jul 09 02:47:09 2006 +0000 +++ b/vc1.c Sun Jul 09 02:51:13 2006 +0000 @@ -704,7 +704,7 @@ 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 @@ { \ 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 @@ 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; \