]> granicus.if.org Git - libvpx/commitdiff
vp9_encoder_parms_get_to_decoder: delete dead code
authorJames Zern <jzern@google.com>
Thu, 10 Sep 2015 06:19:39 +0000 (23:19 -0700)
committerJames Zern <jzern@google.com>
Thu, 10 Sep 2015 07:21:58 +0000 (00:21 -0700)
the only input is y4m, there's no need to test for yuv.

Change-Id: Ie5b55ea4af44ad79a55304ef5636a8ad7ed30bb8

test/vp9_encoder_parms_get_to_decoder.cc

index d97544ac93bead1db384afb5f9d6fd06e63f6957..d561c7fb53990c9a6ced3cf9af8f2c9570348dc9 100644 (file)
@@ -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 @@ static vpx_codec_alg_priv_t *get_alg_priv(vpx_codec_ctx_t *ctx) {
 
 namespace {
 
-const unsigned int kFramerate = 50;
 const int kCpuUsed = 2;
 
 struct EncodePerfTestVideo {
@@ -58,14 +56,6 @@ const EncodeParameters kVP9EncodeParameterSet[] = {
     // 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 @@ class VpxEncoderParmsGetToDecoder
 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);