comparison utils.c @ 1798:a3da4b429984 libavcodec

ppc chroma mess workaround (real bug is that the motion compensation code assumes that 2*uvlinesize == linesize and fixing this would mean a slowdown)
author michael
date Thu, 12 Feb 2004 16:21:21 +0000
parents 33f736f68b52
children 95612d423fde
comparison
equal deleted inserted replaced
1797:fac680cf3008 1798:a3da4b429984
236 236
237 for(i=0; i<3; i++){ 237 for(i=0; i<3; i++){
238 const int h_shift= i==0 ? 0 : h_chroma_shift; 238 const int h_shift= i==0 ? 0 : h_chroma_shift;
239 const int v_shift= i==0 ? 0 : v_chroma_shift; 239 const int v_shift= i==0 ? 0 : v_chroma_shift;
240 240
241 buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, s_align); 241 //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it
242 buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, s_align<<(h_chroma_shift-h_shift));
242 243
243 buf->base[i]= av_mallocz((buf->linesize[i]*h>>v_shift)+16); //FIXME 16 244 buf->base[i]= av_mallocz((buf->linesize[i]*h>>v_shift)+16); //FIXME 16
244 if(buf->base[i]==NULL) return -1; 245 if(buf->base[i]==NULL) return -1;
245 memset(buf->base[i], 128, buf->linesize[i]*h>>v_shift); 246 memset(buf->base[i], 128, buf->linesize[i]*h>>v_shift);
246 247