Skip to content

Commit

Permalink
moar
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Jun 21, 2024
1 parent 13927f4 commit 483757e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ cpu_family = host_machine.cpu_family()
supported_arguments = cpp.get_supported_arguments([
'-Wno-non-virtual-dtor',
'-Wno-class-memaccess',
'-Werror',
'-Wunused-but-set-variable',
'-Wno-strict-aliasing'])

add_project_arguments(supported_arguments, language: 'cpp')
Expand Down
22 changes: 0 additions & 22 deletions test/api/decoder_ec_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) {
EXPECT_EQ (uiGet, uiEcIdc);

//Start for enc/dec
int iIdx = 0;
int len = 0;
unsigned char* pData[3] = { NULL };
ASSERT_TRUE (InitialEncDec (p.width, p.height));
Expand All @@ -265,11 +264,9 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_EQ (rv, 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 1);
iIdx++;

//Frame 1: P, EC_IDC=DISABLE, loss = 1
EncodeOneFrame (1);
iIdx++;

//Frame 2: P, EC_IDC=DISABLE, loss = 0
EncodeOneFrame (1);
Expand All @@ -284,7 +281,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_TRUE (rv != 0); //construction error due to data loss
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0); //no output due to EC DISABLE
iIdx++;

//set EC=SLICE_COPY
uiEcIdc = (uint32_t) (ERROR_CON_SLICE_COPY);
Expand All @@ -304,7 +300,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_TRUE (rv != 0); //construction error due to data loss
EXPECT_EQ (dstBufInfo_.iBufferStatus, 1);
iIdx++;

//set EC=DISABLE
uiEcIdc = (uint32_t) (ERROR_CON_DISABLE);
Expand All @@ -325,11 +320,9 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) {
//Ref picture is ECed, so current status is ECed, when EC disable, NO output
EXPECT_TRUE (rv != 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0);
iIdx++;

//Frame 5: P, EC_IDC=DISABLE, loss = 1
EncodeOneFrame (1);
iIdx++;

//set EC=FRAME_COPY
uiEcIdc = (uint32_t) (ERROR_CON_FRAME_COPY);
Expand All @@ -339,7 +332,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) {
//Frame 6: P, EC_IDC=FRAME_COPY, loss = 1
EncodeOneFrame (1);
EXPECT_EQ (uiGet, uiEcIdc);
iIdx++;

//Frame 7: P, EC_IDC=FRAME_COPY, loss = 0
EncodeOneFrame (1);
Expand All @@ -354,7 +346,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_TRUE (rv != 0); //not sure if previous data drop would be detected in construction
EXPECT_EQ (dstBufInfo_.iBufferStatus, 1);
iIdx++;
}

//This case contain 2 slices per picture for IDR loss
Expand All @@ -380,7 +371,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) {
decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);

//Start for enc/dec
int iIdx = 0;
int len = 0;
unsigned char* pData[3] = { NULL };
int iTotalSliceSize = 0;
Expand All @@ -406,7 +396,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_EQ (rv, 0); // Reconstruct first slice OK
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0); //slice incomplete, no output
iIdx++;

//Frame 1: P, EC_IDC=2, loss = 0
//will clean SPS/PPS status
Expand All @@ -422,7 +411,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //ECed status, reconstruction current frame 1
EXPECT_TRUE ((rv & 32) != 0); //decoder ECed status
EXPECT_EQ (dstBufInfo_.iBufferStatus, 1); //ECed output for frame 1
iIdx++;

//set EC=DISABLE
uiEcIdc = (uint32_t) (ERROR_CON_DISABLE);
Expand All @@ -443,7 +431,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) {
// Ref picture is ECed, so reconstructed picture is ECed
EXPECT_TRUE ((rv & 32) != 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0);
iIdx++;

//set EC=SLICE_COPY
uiEcIdc = (uint32_t) (ERROR_CON_FRAME_COPY);
Expand All @@ -464,7 +451,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_TRUE ((rv & 32) != 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0); //slice loss
iIdx++;

//set EC=DISABLE
uiEcIdc = (uint32_t) (ERROR_CON_DISABLE);
Expand All @@ -484,7 +470,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_TRUE (rv != 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0); // No ref picture, no output
iIdx++;

}

Expand Down Expand Up @@ -512,7 +497,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) {
decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);

//Start for enc/dec
int iIdx = 0;
int len = 0;
unsigned char* pData[3] = { NULL };
int iTotalSliceSize = 0;
Expand All @@ -537,7 +521,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_EQ (rv, 0); //parse correct
EXPECT_EQ (dstBufInfo_.iBufferStatus, 1); //output frame 0
iIdx++;

//Frame 1: P, EC_IDC=0, loss = 0
//Expected result: all OK, 2nd Output
Expand All @@ -553,7 +536,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction current frame 1
EXPECT_EQ (rv, 0); //parse correct
EXPECT_EQ (dstBufInfo_.iBufferStatus, 1); //ECed output for frame 1
iIdx++;

//Frame 2: P, EC_IDC=0, loss = 1
//Expected result: all OK, no Output
Expand All @@ -570,7 +552,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_EQ (rv, 0); //parse correct
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0);
iIdx++;

//set EC=SLICE_COPY
uiEcIdc = (uint32_t) (ERROR_CON_SLICE_COPY);
Expand All @@ -591,7 +572,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
EXPECT_TRUE ((rv & 32) != 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0); //slice loss
iIdx++;

//set EC=DISABLE
uiEcIdc = (uint32_t) (ERROR_CON_DISABLE);
Expand All @@ -613,7 +593,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) {
// previous frame NOT output, no ref
EXPECT_TRUE (rv != 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 0); //output previous pic
iIdx++;

//Frame 5: IDR, EC_IDC=2->0, loss = 0
//Expected result: depends on DecodeFrame2 result. If OK, output; else ,no output
Expand Down Expand Up @@ -654,7 +633,6 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) {
rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction,
EXPECT_EQ (rv, 0);
EXPECT_EQ (dstBufInfo_.iBufferStatus, 1); //output previous pic
iIdx++;

}

Expand Down

0 comments on commit 483757e

Please sign in to comment.