Yunqing Wang [Tue, 6 Jan 2015 22:14:26 +0000 (14:14 -0800)]
vp9_ethread: add parallel loopfilter
1. Added row-based loopfilter in encoder;
2. Moved common multi-threaded loopfilter functions from decoder
to common;
3. Merged multi-threaded loopfilter code, and made encoder/
decoder call same function to reduce code duplication.
Encoder tests showed that 1% - 2% speedup was seen for good-quality
2-pass mode(at speed 3); 1% - 3% speedup using 2 threads and 4% - 6%
speedup using 4 threads were seen for real-time mode(at speed 7).
Yunqing Wang [Wed, 14 Jan 2015 23:51:56 +0000 (15:51 -0800)]
Align thread data in vp9_ethread
On some platforms, such as 32bit Windows and 32bit Mac, the allocated
memory isn't aligned automatically. The thread data is aligned to
ensure the correct access in SIMD code.
Yaowu Xu [Tue, 13 Jan 2015 20:39:42 +0000 (12:39 -0800)]
Fix comments for encoder controls
This commit added coments for the following encoder controls:
VP9E_SET_LOSSLESS
VP9E_SET_TILE_COLUMNS
VP9E_SET_TILE_ROWS
VP9E_SET_FRAME_PARALLEL_DECODING
VP9E_SET_AQ_MODE
Yaowu Xu [Tue, 13 Jan 2015 18:07:20 +0000 (10:07 -0800)]
Add encoder control for setting color space
This commit adds encoder side control for vp9 to set color space info
in the output compressed bitstream.
It also amends the "vp9_encoder_params_get_to_decoder" test to verify
the correct color space information is passed from the encoder end to
decoder end.
Minghai Shang [Tue, 13 Jan 2015 23:39:04 +0000 (15:39 -0800)]
[twopass temporal svc] Fix decoding error on seek.
Don't put small empty frame in front of a key frame. We will
put key frame flag in webm container if there's a visible key
frame. But there will be decoding error when we seek to here
if we put the small empty frame, which will be inter frame,
in front of it.
Yaowu Xu [Fri, 9 Jan 2015 21:04:48 +0000 (13:04 -0800)]
Enable decoder to pass through color space info
This commit added a field to vpx_image_t for indicating color space,
the field is also added to YUV_BUFFER_CONFIG. This allows the color
space information pass through the decoder from input stream to the
output buffer.
The commit also updated compare_img() function with added verification
of matching color space to ensure the color space information to be
correctly passed from encode to decoder in compressed vp9 streams.
On Nexus 7 speed -5 and -6 saw about a 4% increase in perf.
Speeds -7 and -8 saw about a 6% increase in perf.
Tested on Nexus 7, built with ndk r10d, gcc 4.9.
Yaowu Xu [Fri, 9 Jan 2015 18:36:43 +0000 (10:36 -0800)]
Fix comments and color format
Replaced "color space" with "color format" in comments where color
sampling format is concerned, so to differentiate from the concept
defined in COLOR_SPACE.
Jingning Han [Thu, 8 Jan 2015 20:15:30 +0000 (12:15 -0800)]
Refactor mc reference block fetch in denoiser
This commit refactors the motion compensated reference block fetch
process in denoiser. It skips the stage that generates motion
compensated reference block if denoiser decides to use copy block
mode. For high motion clips, this could speed up the denoising
process by about 10%.
Jingning Han [Thu, 8 Jan 2015 02:30:50 +0000 (18:30 -0800)]
Refactor denoiser frame buffer update
Use frame buffer pointer swap instead of memcpy when possible.
These two CLs make the denoiser when running on vidyo1 720p at
speed -6 over 10% faster.
Jingning Han [Wed, 7 Jan 2015 19:41:56 +0000 (11:41 -0800)]
Initalize zeromv_sse and newmv_sse in vp9_pick_inter_mode
These two parameters are used to control the denoiser cut-off
thresholds. They should be properly initialized when starting
mode search of a given block.
Jingning Han [Wed, 7 Jan 2015 00:17:05 +0000 (16:17 -0800)]
Always check and free denoiser buffer memory space
The vp9_denoiser_free() function will internally check if the
buffer pointers are NULL. This commit makes the encoder always
call vp9_denoiser_free() after finishing encoding. It protects the
case where noise_sensitivity_level is changed during encoding
process and happen to be turned off towards the end of sequence,
which could result memory space allocated to denoiser not being
released.
Jingning Han [Sun, 4 Jan 2015 04:46:13 +0000 (20:46 -0800)]
Fix denoiser chroma component initialization
Use the correct frame size and stride value for chroma components
when setting the initial values. These control parameters are
assigned when the denoiser buffer was allocated and initialized.
Jingning Han [Sat, 3 Jan 2015 20:00:46 +0000 (12:00 -0800)]
Skip duplicate denoiser frame buffer allocation
Allocate the frame buffer allocation for denoiser once during the
encoder initialization. This avoids allocating frame buffer
multiple times and overwriting the buffer pointer without proper
releasing.
Paul Wilkins [Fri, 19 Dec 2014 16:58:05 +0000 (16:58 +0000)]
Use 64 bit to accumulate frame sse.
When testing frame sse to choose a loop filter value and
when checking ambient error in kf Q selection, use 64 bit
values for accumulating the sse, to avoid risk of overflow
for large image formats.