While CONFIG_INTERNAL_STATS=1, PSNR is calculated while encoding.
The aligned width/height were used mistakenly in the calculation.
This patch fixed it, and used the orignal image width/height.
Change-Id: Iad5334f8693af761b71ebb78f2587db8a3404ecf
In vp8_sub_pixel_variance8x8_neon the temp2 buffer is only initialized
to kHeight8 * kWidth8. However, in the case that xoffset != 0 and
yoffset == 0, var_filter_block2d_bil_w8 is called with output_width
kHeight8PlusOne.
Thanks to cmugurel for diagnosing and yulius for the patch.
Change-Id: Ib71ffd96ffad963c92b8b7ca23f303942785b8e0
https://code.google.com/p/webrtc/issues/detail?id=4190
By using 0xff for a short it was not setting the high bits. When
comparing the output with vtst to find non-zero elements it was skipping
vaules which had no low bits set such as -512 / 0xFE00.
Using -8191 as the first element of coeff will generate this condition.
BUG=883
Change-Id: Ia1e10fb809d1e7866f28c56769fe703e6231a657
The obj_int_extract code is no longer worth maintaining. It creates
significant issues when adapting for different build systems and no
longer offers as significant of a performance benefit due to
improvements in intrinsics.
Source files will remain until the various third-party builds are updated.
The neon fast quantizer has been moved to intrinsics. The armv6 version
has been removed because so few remaining targets require it.
Compilers and processors have improved significantly since the
pack_tokens code was written. The assembly is no longer faster than the
C code.
pack_tokens were the only optimizations for the armv5te targets so the targets
will be removed after the test infrastructure has been updated.
BUG=710
Change-Id: Ic785b167cd9f95eeff31c7c76b7b736c07fb30eb
Check that the numerator is not zero. If it is, guess 30fps.
Fixes a clang IOC error in the quantize test. It's very unlikely for
this to occur in the wild because the setup in the quantize test is very
nonstandard.
Change-Id: Icdab7b81d4e168d3423e14db20787f960052e0c3
Use intrinsics for neon quantization. Slight loss (<5%) of performance
compared to the assembly. Roughly 10x faster on arm64 because that was
running C code before.
Change-Id: I7cf5242d8f29b7eab5bca6a1c20c89c9fc9ca66d
-Use full bandwidth (when temporal layers is on) for checking switching.
-Normalize metric wrt num_blocks.
-Rounding fix to update of average noise level metric.
-Make default internal denoiser mode == kDenoiserOnYUV (in denoiser set_parameters()).
-Adjust some thresholds.
Change-Id: Ib827512b25a7bf1f66c76d3045f3a68ce56b1cd2
If the GOLDEN or ALTREF frame was last updated > x frames in the past,
don't use them for denoising (only consider LAST). Using an old reference
frame for denoising, e.g., if it is a long-term reference or the last key frame,
can cause some visible artifacts, in particular in the aggressive denoising mode.
Change-Id: I239c9fbb092c36cba7e95328f1fa67a58d6a7ed9
The version of gcc4.6 included with the Android NDK through r10b
fails to compile this function. Replace it with C code.
BUG=860
Change-Id: Ifcc0476664071aec46a171cdd5ad17305930986a
A left shift of negative value causes IOC runtime warnings, this
commit converts two such left shifts to multiply to avoid IOCs.
Change-Id: I8811428768d7135e6e16af4b3094d0341589a995
Allow for option to apply spatial blur for temporal
denoising, under the aggressive denoising mode.
Change-Id: I41c5fdc0b6cf32d8f8d1d4236b25fa5aa406e89e
This issue is found when the denoising mode is set to kDenoiserOnYUVAggressive.
Updated the C code to make it the same with SSE version.
I also changed several lines in VP9 denoiser for the code style.
Change-Id: I640d48cf946fe8c6a400e6e252107501d1e226d3
make bifilter4_coeff[][] uint8_t, no values exceed this range and
they're loaded with vdup_n_u8().
Change-Id: I921983e9edd828d29820e40ac30a7801dbe0fb4f
Use the right return values - vget_low_s64 returns int64x1_t, not
a normal int64_t.
Also make __builtin_prefetch a no-op on MSVC for this file.
Change-Id: I4d2fce01d0ba106b98d3d53b137803119c2c2c08
vp8_build_intra_predictors_mbuv_s().
This patch replaces the assembly version with an intrinsic
version.
On a Nexus 7, vpxenc (in realtime mode, speed -12)
reported a performance improvement of ~2.6%.
Change-Id: I9ef65bad929450c0215253fdae1c16c8b4a8f26f
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.
Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
In order to understand memory layout consider the declaration of the
following structs. The first one is a part of our API:
struct vpx_codec_ctx {
// ...
struct vpx_codec_priv *priv;
};
The second one is defined in vpx_codec_internal.h:
struct vpx_codec_priv {
// ...
};
The following struct is defined 4 times for encoder/decoder VP8/VP9:
struct vpx_codec_alg_priv {
struct vpx_codec_priv base;
// ...
};
Private data allocation for the given ctx:
struct vpx_codec_ctx *ctx = <get>
struct vpx_codec_alg_priv *alg_priv = <allocate>
ctx->priv = (struct vpx_codec_priv *)alg_priv;
The cast works because vpx_codec_alg_priv has a
vpx_codec_priv instance as a first member 'base'.
Change-Id: I10d1afc8c9a7dfda50baade8c7b0296678bdb0d0
Scale min_consec_zero_last wrt to #temporal layers,
and use full framerate as factor in noise metric.
Change-Id: Id0842b90164ce468d1236173c51965e7620c0e12
When configuring the buffer make sure to set all the (now) required
fields. Use the canonical variables and match the style from vpx_scale.
https://code.google.com/p/webm/issues/detail?id=841
Change-Id: I71b43d4a03756b8b2d6d60fdf8d7bf41b8041787
On key frame, will always start with normal denoising mode,
but based on a computed noise metric (normalized mse on source diff)
may switch to aggressive mode (and back down again).
Change-Id: I20330b2dcf3056287be37223302b2cab5fc103eb
Modify zero_mv bias condition to include check that "closest" reference is last_frame.
This is needed for temporal layers, where the last_frame is not always the closest reference.
Also, constain zeromv_count to be for last_frame reference.
Change-Id: I7af54a809ebf01ef43b9933c9d4095b6cb189390
if the decode of the first frame fails, frame_to_show may not be set.
fixes a crash in vpxdec with corrupt data.
Change-Id: I5ab9476d005778a13fd42a39d05876bb6c90a93c
This is needed to update the width/height and stride parameters
for the reference buffers that the denoiser uses.
Change-Id: Id51b3bdcb56bbbc8187865544ccd3d872a0d51fe
When no more data is available, vpx_codec_decode should
be called with NULL as data and 0 as data_sz.
vpx_codec_get_frame iterates over a list of the frames
available for display. The iterator storage should be initialized
to NULL to start the iteration. Iteration is complete when this
function returns NULL.
Also change the unit test to conform to the api spec.
Change-Id: I4b258b309f5df3d37d10c82f01492c0394181c2a
Since the UV decision to denoise is based on Y, we need to set
the default/initial denoiser decision_u/v to COPY_BLOCK,
to make sure if no uv_denoiser is applied we still update
(uv)running_avg with source.
Change-Id: I5af1c2afbd40c498cd3de208bea88c837099b24d
On a key frame, the denoised-running_avg for all references
frames should be updated with the source.
The altref denoised-running_avg was not being updated on key frame,
this fixes that.
Change-Id: Ie02cd0ba5383e013af59240e6df7e185d11703f6
For gcc, when libvpx config option debug is disabled, added the
flag -DNDEBUG to disable the assertions in libvpx for some speedup.
Change-Id: Ifcb7b9e8ef5cbe5d07a24407b53b9a2923f596ee
Sets the bit-depth field as default 8 in the image structure in vp8.
Generalizes yuv read in preparation for support for reading 422/444
for 8-bit and 10/12-bit.
Change-Id: I560c13c348b122fd028e408431156376b895058c
All changes are for spatial svc only.
1. Enable encoding hidden frames in each layer and use alt reference idex to reference the hidden frame in each layer
2. Use golden reference idx for spatial reference
3. For those layers that don't have hidden frames (caused by lack of frame buffers), reference a hidden frame in lower layers
4. Add "auto-alt-refs" in svc options
Change-Id: Idf27d1fd2fb5f3ffd9e86d2119235e3dad36c178
vp8/encoder/x86/denoising_sse2.c:35:10: error: taking the absolute value
of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
Change-Id: I749ba8e6f55dbd9b822bfd4260a8397554f5e524
Set the proper number of mb_rows/cols.
Also remove warnings (unused variable) when configured with temporal-denoising disabled.
Change-Id: I8abd2372394ee55295feb87a66efd294ea6989d0
C version and sse2 version, and off by default.
For the test clip used, the sse2 performance improved by ~5.6%
Change-Id: Ic2d815968849db51b9d62085d7a490d0e01574f6
Allow for an option to selectively apply the deblocking loop filter to the denoised
raw block, based on the denoised state (no-filter, filter with zero motion, or filter with non-zero motion)
of the current block and its upper and left denoised block.
This helps to reduce some blocking artifacts from the motion-compensated denoising.
Change-Id: I0ac4e70076df69a98c5391979e739a2681e24ae6
When this compiler flag is enabled, the encoder will write a denoised,
uncompressed, version of the input to denoised.yuv.
Change-Id: Ie0247f76b23219d95fe97dd70f23e097d742c249
By enabling the OUTPUT_YUV_SRC compiler flag, the encoder will write the raw
input to bd.yuv.
The functionality was mostly implemented, but in its previous state did not
compile.
Change-Id: Ia331ad0f4c6e6f9f51e8d42cd33ba8cc146b3dbf