[x265] [PATCH] Make FrameEncoder partially virtual so it can be overloaded

Nicolas Morey-Chaisemartin nmorey at kalray.eu
Wed Feb 4 09:16:44 CET 2015


On 02/03/2015 07:21 PM, Steve Borho wrote:
> m_frameEncoder = new FrameEncoderKalray[m_param->frameNumThreads] should
> still work unless you plan to use a mixture of FrameEncoder and
> FrameEncoderKalray.
Actually it doesn't. Because m_frameEncoder is declared as an array of FrameEncoder, later access will get a wrong pointer
In this case:
&m_frameEncoder[i] = (uint8_t*)m_frameEncoder + i *sizeof(FrameEncoder)
Not (uint8_t*)m_frameEncoder + i *sizeof(FrameEncoderKalray)

I tried it at first but it just went awfully wrong ;)

>
> Either way, can you rebase your change to the new tip and use
> FrameEncoder*  m_frameEncoder[X265_MAX_FRAME_THREADS] in the top-level
> Encoder?
>

Sure


More information about the x265-devel mailing list