Removing all copies of identical vp8_mse2psnr/vp9_mse2psnr functions.
Using vpx_sse_to_psnr() instead in all places.
Change-Id: I15beef9834d43d8fc8a8a7a2d1fc5de3d658fed8
Added support for external frame buffers to libvpx's VP9 decoder.
If the external frame buffer functions are set then libvpx will
call the get function whenever it needs a new frame buffer to
decode a frame into. And it will call the release function
whenever there are no more references to that buffer.
Change-Id: Id2934d005f606af6e052fb6db0d5b7c02f567522
Filter out files ending in _neon.c and append .neon so the Android build
system knows to apply -mfpu=neon
Change-Id: Ib67277e5920bfcaeda7c4aa16cd1001b11d59305
Under a configuration change, where the bitrate suddenly decreases,
the buffer level may be larger than maximum allowed (for that first frame to be encoded after change_config).
This change keeps it clipped to its maximum level.
Change-Id: I4d0b5b3d1fd8148600dd39e02bd630c9464baba5
There were two problems with the format string in
the conditionally compiled print statement. It referred
to a variable that is no longer available and it used
incorrect format specifiers.
Change-Id: I315e22bea2691bb535a2e33f5ca206fc55287a37
When a frame is dropped due to |buffer_level| < 0 for a given temporal layer,
the buffer level for the upper temporal layers was not updated (in calc_pframe_target_size()).
This change fixes that.
Also, use the layer per-frame-bandwidth for updating the buffer level
of the higher layers when a frame is dropped.
Change-Id: I660c23f3229b47e9d124a950b480314b4307c5a8
The clamp operation may not affect the values of the final assigned mv
where compiler may make use of strict aliasing rule to optimize out the
clamp operation. This change made the code segments to better comply
the strict aliasing rule.
Change-Id: I24502ff18bd4f9e62507a879cc8760a91a0fd07e
coef_counts is now in cpi->mb, instead of cpi. The commit corrected the
mis-use and enable succefual build.
Change-Id: I0e77909d34571cfd2560c66b46b1f8fa0cd1a6b4
The declaration of the bilinear filters specified an alignment clause
in the implementation file but not in the header. This turned out
to be harmless, but it did cause linker warnings to be emitted when
building on Windows.
The (extern) declaration in the header was changed, to match the
declaration in the implementation.
Change-Id: I44be89b1572fe9a50fa47a42e4db9128c4897b04
Jenkins warns on left shift of negative numbers and non-aligned read
of int. This commit fixed the two issues.
Change-Id: I389a7fb6a572c643902e40a4c10fefef94500d2c
Sample app: vp9_spatial_scalable_encoder
vpx_codec_control extensions:
VP9E_SET_SVC
VP9E_SET_WIDTH, VP9E_SET_HEIGHT, VP9E_SET_LAYER
VP9E_SET_MIN_Q, VP9E_SET_MAX_Q
expanded buffer size for vp9_convolve
modified setting of initial width in vp9_onyx_if.c so that layer size
can be set prior to initial encode
Default number of layers set to 3 (VPX_SS_DEFAULT_LAYERS)
Number of layers set explicitly in vpx_codec_enc_cfg.ss_number_layers
Change-Id: I2c7a6fe6d665113671337032f7ad032430ac4197
Adds a new end-usage option for constant quality encoding in vpx. This
first version implemented for VP9, encodes all regular inter frames
using the quality specified in the --cq-level= option, while encoding
all key frames and golden/altref frames at a quality better than that.
The current performance on derfraw300 is +0.910% up from bitrate control,
but achieved without multiple recode loops per frame.
The decision for qp for each altref/golden/key frame will be improved
in subsequent patches based on better use of stats from the first pass.
Further, the qp for regular inter frames may also be varied around the
provided cq-level.
Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
these are only used in the encoder.
frames_since_golden / frames_till_alt_ref_frame -> VP[89]_COMP
Change-Id: Ie14a6f46987bced685ddb449b85dc261caba6dfe
this was never fleshed out in the context of VP8, for which it was
added. for VP9 it has no meaning.
Change-Id: Iba2ecc026d9e947067b96690245d337e51e26eff
This allows code calling the library can choose an arbitrary
encryption algorithm.
Decoder control parameter VP8_SET_DECRYPT_KEY is renamed to
VP8D_SET_DECRYPTOR, and now takes an small config struct instead
of just a byte array.
Change-Id: I0462b3388d8d45057e4f79a6b6777fe713dc546e
If the codec was configured with --enable-internal-stats,
a seg fault would occur. This patch fixes the problem.
Change-Id: Id10a577973d185e93037c59e5b36bebdded327da
Condition the existing zbin boost logic for gf/altf mode to temporal layers==1,
since gf/altf reference frames are used in temporal layers as reference frames.
Change-Id: I618bb20730e5f193e078215d06f54997c363dd7b
Previously, the microsoft arm assembler errored out, saying that
bilinear_taps_coeff was an undefined symbol.
Change-Id: Ib938f0b454c41ccbd801e70a7c9acc0fa04e3c55
Use a separate counter for resetting the pattern upon
a change in temporal layers, and set/initialize the
layer context parameters for the new temporal layer state.
Also moved the setting of layer configuation in init_config()
to a separate function.
Change-Id: Ic7fc023a1e5490020509e107004645098f4c00f0
Conflicts:
vp9/common/vp9_findnearmv.c
vp9/common/vp9_rtcd_defs.sh
vp9/decoder/vp9_decodframe.c
vp9/decoder/x86/vp9_dequantize_sse2.c
vp9/encoder/vp9_rdopt.c
vp9/vp9_common.mk
Resolve file name changes in favor of master. Resolve rdopt changes in
favor of experimental, preserving the newer experiments.
Change-Id: If51ed8f457470281c7b20a5c1a2f4ce2cf76c20f
The only reason for the _intrinsics part of the file name was for the
interim period where only one of the functions was redone and the base
file name was the same.
Change-Id: I7851154f1633d48821bee885b1cadb2148e65a23
This is work-in-progress, it implements multiple ARF
encoding behind an experimental flag.
It adds the ability to insert multiple ARF frames into a
single ARF group. This patch implements the reordering
of the coded frames, and implements a fixed-length coding
pattern. It applies a fixed quantizer strategy based on
where the frame is in the coding sequence.
Further work to modify the rate control strategy is
ongoing and will be submitted via a set of future patches.
In this first step, each ARF group is recursively
bisected and an ARF frame added at that position in the
sequence. The recursion continues until ARF frames are
within MIN_GF_INTERVAL frames.
The code sits behind the "multiple-arf" experimental
flag ("CONFIG_MULTIPLE_ARF"). The experimental flag
"oneshotq" ("CONFIG_ONESHOTQ") also needs to be enabled
for this patch to work correctly.
Change-Id: Ie473b05ebb43ac473c0cfb659b2b8042823085e2
Use local variable for setting the improved prediction mode.
cpi->sf.improved_mv_pred is set/fixed at the frame level
and should not be changed inside pick_inter_mode.
Change-Id: Ie28d9171ac000e631af0e30204970e3d4fff3078
Pick up VP8 encryption, quantization changes, and some fixes to vpxenc
Conflicts:
test/decode_test_driver.cc
test/decode_test_driver.h
test/encode_test_driver.cc
vp8/vp8cx.mk
vpxdec.c
vpxenc.c
Change-Id: I9fbcc64808ead47e22f1f22501965cc7f0c4791c
and denoising.c
Adding -Wshadow to CFLAGS generated a bunch of warnings. This patch
removes these warnings.
Change-Id: I434a9f4bfac9ad4ab7d2a67a35ef21e6636280da
ratectrl.c and quantize.c
Adding -Wshadow to CFLAGS generated a bunch of warnings. This patch
removes these warnings.
Change-Id: I8c8faa9fde57c1c49662d332a90bc8d9a0f4a2ce
Adding -Wshadow to CFLAGS generated a bunch of warnings. This commit
is based on work already done by jzern.
Change-Id: Iefc08a7ab601c4d1b507f039577433bfb1c6cc9d
Writing all #define guards using the same style. Inlining macro
VP8DX_BOOL_DECODER_FILL into vp8dx_bool_decoder_fill. Removing unnecessary
includes.
Change-Id: I483fa979ab34008bf7835b5f34c6471c44daf956
Remove dependency of this function on asm_offsets. ssse3/sse4 next.
Change quant_shift calculation so it be done using SIMD. Pre-calculate
as much as possible to simplify EOB selection.
Take advantage of qcoeff being zero'd by tying the if statements
together.
Speed parity with previous implementation with gcc x86_64 linux
Change-Id: Ife97556a1eca3a74b09def1a3d04084974dff1fb
Reduce dependency on offsets file by using intrinsics. Disassembly shows
improvements over previous assembly specifically in register management,
preloading, and {pro,epi}log. Speed change is within margin of error.
Change-Id: I8131b4b4d62bc092407fe847bfaa8f2c0e1384ff
Started adding support for multiple internal decoder instances. Also added
code to limit the vp8 config options available when using frame-based
multithreading.
Change-Id: I0f1ee7abcfcff59204f50162e28254b8dd6972eb
Adds a flag to disable features that would inhibit frame parallel
decoding. This includes backward adaptation and MV sorting based
on search in ref frame buffer.
Also includes some minor clean-ups.
Change-Id: I434846717a47b7bcb244b37ea670c5cdf776f14d
When error concealment is enabled, it swaps the mi and prev_mi ptrs after
each frame is decoded. The postproc uses the mi ptr for the mode info context.
Now the postproc will use the correct mode info context.
Change-Id: I537ae5450f319c624999b44525bb52bb30047b7b
Reduce the delta loop filter for blocks that are cyclicly refreshed.
This helps to reduce the dot artifacts that may happen
when zero_mv blocks are repeatedly loop-filtered.
This change, along with the fix in:
https://gerrit.chromium.org/gerrit/#/c/40409/
helps to reduce this artifact, but cannot remove the dot artifacts completely.
Change-Id: I44675e7a0f59295b648a3b7d4956fb301231a97f
Use the proper seg/mode/ref filter offsets when selecting the
frame loop filter level for fast mode (pick_filter_level_fast).
Change-Id: I2473e2131c800ad19755cb6211ad735fecfe2ac0
The MAX_PSNR was used to assign a "psnr" number when the mse is close
to zero. The direct assignment is used to prevent divide by zero in
computation. Changing it from 60 to 100 to be consistent against what
is being done in VP9
Change-Id: I4854ffc4961e59d372ec8005a0d52ca46e3c4c1a
WIP: Fixing unsafe threading in VP8 encoder.
Use the passed in macroblock instead of the macroblock located in
cpi.
Change-Id: I1bfa07de6ea463f2baeaae1bae5d950691bc4afc
The loopfilter thread from the previous frame can be running while
starting the current frame. cpi->Source will change during this time causing
the wrong data to be copied. The refresh_x_frame flags also change, which
will cause incorrect updates of the denoised buffers.
Change-Id: I7d982b4fcb40a0610801332aa85f3b792c64e4c3
The denoiser was writing to LAST_FRAME buffer. If LAST_FRAME isn't being
updated, the reference frame buffers were out of sync between the encoder and the
denoised raw buffers. This patch resolves the discrepancy by always writing to a work
buffer (INTRA_FRAME) and then copying from that buffer to any buffers that needs to
be updated.
Change-Id: I6dd855b9749978b542bc3d515914d5f16faf25df
Multi-threaded code was not updated to disable background
refresh for non base-layer frames at the time it was
disabled in the main C-code.
Change-Id: Id6cc376130b7def046942121cfd0526b4f0a71d4
Don't use the switch to gf_rate_correction factor when
temporal layers is used (i.e., cpi->oxcf.number_of_layers > 1).
In temporal layers, we prefer to avoid this as any frame
(e.g., base layer frame at anchor of pattern) may update
both last and golden (and possibly alt-ref), and so we would get
different rate correction factors within the same layer.
This change will make sure one rate correction factor exists for each layer.
Also, made some other code in qp-regulate that depends on
alt/golden update specific to the 1 layer case.
Change-Id: I41a6d085bd477f9307ef3b3c311695214273892c
xmm[6-11] should be saved and restored for Windows x64; prevents an
encoder mismatch and some datarate issues.
Change-Id: I03c38eb18ec20c6c441cae19416393058baad1ee
xmm6/xmm7 should be saved and restored for Windows x64; prevents an
encoder mismatch and some datarate issues.
Change-Id: Ifa1a82ab25fbdc5112d66f5332e14b16e69ac164
Rather than building an object file directory heirarchy matching the
source tree's layout, rename the object files so that the object
file name contains the path in the source file tree. The intent here
is to allow two files in different parts of the source tree to have
the same name and still not collide when put into an ar archive.
Change-Id: Id627737dc95ffc65b738501215f34a995148c5a2
Creates a merge between the master and experimental branches. Fixes a
number of conflicts in the build system to allow *either* VP8 or VP9
to be built. Specifically either:
$ configure --disable-vp9 $ configure --disable-vp8
--disable-unit-tests
VP9 still exports its symbols and files as VP8, so that will be
resolved in the next commit.
Unit tests are broken in VP9, but this isn't a new issue. They are
fixed upstream on origin/experimental as of this writing, but rebasing
this merge proved difficult, so will tackle that in a second merge
commit.
Change-Id: I2b7d852c18efd58d1ebc621b8041fe0260442c21
So that, in case of error, the arrays are not filled with trash
pointers that are attempted a free() during vp8mt_de_alloc_temp_buffers()
Change-Id: Ic074549c2903a43316510eb42e4f393e7d3ee528
Most of these were picked up by jenkins in the commit that changed
the vp8 namespace to vp9 in common/.
Change-Id: I5cbd56ffc753b92ef805133cda6acc1713a13878
For non-static functions, change the prefix to vp9_. For static functions,
remove the prefix. Also fix some comments, remove unused code or unused
function prototypes.
Change-Id: I1f8be05362f66060fe421c3d4c9a906fdf835de5
Most of these were picked up in the previous commit (prefix change from
vp8_ to vp9_), but I'm pushing this separately so that it's easier to
review.
Change-Id: Ifce2cdd6f008f4b1fbc2d89b5196d75e35fe115d
Most of these were picked up in the previous commit (prefix change from
vp8_ to vp9_), but I'm pushing this separately so that it's easier to
review.
Change-Id: I91e959895778b8632d7d33375523df8a7568a490
Converted the forward and inverse transforms to integer forms.
Modify #define TEST_INT 1/0
in the code to call integer/float version of transforms.
The tests showed that average OVERALL PSNR loss was less than 0.1%.
Change-Id: I1dfa4eeab6412597e3b970ce299cf0e116a917e6
As suggested by Paul, this commit separate the subpel refmv selection
into a separate experiment. It also changed a couple variable names
to better reflect the nature of the variables.
Change-Id: Id951c3cadc61a982dd15afe641000f60213b8995
This is the condition under which it is called in onyx_if.c. Also remove
the unused function print_mv_ref_cts().
Change-Id: I51ea3720d46f86d136e2215e01cf9d6c7dfc41ea