<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>hi,</div><div><br></div><div>I read x265 source code, and find one function, as shown below:</div><div><br></div><div><br></div><div><div>int x265_param_apply_profile(x265_param *param, const char *profile)</div><div>{</div><div>    if (!param || !profile)</div><div>        return 0;</div><div><br></div><div>    /* Check if profile bit-depth requirement is exceeded by internal bit depth */</div><div>    bool bInvalidDepth = false;</div><div>#if X265_DEPTH > 8</div><div>    if (!strcmp(profile, "main") || !strcmp(profile, "mainstillpicture") || !strcmp(profile, "msp") ||</div><div>        !strcmp(profile, "main444-8") || !strcmp(profile, "main-intra") ||</div><div>        !strcmp(profile, "main444-intra") || !strcmp(profile, "main444-stillpicture"))</div><div>        bInvalidDepth = true;</div><div>#endif</div><div>#if X265_DEPTH > 10</div><div>    if (!strcmp(profile, "main10") || !strcmp(profile, "main422-10") || !strcmp(profile, "main444-10") ||</div><div>        !strcmp(profile, "main10-intra") || !strcmp(profile, "main422-10-intra") || !strcmp(profile, "main444-10-intra"))</div><div>        bInvalidDepth = true;</div><div>#endif</div><div>#if X265_DEPTH > 12</div><div>    if (!strcmp(profile, "main12") || !strcmp(profile, "main422-12") || !strcmp(profile, "main444-12") ||</div><div>        !strcmp(profile, "main12-intra") || !strcmp(profile, "main422-12-intra") || !strcmp(profile, "main444-12-intra"))</div><div>        bInvalidDepth = true;</div><div>#endif</div><div><br></div><div>    if (bInvalidDepth)</div><div>    {</div><div>        x265_log(param, X265_LOG_ERROR, "%s profile not supported, internal bit depth %d.\n", profile, X265_DEPTH);</div><div>        return -1;</div><div>    }</div></div><div><br></div><div>It seems that the logic will report error, when x265 is built with X265_DEPTH = 10 and profile is of 8bit.</div><div><br></div><div>How to make x265 support both 8bit and 10bit?</div><div><br></div><div>Thanks!</div><div><br></div><div>Regards</div><div><br></div><div>Andrew</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><br><span title="neteasefooter"><p> </p></span>