Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 6 files). Show all
Unified · Split
| @@ -106,7 +106,7 @@ static DECODING_STATE ConstructAccessUnit (CWelsDecoder* pWelsDecoder, PWelsDec · 105 unmodified lines | |||
| 106 | } | 106 | } |
| 107 | pThrCtx->pDec = NULL; | 107 | pThrCtx->pDec = NULL; |
| 108 | if (GetThreadCount (pThrCtx->pCtx) > 1) { | 108 | if (GetThreadCount (pThrCtx->pCtx) > 1) { |
| 109 | RESET_EVENT (&pThrCtx->sSliceDecodeFinsh); | 109 | RESET_EVENT (&pThrCtx->sSliceDecodeFinish); |
| 110 | } | 110 | } |
| 111 | iRet |= pWelsDecoder->DecodeFrame2WithCtx (pThrCtx->pCtx, NULL, 0, pThrCtx->ppDst, &pThrCtx->sDstInfo); | 111 | iRet |= pWelsDecoder->DecodeFrame2WithCtx (pThrCtx->pCtx, NULL, 0, pThrCtx->ppDst, &pThrCtx->sDstInfo); |
| 112 | 112 | ||
| @@ -142,7 +142,8 @@ CWelsDecoder::CWelsDecoder (void) · 29 unmodified lines | |||
| 142 | m_bFreezeOutput (false), | 142 | m_bFreezeOutput (false), |
| 143 | m_DecCtxActiveCount (0), | 143 | m_DecCtxActiveCount (0), |
| 144 | m_pDecThrCtx (NULL), | 144 | m_pDecThrCtx (NULL), |
| 145 | m_pLastDecThrCtx (NULL) { | 145 | m_pLastDecThrCtx (NULL), |
| 146 | m_iLastBufferedIdx (0) { | ||
| 146 | #ifdef OUTPUT_BIT_STREAM | 147 | #ifdef OUTPUT_BIT_STREAM |
| 147 | char chFileName[1024] = { 0 }; //for .264 | 148 | char chFileName[1024] = { 0 }; //for .264 |
| 148 | int iBufUsed = 0; | 149 | int iBufUsed = 0; |
| @@ -314,7 +315,7 @@ void CWelsDecoder::OpenDecoderThreads() { · 165 unmodified lines | |||
| 314 | m_pDecThrCtx[i].pDec = NULL; | 315 | m_pDecThrCtx[i].pDec = NULL; |
| 315 | CREATE_EVENT (&m_pDecThrCtx[i].sImageReady, 1, 0, NULL); | 316 | CREATE_EVENT (&m_pDecThrCtx[i].sImageReady, 1, 0, NULL); |
| 316 | CREATE_EVENT (&m_pDecThrCtx[i].sSliceDecodeStart, 1, 0, NULL); | 317 | CREATE_EVENT (&m_pDecThrCtx[i].sSliceDecodeStart, 1, 0, NULL); |
| 317 | CREATE_EVENT (&m_pDecThrCtx[i].sSliceDecodeFinsh, 1, 0, NULL); | 318 | CREATE_EVENT (&m_pDecThrCtx[i].sSliceDecodeFinish, 1, 0, NULL); |
| 318 | CREATE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle, 0, 1, NULL); | 319 | CREATE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle, 0, 1, NULL); |
| 319 | CREATE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated, 0, 1, NULL); | 320 | CREATE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated, 0, 1, NULL); |
| 320 | CREATE_THREAD (&m_pDecThrCtx[i].sThreadInfo.sThrHandle, pThrProcInit, (void*) (& (m_pDecThrCtx[i]))); | 321 | CREATE_THREAD (&m_pDecThrCtx[i].sThreadInfo.sThrHandle, pThrProcInit, (void*) (& (m_pDecThrCtx[i]))); |
| @@ -330,7 +331,7 @@ void CWelsDecoder::CloseDecoderThreads() { · 9 unmodified lines | |||
| 330 | WAIT_THREAD (&m_pDecThrCtx[i].sThreadInfo.sThrHandle); | 331 | WAIT_THREAD (&m_pDecThrCtx[i].sThreadInfo.sThrHandle); |
| 331 | CLOSE_EVENT (&m_pDecThrCtx[i].sImageReady); | 332 | CLOSE_EVENT (&m_pDecThrCtx[i].sImageReady); |
| 332 | CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeStart); | 333 | CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeStart); |
| 333 | CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeFinsh); | 334 | CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeFinish); |
| 334 | CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle); | 335 | CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle); |
| 335 | CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated); | 336 | CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated); |
| 336 | } | 337 | } |
| @@ -925,14 +926,42 @@ DECODING_STATE CWelsDecoder::FlushFrame (unsigned char** ppDst, · 588 unmodified lines | |||
| 925 | } | 926 | } |
| 926 | if (bEndOfStreamFlag && m_sReoderingStatus.iNumOfPicts > 0) { | 927 | if (bEndOfStreamFlag && m_sReoderingStatus.iNumOfPicts > 0) { |
| 927 | m_sReoderingStatus.iMinPOC = IMinInt32; | 928 | m_sReoderingStatus.iMinPOC = IMinInt32; |
| 928 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | 929 | if (m_bIsBaseline) { |
| 929 | if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32) { | 930 | uint32_t uiDecodingTimeStamp = 0; |
| 930 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | 931 | int32_t firstValidIdx = -1; |
| 931 | m_sReoderingStatus.iPictInfoIndex = i; | 932 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { |
| 933 | if (m_sPictInfoList[i].iPOC > IMinInt32) { | ||
| 934 | uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp; | ||
| 935 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | ||
| 936 | m_sReoderingStatus.iPictInfoIndex = i; | ||
| 937 | firstValidIdx = i; | ||
| 938 | break; | ||
| 939 | } | ||
| 932 | } | 940 | } |
| 933 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].iPOC < m_sReoderingStatus.iMinPOC) { | 941 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { |
| 934 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | 942 | if (i == firstValidIdx) continue; |
| 935 | m_sReoderingStatus.iPictInfoIndex = i; | 943 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].uiDecodingTimeStamp < uiDecodingTimeStamp) { |
| 944 | uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp; | ||
| 945 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | ||
| 946 | m_sReoderingStatus.iPictInfoIndex = i; | ||
| 947 | } | ||
| 948 | } | ||
| 949 | } else { | ||
| 950 | int32_t firstValidIdx = -1; | ||
| 951 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | ||
| 952 | if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32) { | ||
| 953 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | ||
| 954 | m_sReoderingStatus.iPictInfoIndex = i; | ||
| 955 | firstValidIdx = i; | ||
| 956 | break; | ||
| 957 | } | ||
| 958 | } | ||
| 959 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | ||
| 960 | if (i == firstValidIdx) continue; | ||
| 961 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].iPOC < m_sReoderingStatus.iMinPOC) { | ||
| 962 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | ||
| 963 | m_sReoderingStatus.iPictInfoIndex = i; | ||
| 964 | } | ||
| 936 | } | 965 | } |
| 937 | } | 966 | } |
| 938 | } | 967 | } |
| @@ -940,7 +969,8 @@ DECODING_STATE CWelsDecoder::FlushFrame (unsigned char** ppDst, · 1 unmodified line | |||
| 940 | m_sReoderingStatus.iLastWrittenPOC = m_sReoderingStatus.iMinPOC; | 969 | m_sReoderingStatus.iLastWrittenPOC = m_sReoderingStatus.iMinPOC; |
| 941 | #if defined (_DEBUG) | 970 | #if defined (_DEBUG) |
| 942 | #ifdef _MOTION_VECTOR_DUMP_ | 971 | #ifdef _MOTION_VECTOR_DUMP_ |
| 943 | fprintf (stderr, "Output POC: #%d\n", m_sReoderingStatus.iLastWrittenPOC); | 972 | fprintf (stderr, "Output POC: #%d uiDecodingTimeStamp=%d\n", m_sReoderingStatus.iLastWrittenPOC, |
| 973 | m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].uiDecodingTimeStamp); | ||
| 944 | #endif | 974 | #endif |
| 945 | #endif | 975 | #endif |
| 946 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); | 976 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); |
| @@ -1051,6 +1081,7 @@ void CWelsDecoder::BufferingReadyPicture (PWelsDecoderContext pCtx, unsigned cha · 104 unmodified lines | |||
| 1051 | m_sPictInfoList[i].iPicBuffIdx = pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iPicBuffIdx; | 1081 | m_sPictInfoList[i].iPicBuffIdx = pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iPicBuffIdx; |
| 1052 | if (GetThreadCount (pCtx) <= 1) ++pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iRefCount; | 1082 | if (GetThreadCount (pCtx) <= 1) ++pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iRefCount; |
| 1053 | m_sPictInfoList[i].bLastGOP = false; | 1083 | m_sPictInfoList[i].bLastGOP = false; |
| 1084 | m_iLastBufferedIdx = i; | ||
| 1054 | pDstInfo->iBufferStatus = 0; | 1085 | pDstInfo->iBufferStatus = 0; |
| 1055 | ++m_sReoderingStatus.iNumOfPicts; | 1086 | ++m_sReoderingStatus.iNumOfPicts; |
| 1056 | if (i > m_sReoderingStatus.iLargestBufferedPicIndex) { | 1087 | if (i > m_sReoderingStatus.iLargestBufferedPicIndex) { |
| @@ -1069,11 +1100,17 @@ void CWelsDecoder::ReleaseBufferedReadyPicture (PWelsDecoderContext pCtx, unsign · 12 unmodified lines | |||
| 1069 | } | 1100 | } |
| 1070 | if (!m_bIsBaseline && m_sReoderingStatus.iLastGOPRemainPicts > 0) { | 1101 | if (!m_bIsBaseline && m_sReoderingStatus.iLastGOPRemainPicts > 0) { |
| 1071 | m_sReoderingStatus.iMinPOC = IMinInt32; | 1102 | m_sReoderingStatus.iMinPOC = IMinInt32; |
| 1103 | int32_t firstValidIdx = -1; | ||
| 1072 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | 1104 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { |
| 1073 | if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].bLastGOP) { | 1105 | if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].bLastGOP) { |
| 1074 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | 1106 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; |
| 1075 | m_sReoderingStatus.iPictInfoIndex = i; | 1107 | m_sReoderingStatus.iPictInfoIndex = i; |
| 1108 | firstValidIdx = i; | ||
| 1109 | break; | ||
| 1076 | } | 1110 | } |
| 1111 | } | ||
| 1112 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | ||
| 1113 | if (i == firstValidIdx) continue; | ||
| 1077 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].iPOC < m_sReoderingStatus.iMinPOC | 1114 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].iPOC < m_sReoderingStatus.iMinPOC |
| 1078 | && m_sPictInfoList[i].bLastGOP) { | 1115 | && m_sPictInfoList[i].bLastGOP) { |
| 1079 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | 1116 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; |
| @@ -1083,7 +1120,8 @@ void CWelsDecoder::ReleaseBufferedReadyPicture (PWelsDecoderContext pCtx, unsign · 3 unmodified lines | |||
| 1083 | m_sReoderingStatus.iLastWrittenPOC = m_sReoderingStatus.iMinPOC; | 1120 | m_sReoderingStatus.iLastWrittenPOC = m_sReoderingStatus.iMinPOC; |
| 1084 | #if defined (_DEBUG) | 1121 | #if defined (_DEBUG) |
| 1085 | #ifdef _MOTION_VECTOR_DUMP_ | 1122 | #ifdef _MOTION_VECTOR_DUMP_ |
| 1086 | fprintf (stderr, "Output POC: #%d\n", m_sReoderingStatus.iLastWrittenPOC); | 1123 | fprintf (stderr, "Output POC: #%d uiDecodingTimeStamp=%d\n", m_sReoderingStatus.iLastWrittenPOC, |
| 1124 | m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].uiDecodingTimeStamp); | ||
| 1087 | #endif | 1125 | #endif |
| 1088 | #endif | 1126 | #endif |
| 1089 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); | 1127 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); |
| @@ -1104,21 +1142,29 @@ void CWelsDecoder::ReleaseBufferedReadyPicture (PWelsDecoderContext pCtx, unsign · 14 unmodified lines | |||
| 1104 | } | 1142 | } |
| 1105 | if (m_sReoderingStatus.iNumOfPicts && m_bIsBaseline) { | 1143 | if (m_sReoderingStatus.iNumOfPicts && m_bIsBaseline) { |
| 1106 | uint32_t uiDecodingTimeStamp = 0; | 1144 | uint32_t uiDecodingTimeStamp = 0; |
| 1145 | int32_t firstValidIdx = -1; | ||
| 1107 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | 1146 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { |
| 1108 | if (m_sPictInfoList[i].iPOC > IMinInt32) { | 1147 | if (m_sPictInfoList[i].iPOC > IMinInt32) { |
| 1109 | uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp; | 1148 | uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp; |
| 1110 | m_sReoderingStatus.iPictInfoIndex = i; | 1149 | m_sReoderingStatus.iPictInfoIndex = i; |
| 1150 | firstValidIdx = i; | ||
| 1111 | break; | 1151 | break; |
| 1112 | } | 1152 | } |
| 1113 | } | 1153 | } |
| 1114 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | 1154 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { |
| 1115 | if (m_sReoderingStatus.iPictInfoIndex != i && m_sPictInfoList[i].iPOC > IMinInt32 | 1155 | if (i == firstValidIdx) continue; |
| 1116 | && m_sPictInfoList[i].sBufferInfo.uiInBsTimeStamp < uiDecodingTimeStamp) { | 1156 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].uiDecodingTimeStamp < uiDecodingTimeStamp) { |
| 1117 | uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp; | 1157 | uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp; |
| 1118 | m_sReoderingStatus.iPictInfoIndex = i; | 1158 | m_sReoderingStatus.iPictInfoIndex = i; |
| 1119 | } | 1159 | } |
| 1120 | } | 1160 | } |
| 1121 | if (uiDecodingTimeStamp > 0) { | 1161 | if (uiDecodingTimeStamp > 0) { |
| 1162 | #if defined (_DEBUG) | ||
| 1163 | #ifdef _MOTION_VECTOR_DUMP_ | ||
| 1164 | fprintf (stderr, "Output POC: #%d uiDecodingTimeStamp=%d\n", m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPOC, | ||
| 1165 | uiDecodingTimeStamp); | ||
| 1166 | #endif | ||
| 1167 | #endif | ||
| 1122 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); | 1168 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); |
| 1123 | ppDst[0] = pDstInfo->pDst[0]; | 1169 | ppDst[0] = pDstInfo->pDst[0]; |
| 1124 | ppDst[1] = pDstInfo->pDst[1]; | 1170 | ppDst[1] = pDstInfo->pDst[1]; |
| @@ -1132,11 +1178,17 @@ void CWelsDecoder::ReleaseBufferedReadyPicture (PWelsDecoderContext pCtx, unsign · 7 unmodified lines | |||
| 1132 | } | 1178 | } |
| 1133 | if (m_sReoderingStatus.iNumOfPicts > 0) { | 1179 | if (m_sReoderingStatus.iNumOfPicts > 0) { |
| 1134 | m_sReoderingStatus.iMinPOC = IMinInt32; | 1180 | m_sReoderingStatus.iMinPOC = IMinInt32; |
| 1181 | int32_t firstValidIdx = -1; | ||
| 1135 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | 1182 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { |
| 1136 | if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32) { | 1183 | if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32) { |
| 1137 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | 1184 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; |
| 1138 | m_sReoderingStatus.iPictInfoIndex = i; | 1185 | m_sReoderingStatus.iPictInfoIndex = i; |
| 1186 | firstValidIdx = i; | ||
| 1187 | break; | ||
| 1139 | } | 1188 | } |
| 1189 | } | ||
| 1190 | for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) { | ||
| 1191 | if (i == firstValidIdx) continue; | ||
| 1140 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].iPOC < m_sReoderingStatus.iMinPOC) { | 1192 | if (m_sPictInfoList[i].iPOC > IMinInt32 && m_sPictInfoList[i].iPOC < m_sReoderingStatus.iMinPOC) { |
| 1141 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; | 1193 | m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC; |
| 1142 | m_sReoderingStatus.iPictInfoIndex = i; | 1194 | m_sReoderingStatus.iPictInfoIndex = i; |
| @@ -1144,20 +1196,16 @@ void CWelsDecoder::ReleaseBufferedReadyPicture (PWelsDecoderContext pCtx, unsign · 1 unmodified line | |||
| 1144 | } | 1196 | } |
| 1145 | } | 1197 | } |
| 1146 | if (m_sReoderingStatus.iMinPOC > IMinInt32) { | 1198 | if (m_sReoderingStatus.iMinPOC > IMinInt32) { |
| 1147 | bool isReady = false; | 1199 | int32_t iLastPOC = pCtx != NULL ? pCtx->pSliceHeader->iPicOrderCntLsb : m_sPictInfoList[m_iLastBufferedIdx].iPOC; |
| 1148 | if (pCtx != NULL) { | 1200 | bool isReady = (m_sReoderingStatus.iLastWrittenPOC > IMinInt32 |
| 1149 | isReady = (m_sReoderingStatus.iLastWrittenPOC > IMinInt32 | 1201 | && m_sReoderingStatus.iMinPOC - m_sReoderingStatus.iLastWrittenPOC <= 1) |
| 1150 | && m_sReoderingStatus.iMinPOC - m_sReoderingStatus.iLastWrittenPOC <= 1) | 1202 | || m_sReoderingStatus.iMinPOC < iLastPOC; |
| 1151 | || m_sReoderingStatus.iMinPOC < pCtx->pSliceHeader->iPicOrderCntLsb; | ||
| 1152 | } else { | ||
| 1153 | isReady = m_sReoderingStatus.iMinPOC == 0 || (m_sReoderingStatus.iLastWrittenPOC >= 0 | ||
| 1154 | && m_sReoderingStatus.iMinPOC <= m_sReoderingStatus.iLastWrittenPOC + 2) ; | ||
| 1155 | } | ||
| 1156 | if (isReady) { | 1203 | if (isReady) { |
| 1157 | m_sReoderingStatus.iLastWrittenPOC = m_sReoderingStatus.iMinPOC; | 1204 | m_sReoderingStatus.iLastWrittenPOC = m_sReoderingStatus.iMinPOC; |
| 1158 | #if defined (_DEBUG) | 1205 | #if defined (_DEBUG) |
| 1159 | #ifdef _MOTION_VECTOR_DUMP_ | 1206 | #ifdef _MOTION_VECTOR_DUMP_ |
| 1160 | fprintf (stderr, "Output POC: #%d\n", m_sReoderingStatus.iLastWrittenPOC); | 1207 | fprintf (stderr, "Output POC: #%d uiDecodingTimeStamp=%d\n", m_sReoderingStatus.iLastWrittenPOC, |
| 1208 | m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].uiDecodingTimeStamp); | ||
| 1161 | #endif | 1209 | #endif |
| 1162 | #endif | 1210 | #endif |
| 1163 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); | 1211 | memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo)); |