comparison vc1.c @ 6150:49a4e4d78692 libavcodec

pqindex=0 is forbidden
author kostya
date Wed, 16 Jan 2008 17:07:34 +0000
parents ddf5d7fae101
children 1d735690e172
comparison
equal deleted inserted replaced
6149:b1bd3188bdef 6150:49a4e4d78692
1063 if(v->s.pict_type == P_TYPE) 1063 if(v->s.pict_type == P_TYPE)
1064 v->rnd ^= 1; 1064 v->rnd ^= 1;
1065 1065
1066 /* Quantizer stuff */ 1066 /* Quantizer stuff */
1067 pqindex = get_bits(gb, 5); 1067 pqindex = get_bits(gb, 5);
1068 if(!pqindex) return -1;
1068 if (v->quantizer_mode == QUANT_FRAME_IMPLICIT) 1069 if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
1069 v->pq = ff_vc1_pquant_table[0][pqindex]; 1070 v->pq = ff_vc1_pquant_table[0][pqindex];
1070 else 1071 else
1071 v->pq = ff_vc1_pquant_table[1][pqindex]; 1072 v->pq = ff_vc1_pquant_table[1][pqindex];
1072 1073
1299 if(v->bfraction == 0) { 1300 if(v->bfraction == 0) {
1300 v->s.pict_type = BI_TYPE; /* XXX: should not happen here */ 1301 v->s.pict_type = BI_TYPE; /* XXX: should not happen here */
1301 } 1302 }
1302 } 1303 }
1303 pqindex = get_bits(gb, 5); 1304 pqindex = get_bits(gb, 5);
1305 if(!pqindex) return -1;
1304 v->pqindex = pqindex; 1306 v->pqindex = pqindex;
1305 if (v->quantizer_mode == QUANT_FRAME_IMPLICIT) 1307 if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
1306 v->pq = ff_vc1_pquant_table[0][pqindex]; 1308 v->pq = ff_vc1_pquant_table[0][pqindex];
1307 else 1309 else
1308 v->pq = ff_vc1_pquant_table[1][pqindex]; 1310 v->pq = ff_vc1_pquant_table[1][pqindex];