History

Don't override the deblocking setting in the encoder test

Since this is on by default now, we don't need a separate test that has it enabled. Thus we can now remove one of the encoder tests. By not overriding the deblocking setting at all, the hash changes for the other tests that use SEncParamExt.

Martin Storsjö committed 12 years ago

Commit 04ca4ba1 parent 6f51d374 files · +16 −22Browse files

Showing the changes to test/api/BaseEncoderTest.cpp (1 of 4 files). Show all

Unified · Split

test/api/BaseEncoderTest.cpp+6−7
@@ -6,8 +6,8 @@ · 5 unmodified lines
6#include "BaseEncoderTest.h"6#include "BaseEncoderTest.h"
7 7
8static int InitWithParam(ISVCEncoder* encoder, int width,8static int InitWithParam(ISVCEncoder* encoder, int width,
9 int height, float frameRate, SliceModeEnum sliceMode, bool denoise, int deblock, int layers) {9 int height, float frameRate, SliceModeEnum sliceMode, bool denoise, int layers) {
10 if (SM_SINGLE_SLICE == sliceMode && !denoise && deblock == 1 && layers == 1) {10 if (SM_SINGLE_SLICE == sliceMode && !denoise && layers == 1) {
11 SEncParamBase param;11 SEncParamBase param;
12 memset (&param, 0, sizeof(SEncParamBase));12 memset (&param, 0, sizeof(SEncParamBase));
13 13
@@ -28,7 +28,6 @@ static int InitWithParam(ISVCEncoder* encoder, int width, · 14 unmodified lines
28 param.iTargetBitrate = 5000000;28 param.iTargetBitrate = 5000000;
29 param.iInputCsp = videoFormatI420;29 param.iInputCsp = videoFormatI420;
30 param.bEnableDenoise = denoise;30 param.bEnableDenoise = denoise;
31 param.iLoopFilterDisableIdc = deblock;
32 param.iSpatialLayerNum = layers;31 param.iSpatialLayerNum = layers;
33 32
34 if (sliceMode != SM_SINGLE_SLICE)33 if (sliceMode != SM_SINGLE_SLICE)
@@ -63,8 +62,8 @@ void BaseEncoderTest::TearDown() { · 28 unmodified lines
63}62}
64 63
65void BaseEncoderTest::EncodeStream(InputStream* in, int width, int height,64void BaseEncoderTest::EncodeStream(InputStream* in, int width, int height,
66 float frameRate, SliceModeEnum slices, bool denoise, int deblock, int layers, Callback* cbk) {65 float frameRate, SliceModeEnum slices, bool denoise, int layers, Callback* cbk) {
67 int rv = InitWithParam(encoder_, width, height, frameRate, slices, denoise, deblock, layers);66 int rv = InitWithParam(encoder_, width, height, frameRate, slices, denoise, layers);
68 ASSERT_TRUE(rv == cmResultSuccess);67 ASSERT_TRUE(rv == cmResultSuccess);
69 68
70 // I420: 1(Y) + 1/4(U) + 1/4(V)69 // I420: 1(Y) + 1/4(U) + 1/4(V)
@@ -97,8 +96,8 @@ void BaseEncoderTest::EncodeStream(InputStream* in, int width, int height, · 26 unmodified lines
97}96}
98 97
99void BaseEncoderTest::EncodeFile(const char* fileName, int width, int height,98void BaseEncoderTest::EncodeFile(const char* fileName, int width, int height,
100 float frameRate, SliceModeEnum slices, bool denoise, int deblock, int layers, Callback* cbk) {99 float frameRate, SliceModeEnum slices, bool denoise, int layers, Callback* cbk) {
101 FileInputStream fileStream;100 FileInputStream fileStream;
102 ASSERT_TRUE(fileStream.Open(fileName));101 ASSERT_TRUE(fileStream.Open(fileName));
103 EncodeStream(&fileStream, width, height, frameRate, slices, denoise, deblock, layers, cbk);102 EncodeStream(&fileStream, width, height, frameRate, slices, denoise, layers, cbk);
104}103}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t