[x264-devel] Build issue
Chang Chen
Chang_Chen at sonic.com
Mon Apr 21 10:06:30 CEST 2008
See the old codes, I think adding cast from void* to uint8_t* would be
ok.
Would you like submitting your MSVS2005 project?
Chang
From: x264-devel-bounces at videolan.org
[mailto:x264-devel-bounces at videolan.org] On Behalf Of Paul -Spawn-
Rysevets
Sent: Monday, April 21, 2008 4:02 PM
To: Mailing list for x264 developers
Subject: Re: [x264-devel] Build issue
Hello Chang,
Monday, April 21, 2008, 7:38:14 AM, you wrote:
and what about this solution?
- CHECKED_MALLOC( frame->buffer[4+i],
- frame->i_stride[0] * ( frame->i_lines[0] +
2*i_padv ) );
- frame->filtered[i+1] = ((uint8_t*)frame->buffer[4+i]) +
- frame->i_stride[0] * i_padv + PADH;
+ CHECKED_MALLOC( frame->buffer[i], luma_plane_size/4 );
+ frame->plane[i] = (uint8_t*)frame->buffer[i] +
(frame->i_stride[i] * i_padv + PADH)/2;
}
+ /* all 4 luma planes allocated together, since the cacheline split
code
+ * requires them to be in-phase wrt cacheline alignment. */
+ CHECKED_MALLOC( frame->buffer[0], 4*luma_plane_size);
+ for( i = 0; i < 4; i++ )
+ frame->filtered[i] = (uint8_t*)frame->buffer[0] +
i*luma_plane_size + frame->i_stride[0] * i_padv + PADH;
+ frame->plane[0] = frame->filtered[0];
in this case MSVS2005 says it's fine... and compiles it perfectly. (i've
wrote that on doom9 last week)
>
Hi
For the "cacheline split workaround for mc_luma"
+ for( i = 1; i < 3; i++ )
{
- CHECKED_MALLOC( frame->buffer[4+i],
- frame->i_stride[0] * ( frame->i_lines[0] +
2*i_padv ) );
- frame->filtered[i+1] = ((uint8_t*)frame->buffer[4+i]) +
- frame->i_stride[0] * i_padv + PADH;
+ CHECKED_MALLOC( frame->buffer[i], luma_plane_size/4 );
+ frame->plane[i] = frame->buffer[i] + (frame->i_stride[i] *
i_padv + PADH)/2;
}
This line would be problematic,
frame->plane[i] = frame->buffer[i] + (frame->i_stride[i] * i_padv +
PADH)/2;
the buffer array is defined as "void *buffer[4];" and plane is
defined as "uint8_t *plane[3]", so it leads a compile issue at MSVC71
--
Best regards,
Paul 'Spawn' Rysevets P.Rysevets at sam-solutions.net
<mailto:P.Rysevets at sam-solutions.net>
SpAwN_gUy.aka.WAREZMasta WAREZMasta at gmail.com
<mailto:WAREZMasta at gmail.com>
ICQ(PRiMARY):968978 ICQ(Secondary):169588436
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.videolan.org/pipermail/x264-devel/attachments/20080421/49dac6f4/attachment.htm
More information about the x264-devel
mailing list