Mercurial > libavcodec.hg
comparison h264.c @ 7528:553ec99ac3b0 libavcodec
Mask bits of reference indexes properly to avoid negative numbers entangling
each other.
Fixes at least:
CAMA1_TOSHIBA_B
cama1_vtc_c
CAMA3_Sand_E
cama3_vtc_b
CAMASL3_Sony_B
CVMA1_TOSHIBA_B
CVMAQP3_Sony_D
cvmp_mot_mbaff0_full_B
FRExt/HCAMFF1_HHI
FRExt/HCHP3_HHI_A
FRExt/HVLCMFF0_Sony_B
author | michael |
---|---|
date | Sun, 10 Aug 2008 16:10:39 +0000 |
parents | ebdac291453a |
children | c4de4b187b4f |
comparison
equal
deleted
inserted
replaced
7527:ebdac291453a | 7528:553ec99ac3b0 |
---|---|
189 //FIXME maybe we can make MC and loop filter use the same values or prevent | 189 //FIXME maybe we can make MC and loop filter use the same values or prevent |
190 //the MC code from changing ref_cache and rather use a temporary array. | 190 //the MC code from changing ref_cache and rather use a temporary array. |
191 if(USES_LIST(mb_type,list)){ | 191 if(USES_LIST(mb_type,list)){ |
192 int8_t *ref = &s->current_picture.ref_index[list][h->mb2b8_xy[mb_xy]]; | 192 int8_t *ref = &s->current_picture.ref_index[list][h->mb2b8_xy[mb_xy]]; |
193 *(uint32_t*)&h->ref_cache[list][scan8[ 0]] = | 193 *(uint32_t*)&h->ref_cache[list][scan8[ 0]] = |
194 *(uint32_t*)&h->ref_cache[list][scan8[ 2]] = pack16to32(ref[0],ref[1])*0x0101; | 194 *(uint32_t*)&h->ref_cache[list][scan8[ 2]] = (pack16to32(ref[0],ref[1])&0x00FF00FF)*0x0101; |
195 ref += h->b8_stride; | 195 ref += h->b8_stride; |
196 *(uint32_t*)&h->ref_cache[list][scan8[ 8]] = | 196 *(uint32_t*)&h->ref_cache[list][scan8[ 8]] = |
197 *(uint32_t*)&h->ref_cache[list][scan8[10]] = pack16to32(ref[0],ref[1])*0x0101; | 197 *(uint32_t*)&h->ref_cache[list][scan8[10]] = (pack16to32(ref[0],ref[1])&0x00FF00FF)*0x0101; |
198 } | 198 } |
199 } | 199 } |
200 } | 200 } |
201 }else{ | 201 }else{ |
202 topleft_type = h->slice_table[topleft_xy ] == h->slice_num ? s->current_picture.mb_type[topleft_xy] : 0; | 202 topleft_type = h->slice_table[topleft_xy ] == h->slice_num ? s->current_picture.mb_type[topleft_xy] : 0; |