Jingning Han [Thu, 28 Feb 2013 01:09:12 +0000 (17:09 -0800)]
Support 16K sequence coding
Fixed a couple of variable/function definitions, as well as header
handling to support 16K sequence coding at high bit-rates.
The width and height are each specified by two bytes in the header.
Use an extra byte to explicitly indicate the scaling factors in
both directions, each ranging from 0 to 15.
John Koleszar [Thu, 28 Feb 2013 18:52:04 +0000 (10:52 -0800)]
Fix incorrect comparison of frame size
The width and height stored in the reference frames are padded out to
a multiple of 16. The Width and Height variables in common are the
displayed size, which may be smaller. The incorrect comparison was
causing scaling related code to be called when it shouldn't have
been. A notable case where this happens is 1080p, since 1088 != 1080.
Jim Bankoski [Thu, 28 Feb 2013 16:32:14 +0000 (08:32 -0800)]
this commit converts all sad ptrs to uint32
sse4_1 code used uint16_t for returning sad, but that
won't work for 32x32 or 64x64. This code fixes the
assembly for those and also reenables sse4_1 on linux
Dmitry Kovalev [Wed, 27 Feb 2013 19:17:38 +0000 (11:17 -0800)]
Code cleanup.
Fixing code style, using array lookup instead of switch statements for
forward hybrid transforms (in the same way as for their inverses).
Consistent usage of ROUND_POWER_OF_TWO macro in appropriate places.
John Koleszar [Thu, 21 Feb 2013 00:32:02 +0000 (16:32 -0800)]
convolve test: validate 1D filters are 1D
Since the 8-tap lowpass filter is non-interpolating, the results are
different between applying it at whole-pel values and not. This
means that 1D-only versions are requried to be implemented, as
opposed to being an optimization of the 2D case. Calling the 2D
filter instead of the horizontal-only filter is not equivalent
in this case. Update the test to pass invalid filters to the
unused stage of the 1D-only calls, to verify they're unused.
John Koleszar [Thu, 21 Feb 2013 00:13:01 +0000 (16:13 -0800)]
Run all filters through convolve test
Updates the convolve test to verify that all filters match the
reference implementation. This verifies commit 30f866f, which
fixed some problems with the SSE3 version of the filters for
the vp9_sub_pel_filters_8s and vp9_sub_pel_filters_8lp banks
due to overflow and order of operations.
John Koleszar [Wed, 27 Feb 2013 18:23:06 +0000 (10:23 -0800)]
Remove unused vp9_copy32xn
This function was part of an optimization used in VP8 that required
caching two macroblocks. This is unused in VP9, and might not
survive refactoring to support superblocks, so removing it for now.
John Koleszar [Tue, 26 Feb 2013 00:58:47 +0000 (16:58 -0800)]
vpxdec: support scaling output
Adds an option, --scale, that will rescale any frames produced by
the decoder that don't match the resolution of the first frame to
that resolution. This is useful for playback of files that use
spatial resampling.
John Koleszar [Thu, 1 Mar 2012 20:50:40 +0000 (12:50 -0800)]
vpxenc: support scaling prior to encoding
Scales the input of the encoder using libyuv's "box filter". Each stream
may have a different width and height specified. If the width (or
height) parameter is missing (or is explicitly set to 0) then the value
will be calculated based on the specified height (or width) and the
input file's dimensions, preserving its aspect ratio. Leaving the height
unspecified behaves similarly.
John Koleszar [Fri, 22 Feb 2013 19:22:03 +0000 (11:22 -0800)]
Use ref_frame_map vice active_ref_idx on the encoder
This patch makes the encoder's use of ref_frame_map and active_ref_idx
consistent with the decoder. ref_frame_map[] maps a reference buffer
index to its actual location in the yv12_fb array, since many
references may share an underlying buffer. active_ref_idx[] mirrors
cpi->{lst,gld,alt}_fb_idx, holding the active references in each
slot.
This also fixes a bug in setup_buffer_inter() where the incorrect
reference was used to populate the scaling factors.
John Koleszar [Thu, 21 Feb 2013 18:38:27 +0000 (10:38 -0800)]
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.
John Koleszar [Wed, 20 Feb 2013 20:34:31 +0000 (12:34 -0800)]
Combined motion compensation with scaled predictors
This patch extends the previous support for using references of a
different resolution in ZEROMV mode to all inter prediction modes.
Subpixel based best-mv scoring is disabled when the reference frame
differs in resolution from the current frame.
John Koleszar [Wed, 20 Feb 2013 21:46:55 +0000 (13:46 -0800)]
Set scale factors consistently for SPLITMV
This commit updates the 4x4 prediction to consistently use the
build_2x1_inter_predictor() method. That function is updated to
calculate the scale offset, rather than relying on the caller
to calculate it. In the case that the 2x1 prediction can not
be used, the scale offset is recalculated for each 1x1 block.
The idea here is that the offsets are calculated before each
call to vp9_build_scaled_inter_predictor().
Yunqing Wang [Wed, 27 Feb 2013 00:27:41 +0000 (16:27 -0800)]
Optimize vp9_dc_only_idct_add_c function
Wrote SSE2 version of vp9_dc_only_idct_add_c function. In order to
improve performance, clipped the absolute diff values to [0, 255].
This allowed us to keep the additions/subtractions in 8 bits.
Test showed an over 2% decoder performance increase.
Johann [Sat, 2 Feb 2013 00:14:38 +0000 (16:14 -0800)]
vp8 fast quantizer with intrinsics
Reduce dependency on offsets file by using intrinsics. Disassembly shows
improvements over previous assembly specifically in register management,
preloading, and {pro,epi}log. Speed change is within margin of error.
John Koleszar [Sat, 9 Feb 2013 01:49:44 +0000 (17:49 -0800)]
Refactor inter recon functions to support scaling
Ensure that all inter prediction goes through a common code path
that takes scaling into account. Removes a bunch of duplicate
1st/2nd predictor code. Also introduces a 16x8 mode for 8x8
MVs, similar to the 8x4 trick we were doing before. This has an
unexpected effect with EIGHTTAP_SMOOTH, so it's disabled in that
case for now.
Yaowu Xu [Tue, 26 Feb 2013 17:07:49 +0000 (09:07 -0800)]
Enable 32x32 dct tests
Also
1. Removed the test code for fDCT from the iDCT test.
2. changed the criteria of round trip error to be below 1/block, this
is quite strict comparing to smaller transforms when size differences
are accounted for.
Yaowu Xu [Mon, 25 Feb 2013 23:21:01 +0000 (15:21 -0800)]
Improve 32x32 forward dct
The commit improves the 32x32 forward dct implementation:
1. change to use same constants and rounding as other forward dcts
2. select rounding to specifically minimize the roundtrip error, which
improved average 19/block to .77/block using 100000 random input.
Test showed a small but consistent gain on all test sets, about .15%
Dmitry Kovalev [Mon, 25 Feb 2013 23:14:01 +0000 (15:14 -0800)]
Code cleanup.
Removing switch statements for inverse hybrid transforms. Making code style
consistent for all similar transform implementations. Renaming shortpitch
and short_pitch variables to half_pitch.