Fix a bug when middle and top spatial layer are skip encoded
(disabled) and then re-enabled again, during the sequence.
Issue is that pending_frame_count in the packing may
be incremented on middle layer, even though that layer is skipped
(not encoded and hence zero size). Fix is to add size check.
Modified existing unitest to reproduce the issue.
Change-Id: I86d806a112d468e06b04fbf7c46ae07db9e0ad93
The initialization depends on cm and mi_row which static
analysis does not approve of.
Clears a static analysis warning:
warning: The right operand of '+' is a garbage value
const loop_filter_thresh *lfi = lfthr + *lfl;
Change-Id: I8c863ced2b1e9a7e10103b7281098f20941a6ca2
These values are not consistently set before calling update_best_mode.
In vp9_rdopt.c they are individual values instead of a struct and are
zero'd at declaration.
Clears a static analysis warning:
warning: The right operand of '-' is a garbage value
RDCOST(x->rdmult, x->rddiv, (rd->rate2 - rd->rate_uv - other_cost),
warning: The right operand of '-' is a garbage value
(rd->distortion2 - rd->distortion_uv));
Change-Id: I19895d062e7c0ac67937126ebc5dcb0afd3a2931
The loop appears to set map[i] with the intention of running
the 'j' loop up to that point. However, without zero'ing map[]
first the behavior is unpredictable.
Fixes a static analysis warning:
warning: Branch condition evaluates to a garbage value
for (j = 0; j < 4 && map[j]; ++j) {
Change-Id: Ifa39353d8aa5cc47b467a7d3d8cdd3b5319fd997
These values are set in main() from user input. Ensure
they are cleared out first.
Clears a static analysis warning:
warning: The right operand of '*' is a garbage value
1000.0 * rc->layer_target_bitrate[0] / rc->layer_framerate[0];
Change-Id: I09bd209be5aff31b87597a24d37a9673fa99381b
This reverts commit 118a57045b.
Reason for revert: Fails on Visual Studio builds:
vpxmdd.lib(vpx_ports_emms_mmx.obj) : error LNK2019: unresolved
external symbol _m_empty referenced in function
vpx_clear_system_state
Original change's description:
> use intrinsics for 'emms'
>
> BUG=webm:1500
>
> Change-Id: I3235d8c2abc01dd3a35e14c5cbcfe20283ff8fb2
Change-Id: Ia9c40bc103c57cced83353249c55218eaf2f0b0c
Static analysis does not recognize that output_rc_stat guards
the usage of window_size. Clears this warning:
The right operand of '>' is a garbage value
if (frame_cnt > (unsigned int)rc.window_size) {
set_rate_control_stats sets window_size to 15. Zeroing it
just introduces another static analysis warning.
Change-Id: Ieee7b81a385f986e42189101cfa39279e519b368
This should be taken care of by parse_superframe_index but
the static analysis is not recognizing it because it depends
on 'marker' which is read from the bitstream.
Clears a static analysis warning:
The right operand of '*' is a garbage value
rc.layer_encoding_bitrate[layer] += 8.0 * sizes[sl];
Change-Id: I8ee48a98f907bc7b46869fd27a351f33e2e7de71
Print error messages as they are encountered. This was the default
behavior.
Removes a static analysis warning regarding the use of strncat:
Null pointer argument in call to string length function
As this is the only use of strncat in the library, remove it and the
associated public function.
Change-Id: Id55305c5a4d65f11da88c3a2203ff824200f526f
sl was passed to set_frame_flags_bypass_mode, triggering
an uninitialized variable warning. Inside the function it
is only used as a local variable.
Change-Id: If743626e9e10fd41d135e3b4ad6196dc4dc90172
When an enhancement spatial layer is skipped, we should check
for updating the layer frame counters.
Change-Id: Ib79d0955c62fb465f59ef2f9ac45240ae2614d7b
This causes assert to trigger in choose_partitioning().
This can happen in some cases when enhancement layers
are enabled midway during the stream.
Change-Id: I69c3c8b4b1e3f1c7d8d7294d633ca5ddca148e8b
The largest frame is currently in choose_partitioning:
warning: stack frame size of 44156 bytes in function 'choose_partitioning'
but adding HBD amplifies other things:
warning: stack frame size of 51480 bytes in function 'dec_build_inter_predictors'
Add some padding for sanitizer and variances between compilers.
BUG=webm:1498
Change-Id: I0d94d4f94d25dafafca9d7484881c2ce5f8de371
The file contains sse2 implementations related to various block error
functions. Update the .mk file to include it only when sse2 is
requested.
BUG=webm:1500
Change-Id: I67b766faed425fd7a96db8541b13c69670b65fec
For SVC, if any of the layer scale ratios are not
2x2, then disable the partiton_reuse, which assumes
2x2 scaling between layers.
Change-Id: I8b3163de0826052bbb1bfe03554a074c89510558
Set phase_shift = 0 if the scale factors are
above 3/4. Removes artifact for scale factors
close to 1.
phase_shift = 8 is to get an averaging filter
(decimated pixel aligns to 8/16, midway between source pixels),
and only makes sense for scale factors multiples of
2 (1/2, 1/4,...).
Removes artifact for high scaling ratios.
Change-Id: Id0a85869d6c6156dda0032c697ded2de78fad6bd
This change is targeted mainly at higher resolutions where typically
the average error per MB is much smaller. hence this patch replaces
a fixed error per MB factor with a tiered value.
It also adds in a fixed offset value that acts as a minimum return score.
Note also minor fix to debug stats output.
The results are overall beneficial (-ve) on our test sets, most notably for
higher definition formats (see below - overall psnr, ssim, psnr hvs)
low res: 0.184 -0.262 -0.166
mid res: 0.094 0.075 0.049
hd res: -0.752 -0.300 -0.800
NF 2K: -0.353 1.095 -0.302
NF 4K: -1.245 -0.578 -1.205
The most notable negative case is pierseaside 2K which appears to be worse by
8-10% (which has a big impact on the overall gain for the NF 2K set). Closer
inspection reveals that the drop does not relate to the key frame boost
per se as in both cases the key frame substantially undershoots its target. Rather
this is a side effect relating to the initial Q range allowed for the key frame and
a poor initial complexity estimate. This will hopefully be improved in a later
patch.
Change-Id: I4773ebe554782f4024c047c3c392c763a3fe843b