diff options
author | Jeff Downs <heydowns@borg.com> | 2009-05-23 19:37:01 +0000 |
---|---|---|
committer | Jeff Downs <heydowns@borg.com> | 2009-05-23 19:37:01 +0000 |
commit | fdb699de62a7fdeb14a1a53a7813a3e8dcad12c1 (patch) | |
tree | 6fddf3cd660a8867b6c2e038d090bdead228179a /libavcodec | |
parent | aa5cfdfb4f11519c338372f5a52137c2e65a1a11 (diff) | |
download | ffmpeg-fdb699de62a7fdeb14a1a53a7813a3e8dcad12c1.tar.gz |
Fix passing of unaligned addresses to dsputil diff_bytes() by
changeing calls to sub_left_prediction such that
the source frame data pointers are no longer offset to skip the initial
elements. This keeps them properly aligned for the subsequent call to diff_bytes.
Changes encoding offset to compensate.
Mailing list thread:
https://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-May/069952.html
Originally committed as revision 18919 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/huffyuv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index 5ecb138045..092a1096b6 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -1257,11 +1257,11 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, put_bits(&s->pb, 8, leftu= p->data[1][0]); put_bits(&s->pb, 8, p->data[0][0]); - lefty= sub_left_prediction(s, s->temp[0], p->data[0]+2, width-2 , lefty); - leftu= sub_left_prediction(s, s->temp[1], p->data[1]+1, width2-1, leftu); - leftv= sub_left_prediction(s, s->temp[2], p->data[2]+1, width2-1, leftv); + lefty= sub_left_prediction(s, s->temp[0], p->data[0], width , 0); + leftu= sub_left_prediction(s, s->temp[1], p->data[1], width2, 0); + leftv= sub_left_prediction(s, s->temp[2], p->data[2], width2, 0); - encode_422_bitstream(s, 0, width-2); + encode_422_bitstream(s, 2, width-2); if(s->predictor==MEDIAN){ int lefttopy, lefttopu, lefttopv; |