Yaowu Xu [Fri, 8 Nov 2013 21:04:08 +0000 (13:04 -0800)]
[BITSTREAM]Fix row tile mode_info pointer setup
This commit fixes the assignment of mode_info pointer per tile. It
makes recognition of tiles in both row and column formats and properly
arrange the use of mode_info.
The bug was first introduced in
I6226456dd11f275fa991e4a7a930549da6675915
https://gerrit.chromium.org/gerrit/#/c/67492/
Yunqing Wang [Wed, 6 Nov 2013 19:06:21 +0000 (11:06 -0800)]
Remove TEXTREL from 32bit encoder
This patch fixed the issue reported in "Issue 655: remove textrel's
from 32-bit vp9 encoder". The set of vp9_subpel_variance functions
that used x86inc.asm ABI didn't build correctly for 32bit PIC. The
fix was carefully done under the situation that there was not
enough registers.
After the change, we got
$ eu-findtextrel libvpx.so
eu-findtextrel: no text relocations reported in 'libvpx.so'
Dmitry Kovalev [Thu, 7 Nov 2013 02:15:33 +0000 (18:15 -0800)]
Unifying tile decoding for both direct and inverse tile order.
Now tile decoding consists of two stages:
1. Find tile buffer start and its size, put this info into tile_buffers.
2. Decode each tile based on information from tile_buffers.
It seems that stage 1 can also be reused by multithreaded tile decoder.
Dmitry Kovalev [Thu, 7 Nov 2013 00:14:45 +0000 (16:14 -0800)]
Using pd->dqcoeff instead of pd->qcoeff in the decoder.
It is more logical to use dqcoeff buffer to put there *dequantized*
transform coefficients (inside inverse_transform_block and
decode_coefs functions). Dequantization happens inside WRITE_COEF_CONTINUE
macro.
qcoeff buffer should be only used in the encoder for *quantized*
transform coefficients.
Ivan Maltz [Wed, 23 Oct 2013 18:53:37 +0000 (11:53 -0700)]
Move SVC per-frame loop from sample app into libvpx proper
SVC multiple layer per frame encoding is invoked with vpx_svc_init and
vpx_svc_encode. These interfaces are designed to be invoked from ffmpeg.
Additional improvements:
- make dummy frame handling a bit more explicit
- fixed bug with single layer encodes
- track individual frame sizes and psnrs instead of averages
- parameterized quantizer, 16th scalefactors, more logging,
- enabled single layer encodes to generate baseline
- include new mode for 3 layer I frame with 5 total layers
Tom Finegan [Wed, 6 Nov 2013 18:02:31 +0000 (10:02 -0800)]
webmenc: Clean up the truly egregious style issues.
I'm sure I could do more, but I don't know how long this code has to
live. I think this at least makes the code a little easier to read and
understand.
Tom Finegan [Tue, 5 Nov 2013 18:02:18 +0000 (10:02 -0800)]
Move WebM writing support out of vpxenc.c.
This is mainly a clean up patchset. It moves the WebM writing support
out of vpxenc and into its own source file. Changes to tools_common and
vpxdec result from relocation of shared bits of code.
Dmitry Kovalev [Tue, 5 Nov 2013 19:58:57 +0000 (11:58 -0800)]
Localizing NEARESTMV special cases in the code.
Removing special case handling from vp9_tree_probs_from_distribution(),
tree_merge_probs(), and vp9_tokens_from_tree_offset() functions. Replacing
inter_mode_offset() function with macro INTER_OFFSET which is used now for
vp9_inter_mode_tree definition.
Jingning Han [Tue, 5 Nov 2013 02:45:45 +0000 (18:45 -0800)]
Avoid mv cost check for invalid mv values
The compound inter prediction could potentially run with initial
motion vectors of invalid value and check the mv_cost, which triggers
overheap read. This commit resolves this issue by forcing a motion
vector value check for compound inter modes of both superblock and
sub8x8 block sizes.
Dmitry Kovalev [Sat, 2 Nov 2013 01:23:06 +0000 (18:23 -0700)]
Splitting partition_probs array into two arrays.
We only update partition_probs for inter frames but they are constant
for key frames. It is not necessary to have constants inside frame
context and copy them every time. This change reduces FRAME_CONTEXT size
by at least 48 bytes.
Adrian Grange [Mon, 4 Nov 2013 20:17:54 +0000 (12:17 -0800)]
Remove unused members from VP9_COMP
Removed:
goldfreq, avg_encode_time, avg_pick_mode_time,
cpu_freq, interquantizer
member variables from VP9_COMP since they are no longer
used in the code.
Jingning Han [Sun, 3 Nov 2013 19:16:38 +0000 (11:16 -0800)]
Fix the use case of plane_block_idx in sub8x8 RD
This commit fixes the use case of plane_block_idx, which determines
the plane (Y/U/V) index based on block index. When block idx >= 4 in
sub8x8 block loop, it should be of chroma components.
Dmitry Kovalev [Fri, 1 Nov 2013 22:09:43 +0000 (15:09 -0700)]
Removing 'new' probability calculation from convert_distribution().
We don't have to calculate 'new' probability in convert_distribution()
because it is enough to calculate only 'new' counters which could be used
to calculate probability if necessary. That's why removing a lot of unused
temporary probability arrays and reducing number of get_binary_prob()
calls.
Marco Paniconi [Fri, 1 Nov 2013 18:03:03 +0000 (11:03 -0700)]
Fixes to buffer update for temporal layers.
When a frame is dropped due to |buffer_level| < 0 for a given temporal layer,
the buffer level for the upper temporal layers was not updated (in calc_pframe_target_size()).
This change fixes that.
Also, use the layer per-frame-bandwidth for updating the buffer level
of the higher layers when a frame is dropped.
Yaowu Xu [Fri, 1 Nov 2013 14:24:07 +0000 (07:24 -0700)]
Two optimizations:
1. Reduced the size memset based on eob for 32x32 transform. The reset
of non-zero coefficient should probably go into where they are read in
inverse transform functions. (TODO)
2. Removed a redundant level of indirection.
vp9_iht4x4_add() checks transform type and call vp9_iht4x4_16_add()
for tranforms other than DCT_DCT. In this case, the DCT_DCT case
has been already handled here.
Dmitry Kovalev [Thu, 31 Oct 2013 20:52:08 +0000 (13:52 -0700)]
Reducing the number of foreach_transformed_block() calls.
The change doesn't affect the bitstream. It changes the order or function
calls and affects how we reconstruct intra- and inter-blocks. Speed up is
about 1...1.5%.
For intra-blocks:
Before:
for each transform block read tokens
for each transform block do prediction
for each transform block do inverse transform
Now:
for each transform block
read tokens
do prediction
do inverse transform
For inter-blocks:
Before:
for each transform block read tokens
for each transform block do inverse transform
Now:
for each transform block
read tokens
do inverse transform
Jingning Han [Wed, 30 Oct 2013 20:52:55 +0000 (13:52 -0700)]
Enable all-zero coeff block index for sub8x8 blk
This commit makes zcoeff_blk cache the case where the entire block
is quantized to be zero (without applying zero-forcing) in the rate-
distortion optimization loop, and skip the forward DCT, quantization,
inverse DCT, and reconstruction process in the encode_block stage.
It now works for all the block sizes, including sub8x8 blocks.
Dmitry Kovalev [Wed, 30 Oct 2013 19:17:05 +0000 (12:17 -0700)]
Reducing the number of recursive calls.
Both decode_modes_sb and decode_modes_b had conditions to immediately
return at the beginning. Eliminating these conditions here and calling
these functions only to do a real work. Also unrolling loop for
PARTITION_SPLIT.