Commit Graph

911 Commits

Author SHA1 Message Date
John Koleszar
f3a13cb236 Merge "Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistently" 2011-06-29 07:29:59 -07:00
Johann
dc004e8c17 Merge "Avoid text relocations in ARM vp8 decoder" 2011-06-28 16:34:10 -07:00
Johann
02c30cdeef Merge "utilize preload in ARMv6 MC/LPF/Copy routines" 2011-06-28 16:33:45 -07:00
John Koleszar
b32da7c3da Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistently
There were many instances in the code of vp8_coef_tokens and
vp8_coef_tokens-1, which was a preprocessor macro despite the naming
convention. Replace these with MAX_ENTROPY_TOKENS and ENTROPY_NODES,
respectively.

Change-Id: I72c4f6c7634c94e1fa066cd511471e5592c748da
2011-06-28 17:03:55 -04:00
John Koleszar
9bcf07ae4a Merge "Simplify decode_macroblock." 2011-06-28 12:54:25 -07:00
Gaute Strokkenes
81c0546407 Simplify decode_macroblock.
Change-Id: Ieb2f3827ae7896ae594203b702b3e8fa8fb63d37
2011-06-28 17:01:14 +01:00
Stefan Holmer
7296b3f922 New ways of passing encoded data between encoder and decoder.
With this commit frames can be received partition-by-partition
from the encoder and passed partition-by-partition to the
decoder.

At the encoder-side this makes it easier to split encoded
frames at partition boundaries, useful when packetizing
frames. When VPX_CODEC_USE_OUTPUT_PARTITION is enabled,
several VPX_CODEC_CX_FRAME_PKT packets will be returned
from vpx_codec_get_cx_data(), containing one partition
each. The partition_id (starting at 0) specifies the decoding
order of the partitions. All partitions but the last has
the VPX_FRAME_IS_FRAGMENT flag set.

At the decoder this opens up the possibility of decoding partition
N even though partition N-1 was lost (given that independent
partitioning has been enabled in the encoder) if more info
about the missing parts of the stream is available through
external signaling.

Each partition is passed to the decoder through the
vpx_codec_decode() function, with the data pointer pointing
to the start of the partition, and with data_sz equal to the
size of the partition. Missing partitions can be signaled to
the decoder by setting data != NULL and data_sz = 0. When
all partitions have been given to the decoder "end of data"
should be signaled by calling vpx_codec_decode() with
data = NULL and data_sz = 0.

The first partition is the first partition according to the
VP8 bitstream + the uncompressed data chunk + DCT address
offsets if multiple residual partitions are used.

Change-Id: I5bc0682b9e4112e0db77904755c694c3c7ac6e74
2011-06-28 11:10:17 -04:00
Stefan Holmer
4cb0ebe5b2 Adding support for independent partitions
Adding support in the encoder for generating
independent residual partitions by forcing
equal probabilities over the prev coef entropy
contexts.

Change-Id: I402f5c353255f3ca20eae2620af739f6a498cd21
2011-06-28 11:10:17 -04:00
Mike Hommey
e3f850ee05 Avoid text relocations in ARM vp8 decoder
The current code stores pointers to coefficient tables and loads them to
access the tables contents. As these pointers are stored in the code
sections, it means we end up with text relocations. eu-findtextrel will
thus complain about code not compiled with -fpic/-fPIC.

Since the pointers are stored in the code sections, we can actually cheat
and let the assembler generate relative addressing when accessing the
coefficient tables, and just load their location with adr.

Change-Id: Ib74ae2d3f2bab80b29991355f2dbe6955f38f6ae
2011-06-28 09:11:40 +02:00
Fritz Koenig
be99868bd1 Fix after removal of B_MODE_INFO
Change Ieb746989: Removed B_MODE_INFO missed this.

Change-Id: I32202555581cc2a5d45e729c6650ada4d2df55d3
2011-06-27 09:43:21 -07:00
Johann
8a9a11e8dc Merge "configuration, support disabling any subset of ARM arch" 2011-06-27 08:55:18 -07:00
Stefan Holmer
ba0822ba96 Adding support for error concealment in multi-threaded decoding
Also includes a couple of error concealment bug fixes:
- the segment_id wasn't properly initialized when missing
- when interpolating and no neighbors are found, set to zero
- clear the qcoef buffer when concealing an MB

Change-Id: Id79c876b41d78b559a2241e9cd0fd2cae6198f49
2011-06-27 09:03:06 -04:00
Adrian Grange
deca8cfc44 Fixed initialization of frame buffer ref counters
Only the first frame buffer ref counter was being initialized
because the index was fixed at 0 rather than using i.

Change-Id: Ib842298be4a5e3607f9e21c2cd4bfbee4054ffc4
2011-06-24 08:43:40 -07:00
John Koleszar
db67dcba6a Revert "Reduce overshoot in 1 pass rate control"
This reverts commit 212f618373.

Further testing shows that the overshoot accumulation/damping is too
aggressive on some clips. Allowing the accumulated overshoot to
decay and limiting to damping to golden frames shows some promise.
But some clips show significant overshoot in the buffer window, so
I think this still needs work.

Change-Id: Ic02a9ca34f55229f9cc04786f4fab54cdc1a3ef5
2011-06-23 11:52:12 -04:00
James Berry
2bd90c13a0 get/set reference buffer dimension check added
vp8_yv12_copy_frame_ptr() expects same size
buffers which was not previously gaurenteed.
Using an improperly allocated buffer would
cause a crash before.

Change-Id: I904982313ce9352474f80de842013dcd89f48685
2011-06-22 13:36:24 -04:00
Yaowu Xu
76495617e0 Merge "adjusting the calculation of errorperbit" 2011-06-21 09:47:42 -07:00
Scott LaVarnway
55c3963c88 Merge "Improved vp8dx_decode_bool" 2011-06-21 07:45:51 -07:00
Yunqing Wang
109c20299c Merge "Remove unnecessary bounds checking in motion search" 2011-06-21 07:23:24 -07:00
Attila Nagy
6f23f24afe configuration, support disabling any subset of ARM arch
Useful for leaving out any version specific asm files.

Change-Id: I233514410eb9d7ca88d2d2c839673122c507fa99
2011-06-21 10:39:01 +03:00
Yaowu Xu
10ed60dc71 adjusting the calculation of errorperbit
RDMULT/RDDIV defines a bit worth of distortion in term of sum squared
difference. This has also been used as errorperbit in subpixel motion
search, where the distortions computed as variance of the difference.
The variance of differences is different from sum squared differences
by amount of DC squared. Typically, for inter predicted MBs, this
difference averages around 10% between the two distortion, so this patch
introduces a 110% constant in deriving errorperbit from RDMULT/RDDIV.

Test on CIF set shows small but positive gain on overall PSNR (.03%)
and SSIM (.07%), overall impact on average PSNR is 0.

Change-Id: I95425f922d037b4d96083064a10c7cdd4948ee62
2011-06-20 16:32:30 -07:00
Scott LaVarnway
67a1f98c2c Improved vp8dx_decode_bool
Relocated the vp8dx_bool_decoder_fill() call, allowing
the compiler to produce better assembly code.  Tests
showed a 1 - 2 % performance boost (x86 using gcc)
for the 720p clip used.

Change-Id: Ic5a4eefed8777e6eefa007d4f12dfc7e64482732
2011-06-20 14:44:16 -04:00
Taekhyun Kim
458fb8f491 utilize preload in ARMv6 MC/LPF/Copy routines
About 9~10% decoding perf improvement on non-Neon ARM cpus

Change-Id: I7dc2a026764e84e9c2faf282b4ae113090326837
2011-06-17 14:04:53 -07:00
Yunqing Wang
2cd1c2855e Remove unnecessary bounds checking in motion search
The starting points are always within the limits, and bounds
checking on these points is not needed. For speed < 5, the
encoded result changes a little because different treatment
is taken while starting point equals the bounds.

Change-Id: I09a402d310f51e305a3519f1601b1d17b05c6152
2011-06-17 14:19:51 -04:00
John Koleszar
a60fc419f5 Merge "Use SSE as BPRED distortion metric consistently" 2011-06-17 09:48:32 -07:00
Ronald S. Bultje
87fd66bb0e Assign boost to GF bit allocation if past frame had no ARF.
Modify the second-pass code to provide a full golden-frame (GF) bit
allocation boost if the past GF group (GFG) had no alt-ref frame (ARF),
even if the current GFG does contain and ARF.

This mostly has no effect on clips, since switching ARFs on/off between
GFGs is not very common. Has a positive effect on e.g. cheer (+0.45 SSIM
at 600kbps) and football (+0.25 SSIM at 600kbps), particularly at high
bitrates. Has a negative effect (-0.04 SSIM at 300kbps) at pamphlet,
which appears only marginally related to this patch, and crew (-0.1 SSIM
at 700kbps).

Change-Id: I2e32899638b59f857e26efeac18a82e0c0b77089
2011-06-16 13:01:27 -04:00
John Koleszar
eb645abeac Merge "Disable specialcase for last frames if the sequence contains ARFs." 2011-06-16 09:56:05 -07:00
John Koleszar
5223016337 Merge "Remove redundant check for KEY_FRAME in multithreaded decoder" 2011-06-15 10:18:06 -07:00
John Koleszar
61599fb59f Use SSE as BPRED distortion metric consistently
The BPRED mode selection uses SSE as a distortion metric, but the early
breakout threshold being used was a variance value.

Change-Id: I42d4602fb9b548bf681a36445701fada5e73aff1
2011-06-15 10:53:37 -04:00
John Koleszar
1ade44b352 Merge "fix --disable-runtime-cpu-detect on x86" 2011-06-15 07:09:09 -07:00
Ronald S. Bultje
299193dd1c Disable specialcase for last frames if the sequence contains ARFs.
firstpass.c contains some rate adjustment code that assures that the
last few frames in a sequence abide by rate limits. If the second-to-
last group of frames contains an alt-ref frame (ARF), the last golden
frame (GF) is zero bytes, and we will thus spend a ridiculously high
number of bits on regular P-frames trying to hit the target rate. This
does slightly enhance the quality of these last few frames, but has
no perceptual value (other than hitting the target rate).

Disabling this code means we consistently (slightly) undershoot the
target rate and consequently do worse on the last few frames of a
clip, which is particularly noticeable for small clips. The quality-
per-bitrate is generally better, ~0.2% better overall on derf-set,
especially on clips such as garden, tennis, foreman at low bitrates.
Has a negative effect on hallmonitor at high bitrates.

Change-Id: I1d63452fef5fee4a0ad2fb2e9af4c9f2e0d86d23
2011-06-15 09:47:00 -04:00
Attila Nagy
c7e6aabbca Remove redundant check for KEY_FRAME in multithreaded decoder
For Intra blocks is enough to check ref_frame == INTRA_FRAME.

Change-Id: I3e2d3064c7642658a9e14011a4627de58878e366
2011-06-15 09:01:27 +03:00
Scott LaVarnway
7be5b6dae4 Merge "Populate bmi for B_PRED only" 2011-06-14 12:04:50 -07:00
Johann
92b0e544f3 fix --disable-runtime-cpu-detect on x86
Change-Id: Ib8e429152c9a8b6032be22b5faac802aa8224caa
2011-06-14 11:31:50 -04:00
Tero Rintaluoma
9909047461 Fix RT only build
Moved encode_intra function from firstpass.c to encodeintra.c to
prevent linking problem in real-time only build. Also changed name
of the function to vp8_encode_intra because it is not a static.

Change-Id: Ibf3c6c1de3152567347e5fbef47d1d39564620a5
2011-06-14 13:39:06 +03:00
James Zern
532c30c83e fix corrupt frame leak
If setup_token_decoder reported an internal error the memory allocated
there would not be freed in the resulting call to _remove_decompressor.

Change-Id: Ib459de222d76b1910d6f449cdcd01663447dbdf6
2011-06-13 17:32:19 -07:00
Scott LaVarnway
223d1b54cf Populate bmi for B_PRED only
Small decode performance gain (~1%) on keyframes.  No
noticeable gains on encode.  Also changed pick_intra4x4mby_modes()
to read the above and left block modes for keyframes only.

Change-Id: I1f4885252f5b3e9caf04d4e01e643960f910aba5
2011-06-13 17:14:11 -04:00
Scott LaVarnway
e71a010646 Calc ref_frame_cost once per frame
instead of every macro block.

Change-Id: I2604e94c6b89e3a8457777e21c8c38406d55b165
2011-06-13 09:58:03 -04:00
John Koleszar
f3ba4c6b82 Merge "bug fix mode_info_context not initialized for error-resilient" 2011-06-09 13:39:47 -07:00
Yaowu Xu
361717d2be remove one set of 16x16 variance funcations
call to this set of functions are replaced by var16x16.

Change-Id: I5ff1effc6c1358ea06cda1517b88ec28ef551b0d
2011-06-09 11:23:05 -07:00
James Berry
45feea4cf0 bug fix mode_info_context not initialized for error-resilient
uninitialized xd->mode_info_context would crash
vpxenc for --error-resilient=1.

Change-Id: I31849e40281e3d65ab63257cfec5e93398997f0b
2011-06-09 12:46:31 -04:00
John Koleszar
af49c11250 Update keyframe activity in non-RD mode
Activity update is no longer dependent on being in RD mode, so update
it unconditionally.

Change-Id: Ib617a6fc210dfc045455e3e4467d7ee5e3d1fa0e
2011-06-09 12:05:31 -04:00
Johann
79327be6c7 use GCC inline magic
Better fix for #326. ICC happens to support the inline magic

Change-Id: Ic367eea608c88d89475cb7b05d73500d2a1bc42b
2011-06-08 16:19:37 -04:00
John Koleszar
8767ac3bc7 Merge "vp8_pick_inter_mode: remove best_bmodes" 2011-06-08 10:59:30 -07:00
John Koleszar
9e4df2bcf5 Merge "vp8_pick_intra_mode: correct returned rate" 2011-06-08 10:58:36 -07:00
John Koleszar
254a7483e5 Merge "Move RD intra block mode selection to rdopt.c" 2011-06-08 10:51:50 -07:00
John Koleszar
001bd51ceb vp8_pick_inter_mode: remove best_bmodes
Since BPRED will be tested at most once, and SPLITMV is not enabled,
there's nothing to clobber the subblock modes, so there's no need to
save and restore them.

Change-Id: I7c3615b69190c10bd068a44df5488d6e8b85a364
2011-06-08 13:50:50 -04:00
Scott LaVarnway
dce64343d6 Merge "Removed unused function parameters" 2011-06-08 10:20:28 -07:00
John Koleszar
91907e0bf4 vp8_pick_intra_mode: correct returned rate
The returned rate was always the 4x4 rate, instead of the rate
matching the selected mode.

Change-Id: I51da31f80884f5e37f3bcc77d1047d31e612ded4
2011-06-08 13:19:12 -04:00
Scott LaVarnway
69d8d386ed Removed unused function parameters
Change-Id: Ib641c624faec28ad9eb99e2b5de51ae74bbcb2a2
2011-06-08 13:01:09 -04:00
Yaowu Xu
1fba1e38ea Adjust errorperbit according to RDMULT in activity masking
In activity masking, RDO constant RDMULT is adjusted on a per MB basis
adaptive to activity with the MB. errorperbit, which is defined as
RDMULT/RDDIV, is a constant used in motion estimation. Previously, in
activity masking, errorperbit is not changed even when RDMULT is changed.
This commit changed to adjust errorperbit according to the change in
RDMULT.

Test in cif set showed a very small but consistent gain by all quality
metrics (average, overall psnr and ssim) when activity masking is on.

Change-Id: I07ded3e852919ab76757691939fe435328273823
2011-06-08 09:45:47 -07:00