For encoding with --enable-multi-res-encoding, with 1 layer, when the
target bitrate is set 0, under these conditions null pointer
will be de-referenced. Fix is to check
cpi->oxcf.mr_total_resolutions > 1. Also added NULL pointer check.
This issue causes crash for asan build in chromium clusterfuzz.
BUG=805863
Change-Id: I9cd25af631395bc9fede3a12fb68af4021eb15f8
this allows the test to be sharded more efficiently and speeds up the
run when built with slower configs, e.g., asan.
Change-Id: If6d863b76871e3934704a1079bbf17f4886932c7
scaled_temp frame is used as an intermediate buffer for
2 stage down-sampling: two stages of 1/2 down-sampling
for a target of 1/4x1/4. This is used in 3 layer SVC
to avoid duplicate frame downsampling (on middle layer).
As this allocation is only needed/used when the
number_spatial_layers > 2, add this condition to avoid
unneeded allocation for 1 and 2 spatial SVC.
Change-Id: If342466644f685c1ea3ca5344b581793e5136c09
For 3 spatial layers with 1/2 downsampling, the
downsampling filter for the middle layer was not
set for the very first frame, so it was defaulting
to the subsample filter (no averaging/phase = 0).
Its not set due to the two stage scaling that is
done for 1/4 on base layer, during which the intermediate
1/2 result is saved for the middle layer.
Fix for now is to set the default downsampling filter
to Bilinear (averaging/non-zero phase) for all layers on
init (vp9_init_layer_context):.
Change-Id: Ic7407810b34c621e7e7420682508d45478bdffcf
Eliminate false positives in previous patch.
The previous patch did a good job of detecting slide transitions but
in discussions a number of situations were identified that might trigger
harmful false positives. This risk seems to be born out by some testing
on a wider YT set done by yclin@.
This patch adds an additional clause that requires that the best case
inter and intra error for the frame are very similar,meaning it is almost
as easy to code a key frame as an inter frame. This will certainly prevent
the false positive conditions that Jim and I discussed and even if one
does occur it should not be very damaging.
The down side is that this clause may mean that we still miss some
real slide transitions, especially if the images are small and similar. If this
proves to be the case then some further adjustment of the threshold may be
required. However, in the specific problem sample provided we do trap every
transition correctly.
Change-Id: I7e5e79e52dc09bc47917565bf00cc44e5cddd44c
Only affects 2 temporal layer case.
Modified the flags for 2 temporal layers to make
top layer (top spatial, top temporal) a non-reference
frame, conistent with the 3 TL case.
Add mismatch check to the datarate test of changing
svc pattern on the fly, which is test for 2 temporal
layers.
This re-applies the change: 254e2f5501,
that was reverted in: 658eb1d675.
Change-Id: Ib5fd4a7a0312c0c05329ae75baac480af34b4694
This reverts commit 254e2f5501.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> vp9 svc: fix to make top layer frame non-ref
>
> Add mismatch check to the datarate test of changing svc pattern on the
> fly.
>
> Change-Id: I6a878736de44e6a40c077ed6430aabd7fadabdd9
TBR=marpan@google.com,builds@webmproject.org,jianj@google.com
Change-Id: Ibcb600438098f8dc380fe7e1de90cb81fc367468
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
In the process of fixing a ubsan warning:
commit 738b829b8c
Fix incorrect size reading
the inferred check of start < end was removed. This causes fuzzed files
to get a little further and segfault in vp8dx_start_decode.
Change-Id: I316e23058753ba42dbcc46d27eb575f51c8a9e9a
When compiling an app using libvpx in Xcode 9.2, a warning is
thrown in vpx_frame_buffer.h:
"Parameter 'new_size' not found in the function declaration"
Switching it to 'min_size' to match the comment text and the
callback type definition prototype resolves it.
Change-Id: I7a3e4a857c2007c2d0d390e22054d7bc85068aa1
The following changes were not carried back from the release branch:
commit f87a4594fb
Revert "Add frame width & height to frame pkt. Add test."
commit c5dc3373db
work around pic issue with gcc 6
BUG=webm:1490
Change-Id: Id3e15983d5565680c05a0c454544003a615a4d7f
Cherry pick from vp9:
commit 85770264ac
Guard against incorrect size values moving *data past data_end.
Check read length against the difference of the buffers.
Change-Id: I5e8679ddd447c4d73deb80be5ec94841a92c5fcd
For SVC, on spatial enhancement layer, intra
search was disabled unless best reference frame
is golden (i.e., spatial/inter-layer prediction),
except for some other conditions (lower layer is key
or golden is not an allowed reference).
Fix is to add the base temporal layer condition,
so intra search will not be force-disabled for base
temporal layer frames.
This improves metrics (-1-2%) for SVC 3 and 2 layer config.
Some small encode time is expected, but since condition
only affect base temporal layers (i.e., every 4 frames
for 3 layers), increase is small.
Change-Id: I10b824faef99560dfdeeb02ba8bf8e3e1eea6255
In nonrd-pickmode: the golden/spatial reference for inter-layer
prediction may be skipped in the mode testing. Add QP dependency
to reduce the threshold for skipping (i.e., check it more often)
at high QP, if the lower layer was encoded at lower QP relative
to the current layer.
At high QP, a better quality lower resolution is more likely to
provide good spatial (inter-layer) prediction.
avgPSNR/SSIM metrics up by ~1% (all clips positive gain or neutral).
Some decrease in encode time (~1-2%) expected at lower bitrates,
for 3 layer SVC.
Change-Id: I9ee0f62d4b10d4ebd30165d378ecfa4399ae5ef1
warning: Tag `XML_SCHEMA' at line 941 of file `doxyfile' has become obsolete.
warning: Tag `XML_DTD' at line 947 of file `doxyfile' has become obsolete.
Change-Id: I85e39c4fb154569b8d7f68bdf362408983e9bd4f
Remove an adjustment to two cyclic refresh (aq-mode= 3)
parameters for SVC. The adjustment was to reduce the
delta-qp on second segment, and reduce the motion threshold.
This was done early on in the SVC encoder development,
in the latest codebase removing this adjustment yields
some improvements in metrics.
The avgPSNR/SSIM metrics increase on average by ~1%
(most clip positive gain), for 3 and 2 layer SVC.
Change-Id: I7a4d5114f16b2a1df383dbe6b3fe02940e29e6cc
vp9 does not support multi-res encoding, the request should not crash.
+ encode_api_test: unconditionally expose multi-res test
vpx_codec_enc_init_multi should fail independent of
CONFIG_MULTI_RES_ENCODING if not for the same reason.
Change-Id: I44fc58ef70ee4e0e482cb6a5736885f4cb2a8517
(cherry picked from commit 004fb91416)
Fix is from the patch in the issue.
Release memories allocated before early exit.
BUG=webm:1482
Change-Id: I64952af99c58241496e03fa55da09fd129a07c77
(cherry picked from commit 5b6ae020b6)