* changes:
vp9_decodeframe.h: remove unused prototype
vp9_decodeframe: move public funcs to end of file
vp9_decodeframe: reorder some functions
vp9_decodeframe: hide vp9_dec_build_inter_predictors_sb
This commit fixes a potential integer overflow issue in function
hadamard_16x16. It adds corresponding dynamic range comment.
Change-Id: Iec22f3be345fb920ec79178e016378e2f65b20be
the declaration containing the alignment in vp9_filter.h was removed in:
eb88b17 Make vp9 subpixel match vp8
fixes a crash in 32-bit builds
Change-Id: I9a97e6b4e8e94698e43ff79d0d8bb85043b73c61
If the frame size increases, the tile data buffer needs to be
re-allocated according to the number of tiles existing in current
frame. This patch makes the multi-tile encoding work in spatial
SVC usage case, and partially solved WebM issue 1018.
Change-Id: I1ad6f33058cf5ce6f60ed5024455a709ca80c5ad
vp9_init_dequantizer() was deleted in:
bdd249b Optimize the dequantization process on decoder side.
Change-Id: Iedb5b6a3a03964dd6901c1e3b2325194d94bc708
Reduce motion threshold and boost factor for second segment,
for low bitrates, at low resolutions for now.
This is to reduce the rate fluctuation/frame dropping that occurs
at these low bitrates.
Change-Id: Ia66c3be41831882fca8c1e4fe104f5ea8fbe7142
Some initial experiments into discounting dead zone
formating bars and intra skip blocks (common in some
types of animation and graphics) in the calculation of
the active max Q for each ARF/GF group.
TODO: check for vertical formating bars and validate the
horizontal bar at the bottom edge of the image.
As expected, this change as it stands, does not make much
difference for the natural videos in the std-hd and derf sets.
However, for the yt and yt hd set there is a significant rise
in the average PSNR with overall PSNR and SSIM remaining
neutral.
The mean rise for the YT-HD test set was > 6%. This is mainly
because the change allows Q to drop further on titles and
other graphics sections where spending a small number of
extra bits gives a sharp rise in PSNR.
Change-Id: I3f878ae91fc1854312d7ecf9fa792c17bc1aa6b7
For content that is identified as likely to contain some
animation or graphics content, increase the availability
of split modes for good quality speeds 1-3.
On a problem test animation clip this improves metrics
results by about 0.25 db and makes a noticeable difference
visually. It also causes a small drop in file size (~0.5%) but
a rise in encode time of about 5-6% at speed 2.
For more normal content it should have no effect.
Change-Id: Ic4cd9a8de065af9f9402f4477a17442aebf0e439
Added check to see if last frame was all intra. This will
eliminate two checks in find_mv_refs_idx(). Also, do not
update the frame mvs if the current frame is all intra.
This improved performance on material with frequent
intra-only frames.
Change-Id: I44a4042c3670ab0d38439d565062a0e2a1ba9d1e
This control allows the application to skip the loop filter in the
decoder. This is an advanced control that should only be used in
extreme circumstances as it may introduce and accumulate decode
artifacts.
Change-Id: I278c65c60826f84c9141ebe06c6eeed3c2335fa8
calculate the averages needed for even and odd rows once; this removes a
conditional from the inner loop
the final average calculated currently relies on above[] being extended,
it could be reduced to use
above[block_size - 2] + 3 * above[block_size - 1]
Change-Id: I70f5eac8d8a2a959c7114844a95826f445c3dd4d
The only difference between the two was that the vp9 function allowed
for every step in the bilinear filter (16 steps) while vp8 only allowed
for half of those. Since all the call sites in vp9 (<< 1) the input, it
only ever used the same steps as vp8.
This will allow moving the subpel variance to vpx_dsp with the rest of
the variance functions.
Change-Id: I6fa2509350a2dc610c46b3e15bde98a15a084b75
Adds code to detect dead zone bars at the top and bottom
of reformatted letterbox video (note that the code only
looks at the top of the image and assumes any dead zone
is symmetrical). Use of this to adapt rate control etc.
will follow in a subsequent patch.
Also counts other blocks (excluding the dead zone) that
have no intra signal. The presence of a significant
number of such blocks can be used as a identify that the frame
may be artificial (e.g. animation, screen capture, graphics).
This patch contains plumbing only and does not use
the signal.
Change-Id: I59bc93529cd4065416cef773e405fda3ae006a20
Some places are using the unoptimized variance function. This was never
intended and does not fit into the optimization framework.
Change-Id: Id96238407aad03b0ffd4a46cd183555a026daedc
Updated sources according to improved version of common MSA macros.
Enabled respective convolve MSA hooks and tests.
Overall, this is just upgrading the code with styling changes.
Change-Id: If5ad6ef8ea7ca47feed6d2fc9f34f0f0e8b6694d
Updated sources according to improved version of common MSA macros.
Enabled idct MSA hooks and tests.
Overall, this is just upgrading the code with styling changes.
Change-Id: I1f488ab2c741f6c622b7a855388a202168082209
only the immediate above right pixel is needed; this removes a
conditional from the inner loop
the final average calculated currently relies on above[] being extended,
it could be reduced to use above[block_size - 2] + 3 * above_right
Change-Id: Ica4f2b8d25eec3ca1d6fa52ef0d4adc228eeea3f
Done little restructuring/styling changes to the sources like generic macro definitions, their use to reduce code lines, better code alignments etc.
Disabled all MSA hooks and tests
Change-Id: Ic6f2dce0b501f46b80c06c46c0fe2043d557b190
Keep the logic, transform size based on cyclic refresh and bsize,
(that was conditioned on VAR_PARTITION conditions) the same
for all speeds in non-rd mode (speeds >= 5).
No change to speeds >=6.
Small improvement for speed 5, ~0.5/1.5% gain for avg psnr/ssim.
Change-Id: If9c5657f3d30efd3c7f147166bba7cb69ea55114
In VS 2015 and higher snprintf is supplied and therefore vsnprintf
doesn't need to be defined. This also avoids problems caused by
_snprintf being different from snprintf.
This fixes a build break with VS 2015 and improves security.
Originally submitted via chromium by brucedawson@chromium.orghttps://codereview.chromium.org/1055603003
Additionally break this MSVC-specific tweak to a new file, which will
become the home of all such MSVC-specific things.
This requires adding a dependency on msvc.h to every example which uses
args.c and tools_common.h
Change-Id: I35b5f8e7ea00f6627403aabc9ea79b0412557a99
Increase the 32x32 split threshold, to allow for more 32x32
at expense of 16x16. Visually looks somewhat better.
Change-Id: Ia1439c3a0dc2d7933468b88bd59266fcd9f03505
Break out the setting of the block variance split thresholds,
since they are locally modified, e.g., based on local/segment qp.
No change in performance.
Change-Id: I0a3238e6dab05140657539fc4bd27ac5ff7a554e
+ synchronize filter function signatures
this makes any intrinsics filters available for inlining and has the
side-effect of making those filters static, quieting missing-prototype
warnings.
Change-Id: I1908875caffa585bd4fc65aaf10d17a5e20cfb46
+ synchronize filter function signatures
this makes any intrinsics filters available for inlining and has the
side-effect of making those filters static, quieting missing-prototype
warnings.
Change-Id: I1cd55c9d52547793ad65aa90c7620f0e426edaa2
collect the vp9_convolve function definition macros there; this will
allow some relocation of functions from vp9_asm_stubs.c
Change-Id: Idadd117fa256dd48748379856973fd985b8204e8
This commit fixes the integral projection motion search crash when
frame resize is used. It fixes issue 994.
Change-Id: Ieeb52619121d7444f7d6b3d0cf09415f990d1506
reorder includes to avoid:
warning C4985: 'ceil': attributes not present on previous declaration.
this is the same workaround used in vp9/common/vp9_systemdependent.h
Change-Id: Ia10dd63de24f96fa1507a6179220e9d6ec774db6
Various header/test files had to be re-worked in order to
build "Remove cm parameter from vp9_decode_block_tokens()".
This patch reverts the "Remove cm" part and only contains
the re-worked header files.
Change-Id: I520958a88d1991fee988a3c784d0eac40e117a32
1. Check existing buffer sizes when re-allocate context buffers.
2. Don't need to set mi buffers to 0 during setup_mi.
Change-Id: I6b48b0e077a4d804312b605ad0dc34aec5795a6d
This patch provides a partial rapid feedback of bits
resulting from extreme undershoot.
Some improvement on some problem animated material
but in its current form only a small impact on the metrics results
of our standard test sets.
Change-Id: Ie03036ea8123bc2553437cb8c8c9e7a9fc5dac5d
This patch addresses two issues that can occur when the
encoder chooses to use a mixture of ARF and GF groups.
The first issue relates to a failure to reset the "ARF active" flag
correctly when transitioning from coding ARF groups to coding
GF groups. This caused some golden frames to be encoded
with an incorrect bit rate target as if they were ARF overlay frames.
The second issue relates to the encoding of a single short GF group
just before a key frame. Where the last group before a key frame
is an ARF group we expect the final frame before the key frame to
be an low data rate overlay frame. However, when the last group
is a GF group, the final frame before the key frame should be a normal
frame with a normal bit allocation. This issue had the potential to cause
a single poorly coded frame just before a key frame. If that key frame
were a forced key frame rather than a real scene cut, this might cause
pulsing.
Change-Id: Idf1eb5eaf63a231495a74de7899236e1ead9fb00
split call of extend_and_predict() and return, fixes visual studio build
warning since:
0a80164 Move mc_buf to cut down size of MACROBLOCKD.
Change-Id: I7cdf712941ef773a07f038539cb8080dc27861cd
this file shouldn't be built directly, it is included in vp9_dct_sse2.c
to create a non-high-bitdepth and a high-bitdepth version
silences missing prototype warnings for the unused FDCT* functions
Change-Id: Ide6ff8c24ab31bdb0f833260505ae33660a1ad5b
this file shouldn't be built directly, it is included in vp9_dct_sse2.c
to create a non-high-bitdepth and a high-bitdepth version
silences missing prototype warnings for the unused FDCT32x32* functions
Change-Id: I0e38f16dae5ea1728de184ee2c89287d48675c51
this file shouldn't be built directly, it is included in vp9_dct_avx2.c
to create a non-high-bitdepth and a high-bitdepth version
silences missing prototype warnings for the unused FDCT32x32* functions
Change-Id: I4c19935c0e035b393be513bde735e9a78064a494
* changes:
vp9_subexp.h: add a missing prototype
vp9: add some missing includes
vp9 intrinsics: add vp9_rtcd include
vp9: correct some function signatures
vp9_variance_sse2: sync function signatures
vp9/encoder: make some functions static
vp9_dct_sse2: make some functions static
vp9_decodeframe.c: make a function static
Use the same settting as in speed >=6.
This will use same logic for tx_size selecton as in speed >=6,
which limits the transform size and reduces ringing artifact.
Also metrics go up on average with this change: ~2% for PSNR, ~10% for SSIM.
Change-Id: Ia2d50db236ae1cc72f742bfa6c9ec5ea50ff0e0a
Add a check to make sure we have a decoded frame available
before copying its 'corrupt' flag.
(Originally submitted to the old repository by Alexander Voronov
as: https://gerrit.chromium.org/gerrit/#/c/74305/).
Change-Id: Iceb4686c785afb437b668015bf8818b18d60e0ce
Testing on another rate control patch reveals that in some
situations, where the encoder is flipping in and out of arf
mode, we get an encoder decoder mismatch.
Whilst it is still not clear why, skipping the last buffer
update seems to trigger the problem. Until I can establish
why, or if there is another underlying cause, I am reverting
this change.
This reverts commit e5112b3ae3.
Change-Id: I315c5200414de89458015823344b7367e9dd75ba
With the sad functions, and hopefully the variance functions soon,
moving to the vpx_dsp location, place the defines used in the
reference C code in a common location.
Change-Id: I4c8ce7778eb38a0a3ee674d2f1c488eda01cfeca
The computation of new metrics is not supported yet in highbitdepth
mode. This commit adds protection to make sure the computation is
done only when highbitdepth is not on. This protection shall be
revised when support of highbitdpeth computation is added.
This resolves the encoder crash when configured with both
--enable-internal-stats
--enable-vp9-highbitdepth
Change-Id: Id9f4bcc4fa26d9ca0e9eabade83f3f88a5b212e6
This patch fixed the following warning:
src\third_party\libvpx\source\libvpx\vp9\encoder\vp9_pickmode.c(1607) :
warning C6246: Local declaration of 'this_mode' hides declaration of the
same name in outer scope.
Change-Id: I1d93c4a47a13cb13089fec5bd61e8b58e6cd8d58
When aq-mode=3 is enabled, only for base layer frames should the
qp of the frame incorporate the segment delta-qp.
This was causing more rate mismatch for the enhancement layer frames
when running temporal layers with aq-mode=3 on.
Change-Id: I1c5e69d1ef8a51188af8696753c17fd8f67699b3
currently this needs to be 2x (NEED_ABOVERIGHT) the size of the largest
block (32) + 1 (for above_left). reduce the buffer size from 128 + 16
(alignment) to 64 + 16.
Change-Id: Idaca1806c7e1214e9437de24e15edc2ebf18f95d
The warning only happens in VP9 encoder's first pass due to src_mi
is not set up yet. But it will not fail the encoder as left_mi and
above_mi are not used in the first_pass and they will be set up again
in the second pass.
Change-Id: I0713b4660d71e229e196654cb0970ba6b1574f28
Where a frame appears to be a repeat of an earlier
frame or frame buffer, but the first pass code
does not anticipate this (usually because it is matching
the GF or ARF buffer not the last frame buffer), do not
update the last frame buffer.
This helps ensure that the content of the last frame buffer
is kept "different" where possible, and not updated to
match the GF or ARF. This is particularly helpful in some
animated sequences where there are groups of repeating
frames. Here it has quite a big impact. However, in most
of our standard test clips it has little or no impact.
Change-Id: I77332ee1a69f9ffc0c6080bfeb811c43fd8828e6
this macro was used inconsistently and only differs in behavior from
DECLARE_ALIGNED when an alignment attribute is unavailable. this macro
is used with calls to assembly, while generic c-code doesn't rely on it,
so in a c-only build without an alignment attribute the code will
function as expected.
Change-Id: Ie9d06d4028c0de17c63b3a27e6c1b0491cc4ea79
Using EIGHTTAP and EIGHTTAP_SMOOTH seem sufficient.
Hard to see any visual gain from allowing EIGHTTAP_SHARP, and it is
rarely selected.
PSNR/SSIM metrics go up by ~0.18/0.14%.
Change-Id: I96fa0d98f9321b913e3ebcd464d4ff3c63018791
Create a new component, vpx_dsp, for code that can be shared
between codecs. Move the SAD code into the component.
This reduces the size of vpxenc/dec by 36k on x86_64 builds.
Change-Id: I73f837ddaecac6b350bf757af0cfe19c4ab9327a
Added the intra mode early termination in order to
speed up the mode search in non-rd case since we
started to include more intra modes in the search
list. Borg tests(rtc set) showed a 0.048% PSNR gain
and 0.061 SSIM gain. No speed change.
Change-Id: I6f255fe534dc50b736e6a66a726ad458eb9b4443
widen the loads and stores to 128-bit.
this was added, but not enabled in:
493a857 Add some sse2 code for intra prediction.
Change-Id: I277d7db608a7db7d75cc0bde86f48fa66ad487e4
For non-rd mode (speed >=5): use mask based on prediction block size, and
(for non-screen content mode) allow for checking horiz and vert intra modes
for blocks sizes < 16x16.
Avg psnr/ssim metrics go up by about ~0.2%.
Only allowing H/V intra on block sizes below 16x16 for now, to keep
encoding time increase very small, and also when allowing H/V on 16x16 blocks,
metrics went down on a few clips which need to be further examined.
Change-Id: I8ae0bc8cb2a964f9709612c76c5661acaab1381e
Impose a limit on the rd auto partition search based on
the image format. Smaller formats require that the search
includes includes a smaller minimum block size.
This change is intended to mitigate the visual impact of
ringing in some problem clips, for smaller image formats.
Change-Id: Ie039e5f599ee079bbef5d272f3e40e2e27d8f97b
Remove one of the auto partition size cases.
This case can behaves badly in some types of animated content
and was only used for the rd encode path. A subsequent patch
will add additional checks to help further improve visual quality.
Change-Id: I0ebd8da3d45ab8501afa45d7959ced8c2d60ee4e
Previously limit on max interval set to 0.5 seconds.
Though this helped some low frame rate material it
appears to be a bit too aggressive for some 24 and 25 fps
content. This patch relaxes the limit to 0.75 seconds.
The patch also adds a new minimum interval variable
to replace the current hard wired value. This allows us
to impose a limit on the maximum number of primary
arfs per second for high frame rate (e.g. 50 & 60fps)
content. This is to address concerns regarding playback
performance on some platforms if there is a high base
frame rate and very frequent arfs.
Change-Id: I373e8b6b2a8ef522eced6c6d2cceb234ff763fcf
offsetting by a variable stride prevents instruction reordering,
resulting in poor assembly.
additionally reroll 16x16/32x32 loops to reduce register spill with this
new format
Change-Id: I0635b8ba21ecdb88116e927dbdab53acdf256e11
This patch reduced the BLOCK_8X8's intra_cost_penalty, which
allows 8x8 blocks to conduct intra mode search. Borg test
result(rtc set): 0.077% PSNR gain, 0.228% SSIM gain. No speed
changes.
Change-Id: Icfe90c4f6969de24bda8ecacbd3da50330bf22b2
The rotation computation using 2X of cos(pi/16) has a potential to
overflow 32 bit, this commit disable the function to allow further
investigation and optimization.
Change-Id: I4a9803bc71303d459cb1ec5bbd7c4aaf8968e5cf
Calculated cpi->vbp_threshold_sad from this frame's dequant value.
The encoding quality and speed didn't change much. Borg test
result: PSNR: -0.002%, SSIM: -0.003%.
Change-Id: I97c9826986f39582f29910d637d08a69c90afdee
The version is currently producing different result from c version
for some input. Disable the use of it for now to allow time for
investigation the source of mismatch.
Change-Id: Id039455494ee531db4886a9f1fa4761174ef6df3
The default golden frame interval was doubled. After encoding a
frame, the background motion was measured. If the motion was high,
the current frame was set as the golden frame. Currently, the
changes were applied only while aq-mode 3 was on.
Borg tests(rtc set) showed a 0.226% PSNR gain and 0.312% SSIM gain.
No speed changes.
Change-Id: Id1e2793cc5be37e8a9bacec1380af6f36182f9b1
For color sampling format other than 420, valid partion size in Y may
not work for UV plane. This commit adds validation of UV partition
size before select the partition choice.
This fixes a crash for real time encoding of 422 input.
Change-Id: I1fe3282accfd58625e8b5e6a4c8d2c84199751b6
(see I3a05cf1610679fed26e0b2eadd315a9ae91afdd6)
For the test clip used, the decoder performance improved by ~2%.
This is also an intermediate step towards adding back the
mode_info streams.
Change-Id: Idddc4a3f46e4180fbebddc156c4bbf177d5c2e0d
The existing test was triggering a lot of false positives on some types
of animated material with very plain backgrounds. These were triggering
code designed to catch key frames in letter box format clips.
This patch tightens up the criteria and imposes a minimum requirement
on the % blocks coded intra in the first pass and the ratio between the
% coded intra and the modified inter % after discounting neutral (flat)
blocks that are coded equally well either way.
On a particular problem animation clip this change eliminated a large
number of false positives including some cases where the old code
selected kf several times in a row. Marginal false negatives are less
damaging typically to compression and in the problem clip there are now
a couple of cases where "visual" scene cuts are ignored because of well
correlated content across the scene cut.
Replaced some magic numbers related to this with #defines and added
explanatory comments.
Change-Id: Ia3d304ac60eb7e4323e3817eaf83b4752cd63ecf