Commit Graph

15 Commits

Author SHA1 Message Date
James Zern
dbe691709e resize_test.cc: remove unused param warnings
Change-Id: I86b21186e49f9e0ec0d8eb3addaa44b9fd196a6b
2014-08-22 12:47:52 -07:00
James Zern
bb061388a2 resize_test: use const_iterator where appropriate
Change-Id: I9ebfeb4947e7d7bc8af175730b0b25b2880ee26c
2014-01-31 20:11:55 -08:00
James Zern
17b899322c resize_test: silence a warning
the timebase of pts is 1/fps, so casting down to unsigned is safe here.

Change-Id: I2e2f9bb68604c3c5539804685e6166beb54fe83e
2014-01-31 20:10:28 -08:00
Deb Mukherjee
3cd37dfeb5 Adds a non-normative resize library to vp9 encoder
Adds an arbitrary-size resize library for use in scaling of input
frames in a non-normative manner in the vp9 encoder. The method
used is as follows:
Downsampling - Uses a 8 tap filter for factor of 2 decimation upto
a size just higher than the desired size. Then interpolates pixels
at a precision of 1/32 pel using a set of 8-tap filters.
Upsampling - Interpolates pixels at a precision of 1/32 pel using
a set of 8-tap filters.

There is no assembly optimization yet.

Change-Id: Ib5b81e174fc139da322bb97c8214d52289d60d8a
2014-01-21 16:50:00 -08:00
Paul Wilkins
899ab95c8c Adjustment to allowed range in resize unit test
Change-Id: I5222e3db2627a3a9f7fc34f2ab4554aa5807ed51
2013-10-11 13:38:24 +01:00
Adrian Grange
88c8ff2508 Modified resize unit test to output test vector
Modified the resize unit test so that it optionally
writes the encoded bitstream to file. The macro
WRITE_COMPRESSED_STREAM should be set to 1 to enable
output of the test bitstream; it is set to 0 by default.

Change-Id: I7d436b1942f935da97db6d84574a98d379f57fb1
2013-09-17 15:38:30 -07:00
Adrian Grange
93ffd371eb Enable and fix resize_test for VP9
Added the resize_test unit test to the VP9 set.

Set g_in_frames = 0 to avoid a problem when the total
number of frames being encoded is smaller than
g_in_frames. In this case the test will not have
access to the encoded frames and will not be able to
compare them for testing for encoder/decoder mismatch.

Change-Id: I0d2ff8ef058de7002c5faa894ed6ea794d5f900b
2013-09-10 12:02:37 -07:00
James Zern
1c05e9de2c encode_test_driver: check for fatal failures
Make the base test be:
!(fatal || abort_) removing some redundancy in the encode tests

Change-Id: I8ffaf33fcf9a3030b38ea3e8eb94704cdc2fc920
2013-06-25 17:57:52 -07:00
John Koleszar
449f136886 VP9/ResizeInternalTest: adjust passing threshold
Update to +/- 1dB.

Change-Id: Idada001f261b36945c9334e288a415ee2c79c415
2013-03-18 15:17:45 -07:00
John Koleszar
93e10c8e87 Update ResizeInternalTest threshold
Improved coding performance made this test fail. Adjust the threshold
so that it passes again. A more stable metric is an open TODO.

Change-Id: I56e18749ced48123ee2488888a3eed631759912b
2013-03-05 13:44:56 -08:00
John Koleszar
b683eecf6d Test upscaling as well as downscaling
Fixes a bug in vp9_set_internal_size() that prevented returning to
the unscaled state. Updated the ResizeInternalTest to scale both
down and up. Added a check that all frames are within 2.5% of the
quality of the initial keyframe.

Change-Id: I3b7ef17cdac144ed05b9148dce6badfa75cff5c8
2013-02-27 08:22:40 -08:00
John Koleszar
eb939f45b8 Spatial resamping of ZEROMV predictors
This patch allows coding frames using references of different
resolution, in ZEROMV mode. For compound prediction, either
reference may be scaled.

To test, I use the resize_test and enable WRITE_RECON_BUFFER
in vp9_onyxd_if.c. It's also useful to apply this patch to
test/i420_video_source.h:

  --- a/test/i420_video_source.h
  +++ b/test/i420_video_source.h
  @@ -93,6 +93,7 @@ class I420VideoSource : public VideoSource {

     virtual void FillFrame() {
       // Read a frame from input_file.
  +    if (frame_ != 3)
       if (fread(img_->img_data, raw_sz_, 1, input_file_) == 0) {
         limit_ = frame_;
       }

This forces the frame that the resolution changes on to be coded
with no motion, only scaling, and improves the quality of the
result.

Change-Id: I1ee75d19a437ff801192f767fd02a36bcbd1d496
2013-02-26 23:54:23 -08:00
John Koleszar
88f99f4ec2 Adds a test for the VP8E_SET_SCALEMODE control
Tests that the external interface to set the internal codec scaling
works as expected. Also updates the test to pull the height from
the decoded frame size rather than parsing the keyframe header,
in anticipation of allowing resolution changes on non-keyframes.

Change-Id: I3ed92117d8e5288fbbd1e7b618f2f233d0fe2c17
2013-02-08 12:20:30 -08:00
John Koleszar
706cafe336 Support multiple codecs in test infrastructure
This commit starts to convert the tests to a system where the codec
to be used is provided by a factory object. Currently no tests are
instantiated for VP9 since they all fail for various reasons, but it
was verified that they're called and the correct codec is
instantiated.

Change-Id: Ia7506df2ca3a7651218ba3ca560634f08c9fbdeb
2013-01-23 14:41:33 -08:00
John Koleszar
2fb29ff7f9 Add external resize tests
Adds a test that ensures the application is able to trigger frame size
changes via vpx_codec_enc_config_set()

Change-Id: I231c062e533d75c8d63c5f8a5544650117429a63
2012-05-24 09:38:39 -07:00