ref: 21952bab12c7a74c544a38e32e58c98a6240f281
parent: 0fe900a543e1167e556c5cbc57c41901eeccbffe
author: James Zern <[email protected]>
date: Wed Sep 9 19:19:39 EDT 2015
vp9_encoder_parms_get_to_decoder: delete dead code the only input is y4m, there's no need to test for yuv. Change-Id: Ie5b55ea4af44ad79a55304ef5636a8ad7ed30bb8
--- a/test/vp9_encoder_parms_get_to_decoder.cc
+++ b/test/vp9_encoder_parms_get_to_decoder.cc
@@ -14,7 +14,6 @@
#include "test/encode_test_driver.h"
#include "test/util.h"
#include "test/y4m_video_source.h"
-#include "test/yuv_video_source.h"
#include "vp9/decoder/vp9_decoder.h"
#include "vp9/vp9_dx_iface.c"
@@ -25,7 +24,6 @@
namespace {
-const unsigned int kFramerate = 50;
const int kCpuUsed = 2;
struct EncodePerfTestVideo {
@@ -58,14 +56,6 @@
// TODO(JBB): Test profiles (requires more work).
};
-int is_extension_y4m(const char *filename) {
- const char *dot = strrchr(filename, '.');
- if (!dot || dot == filename)
- return 0;
- else
- return !strcmp(dot, ".y4m");
-}
-
class VpxEncoderParmsGetToDecoder
: public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith2Params<EncodeParameters, \
@@ -147,18 +137,9 @@
TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
init_flags_ = VPX_CODEC_USE_PSNR;
- libvpx_test::VideoSource *video;
- if (is_extension_y4m(test_video_.name)) {
- video = new libvpx_test::Y4mVideoSource(test_video_.name,
- 0, test_video_.frames);
- } else {
- video = new libvpx_test::YUVVideoSource(test_video_.name,
- VPX_IMG_FMT_I420,
- test_video_.width,
- test_video_.height,
- kFramerate, 1, 0,
- test_video_.frames);
- }
+ libvpx_test::VideoSource *const video =
+ new libvpx_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames);
+ ASSERT_TRUE(video != NULL);
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
delete(video);