ref: f6cd3db60ddd64e593306db381f3190c5488f4ac
parent: 3eb2a137c3deb229b2ba01a18c998bb1b1144e4f
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Oct 26 21:36:14 EDT 2021
update plan 9 port
--- /dev/null
+++ b/codec/decoder/core/inc/decoder9.h
@@ -1,0 +1,18 @@
+typedef struct H264Aux H264Aux;
+
+struct H264Aux {
+ SPictReoderingStatus;
+ SPictInfo pics[16];
+
+ SWelsDecoderContext ctx;
+ SLogContext logctx;
+ SBufferInfo info;
+ SWelsLastDecPicInfo pic;
+ SVlcTable vlctbl;
+ SDecoderStatistics stat;
+ uint8_t *data[3];
+};
+
+int h264decode(H264Aux *a, u8int *buf, int sz, uvlong *timestamp);
+void h264flush(H264Aux *a);
+char *h264err2s(int err);
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -404,7 +404,7 @@
//fix Bugzilla 1485229 check if pointers are NULL
if (pCtx->sRefPic.pRefList[LIST_0][0] && pCtx->sRefPic.pRefList[LIST_1][0]) {
if (pSliceHeader->uiRefCount[0] == 1 && pSliceHeader->uiRefCount[1] == 1
- && int64_t(pCtx->sRefPic.pRefList[LIST_0][0]->iFramePoc) + int64_t(pCtx->sRefPic.pRefList[LIST_1][0]->iFramePoc) == 2 * int64_t(iPoc)) {
+ && (int64_t)(pCtx->sRefPic.pRefList[LIST_0][0]->iFramePoc) + (int64_t)(pCtx->sRefPic.pRefList[LIST_1][0]->iFramePoc) == 2 * (int64_t)(iPoc)) {
pCurDqLayer->bUseWeightedBiPredIdc = false;
return;
}