Compare commits
6 Commits
v1.6.0
...
openh264v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6ee34c08b | ||
|
|
6d1a9968e2 | ||
|
|
b46a9206d0 | ||
|
|
07b046f7fa | ||
|
|
4b096b1ab6 | ||
|
|
be76769262 |
@@ -4,12 +4,12 @@
|
||||
|
||||
#include "codec_app_def.h"
|
||||
|
||||
static const OpenH264Version g_stCodecVersion = {1, 4, 0, 0};
|
||||
static const char* const g_strCodecVer = "OpenH264 version:1.4.0.0";
|
||||
static const OpenH264Version g_stCodecVersion = {1,4,1,0};
|
||||
static const char* const g_strCodecVer = "OpenH264 version:1.4.1.0";
|
||||
|
||||
#define OPENH264_MAJOR (1)
|
||||
#define OPENH264_MINOR (4)
|
||||
#define OPENH264_REVISION (0)
|
||||
#define OPENH264_REVISION (1)
|
||||
#define OPENH264_RESERVED (0)
|
||||
|
||||
#endif // CODEC_VER_H
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "parameter_sets.h"
|
||||
#include "decoder_context.h"
|
||||
|
||||
#define DISABLE_HP_BRANCH_1_4
|
||||
namespace WelsDec {
|
||||
|
||||
/*!
|
||||
|
||||
@@ -961,11 +961,13 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW
|
||||
|
||||
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc
|
||||
pSps->uiChromaFormatIdc = uiCode;
|
||||
// if (pSps->uiChromaFormatIdc != 1) {
|
||||
// WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.",
|
||||
// pSps->uiChromaFormatIdc);
|
||||
// return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
|
||||
// }
|
||||
#ifdef DISABLE_HP_BRANCH_1_4
|
||||
if (pSps->uiChromaFormatIdc != 1) {
|
||||
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.",
|
||||
pSps->uiChromaFormatIdc);
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
|
||||
}
|
||||
#endif
|
||||
if (pSps->uiChromaFormatIdc > 1) {
|
||||
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) <=1 supported.",
|
||||
pSps->uiChromaFormatIdc);
|
||||
@@ -993,8 +995,15 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW
|
||||
pSps->bSeqScalingMatrixPresentFlag = !!uiCode;
|
||||
|
||||
if (pSps->bSeqScalingMatrixPresentFlag) {
|
||||
#ifndef DISABLE_HP_BRANCH_1_4
|
||||
WELS_READ_VERIFY (ParseScalingList (pSps, pBs, 0, pSps->bSeqScalingListPresentFlag, pSps->iScalingList4x4,
|
||||
pSps->iScalingList8x8));
|
||||
#else
|
||||
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||
"ParseSps(): seq_scaling_matrix_present_flag (%d). Feature not supported.",
|
||||
pSps->bSeqScalingMatrixPresentFlag);
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //log2_max_frame_num_minus4
|
||||
@@ -1348,13 +1357,21 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux,
|
||||
pPps->bWeightedPredFlag = !!uiCode;
|
||||
WELS_READ_VERIFY (BsGetBits (pBsAux, 2, &uiCode)); //weighted_bipred_idc
|
||||
pPps->uiWeightedBipredIdc = uiCode;
|
||||
#ifdef DISABLE_HP_BRANCH_1_4
|
||||
if (pPps->bWeightedPredFlag || pPps->uiWeightedBipredIdc != 0) {
|
||||
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||
"ParsePps(): weighted_pred_flag (%d) weighted_bipred_idc (%d) neither supported.\n",
|
||||
pPps->bWeightedPredFlag, pPps->uiWeightedBipredIdc);
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_WP);
|
||||
}
|
||||
#else
|
||||
if (pPps->uiWeightedBipredIdc != 0) {
|
||||
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||
"ParsePps(): weighted_bipred_idc (%d) not supported.\n",
|
||||
pPps->uiWeightedBipredIdc);
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_WP);
|
||||
}
|
||||
|
||||
#endif
|
||||
WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //pic_init_qp_minus26
|
||||
pPps->iPicInitQp = PIC_INIT_QP_OFFSET + iCode;
|
||||
WELS_CHECK_SE_BOTH_ERROR (pPps->iPicInitQp, PPS_PIC_INIT_QP_QS_MIN, PPS_PIC_INIT_QP_QS_MAX, "pic_init_qp_minus26 + 26",
|
||||
@@ -1374,7 +1391,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux,
|
||||
pPps->bConstainedIntraPredFlag = !!uiCode;
|
||||
WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //redundant_pic_cnt_present_flag
|
||||
pPps->bRedundantPicCntPresentFlag = !!uiCode;
|
||||
|
||||
#ifndef DISABLE_HP_BRANCH_1_4
|
||||
if (CheckMoreRBSPData (pBsAux)) {
|
||||
WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //transform_8x8_mode_flag
|
||||
pPps->bTransform8x8ModeFlag = !!uiCode;
|
||||
@@ -1396,7 +1413,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux,
|
||||
PPS_CHROMA_QP_INDEX_OFFSET_MAX, "chroma_qp_index_offset", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS,
|
||||
ERR_INFO_INVALID_CHROMA_QP_INDEX_OFFSET));
|
||||
}
|
||||
|
||||
#endif
|
||||
if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
|
||||
PNalUnit pLastNalUnit = pCtx->pAccessUnitList->pNalUnitsList[pCtx->pAccessUnitList->uiAvailUnitsNum - 1];
|
||||
PPps pLastPps = pLastNalUnit->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pPps;
|
||||
@@ -1442,7 +1459,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux,
|
||||
*************************************************************************************
|
||||
* \brief to parse SEI message payload
|
||||
*
|
||||
* \param pSei sei message to be parsed output
|
||||
* \param pSei sei message to be parsed output
|
||||
* \param pBsAux bitstream reader auxiliary
|
||||
*
|
||||
* \return 0 - successed
|
||||
|
||||
@@ -280,33 +280,33 @@ bool GomValidCheckSliceMbNum (const int32_t kiMbWidth, const int32_t kiMbHeight,
|
||||
iGomSize = kiMbWidth * GOM_ROW_MODE0_360P;
|
||||
else
|
||||
iGomSize = kiMbWidth * GOM_ROW_MODE0_720P;
|
||||
// GOM boundary aligned
|
||||
int32_t iNumMbAssigning = WELS_DIV_ROUND (INT_MULTIPLY * kiMbNumPerSlice, iGomSize * INT_MULTIPLY) * iGomSize;
|
||||
int32_t iCurNumMbAssigning = 0;
|
||||
|
||||
iMinimalMbNum = iGomSize;
|
||||
iMaximalMbNum = kiMbNumInFrame - (kuiSliceNum - 1) * iMinimalMbNum;
|
||||
|
||||
while (uiSliceIdx + 1 < kuiSliceNum) {
|
||||
// GOM boundary aligned
|
||||
int32_t iNumMbAssigning = WELS_DIV_ROUND (INT_MULTIPLY * kiMbNumPerSlice, iGomSize * INT_MULTIPLY) * iGomSize;
|
||||
iMaximalMbNum = iNumMbLeft - (kuiSliceNum - uiSliceIdx - 1) * iMinimalMbNum; // get maximal num_mb in left parts
|
||||
|
||||
// make sure one GOM at least in each slice for safe
|
||||
if (iNumMbAssigning < iMinimalMbNum)
|
||||
iNumMbAssigning = iMinimalMbNum;
|
||||
iCurNumMbAssigning = iMinimalMbNum;
|
||||
else if (iNumMbAssigning > iMaximalMbNum)
|
||||
iNumMbAssigning = iMaximalMbNum;
|
||||
iCurNumMbAssigning = ( iMaximalMbNum / iGomSize ) * iGomSize;
|
||||
else
|
||||
iCurNumMbAssigning = iNumMbAssigning;
|
||||
|
||||
if (iNumMbAssigning <= 0) {
|
||||
if (iCurNumMbAssigning <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
iNumMbLeft -= iNumMbAssigning;
|
||||
iNumMbLeft -= iCurNumMbAssigning;
|
||||
if (iNumMbLeft <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pSlicesAssignList[uiSliceIdx] = iNumMbAssigning;
|
||||
|
||||
pSlicesAssignList[uiSliceIdx] = iCurNumMbAssigning;
|
||||
++ uiSliceIdx;
|
||||
iMaximalMbNum = iNumMbLeft - (kuiSliceNum - uiSliceIdx - 1) * iMinimalMbNum; // get maximal num_mb in left parts
|
||||
}
|
||||
pSlicesAssignList[uiSliceIdx] = iNumMbLeft;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,0
|
||||
PRODUCTVERSION 1,4,0,0
|
||||
FILEVERSION 1,4,1,0
|
||||
PRODUCTVERSION 1,4,1,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -43,12 +43,12 @@ BEGIN
|
||||
VALUE "Comments", "Cisco OpenH264 codec"
|
||||
VALUE "CompanyName", "Cisco Systems Inc."
|
||||
VALUE "FileDescription", "Cisco OpenH264 codec"
|
||||
VALUE "FileVersion", "1.4.0.0"
|
||||
VALUE "FileVersion", "1.4.1.0"
|
||||
VALUE "InternalName", "openh264.dll"
|
||||
VALUE "LegalCopyright", "<22> 2011-2015 Cisco and/or its affiliates. All rights reserved."
|
||||
VALUE "OriginalFilename", "openh264.dll"
|
||||
VALUE "ProductName", "Cisco OpenH264 codec"
|
||||
VALUE "ProductVersion", "1.4.0.0"
|
||||
VALUE "ProductVersion", "1.4.1.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -272,7 +272,7 @@ void DecoderParseSyntaxTest::TestScalingList() {
|
||||
//TEST here for whole tests
|
||||
TEST_F (DecoderParseSyntaxTest, DecoderParseSyntaxTestAll) {
|
||||
|
||||
TestScalingList();
|
||||
//TestScalingList(); Disable ScalingUTTest in Branch1.4
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user