[x265] how to build x265 that supports both 8bit and 10bit

qw applemax82 at 163.com
Fri May 17 05:06:13 CEST 2019


hi,


I read x265 source code, and find one function, as shown below:




int x265_param_apply_profile(x265_param *param, const char *profile)
{
    if (!param || !profile)
        return 0;


    /* Check if profile bit-depth requirement is exceeded by internal bit depth */
    bool bInvalidDepth = false;
#if X265_DEPTH > 8
    if (!strcmp(profile, "main") || !strcmp(profile, "mainstillpicture") || !strcmp(profile, "msp") ||
        !strcmp(profile, "main444-8") || !strcmp(profile, "main-intra") ||
        !strcmp(profile, "main444-intra") || !strcmp(profile, "main444-stillpicture"))
        bInvalidDepth = true;
#endif
#if X265_DEPTH > 10
    if (!strcmp(profile, "main10") || !strcmp(profile, "main422-10") || !strcmp(profile, "main444-10") ||
        !strcmp(profile, "main10-intra") || !strcmp(profile, "main422-10-intra") || !strcmp(profile, "main444-10-intra"))
        bInvalidDepth = true;
#endif
#if X265_DEPTH > 12
    if (!strcmp(profile, "main12") || !strcmp(profile, "main422-12") || !strcmp(profile, "main444-12") ||
        !strcmp(profile, "main12-intra") || !strcmp(profile, "main422-12-intra") || !strcmp(profile, "main444-12-intra"))
        bInvalidDepth = true;
#endif


    if (bInvalidDepth)
    {
        x265_log(param, X265_LOG_ERROR, "%s profile not supported, internal bit depth %d.\n", profile, X265_DEPTH);
        return -1;
    }


It seems that the logic will report error, when x265 is built with X265_DEPTH = 10 and profile is of 8bit.


How to make x265 support both 8bit and 10bit?


Thanks!


Regards


Andrew









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190517/27266dce/attachment.html>


More information about the x265-devel mailing list