View | Details | Raw Unified
Collapse All | Expand All

(-) libavcodec/utils.c.orig (+9 lines)
 Lines 325-330    Link Here 
            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;
	    if(s->pix_fmt == PIX_FMT_PAL8 && i == 1)
	    {
	        buf->base[i] = av_malloc(256 * 4);
	        if(buf->base[i] == NULL)
	            return -1;
	        buf->data[i] = buf->base[i];
	        continue;
	    }
            //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it
            //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, STRIDE_ALIGN<<(h_chroma_shift-h_shift)); 
            buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, STRIDE_ALIGN<<(h_chroma_shift-h_shift));