Closed njliang closed 3 years ago
getMaxBitDepthFromProfile return 10 for avc nv16 (profile: AL_PROFILE_AVC_HIGH_422)
static int getMaxBitDepthFromProfile(int profile_idc) { if( (profile_idc == AL_GET_PROFILE_IDC(AL_PROFILE_AVC_BASELINE)) || (profile_idc == AL_GET_PROFILE_IDC(AL_PROFILE_AVC_MAIN)) || (profile_idc == AL_GET_PROFILE_IDC(AL_PROFILE_AVC_EXTENDED)) || (profile_idc == AL_GET_PROFILE_IDC(AL_PROFILE_AVC_HIGH)) ) return 8; return 10; } static int getMaxBitDepth(AL_TAvcSps const* pSPS) { int iSPSLumaBitDepth = pSPS->bit_depth_luma_minus8 + 8; int iSPSChromaBitDepth = pSPS->bit_depth_chroma_minus8 + 8; int iMaxSPSBitDepth = Max(iSPSLumaBitDepth, iSPSChromaBitDepth); int iMaxBitDepth = Max(iMaxSPSBitDepth, getMaxBitDepthFromProfile(pSPS->profile_idc)); if((iMaxBitDepth % 2) != 0) iMaxBitDepth++; return iMaxBitDepth; }
getMaxBitDepthFromProfile return 10 for avc nv16 (profile: AL_PROFILE_AVC_HIGH_422)