[x265] #define => enum?

Steve Borho steve at borho.org
Wed Sep 18 18:02:52 CEST 2013


On Wed, Sep 18, 2013 at 7:36 AM, SF Markus Elfring <
elfring at users.sourceforge.net> wrote:

> Hello,
>
> Would you like to replace more defines for constant values by enumerations
> to
> stress their relationships?
>
> https://bitbucket.org/multicoreware/x265/src/1c66f40da3e9/source/x265.h#cl-157
>
> Examples:
> - X265_LOG_...
> - X265_CPU_LEVEL_...
>

In general yes, but I would avoid changing X265_CPU_LEVEL_* for two reasons:

1 - they should go away when we drop the vector class library, to be
replaced with x264's CPU capability flags

2 - they are used by the preprocessor in #if statements, and enums fail in
odd ways.  I actually defined those as enums at first but had to "regress"
them to preprocessor defines so the code would compile correctly

Cheers

-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130918/bc5ef161/attachment.html>


More information about the x265-devel mailing list