diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-02-12 16:21:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-02-12 16:21:21 +0000 |
commit | 7984082a08cf2119da3433c245b72a91020b879d (patch) | |
tree | 46e68074a3094ce23da69364c137e1f5652d7f9f /libavcodec/utils.c | |
parent | ec26a167ee4835d237c0d6700df9a661e38994c4 (diff) | |
download | ffmpeg-7984082a08cf2119da3433c245b72a91020b879d.tar.gz |
ppc chroma mess workaround (real bug is that the motion compensation code assumes that 2*uvlinesize == linesize and fixing this would mean a slowdown)
Originally committed as revision 2771 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0f123b7b32..d04c2faaf0 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -238,7 +238,8 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ const int h_shift= i==0 ? 0 : h_chroma_shift; const int v_shift= i==0 ? 0 : v_chroma_shift; - buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, s_align); + //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it + buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, s_align<<(h_chroma_shift-h_shift)); buf->base[i]= av_mallocz((buf->linesize[i]*h>>v_shift)+16); //FIXME 16 if(buf->base[i]==NULL) return -1; |