Compare commits
	
		
			2 Commits
		
	
	
		
			indianrunn
			...
			stable-vp9
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					422da555b0 | ||
| 
						 | 
					29611db9f8 | 
@@ -16,8 +16,68 @@
 | 
				
			|||||||
#include "test/video_source.h"
 | 
					#include "test/video_source.h"
 | 
				
			||||||
#include "test/util.h"
 | 
					#include "test/util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Enable(1) or Disable(0) writing of the compressed bitstream.
 | 
				
			||||||
 | 
					#define WRITE_COMPRESSED_STREAM 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if WRITE_COMPRESSED_STREAM
 | 
				
			||||||
 | 
					static void mem_put_le16(char *const mem, const unsigned int val) {
 | 
				
			||||||
 | 
					  mem[0] = val;
 | 
				
			||||||
 | 
					  mem[1] = val >> 8;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void mem_put_le32(char *const mem, const unsigned int val) {
 | 
				
			||||||
 | 
					  mem[0] = val;
 | 
				
			||||||
 | 
					  mem[1] = val >> 8;
 | 
				
			||||||
 | 
					  mem[2] = val >> 16;
 | 
				
			||||||
 | 
					  mem[3] = val >> 24;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void write_ivf_file_header(const vpx_codec_enc_cfg_t *const cfg,
 | 
				
			||||||
 | 
					                                  int frame_cnt, FILE *const outfile) {
 | 
				
			||||||
 | 
					  char header[32];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  header[0] = 'D';
 | 
				
			||||||
 | 
					  header[1] = 'K';
 | 
				
			||||||
 | 
					  header[2] = 'I';
 | 
				
			||||||
 | 
					  header[3] = 'F';
 | 
				
			||||||
 | 
					  mem_put_le16(header + 4,  0);                   /* version */
 | 
				
			||||||
 | 
					  mem_put_le16(header + 6,  32);                  /* headersize */
 | 
				
			||||||
 | 
					  mem_put_le32(header + 8,  0x30395056);          /* fourcc (vp9) */
 | 
				
			||||||
 | 
					  mem_put_le16(header + 12, cfg->g_w);            /* width */
 | 
				
			||||||
 | 
					  mem_put_le16(header + 14, cfg->g_h);            /* height */
 | 
				
			||||||
 | 
					  mem_put_le32(header + 16, cfg->g_timebase.den); /* rate */
 | 
				
			||||||
 | 
					  mem_put_le32(header + 20, cfg->g_timebase.num); /* scale */
 | 
				
			||||||
 | 
					  mem_put_le32(header + 24, frame_cnt);           /* length */
 | 
				
			||||||
 | 
					  mem_put_le32(header + 28, 0);                   /* unused */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (void)fwrite(header, 1, 32, outfile);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void write_ivf_frame_size(FILE *const outfile, const size_t size) {
 | 
				
			||||||
 | 
					  char header[4];
 | 
				
			||||||
 | 
					  mem_put_le32(header, static_cast<unsigned int>(size));
 | 
				
			||||||
 | 
					  (void)fwrite(header, 1, 4, outfile);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void write_ivf_frame_header(const vpx_codec_cx_pkt_t *const pkt,
 | 
				
			||||||
 | 
					                                   FILE *const outfile) {
 | 
				
			||||||
 | 
					  char header[12];
 | 
				
			||||||
 | 
					  vpx_codec_pts_t pts;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  pts = pkt->data.frame.pts;
 | 
				
			||||||
 | 
					  mem_put_le32(header, static_cast<unsigned int>(pkt->data.frame.sz));
 | 
				
			||||||
 | 
					  mem_put_le32(header + 4, pts & 0xFFFFFFFF);
 | 
				
			||||||
 | 
					  mem_put_le32(header + 8, pts >> 32);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (void)fwrite(header, 1, 12, outfile);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif  // WRITE_COMPRESSED_STREAM
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const unsigned int kInitialWidth = 320;
 | 
					const unsigned int kInitialWidth = 320;
 | 
				
			||||||
const unsigned int kInitialHeight = 240;
 | 
					const unsigned int kInitialHeight = 240;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -42,6 +102,8 @@ class ResizingVideoSource : public ::libvpx_test::DummyVideoSource {
 | 
				
			|||||||
    limit_ = 60;
 | 
					    limit_ = 60;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual ~ResizingVideoSource() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  virtual void Next() {
 | 
					  virtual void Next() {
 | 
				
			||||||
    ++frame_;
 | 
					    ++frame_;
 | 
				
			||||||
@@ -56,13 +118,15 @@ class ResizeTest : public ::libvpx_test::EncoderTest,
 | 
				
			|||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
  ResizeTest() : EncoderTest(GET_PARAM(0)) {}
 | 
					  ResizeTest() : EncoderTest(GET_PARAM(0)) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual ~ResizeTest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  struct FrameInfo {
 | 
					  struct FrameInfo {
 | 
				
			||||||
    FrameInfo(vpx_codec_pts_t _pts, unsigned int _w, unsigned int _h)
 | 
					    FrameInfo(vpx_codec_pts_t _pts, unsigned int _w, unsigned int _h)
 | 
				
			||||||
        : pts(_pts), w(_w), h(_h) {}
 | 
					        : pts(_pts), w(_w), h(_h) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    vpx_codec_pts_t pts;
 | 
					    vpx_codec_pts_t pts;
 | 
				
			||||||
    unsigned int    w;
 | 
					    unsigned int w;
 | 
				
			||||||
    unsigned int    h;
 | 
					    unsigned int h;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void SetUp() {
 | 
					  virtual void SetUp() {
 | 
				
			||||||
@@ -95,17 +159,47 @@ TEST_P(ResizeTest, TestExternalResizeWorks) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const unsigned int kStepDownFrame = 3;
 | 
				
			||||||
 | 
					const unsigned int kStepUpFrame = 6;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ResizeInternalTest : public ResizeTest {
 | 
					class ResizeInternalTest : public ResizeTest {
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
 | 
					#if WRITE_COMPRESSED_STREAM
 | 
				
			||||||
 | 
					  ResizeInternalTest()
 | 
				
			||||||
 | 
					      : ResizeTest(),
 | 
				
			||||||
 | 
					        frame0_psnr_(0.0),
 | 
				
			||||||
 | 
					        outfile_(NULL),
 | 
				
			||||||
 | 
					        out_frames_(0) {}
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
  ResizeInternalTest() : ResizeTest(), frame0_psnr_(0.0) {}
 | 
					  ResizeInternalTest() : ResizeTest(), frame0_psnr_(0.0) {}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual ~ResizeInternalTest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual void BeginPassHook(unsigned int /*pass*/) {
 | 
				
			||||||
 | 
					#if WRITE_COMPRESSED_STREAM
 | 
				
			||||||
 | 
					    outfile_ = fopen("vp90-2-05-resize.ivf", "wb");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual void EndPassHook() {
 | 
				
			||||||
 | 
					#if WRITE_COMPRESSED_STREAM
 | 
				
			||||||
 | 
					    if (outfile_) {
 | 
				
			||||||
 | 
					      if (!fseek(outfile_, 0, SEEK_SET))
 | 
				
			||||||
 | 
					        write_ivf_file_header(&cfg_, out_frames_, outfile_);
 | 
				
			||||||
 | 
					      fclose(outfile_);
 | 
				
			||||||
 | 
					      outfile_ = NULL;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
 | 
					  virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
 | 
				
			||||||
                                  libvpx_test::Encoder *encoder) {
 | 
					                                  libvpx_test::Encoder *encoder) {
 | 
				
			||||||
    if (video->frame() == 3) {
 | 
					    if (video->frame() == kStepDownFrame) {
 | 
				
			||||||
      struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
 | 
					      struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
 | 
				
			||||||
      encoder->Control(VP8E_SET_SCALEMODE, &mode);
 | 
					      encoder->Control(VP8E_SET_SCALEMODE, &mode);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (video->frame() == 6) {
 | 
					    if (video->frame() == kStepUpFrame) {
 | 
				
			||||||
      struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
 | 
					      struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
 | 
				
			||||||
      encoder->Control(VP8E_SET_SCALEMODE, &mode);
 | 
					      encoder->Control(VP8E_SET_SCALEMODE, &mode);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -117,7 +211,25 @@ class ResizeInternalTest : public ResizeTest {
 | 
				
			|||||||
    EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 1.0);
 | 
					    EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 1.0);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
 | 
				
			||||||
 | 
					#if WRITE_COMPRESSED_STREAM
 | 
				
			||||||
 | 
					    ++out_frames_;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Write initial file header if first frame.
 | 
				
			||||||
 | 
					    if (pkt->data.frame.pts == 0)
 | 
				
			||||||
 | 
					      write_ivf_file_header(&cfg_, 0, outfile_);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Write frame header and data.
 | 
				
			||||||
 | 
					    write_ivf_frame_header(pkt, outfile_);
 | 
				
			||||||
 | 
					    (void)fwrite(pkt->data.frame.buf, 1, pkt->data.frame.sz, outfile_);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  double frame0_psnr_;
 | 
					  double frame0_psnr_;
 | 
				
			||||||
 | 
					#if WRITE_COMPRESSED_STREAM
 | 
				
			||||||
 | 
					  FILE *outfile_;
 | 
				
			||||||
 | 
					  unsigned int out_frames_;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
 | 
					TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
 | 
				
			||||||
@@ -125,20 +237,20 @@ TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
 | 
				
			|||||||
                                       30, 1, 0, 10);
 | 
					                                       30, 1, 0, 10);
 | 
				
			||||||
  init_flags_ = VPX_CODEC_USE_PSNR;
 | 
					  init_flags_ = VPX_CODEC_USE_PSNR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // q picked such that initial keyframe on this clip is ~30dB PSNR
 | 
				
			||||||
 | 
					  cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // If the number of frames being encoded is smaller than g_lag_in_frames
 | 
					  // If the number of frames being encoded is smaller than g_lag_in_frames
 | 
				
			||||||
  // the encoded frame is unavailable using the current API. Comparing
 | 
					  // the encoded frame is unavailable using the current API. Comparing
 | 
				
			||||||
  // frames to detect mismatch would then not be possible. Set
 | 
					  // frames to detect mismatch would then not be possible. Set
 | 
				
			||||||
  // g_lag_in_frames = 0 to get around this.
 | 
					  // g_lag_in_frames = 0 to get around this.
 | 
				
			||||||
  cfg_.g_lag_in_frames = 0;
 | 
					  cfg_.g_lag_in_frames = 0;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  // q picked such that initial keyframe on this clip is ~30dB PSNR
 | 
					 | 
				
			||||||
  cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
 | 
					 | 
				
			||||||
  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
					  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (std::vector<FrameInfo>::iterator info = frame_info_list_.begin();
 | 
					  for (std::vector<FrameInfo>::iterator info = frame_info_list_.begin();
 | 
				
			||||||
       info != frame_info_list_.end(); ++info) {
 | 
					       info != frame_info_list_.end(); ++info) {
 | 
				
			||||||
    const vpx_codec_pts_t pts = info->pts;
 | 
					    const vpx_codec_pts_t pts = info->pts;
 | 
				
			||||||
    if (pts >= 3 && pts < 6) {
 | 
					    if (pts >= kStepDownFrame && pts < kStepUpFrame) {
 | 
				
			||||||
      ASSERT_EQ(282U, info->w) << "Frame " << pts << " had unexpected width";
 | 
					      ASSERT_EQ(282U, info->w) << "Frame " << pts << " had unexpected width";
 | 
				
			||||||
      ASSERT_EQ(173U, info->h) << "Frame " << pts << " had unexpected height";
 | 
					      ASSERT_EQ(173U, info->h) << "Frame " << pts << " had unexpected height";
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -520,7 +520,12 @@ d17bc08eedfc60c4c23d576a6c964a21bf854d1f  vp90-2-03-size-226x202.webm
 | 
				
			|||||||
83c6d8f2969b759e10e5c6542baca1265c874c29  vp90-2-03-size-226x224.webm.md5
 | 
					83c6d8f2969b759e10e5c6542baca1265c874c29  vp90-2-03-size-226x224.webm.md5
 | 
				
			||||||
fe0af2ee47b1e5f6a66db369e2d7e9d870b38dce  vp90-2-03-size-226x226.webm
 | 
					fe0af2ee47b1e5f6a66db369e2d7e9d870b38dce  vp90-2-03-size-226x226.webm
 | 
				
			||||||
94ad19b8b699cea105e2ff18f0df2afd7242bcf7  vp90-2-03-size-226x226.webm.md5
 | 
					94ad19b8b699cea105e2ff18f0df2afd7242bcf7  vp90-2-03-size-226x226.webm.md5
 | 
				
			||||||
495256cfd123fe777b2c0406862ed8468a1f4677  vp91-2-04-yv444.webm
 | 
					 | 
				
			||||||
65e3a7ffef61ab340d9140f335ecc49125970c2c  vp91-2-04-yv444.webm.md5
 | 
					 | 
				
			||||||
b6524e4084d15b5d0caaa3d3d1368db30cbee69c  vp90-2-03-deltaq.webm
 | 
					b6524e4084d15b5d0caaa3d3d1368db30cbee69c  vp90-2-03-deltaq.webm
 | 
				
			||||||
65f45ec9a55537aac76104818278e0978f94a678  vp90-2-03-deltaq.webm.md5
 | 
					65f45ec9a55537aac76104818278e0978f94a678  vp90-2-03-deltaq.webm.md5
 | 
				
			||||||
 | 
					4dbb87494c7f565ffc266c98d17d0d8c7a5c5aba  vp90-2-05-resize.ivf
 | 
				
			||||||
 | 
					7f6d8879336239a43dbb6c9f13178cb11cf7ed09  vp90-2-05-resize.ivf.md5
 | 
				
			||||||
 | 
					bf61ddc1f716eba58d4c9837d4e91031d9ce4ffe  vp90-2-06-bilinear.webm
 | 
				
			||||||
 | 
					f6235f937552e11d8eb331ec55da6b3aa596b9ac  vp90-2-06-bilinear.webm.md5
 | 
				
			||||||
 | 
					495256cfd123fe777b2c0406862ed8468a1f4677  vp91-2-04-yv444.webm
 | 
				
			||||||
 | 
					65e3a7ffef61ab340d9140f335ecc49125970c2c  vp91-2-04-yv444.webm.md5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -631,5 +631,9 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm
 | 
				
			|||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm.md5
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm.md5
 | 
				
			||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm
 | 
				
			||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm.md5
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm.md5
 | 
				
			||||||
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf
 | 
				
			||||||
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf.md5
 | 
				
			||||||
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-06-bilinear.webm
 | 
				
			||||||
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-06-bilinear.webm.md5
 | 
				
			||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm
 | 
				
			||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm.md5
 | 
					LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm.md5
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -160,6 +160,7 @@ const char *kVP9TestVectors[] = {
 | 
				
			|||||||
  "vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
 | 
					  "vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
 | 
				
			||||||
  "vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
 | 
					  "vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
 | 
				
			||||||
  "vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm",
 | 
					  "vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm",
 | 
				
			||||||
 | 
					  "vp90-2-05-resize.ivf",        "vp90-2-06-bilinear.webm",
 | 
				
			||||||
#if CONFIG_NON420
 | 
					#if CONFIG_NON420
 | 
				
			||||||
  "vp91-2-04-yv444.webm"
 | 
					  "vp91-2-04-yv444.webm"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -492,7 +492,8 @@ static INTERPOLATIONFILTERTYPE read_interp_filter_type(
 | 
				
			|||||||
    struct vp9_read_bit_buffer *rb) {
 | 
					    struct vp9_read_bit_buffer *rb) {
 | 
				
			||||||
  const INTERPOLATIONFILTERTYPE literal_to_type[] = { EIGHTTAP_SMOOTH,
 | 
					  const INTERPOLATIONFILTERTYPE literal_to_type[] = { EIGHTTAP_SMOOTH,
 | 
				
			||||||
                                                      EIGHTTAP,
 | 
					                                                      EIGHTTAP,
 | 
				
			||||||
                                                      EIGHTTAP_SHARP };
 | 
					                                                      EIGHTTAP_SHARP,
 | 
				
			||||||
 | 
					                                                      BILINEAR };
 | 
				
			||||||
  return vp9_rb_read_bit(rb) ? SWITCHABLE
 | 
					  return vp9_rb_read_bit(rb) ? SWITCHABLE
 | 
				
			||||||
                             : literal_to_type[vp9_rb_read_literal(rb, 2)];
 | 
					                             : literal_to_type[vp9_rb_read_literal(rb, 2)];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1162,7 +1162,7 @@ static void encode_txfm_probs(VP9_COMP *cpi, vp9_writer *w) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void write_interp_filter_type(INTERPOLATIONFILTERTYPE type,
 | 
					static void write_interp_filter_type(INTERPOLATIONFILTERTYPE type,
 | 
				
			||||||
                                     struct vp9_write_bit_buffer *wb) {
 | 
					                                     struct vp9_write_bit_buffer *wb) {
 | 
				
			||||||
  const int type_to_literal[] = { 1, 0, 2 };
 | 
					  const int type_to_literal[] = { 1, 0, 2, 3 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vp9_wb_write_bit(wb, type == SWITCHABLE);
 | 
					  vp9_wb_write_bit(wb, type == SWITCHABLE);
 | 
				
			||||||
  if (type != SWITCHABLE)
 | 
					  if (type != SWITCHABLE)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -215,11 +215,11 @@ vpx_codec_err_t  vpx_codec_encode(vpx_codec_ctx_t            *ctx,
 | 
				
			|||||||
  else if (!(ctx->iface->caps & VPX_CODEC_CAP_ENCODER))
 | 
					  else if (!(ctx->iface->caps & VPX_CODEC_CAP_ENCODER))
 | 
				
			||||||
    res = VPX_CODEC_INCAPABLE;
 | 
					    res = VPX_CODEC_INCAPABLE;
 | 
				
			||||||
  else {
 | 
					  else {
 | 
				
			||||||
 | 
					    unsigned int num_enc = ctx->priv->enc.total_encoders;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Execute in a normalized floating point environment, if the platform
 | 
					    /* Execute in a normalized floating point environment, if the platform
 | 
				
			||||||
     * requires it.
 | 
					     * requires it.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    unsigned int num_enc = ctx->priv->enc.total_encoders;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    FLOATING_POINT_INIT();
 | 
					    FLOATING_POINT_INIT();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (num_enc == 1)
 | 
					    if (num_enc == 1)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user