ref: 722f1d16d6361ef46d12a1eb39e3cefa4c5b15bd
parent: d59610965f421c872ea4752940cb04aa063b1b64
parent: c281ddab1cf2e13dffe1255a61076376e7e32de0
author: ruil2 <ruil2@cisco.com>
date: Mon Jan 23 11:52:30 EST 2017
Merge pull request #2648 from huili2/au_delimiter_as_first_nal_support support au_delimiter as first NAL in seq
--- a/codec/common/inc/wels_common_defs.h
+++ b/codec/common/inc/wels_common_defs.h
@@ -147,6 +147,7 @@
#define IS_SUBSET_SPS_NAL(t) ( (t) == NAL_UNIT_SUBSET_SPS )
#define IS_PPS_NAL(t) ( (t) == NAL_UNIT_PPS )
#define IS_SEI_NAL(t) ( (t) == NAL_UNIT_SEI )
+#define IS_AU_DELIMITER_NAL(t) ( (t) == NAL_UNIT_AU_DELIMITER )
#define IS_PREFIX_NAL(t) ( (t) == NAL_UNIT_PREFIX )
#define IS_SUBSET_SPS_USED(t) ( (t) == NAL_UNIT_SUBSET_SPS || (t) == NAL_UNIT_CODED_SLICE_EXT )
#define IS_VCL_NAL_AVC_BASE(t) ( (t) == NAL_UNIT_CODED_SLICE || (t) == NAL_UNIT_CODED_SLICE_IDR )
--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -146,7 +146,7 @@
++ (*pConsumedBytes);
if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_SPS_NAL (pNalUnitHeader->eNalUnitType)
- || pCtx->bSpsExistAheadFlag)) {
+ || IS_AU_DELIMITER_NAL (pNalUnitHeader->eNalUnitType) || pCtx->bSpsExistAheadFlag)) {
if (pCtx->bPrintFrameErrorTraceFlag && pCtx->iSpsErrorIgnored == 0) {
WelsLog (pLogCtx, WELS_LOG_WARNING,
"parse_nal(), no exist Sequence Parameter Sets ahead of sequence when try to decode NAL(type:%d).",
@@ -160,7 +160,7 @@
}
pCtx->iSpsErrorIgnored = 0;
if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_PARAM_SETS_NALS (pNalUnitHeader->eNalUnitType)
- || pCtx->bPpsExistAheadFlag)) {
+ || IS_AU_DELIMITER_NAL (pNalUnitHeader->eNalUnitType) || pCtx->bPpsExistAheadFlag)) {
if (pCtx->bPrintFrameErrorTraceFlag && pCtx->iPpsErrorIgnored == 0) {
WelsLog (pLogCtx, WELS_LOG_WARNING,
"parse_nal(), no exist Picture Parameter Sets ahead of sequence when try to decode NAL(type:%d).",