diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-08-17 10:41:15 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-08-17 10:41:15 +0000 |
commit | 0722ccdbc000b82b4bf52644a0e4964c64d1f537 (patch) | |
tree | cfdd4a18fec005be177a740b7bd87bcc06e20af4 /libavcodec | |
parent | 3ad7dd8cdaff9faa722498a463b72e5f4c5ce990 (diff) | |
download | ffmpeg-0722ccdbc000b82b4bf52644a0e4964c64d1f537.tar.gz |
more untested bigendian fixes
rgb32 plane predictor decoding bugfix
Originally committed as revision 3398 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/huffyuv.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index 34d2de89b4..6c4b3ceddf 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -623,9 +623,9 @@ static void decode_bgr_bitstream(HYuvContext *s, int count){ if(s->decorrelate){ if(s->bitstream_bpp==24){ for(i=0; i<count; i++){ - s->temp[0][4*i+1]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); - s->temp[0][4*i ]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3) + s->temp[0][4*i+1]; - s->temp[0][4*i+2]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3) + s->temp[0][4*i+1]; + s->temp[0][4*i+G]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); + s->temp[0][4*i+B]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3) + s->temp[0][4*i+G]; + s->temp[0][4*i+R]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3) + s->temp[0][4*i+G]; } }else{ for(i=0; i<count; i++){ @@ -638,9 +638,9 @@ static void decode_bgr_bitstream(HYuvContext *s, int count){ }else{ if(s->bitstream_bpp==24){ for(i=0; i<count; i++){ - s->temp[0][4*i ]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3); - s->temp[0][4*i+1]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); - s->temp[0][4*i+2]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3); + s->temp[0][4*i+B]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3); + s->temp[0][4*i+G]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); + s->temp[0][4*i+R]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3); } }else{ for(i=0; i<count; i++){ @@ -864,14 +864,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8 const int last_line= (height-1)*p->linesize[0]; if(s->bitstream_bpp==32){ - p->data[0][last_line+3]= get_bits(&s->gb, 8); - leftr= p->data[0][last_line+2]= get_bits(&s->gb, 8); - leftg= p->data[0][last_line+1]= get_bits(&s->gb, 8); - leftb= p->data[0][last_line+0]= get_bits(&s->gb, 8); + skip_bits(&s->gb, 8); + leftr= p->data[0][last_line+R]= get_bits(&s->gb, 8); + leftg= p->data[0][last_line+G]= get_bits(&s->gb, 8); + leftb= p->data[0][last_line+B]= get_bits(&s->gb, 8); }else{ - leftr= p->data[0][last_line+2]= get_bits(&s->gb, 8); - leftg= p->data[0][last_line+1]= get_bits(&s->gb, 8); - leftb= p->data[0][last_line+0]= get_bits(&s->gb, 8); + leftr= p->data[0][last_line+R]= get_bits(&s->gb, 8); + leftg= p->data[0][last_line+G]= get_bits(&s->gb, 8); + leftb= p->data[0][last_line+B]= get_bits(&s->gb, 8); skip_bits(&s->gb, 8); } @@ -887,7 +887,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8 add_left_prediction_bgr32(p->data[0] + p->linesize[0]*y, s->temp[0], width, &leftr, &leftg, &leftb); if(s->predictor == PLANE){ - if((y&s->interlaced)==0){ + if((y&s->interlaced)==0 && y<s->height-2){ s->dsp.add_bytes(p->data[0] + p->linesize[0]*y, p->data[0] + p->linesize[0]*y + fake_ystride, fake_ystride); } |