Commit 5a15eacf authored by michael's avatar michael

ppc chroma mess workaround (real bug is that the motion compensation code...

ppc chroma mess workaround (real bug is that the motion compensation code assumes that 2*uvlinesize == linesize and fixing this would mean a slowdown)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2771 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e6c110f8
...@@ -238,7 +238,8 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ ...@@ -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 h_shift= i==0 ? 0 : h_chroma_shift;
const int v_shift= i==0 ? 0 : v_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 buf->base[i]= av_mallocz((buf->linesize[i]*h>>v_shift)+16); //FIXME 16
if(buf->base[i]==NULL) return -1; if(buf->base[i]==NULL) return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment