Граф коммитов

6171 Коммитов

Автор SHA1 Сообщение Дата
Yaowu Xu 87cf002e9d Minor cleanup
Change-Id: I3a3ceeeed489f8b1ccd7199ff97f3fb991bbf5a4
2014-07-09 15:42:10 -07:00
Yunqing Wang a581da218e Remove repetitive code in mcomp.c
Deleted vp9_find_best_sub_pixel_comp_tree(), and combined it in
vp9_find_best_sub_pixel_tree().

Change-Id: Ifb25763c8b19822df5537cc1daa76ce88dc3b056
2014-07-09 14:50:50 -07:00
Yunqing Wang a51e389b42 Merge "Adjust full-pixel search method in real-time mode" 2014-07-09 13:46:42 -07:00
Yaowu Xu 0e99f3a387 Merge "Combined non-rd motion searchs into a single function" 2014-07-09 13:02:25 -07:00
Yunqing Wang 9bd3be69a4 Adjust full-pixel search method in real-time mode
Use FAST_HEX in speed 5 and 6, which covers more points than
FAST_DIAMOND and improves motion search quality.

At speed 6, RTC set borg tests showed slight quality gain (psnr
gain: 0.143%, ssim gain: 0.226%). No noticeable encoding speed
change.

Change-Id: Ifa62875d9a52ee382ec494f271382bb77d8c67bf
2014-07-09 12:56:25 -07:00
Yaowu Xu c788bceb55 Combined non-rd motion searchs into a single function
This commit combined the full pel and sub pel motion search into a
single function to avoid code duplication. The commit does not change
encoder outputs.

Change-Id: Ibe18342c4f64073bef20f9cf6c6ca0a20d01bf0d
2014-07-09 12:07:52 -07:00
Jingning Han f6bf614b2f Merge "Re-design quantization process for 32x32 transform block" 2014-07-09 11:55:26 -07:00
James Zern 2e0588bc46 vp9_decoder_remove: destroy common after thread shutdown
in a failure case the threads may still be running and share a reference
to VP9_COMMON

Change-Id: I867034b4b55f133663b8cbf6ca06e72acf952849
2014-07-09 11:08:06 -07:00
hkuang b84ee5a3d0 Merge "Move vp9_thread.* to common." 2014-07-09 10:16:13 -07:00
Tim Kopp 3008da9dea Merge "Vp9 denoiser MC bugfix" 2014-07-09 08:02:20 -07:00
Adrian Grange 75e5abe83d Merge "Fix decoder handling of intra-only frames" 2014-07-09 07:37:28 -07:00
Jingning Han 9ad1b9fc67 Re-design quantization process for 32x32 transform block
This commit enables a new quantization process for 32x32 2D-DCT
transform coefficient blocks. It improves the compression
performance of speed 5 by 1.4%. The overall compression gains of
speed 5 due to the new quantization scheme is 4.7%. It also includes
the SSSE3 implementation of the 32x32 quantization process.

Change-Id: I0855b124fd6462418683f783f5bcb44255c9993b
2014-07-08 16:55:28 -07:00
Adrian Grange 7c43fb67ae Fix decoder handling of intra-only frames
This patch fixes bug 633:
https://code.google.com/p/webm/issues/detail?id=633

The first decoded frame does not have to be a keyframe,
it could be an inter-frame that is coded intra-only.

This patch fixes the handling of intra-only frames.

A test vector has also been added that encodes 3
intra-only frames at the start of the clip. The
test vector was generated using the code in the
following patch:
https://gerrit.chromium.org/gerrit/#/c/70680/

Change-Id: Ib40b1dbf91aae2bc047e23c626eaef09d1860147
2014-07-08 16:24:03 -07:00
Tim Kopp 3c86228cd3 Vp9 denoiser MC bugfix
In the previous version, only certain buffers in the macroblockd were saved and
the restored. In this version, all of the buffers are saved and restored. The
code was then rolled into a loop for readability.

Also contains a tiny fix for when the -DOUTPUT_YUV_DENOISED flag is used.

Change-Id: Id925ef8b3fa122ae88acfa1d9a1e4df45df83518
2014-07-08 15:13:13 -07:00
Guillaume Martres 113dbf8d1e vp9_cx_iface.c: allow speed greater than 7
This makes it possible to use --rt --cpu-used=8.

Change-Id: I8b5bc4449b6e05d24d25145e35b4793501268c59
2014-07-08 15:58:42 +02:00
Johann fe4b663559 Merge "Use the VP9 version of extend_borders" 2014-07-07 15:20:37 -07:00
hkuang 337e8015c9 Move vp9_thread.* to common.
Prepare for frame parallel decoding, the reference count buffers
need to be protected by mutex. Move vp9_thread.* to common
folder so that those buffers could use cross-platform mutex
from vp9_thread.*.

Change-Id: I541277cf15eefed6641555944f67f4a0bcdc8154
2014-07-07 14:52:19 -07:00
Deb Mukherjee 14a12be8fd Merge "Adds support for reading and writing 10/12-bit y4m" 2014-07-07 12:36:28 -07:00
Jingning Han ffd2213660 Merge "Tune SSSE3 implementation of fast path quantization" 2014-07-07 12:07:09 -07:00
Jingning Han 6214038be9 Merge "Remove an empty line" 2014-07-07 11:42:48 -07:00
Jingning Han 00fc0e3ff5 Tune SSSE3 implementation of fast path quantization
This commit further simplifies the SSSE3 implementation of the fast
path quantization process.

Change-Id: I5be3286ec0f1bd81d1cf5be3168fece6384fb9ca
2014-07-07 11:06:53 -07:00
Jingning Han 3316918b3b Remove an empty line
Change-Id: Id6eedc502c86433df1456dd994aee6bc9a1359a2
2014-07-07 10:28:05 -07:00
Alex Converse f60a1178c6 Cleanup motion search speed features.
* Replace max_step_search_steps with constant MAX_MVSEARCH_STEPS
* Fold (reduce_first_step_size + speed > 5) into reduce_first_step_size
  replacing uses of reduce_first_step_size that don't add the speed
  check with zero.

Change-Id: Iae46395dbf3eaca138bf4d18b838a9e364b5a198
2014-07-07 10:08:45 -07:00
Alex Converse f0e0d01e94 Merge "Allow lossless skipping in RD mode decision." 2014-07-07 09:58:43 -07:00
Guillaume Martres 44666b7ce3 vp9_ratectrl.c: refactor get_active_quality usage
Change-Id: I53db06acf5bc434f9584136b848322f5870300b3
2014-07-06 18:49:46 +02:00
Deb Mukherjee 5820c5d614 Adds support for reading and writing 10/12-bit y4m
The y4m extension used is the same as the one used in ffmpeg/x264.
The patch is adapted from the highbitdepth branch.

Also adds unit tests for y4m header parsing and md5 check
of the raw frame data, as well as y4m writing.

[build fix for Mac/VS by not using tuples with strings]

Change-Id: I40897ee37d289e4b6cea6fedc67047d692b8cb46
2014-07-05 16:00:54 -07:00
Dmitry Kovalev 3643544fe0 Merge "Reverting "Adds support for reading and writing 10/12-bit y4m" for now because of Mac Build Failure." 2014-07-03 12:59:31 -07:00
Paul Wilkins 14f570f6c3 Merge "Multi-arf: Add code to turn it on and off." 2014-07-03 02:16:49 -07:00
Dmitry Kovalev 79199e465a Reverting "Adds support for reading and writing 10/12-bit y4m" for now because of Mac Build Failure.
This reverts commit 82dc1332af

Change-Id: I824bf42bf47c7df6985c79e451d6af913030d374
2014-07-02 22:23:38 -07:00
Alex Converse 49f00ba77e Merge "Cleanup vp9_rd." 2014-07-02 21:33:54 -07:00
Alex Converse 5fa37fb526 Merge "Split vp9_rdopt into vp9_rdopt and vp9_rd." 2014-07-02 21:33:44 -07:00
Dmitry Kovalev 362b53ecf7 Merge "Cleaning up and simplifying read_frame_stats()." 2014-07-02 15:56:50 -07:00
Alex Converse 15123db753 Cleanup vp9_rd.
Change-Id: I39a37335ba5b3a969d328afb1f425ddb2cf7ddda
2014-07-02 15:54:36 -07:00
Alex Converse 03c276ea17 Split vp9_rdopt into vp9_rdopt and vp9_rd.
vp9_rdopt is for making rd optimal mode decisions. vp9_rd is for all
other rd related routines. Anything used outside of making an rd optimal
decision belongs in rd.

Change-Id: I772a3073f7588bdf139f551fb9810b6864d8e64b
2014-07-02 15:33:33 -07:00
Dmitry Kovalev 4635a2ba11 Cleaning up and simplifying read_frame_stats().
Change-Id: I262ecac02d376de83097bb40f744f5584e987603
2014-07-02 13:52:50 -07:00
Yunqing Wang ee5d0335ca Merge "Fix rd threshold overflow issue" 2014-07-02 13:06:41 -07:00
Tim Kopp 6c0a2692e4 Merge "VP9 denoiser implemented FILTER_BLOCK case" 2014-07-02 12:48:28 -07:00
Tim Kopp 3302147f93 Merge "VP9 denoising enabled by noise_sensitivity param" 2014-07-02 12:45:34 -07:00
Yunqing Wang 3bc1193201 Fix rd threshold overflow issue
Moved the threshold adjustment before reference flag checking,
which could set the threshold to INT_MAX for disabled reference
frame, and cause overflow if the adjustment is done after that.

Change-Id: I85e94f8726d5e3ae93f65965aa978721dddc9957
2014-07-02 12:16:27 -07:00
Tim Kopp 1e511a539c Merge "Replaced loops with vpx_memcpy()" 2014-07-02 11:35:32 -07:00
Tim Kopp 03a3ba4a0d VP9 denoiser implemented FILTER_BLOCK case
Renamed updating_running_avg() to filter(). Extended function with the rest of
the filter procedure. Made all of the empirically-determined constants used in
VP8 into functions so they can be tweaked more easily.

Change-Id: I41730c8c92370c76885950a43742347477ca4e7e
2014-07-02 11:23:29 -07:00
Tim Kopp 9c9922df97 VP9 denoising enabled by noise_sensitivity param
As in VP8.

Currently, this parameter is set with the VP8E_SET_NOISE_SENSITIVITY flag.
The flag was not renamed so that we don't break the interface for webrtc. This
should probably be changed at some point in the future.

Change-Id: Ic73fcb0dde9d1d019e9d042050b617333ac65472
2014-07-02 11:20:35 -07:00
Tim Kopp 49741fee9f Replaced loops with vpx_memcpy()
Change-Id: Icbe05657f0e92c3838e6a5a975f4f82d21328a2e
2014-07-02 10:36:25 -07:00
Yaowu Xu 6c417077be Merge "Added a speed feature controlling a motion search parameter" 2014-07-02 10:31:51 -07:00
Paul Wilkins 8830772370 Multi-arf: Add code to turn it on and off.
Add test code to turn multi-arf on and off depending
on group length and zero motion.

Changes to active max group length for mult-arf.

Fund second arf only from normal frame bits.

Change-Id: I920287fac1c886428c15a39f731a25d07c2b796c
2014-07-02 17:53:23 +01:00
Paul Wilkins 579c7bcca5 Merge "Adapt strength of AQ2." 2014-07-02 09:49:34 -07:00
Yaowu Xu 92a6db7928 Added a speed feature controlling a motion search parameter
This commit added a speed feature to control the step_param used in
full pixel motion search. The intention is to reduced the search
steps for high speed real time coding.

Change-Id: I21d2f0105c2b647783a6688615da7fcf2b6d670b
2014-07-02 09:30:43 -07:00
Pengchong Jin 2c04e85d06 Merge "Store/read 16x16 block statistics obtained from the first pass" 2014-07-02 08:36:22 -07:00
Paul Wilkins adf4293e4e Adapt strength of AQ2.
Adapt the use of segmentation in AQ mode 2 based on
the ambient kf/arf/gf Q.

Disable segmentation where the rate per SB is very
low and overheads are likely to outweigh the benefits.

This patch reduces the -ve average metrics impact
of AQ mode 2 while allowing stronger 3 segment AQ
in some cases. Average improvement ~0.5-1.0%.

Change-Id: I5892dfcc7507c5cc6444531cc7fe17554cf8d0c7
2014-07-02 16:34:26 +01:00
Deb Mukherjee 82dc1332af Adds support for reading and writing 10/12-bit y4m
The y4m extension used is the same as the one used in ffmpeg/x264.
The patch is adapted from the highbitdepth branch.

Also adds unit tests for y4m header parsing and md5 check
of the raw frame data, as well as y4m writing.

Change-Id: Ie2794daf6dbafd2f128464f9b9da520fc54c0dd6
2014-07-02 05:41:14 -07:00
Tim Kopp 08cb2b0211 Merge "VP9 denoiser used s/int/enum where appropriate" 2014-07-01 23:03:24 -07:00
Tim Kopp 73799aa3f7 Merge "Denoised output is now grayscale" 2014-07-01 23:03:07 -07:00
James Zern 8aafd34050 Merge changes I875ac5a7,I2b13369d,I9ceb47a9
* changes:
  update vp9_thread.[hc]
  vp9_thread_test: remove unnecessary c_str()'s
  vp9_thread_test: factorize decode loop
2014-07-01 20:46:53 -07:00
Yaowu Xu 82fd084b35 Merge "Re-design quantization process" 2014-07-01 19:04:01 -07:00
Jingning Han 9ac2f66320 Re-design quantization process
This commit re-designs the quantization process for transform
coefficient blocks of size 4x4 to 16x16. It improves compression
performance for speed 7 by 3.85%. The SSSE3 version for the
new quantization process is included.

The average runtime of the 8x8 block quantization is reduced
from 285 cycles -> 255 cycles, i.e., over 10% faster.

Change-Id: I61278aa02efc70599b962d3314671db5b0446a50
2014-07-01 17:00:07 -07:00
Alex Converse 0256a75950 Allow lossless skipping in RD mode decision.
Change-Id: I2fc4ecfc2dd3ff1dd241a68c9ed4c280291b41f2
2014-07-01 16:57:21 -07:00
Jim Bankoski 56dbf1ca6c Merge "validate uv block size when reading partition" 2014-07-01 16:48:45 -07:00
Pengchong Jin aaabbd67b2 Store/read 16x16 block statistics obtained from the first pass
Add a conditional compile flag for this feature. Also add a
switch to enable the encoder to use these statistics in the
second pass. Currently, the switch is turned off.

Change-Id: Ia1c858c35ec90e36f19f5cffe156b97ddaa04922
2014-07-01 16:47:17 -07:00
Yunqing Wang f31ff029df Elevate NEWMV mode checking threshold in real time
The current threshold is knid of low, and in many cases NEWMV
mode is checked but not picked as the best mode. This patch
added a speed feature to increase NEWMV threshold, so that
less partition mode checking goes to check NEWMV. This feature
is enabled for speed 6 and 7.

Rtc set borg tests showed:
1. Speed 6, overall psnr: -0.088%, ssim: -1.339%;
   Average speedup on rtc set is 11.1%.
2. Speed 7, overall psnr: -0.505%, ssim: -2.320%
   Average speedup on rtc set is 12.9%.

Change-Id: I953b849eeb6e0d5a1f13eacba30c14204472c5be
2014-07-01 14:50:39 -07:00
Tim Kopp 1a66dab93a VP9 denoiser used s/int/enum where appropriate
Change-Id: Id52a7869fd1f31bb060de170e3295da7435adb9e
2014-07-01 14:07:40 -07:00
Tim Kopp 2f71de77f0 Denoised output is now grayscale
Grayscale is conditionally compiled.

Change-Id: I482ab237560d0bae8d397fd9999e78d38104f2a1
2014-07-01 14:07:40 -07:00
Dmitry Kovalev 19cbf54143 Merge "Fix visual studio build issue" 2014-07-01 10:30:39 -07:00
Jim Bankoski abf0df08f1 validate uv block size when reading partition
Change-Id: I74fc5f1a7bab3128cdd49441b83ec3a25aee65ca
2014-07-01 10:26:26 -07:00
Yunqing Wang 9ba1d60bd1 Fix visual studio build issue
Fixed the signed/unsigned mismatch.

Change-Id: Id83d603b8f1745b71f4cf695a0751e55518b1316
2014-07-01 08:58:05 -07:00
James Zern e656f44c24 update vp9_thread.[hc]
pull the latest from WebP, which adds a worker interface abstraction
allowing an application to override init/reset/sync/launch/execute/end

this has the side effect of removing a harmless, but annoying, TSan
warning.

Original source:
 http://git.chromium.org/webm/libwebp.git
  100644 blob 08ad4e1fecba302bf1247645e84a7d2779956bc3 src/utils/thread.c
  100644 blob 7bd451b124ae3b81596abfbcc823e3cb129d3a38 src/utils/thread.h

Local modifications:
 - s/WebP/VP9/g
 - camelcase functions -> lower with _'s
 - associate '*' with the variable, not the type

Change-Id: I875ac5a74ed873cbcb19a3a100b5e0ca6fcd9aed
2014-07-01 00:39:10 -07:00
James Zern 968291f556 Merge "Revert "Fix a bug in VP9Worker which leads to unit test hang."" 2014-06-30 17:50:45 -07:00
Alex Converse 6c54dbcb69 Merge "BITSTREAM: Handle transform size and motion vectors more logically for non-420." 2014-06-30 17:44:01 -07:00
hkuang 1480ba6f0a Revert "Fix a bug in VP9Worker which leads to unit test hang."
The caller should reset the state instead of letting worker
to reset.

This reverts commit 34b2ce15f9.

Change-Id: Idb546ea6386cffc44e98dee772900d21ab79710f
2014-06-30 17:02:26 -07:00
Yunqing Wang 4bb4c2291b Merge "Encode_breakout code refactoring" 2014-06-30 16:05:25 -07:00
Yaowu Xu 370618ffb4 Merge "change to not force interp_type as SWITCHABLE" 2014-06-30 15:44:08 -07:00
Yaowu Xu 186bd4eb52 change to not force interp_type as SWITCHABLE
Encoder still uses SWITCHABLE as default via DEFAULT_INTERP_FILTER,
but does not override the default if it is not SWITCHABLE.

Change-Id: I3c0f6653bd228381a623a026c66599b0a87d01d5
2014-06-30 12:48:21 -07:00
Jingning Han 6643b8868d Merge "Remove unused set_mode_info function" 2014-06-30 12:20:30 -07:00
hkuang f8476424ee Merge "Fix a bug in VP9Worker which leads to unit test hang." 2014-06-30 11:32:11 -07:00
Yunqing Wang 3779ccaf98 Encode_breakout code refactoring
Moved the encode_breakout_test out of vp9_pick_inter_mode().

Change-Id: I6966d0293ae5210a5a28b0e8debacb24d1c0d2d4
2014-06-30 11:22:32 -07:00
Jingning Han 30ab37019c Remove unused set_mode_info function
When the frame is intra coded only, the encoder takes the RD
coding flow. Hence the function set_mode_info is not practically
in use. This commit removes it and the associated conditional
branches.

Change-Id: I1e42659ceb55b771ba712d1cdecacb446aa6460d
2014-06-30 10:59:04 -07:00
hkuang 34b2ce15f9 Fix a bug in VP9Worker which leads to unit test hang.
This fixes the hang in VP9/InvalidFileTest.ReturnCode/3
due to worker->had_error has not been reset after getting
error.

Change-Id: Ia3608225094758a2bd88f6ae4dd9dfd93bbaad27
2014-06-30 10:45:50 -07:00
Yunqing Wang dee5782f93 Enable encode breakout in real time
For real time speed 7, once encode breakout is on(i.e. encoding
setting --static-thresh=1), a proper encode breakout threshold
is set to speed up the encoder.

Set --static-thresh=1, RTC set borg test showed a slight overall
psnr loss of 0.162%, but ssim gain of 0.287%. The average speedup
on RTC set is 6%, and for some clips, the speedup can be 10+%.

Change-Id: Id522d9ce779ff7c699936d13d0c47083de4afb85
2014-06-30 10:41:12 -07:00
Yunqing Wang 9d41313e4b Decide the partitioning threshold from the variance histogram
Before encoding a frame, calculate and store each 16x16 block's
variance of source difference between last and current frame.
Find partitioning threshold T for the frame from its variance
histogram, and then use T to make partition decisions.

Comparing with fixed 16x16 partitioning, rtc set test showed an
overall psnr gain of 3.242%, and ssim gain of 3.751%. The best
psnr gain is 8.653%.

The overall encoding speed didn't change much. It got faster for
some clips(for example, 12% speedup for vidyo1), and a little
slower for others.

Also, a minor modification was made in datarate unit test.

Change-Id: Ie290743aa3814e83607b93831b667a2a49d0932c
2014-06-30 09:36:23 -07:00
Jim Bankoski a93c506034 Merge "initialize bit buffer structure to avoid warning error" 2014-06-30 09:14:23 -07:00
Tim Kopp 04d9720c63 Merge "Implemented motion compensation for VP9 denoiser" 2014-06-30 08:29:32 -07:00
Jim Bankoski 783107fd45 Merge "silence unused parm warning for worker thread in loop filter" 2014-06-30 08:08:53 -07:00
Jim Bankoski acc0fec3d1 Merge "remove unused parms from rd_pick_inter_mode_sb_seg_skip" 2014-06-30 08:08:41 -07:00
Jim Bankoski 7a8829f61a initialize bit buffer structure to avoid warning error
Change-Id: I38bb2801ad3f059d5e2eb6513eec92397c67abcd
2014-06-30 08:05:15 -07:00
Jim Bankoski 9aa4fad73c silence unused parm warning for worker thread in loop filter
Change-Id: Id51468f99f8970b8795ce2d254344f4b8d7817d0
2014-06-29 09:30:59 -07:00
Jim Bankoski a13bf65315 remove unused parms from rd_pick_inter_mode_sb_seg_skip
Change-Id: I7f989d197444d166133ad91eb23ac1033109f58d
2014-06-29 09:23:21 -07:00
James Zern 44472cde55 vp9: disable postproc buffer alloc when unnecessary
the buffer is only used in encoding and only when
CONFIG_INTERNAL_STATS or CONFIG_VP9_POSTPROC is enabled.
a future change should decouple this from the frame buffer allocation
and make it conditional based on runtime flags when the above config
options are enabled.
reduces decode heap usage by at least 12%

Change-Id: Id0b97620d4936afefa538d3aadf32106743d9caf
2014-06-27 20:59:56 -07:00
James Zern 715b8d3bef Merge "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:""" 2014-06-27 20:53:57 -07:00
James Zern 749e0c7b28 Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:""
This reverts commit b336356198.

This causes a hang in:
VP9/InvalidFileTest.ReturnCode/3

the change to test/user_priv_test.cc remains with a minor update

Change-Id: I4a8a272ca37ea329b0f413f0b1cd827a238bd9fd
2014-06-27 19:46:27 -07:00
Yaowu Xu 0e79906dc0 Merge "Allow encoder to set lpf level to 0" 2014-06-27 16:47:16 -07:00
Yaowu Xu 303aa7e42a Merge "Added a new speed 7 in rt mode" 2014-06-27 16:47:06 -07:00
Tim Kopp a5f49183da Merge "fix: Only do spatial SVC when there are > 1 layers" 2014-06-27 15:42:14 -07:00
Tim Kopp b0959b8195 Merge "VP9 denoiser: implemented update_frame_stats()" 2014-06-27 15:41:51 -07:00
Yaowu Xu d0cb273e04 Allow encoder to set lpf level to 0
As a way to speed-up rtc encoding at speed 7.

Change-Id: Ie36a010392cf7b741dc130df21a4e733622a75b7
2014-06-27 15:23:41 -07:00
Yaowu Xu 3f92b7b994 Added a new speed 7 in rt mode
To experiment with different speed/quality compromises.

Change-Id: Ia9d4b85243554d620498a327da37c356e752b07f
2014-06-27 13:29:09 -07:00
Jim Bankoski 52b63c238e Merge "Better validation of invalid files" 2014-06-27 11:05:21 -07:00
Alex Converse 3cac9f0a04 Merge "Use UV prediction when deciding to skip in for lossless." 2014-06-27 10:06:54 -07:00
Jim Bankoski 9f37d149c1 Better validation of invalid files
This patch checks that a decoder never tries to reference frame that's
outside the range of 2x to 1/16th the size of this frame.  Any attempt
to do so causes a failure.

Change-Id: I5c98fa7bb95ac4f29146f29dd92b62fe96164e4c
2014-06-27 10:03:15 -07:00
Tim Kopp 2826c1d259 Implemented motion compensation for VP9 denoiser
Change-Id: Iee21eb0ecc5a1fe2c56fb3df0cee0ead6d139ed1
2014-06-27 08:56:09 -07:00
Tim Kopp 0299a60334 fix: Only do spatial SVC when there are > 1 layers
Bug introduced in I930dced169c9d53f8044d2754a04332138347409. If
svc.number_temporal_layers == 1 and svc.number_spatial_layers == 1, the system
attempt to do spatial SVC. It no longer does that.

Change-Id: Ie6b130a72b1eea40c547c9a64447e40695f811c5
2014-06-27 08:56:09 -07:00
Tim Kopp 52462bf7a8 VP9 denoiser: implemented update_frame_stats()
Also added reset_frame_stats()

Change-Id: I8e6ca00dbd5fa85cd39485d81c9343c0ff207d6c
2014-06-27 08:56:09 -07:00
Paul Wilkins 1d5223c627 Multi-arf: Change ref buffer for primary arf.
For the primary arf in a group, if multiple arfs
are enabled and we were using arfs in the previous
group, then allow the second arf from the previous
group to be used as an additional reference.

Change-Id: Iaf41706a52f54ef21548026851cd77100d6aebda
2014-06-27 12:12:21 +01:00
Jingning Han 5a3e3c6d3f Adaptive txfm size selection depending on residual sse/variance
This commit enables an adaptive transform size selection method
for speed -6. It uses largest transform size when the sse is more
than 4 times of variance, i.e., most energy is compacted in the
DC coefficient. Otherwise, use the default TX_8X8. It improves
the compression efficiency for rtc set of speed -6 by 0.8%, no
speed change observed.

Change-Id: Ie6ed1e728ff7bf88ebe940a60811361cdd19969c
2014-06-26 16:00:42 -07:00
Pengchong Jin 73eeb3beff Merge "Skip the partition search for the frame with no motion" 2014-06-26 14:36:10 -07:00
Alex Converse aed5271876 Use UV prediction when deciding to skip in for lossless.
Change-Id: Ic149749157d762039446d14472d40d9211c6451a
2014-06-26 14:34:56 -07:00
Pengchong Jin 1286126073 Skip the partition search for the frame with no motion
This patch allows the encoder to skip the partition search for the
frame if it is an inter frame and only zero motion vectors have
been detected in the first pass. The partition size is directly
assigned according to the difference variance.

Borg tests show overall little performance changes in term of PSNR
(derf -0.027%, yt 0.152%, hd 0.078%, stdhd 0%). The worst case of
PSNR loss is -0.514% from yt. The best PSNR gain is 4.293% from yt.
The second pass encoding speedup for slideshow clips is 15%-40%.

Change-Id: I881f347d286553ee5594a9ea09ba1a61ac684045
2014-06-26 12:10:34 -07:00
Jingning Han e15f6bc19c Merge "Add const mark to const values in non-RD coding mode" 2014-06-26 11:00:34 -07:00
Jingning Han 56afb9c41a Merge "Enable real-time version reference motion vector search" 2014-06-26 11:00:25 -07:00
Jingning Han 46ea9ec719 Enable real-time version reference motion vector search
This commit enables a fast reference motion vector search scheme.
It checks the nearest top and left neighboring blocks to decide the
most probable predicted motion vector. If it finds the two have
the same motion vectors, it then skip finding exterior range for
the second most probable motion vector, and correspondingly skips
the check for NEARMV.

The runtime of speed -5 goes down
pedestrian at 1080p 29377 ms -> 27783 ms
vidyo at 720p       11830 ms -> 10990 ms
i.e., 6%-8% speed-up.

For rtc set, the compression performance
goes down by about -1.3% for both speed -5 and -6.

Change-Id: I2a7794fa99734f739f8b30519ad4dfd511ab91a5
2014-06-26 09:49:13 -07:00
Jingning Han 99e25ec469 Add const mark to const values in non-RD coding mode
Change-Id: I65209fd1e06fc06833f6647cb028b414391a7017
2014-06-26 09:42:03 -07:00
Paul Wilkins 46218c9cb9 Merge "Fix quality regression for multi arf off case." 2014-06-26 09:41:40 -07:00
Jingning Han e84e868570 Merge "Make non-RD intra mode search txfm size dependent" 2014-06-26 09:10:07 -07:00
Paul Wilkins 1c27e1f127 Fix quality regression for multi arf off case.
Bug introduced during multiple iterations on: I3831*

gf_group->arf_update_idx[] cannot currently be used
to select the arf buffer index if buffer flipping on overlays
is enabled (still currently the case when multi arf OFF).

Change-Id: I4ce9ea08f1dd03ac3ad8b3e27375a91ee1d964dc
2014-06-26 09:59:53 +01:00
Paul Wilkins 601be5a29e Merge "Dual arf: Name changes." 2014-06-26 01:55:00 -07:00
Jingning Han 2aa50eafb2 Make non-RD intra mode search txfm size dependent
This commit fixes the potential issue in the non-RD mode decision
flow that only checks part of the block to estimate the cost. It
was due to the use of fixed transform size, in replacing the
largest transform block size. This commit enables per transform
block cost estimation of the intra prediction mode in the non-RD
mode decision.

Change-Id: I14ff92065e193e3e731c2bbf7ec89db676f1e132
2014-06-25 18:52:18 -07:00
James Zern ce7199075e Merge changes I915beaef,I229dd6ca
* changes:
  vp9cx.mk: move avx c files outside of x86inc block
  test.mk: remove renamed file
2014-06-25 14:26:18 -07:00
James Zern 75cb82d87a vp9cx.mk: move avx c files outside of x86inc block
same reasoning as:
9f3a0db vp9_rtcd: correct avx2 references

these are all intrinsics, so don't depend on x86inc.asm

Change-Id: I915beaef318a28f64bfa5469e5efe90e4af5b827
2014-06-25 12:20:46 -07:00
hkuang 36eeb1799d Merge "Revert "Revert 3 patches from Hangyu to get Chrome to build:"" 2014-06-25 11:42:08 -07:00
hkuang b336356198 Revert "Revert 3 patches from Hangyu to get Chrome to build:"
This patch reverts the previous revert from Jim and also add a
variable user_priv in the FrameWorker to save the user_priv
passed from the application. In the decoder_get_frame function,
the user_priv will be binded with the img. This change is needed
or it will fail the unit test added here:
https://gerrit.chromium.org/gerrit/#/c/70610/

This reverts commit 9be46e4565.

Change-Id: I376d9a12ee196faffdf3c792b59e6137c56132c1
2014-06-25 11:21:37 -07:00
Alex Converse bd1fc3402c Merge "Allow lossless breakout in non-rd mode decision." 2014-06-25 10:51:57 -07:00
Minghai Shang e319e4bfa6 Merge "[spatial svc]Don't skip motion search in first pass encoding" 2014-06-25 10:31:21 -07:00
Minghai Shang 0a103ae999 Merge "[spatial svc]Implement lag in frames for spatial svc" 2014-06-25 10:31:05 -07:00
Jingning Han 35bd31cd0a Merge "Replace cpi->common with preset variable cm" 2014-06-25 08:57:18 -07:00
Jingning Han 9f3f5c8bc4 Merge "Add vp9_ prefix to mv_pred and setup_pred_block functions" 2014-06-25 08:57:08 -07:00
Yunqing Wang bccc785f63 Merge "Reuse inter prediction result in real-time speed 6" 2014-06-25 08:18:33 -07:00
Paul Wilkins 9f76c1ec50 Dual arf: Name changes.
Cosmetic patch only in response to comments on
previous patches suggesting a couple of name changes
for consistency and clarity.

Change-Id: Ida3a359b0d5755345660d304a7697a3a3686b2a3
2014-06-25 10:37:02 +01:00
Paul Wilkins b8c382f8e7 Merge "Dual ARF changes: Buffer index selection." 2014-06-25 02:35:56 -07:00
Paul Wilkins 0f446165bc Merge "Adjust arf Q limits with multi-arf." 2014-06-25 02:35:45 -07:00
James Zern b2b07755e0 vp9: check tile column count
the max is 6. there are assumptions throughout the decode regarding
this; fixes a crash with a fuzzed bitstream

$ zzuf -s 5861 -r 0.01:0.05 -b 6- \
  < vp90-2-00-quantizer-00.webm.ivf \
  | dd of=invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.ivf \
    bs=1 count=81883

Change-Id: I6af41bb34252e88bc156a4c27c80d505d45f5642
2014-06-24 19:26:11 -07:00
Alex Converse 1409d1e1ff Allow lossless breakout in non-rd mode decision.
This is very helpful for large moving windows in screencasts.

Change-Id: I91b5f9acb133281ee85ccd8f843e6bae5cadefca
2014-06-24 16:44:35 -07:00
Jingning Han 9e55834426 Replace cpi->common with preset variable cm
This commit replaces a few use cases of cpi->common with preset
variable cm, to avoid unnecessary pointer fetch in the non-RD
coding mode.

Change-Id: I4038f1c1a47373b8fd7bc5d69af61346103702f6
2014-06-24 16:07:17 -07:00
Jingning Han 85cfae818b Add vp9_ prefix to mv_pred and setup_pred_block functions
Make these two functions accessible by both RD and non-RD coding
modes.

Change-Id: Iecb39dbf3d65436286ea3c7ffaa9920d0b3aff85
2014-06-24 16:06:21 -07:00
Minghai Shang 6bebe65118 [spatial svc]Don't skip motion search in first pass encoding
Change-Id: Ia6bcdaf5a5b80e68176f60d8d00e9b5cf3f9bfe3
2014-06-24 14:29:13 -07:00
Minghai Shang 277338f748 [spatial svc]Implement lag in frames for spatial svc
Change-Id: I930dced169c9d53f8044d2754a04332138347409
2014-06-24 14:01:17 -07:00
Yunqing Wang 0aae100076 Reuse inter prediction result in real-time speed 6
In real-time speed 6, no partition search is done. The inter
prediction results got from picking mode can be reused in the
following encoding process. A speed feature reuse_inter_pred_sby
is added to only enable the resue in speed 6.

This patch doesn't change encoding result. RTC set tests showed
that the encoding speed gain is 2% - 5%.

Change-Id: I3884780f64ef95dd8be10562926542528713b92c
2014-06-24 12:46:33 -07:00
Johann 58ac00e9ab Use the VP9 version of extend_borders
Change-Id: Ie16f12b4763a45465e130fb39cbb727c08529ac8
2014-06-24 12:27:08 -07:00
Adrian Grange 8357292a5a Fix test on maximum downscaling limits
There is a normative scaling range of (x1/2, x16)
for VP9. This patch fixes the maximum downscaling
tests that are applied in the convolve function.

The code used a maximum downscaling limit of x1/5
for historic reasons related to the scalable
coding work. Since the downsampling in this
application is non-normative it will revert to
using a separate non-normative scaler.

Change-Id: Ide80ed712cee82fe5cb3c55076ac428295a6019f
2014-06-24 10:26:09 -07:00
Tim Kopp 4efcf83833 Merge "Fixed VP9 denoiser COPY_BLOCK case" 2014-06-24 09:48:11 -07:00
Paul Wilkins 60244ec1f4 Dual ARF changes: Buffer index selection.
Add indirection to the section of buffer indices.
This is to help simplify things in the future if we
have other codec features that switch indices.

Limit the max GF interval for static sections to fit
the gf_group structures.

Change-Id: I38310daaf23fd906004c0e8ee3e99e15570f84cb
2014-06-24 16:30:44 +01:00
Paul Wilkins 11b34f1e19 Adjust arf Q limits with multi-arf.
Adjust enforced minimum arf Q deltas for non primary arfs
in the middle of an arf/gf group.

Change-Id: Ie8034ffb3ac00f887d74ae1586d4cac91d6cace2
2014-06-24 16:29:24 +01:00
Paul Wilkins 9aca602e07 Further dual arf changes: multi_arf_allowed.
Add multi_arf_allowed flag.
Re-initialize buffer indices every kf.
Add some const indicators.

Change-Id: If86c39153517c427182691d2d4d4b7e90594be71
2014-06-24 13:19:17 +01:00
Paul Wilkins 8160a26fa0 Fix some bugs in multi-arf
Fix some bugs relating to the use of buffers
in the overlay frames.

Fix bug where a mid sequence overlay was
propagating large partition and transform sizes into
the subsequent frame because of :-
  sf->last_partitioning_redo_frequency  > 1 and
  sf->tx_size_search_method == USE_LARGESTALL

Change-Id: Ibf9ef39a5a5150f8cbdd2c9275abb0316c67873a
2014-06-24 13:07:48 +01:00
Paul Wilkins 2611022504 Clean out old CONFIG_MULTIPLE_ARF code.
Remove the old experimental multi arf code that was under
the flag CONFIG_MULTIPLE_ARF.

Change-Id: Ib24865abc11691d6ac8cb0434ada1da674368a61
2014-06-24 13:00:19 +01:00
Paul Wilkins 2e430cba61 Experiment for mid group second arf.
This patch implements a mechanism for inserting a second
arf at the mid position of arf groups.

It is currently disabled by default using the flag multi_arf_enabled.

Results are currently down somewhat in initial testing if
multi-arf is enabled. Most of the loss is attributable to the
fact that code to preserve the previous golden frame
(in the arf buffer) in cases where we are coding an overlay
frame, is currently disabled in the multi-arf case.

Change-Id: I1d777318ca09f147db2e8c86d7315fe86168c865
2014-06-24 12:59:14 +01:00
Alex Converse 2518e33bec Merge "Switch active map implementation to segment based." 2014-06-23 18:25:51 -07:00
Alex Converse 20adfc5350 Merge "Fork vp9_rd_pick_inter_mode_sb_seg_skip" 2014-06-23 18:25:46 -07:00
Adrian Grange 8c1f071f1e Allocate buffers based on correct chroma format
The encoder currently allocates frame buffers before
it establishes what the chroma sub-sampling factor is,
always allocating based on the 4:4:4 format.

This patch detects the chroma format as early as
possible allowing the encoder to allocate buffers of
the correct size.

Future patches will change the encoder to allocate
frame buffers on demand to further reduce the memory
profile of the encoder and rationalize the buffer
management in the encoder and decoder.

Change-Id: Ifd41dd96e67d0011719ba40fada0bae74f3a0d57
2014-06-23 11:45:13 -07:00
Alex Converse 6118dcfe40 Merge "Actually skip blocks in skip segments in non-rd encoder." 2014-06-23 10:23:20 -07:00
Jingning Han 961bafc366 Merge "Remove unused vp9_init_quant_tables function" 2014-06-23 09:37:30 -07:00
Jim Bankoski 5aae059cdd Merge "error check vp9 superframe parsing" 2014-06-23 08:58:36 -07:00
Jim Bankoski c3db2d8bc8 error check vp9 superframe parsing
This patch insures that the last byte of a chunk that contains a
valid superframe marker byte,  actually has a proper superframe index.
If not it returns an error.

As part of doing that the file : vp90-2-15-fuzz-flicker.webm now fails
to decode properly and moves to the invalid file test from the test
vector suite.

Change-Id: I5f1da7eb37282ec0c6394df5c73251a2df9c1744
2014-06-23 07:04:57 -07:00
Jim Bankoski 9be46e4565 Revert 3 patches from Hangyu to get Chrome to build:
Avoids failures:
MSE_ClearKey/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKey/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKeyDecryptOnly/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKeyDecryptOnly_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
SRC_ExternalClearKey/EncryptedMediaTest.Playback_VP9Video_WebM/0
SRC_ExternalClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
SRC_ClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0

Patches are
This reverts commit 9bc040859b
This reverts commit 6f5aba069a
This reverts commit 9bc040859b

I1f250441	Revert "Refactor the vp9_get_frame code for frame parallel."
Ibfdddce5	Revert "Delay decreasing reference count in frame-parallel decoding."
I00ce6771	Revert "Introduce FrameWorker for decoding."

Need better testing in libvpx for these commits

Change-Id: Ifa1f279b0cabf4b47c051ec26018f9301c1e130e
2014-06-21 11:36:51 -07:00
Jim Bankoski 3431f575ed Merge "Fix bug in error handling that causes segfault" 2014-06-20 16:46:31 -07:00
Jim Bankoski e8dcadc22a Merge "fix peek_si to enable 1 byte show existing frames." 2014-06-20 16:28:07 -07:00
hkuang d213b0be09 Merge "Introduce FrameWorker for decoding." 2014-06-20 14:47:46 -07:00
hkuang 9bc040859b Introduce FrameWorker for decoding.
When decoding in serial mode, there will be only
one FrameWorker doing decoding. When decoding in
parallel mode, there will be several FrameWorkers
doing decoding in parallel.

Change-Id: If53fc5c49c7a0bf5e773f1ce7008b8a62fdae257
2014-06-20 14:46:45 -07:00
Jim Bankoski 88ba08818e Fix bug in error handling that causes segfault
See: https://code.google.com/p/chromium/issues/detail?id=362697

The code properly catches an invalid stream but seg faults instead of
returning an error due to a buffer not having been initialized. This
code fixes that.

Change-Id: I695595e742cb08807e1dfb2f00bc097b3eae3a9b
2014-06-20 14:44:50 -07:00
Alex Converse aeacaac574 Switch active map implementation to segment based.
Change-Id: Ibb841a1fa4d08d164cf5461246ec290f582b1f80
2014-06-20 13:13:23 -07:00
Alex Converse e8a4edf49e Fork vp9_rd_pick_inter_mode_sb_seg_skip
Change-Id: I549868725b789f0f4f89828005a65972c20df888
2014-06-20 13:13:18 -07:00
Alex Converse 173a86b2a2 Actually skip blocks in skip segments in non-rd encoder.
Copy split from macroblock to pick mode context so it doesn't get lost.

Change-Id: Ie37aa12558dbe65c4f8076cf808250fffb7f27a8
2014-06-20 11:49:02 -07:00
Johann 1fc2b0fd00 Merge "Include type defines" 2014-06-20 11:29:19 -07:00
Johann d658216276 Don't return value for void functions
Clears "warning: 'return' with a value, in function returning void"

Change-Id: I93972610d67e243ec772a1021d2fdfcfc689c8c2
2014-06-20 11:26:44 -07:00
Johann baef0b89da Include type defines
Clears error: unknown type name 'uint8_t'

Change-Id: I9b6eff66a5c69bc24aeaeb5ade29255a164ef0e2
2014-06-20 11:26:13 -07:00
Tim Kopp 6d2ebfabb1 Merge "VP9 denoiser bugfixes" 2014-06-20 10:37:46 -07:00
Jingning Han 48b8ce21f0 Merge "Allow key frame more flexibility in mode search" 2014-06-20 09:38:02 -07:00
Tim Kopp b79d5b62bd Fixed VP9 denoiser COPY_BLOCK case
Now copies the src to the correct location in the running average buffer.

Change-Id: I9c83c96dc7a97f42c8df16ab4a9f18b733181f34
2014-06-20 07:18:42 -07:00
Tim Kopp 31c03b31fe VP9 denoiser bugfixes
s/stdint.h/vpx\/vpx_int.h

Added missing 'break;'s

Also included other minor changes, mostly cosmetic.

Change-Id: I852bba3e85e794f1d4af854c45c16a23a787e6a3
2014-06-20 07:18:42 -07:00
Tim Kopp 7820abe53c Merge "Added CFLAG for outputting vp9 denoised signal" 2014-06-20 07:16:08 -07:00
Jim Bankoski 815485a2a8 fix peek_si to enable 1 byte show existing frames.
The test for this is in test vector code ( show existing frames will
fail ).  I can't check it in disabled as I'm changing the generic
test code to do this:

https://gerrit.chromium.org/gerrit/#/c/70569/


Change-Id: I5ab324f0cb7df06316a949af0f7fc089f4a3d466
2014-06-19 18:08:52 -07:00
Jingning Han c99a8fd7c8 Allow key frame more flexibility in mode search
This commit allows the key frame to search through more prediction
modes and more flexible block sizes. No speed change observed. The
coding performance for rtc set is improved by 1.7% for speed -5 and
3.0% for speed -6.

Change-Id: Ifd1bc28558017851b210b4004f2d80838938bcc5
2014-06-19 14:47:12 -07:00
Tim Kopp ab9755f3af Merge "Fixes in VP9 alloc, free, and COPY_FRAME case" 2014-06-19 12:43:00 -07:00
hkuang 625fbb3068 Merge "Add superframe support for frame parallel decoding." 2014-06-19 12:16:37 -07:00
Jingning Han b202e475e9 Merge "Separate rate-distortion modeling for DC and AC coefficients" 2014-06-19 11:47:55 -07:00
Tim Kopp 26955b2b6a Merge "Improved vp9 denoiser running avg update." 2014-06-19 11:22:50 -07:00
Tim Kopp 40d8a20106 Merge "Implemented COPY_BLOCK case for vp9 denoiser" 2014-06-19 11:02:46 -07:00
hkuang 1eb6e683f2 Add superframe support for frame parallel decoding.
A superframe is a bunch of frames that bundled as one frame. It is mostly
used to combine one or more non-displayable frames and one displayable frame.

For frame parallel decoding, libvpx decoder will only support decoding one
normal frame or a super frame with superframe index.

If an application pass a superframe without superframe index or a chunk
of displayable frames without superframe index to libvpx decoder, libvpx
will not decode it in frame parallel mode. But libvpx decoder still could
decode it in serial mode.

Change-Id: I04c9f2c828373d64e880a8c7bcade5307015ce35
2014-06-19 10:15:41 -07:00
Yunqing Wang 8297b4d7cd Merge "Modify non-rd intra mode checking" 2014-06-19 09:30:04 -07:00
Tim Kopp c9c4e13d09 Added CFLAG for outputting vp9 denoised signal
Change-Id: Iab9b4e11cad927f3282e486c203564e1a658f377
2014-06-19 08:41:36 -07:00
Tim Kopp b56f3af7db Fixes in VP9 alloc, free, and COPY_FRAME case
Change-Id: I1216f17e2206ef521fe219b6d72d8e41d1ba1147
2014-06-19 08:41:36 -07:00
Tim Kopp 0fec8f9712 Improved vp9 denoiser running avg update.
Change-Id: Ie0aa41fb7957755544321897b3bb2dd92f392027
2014-06-19 08:41:36 -07:00
Tim Kopp ff38807165 Implemented COPY_BLOCK case for vp9 denoiser
Change-Id: Ie89ad1e3aebbd474e1a0db69c1961b4d1ddcd33e
2014-06-19 08:41:36 -07:00
Tim Kopp 02d557ea72 Merge "Changed buf_2ds in vp9 denoiser to YV12 buffers" 2014-06-19 08:40:34 -07:00
Tim Kopp 1d4ca03205 Merge "Update running avg for VP9 denoiser" 2014-06-19 08:39:38 -07:00
Tim Kopp 1580a88c5d Merge "Implemented vp9_denoiser_{alloc,free}()" 2014-06-19 08:38:41 -07:00
Dmitry Kovalev 374b21b277 Merge "Removing decode_one_iter() function." 2014-06-18 16:42:29 -07:00
Tim Kopp 2614e56c58 Changed buf_2ds in vp9 denoiser to YV12 buffers
Changed alloc, free, and running average code as necessary.

Change-Id: Ifc4d9ccca462164214019963b3768a457791b9c1
2014-06-18 14:18:09 -07:00
Tim Kopp a4b7a713a4 Update running avg for VP9 denoiser
Change-Id: I9577d648542064052795bf5770428fbd5c276b7b
2014-06-18 14:18:09 -07:00
Tim Kopp 2a72067301 Implemented vp9_denoiser_{alloc,free}()
Change-Id: I79eba79f7c52eec19ef2356278597e06620d5e27
2014-06-18 14:18:09 -07:00
Adrian Grange 99d648b943 Merge "Improve vp9_rb_bytes_read" 2014-06-18 14:02:06 -07:00
Alex Converse 7557a65d16 BITSTREAM: Handle transform size and motion vectors more logically for non-420.
This breaks the profile 1 bitstream.

Don't force non420 uv transform size to 1/4 y size. In the 4:2:0 case the
chroma corresponding to a luma block is 1/4 its size. In the 4:4:4 case
chroma and luma planes are the same size. Disallowing larger transforms
can result in a loss of compression efficiency and is inconsistent.

For sub-8x8 blocks only average corresponding motion vectors.

4:2:0 and profile 0 behavior remains unchanged.

Change-Id: I560ae07183012c6734dd1860ea54ed6f62f3cae8
2014-06-18 13:07:51 -07:00
Jingning Han 3b9c19aaa7 Remove unused vp9_init_quant_tables function
This function is not effectively used, hence removed.

Change-Id: I2e8e48fa07c7518931690f3b04bae920cb360e49
2014-06-18 11:51:41 -07:00
Yunqing Wang 55834d42cc Modify non-rd intra mode checking
Speed 6 uses small tx size, namely 8x8. max_intra_bsize needs to
be modified accordingly to ensure valid intra mode checking.
Borg test on RTC set showed an overall PSNR gain of 0.335% in speed
-6.

This also changes speed -5 encoding by allowing DC_PRED checking
for block32x32. Borg test on RTC set showed a slight PSNR gain of
0.145%, and no noticeable speed change.

Change-Id: I1502978d8fbe265b3bb235db0f9c35ba0703cd45
2014-06-18 11:38:44 -07:00
Jingning Han 7c45dc98a8 Separate rate-distortion modeling for DC and AC coefficients
This is the first step to rework the rate-distortion modeling used
in rtc coding mode. The overall goal is to make the modeling
customized for the statistics encountered in the rtc coding.

This commit makes encoder to perform rate-distortion modeling for
DC and AC coefficients separately. No speed changes observed.
The coding performance for pedestrian_area_1080p is largely
improved:

speed -5, from 79558 b/f, 37.871 dB -> 79598 b/f, 38.600 dB
speed -6, from 79515 b/f, 37.822 dB -> 79544 b/f, 38.130 dB

Overall performance for rtc set at speed -6 is improved by 0.67%.

Change-Id: I9153444567e5f75ccdcaac043c2365992c005c0c
2014-06-18 10:50:38 -07:00
Adrian Grange dbd1184a5a Improve vp9_rb_bytes_read
Change-Id: I69eba120eb3d8ec43b5552451c8a9bd009390795
2014-06-18 08:31:45 -07:00
Dmitry Kovalev bf46feb379 Merge "Moving RD-opt related code from vp9_encoder.h to vp9_rdopt.h." 2014-06-17 14:20:17 -07:00
Pengchong Jin bed7cf2eeb Merge "skip the un-necessary motion search in the first pass" 2014-06-17 12:08:42 -07:00
Jingning Han 6cfb854eef Merge "Fix C versions of DC calculation functions" 2014-06-16 18:33:21 -07:00
James Zern 88df435d6b Merge "vp9_rtcd: correct avx2 references" 2014-06-16 17:39:13 -07:00
Dmitry Kovalev 3f3199e73a Merge "vp9_pickmode.c: fix vs12 compiler warnings" 2014-06-16 12:07:48 -07:00
Jingning Han d203203cc5 Merge "Fix out of boundary memory read in fuzz test on vpxdec" 2014-06-16 10:27:30 -07:00
Pengchong Jin cdc954fdc8 skip the un-necessary motion search in the first pass
This patch allows the VP9 encoder to skip the un-necessary
motion search in the first pass. It computes the motion error
of 0,0 motion using the last source frame as the reference,
and skips the further motion search if this error is small.

Borg test shows overall the patch gives PSNR gain (derf -0.001%,
yt 0.341%, hd 0.282%). Individual clips may have PSNR gain or
loss. The best PSNR performance is 7.347% and the worst is -0.662%.
The first pass encoding speedup for slideshow clips is over 30%.

Change-Id: I4cac4dbd911f277ee858e161f3ca652c771344fe
2014-06-16 10:16:27 -07:00
unknown 45648532bc vp9_pickmode.c: fix vs12 compiler warnings
Change-Id: I5042b76a7050c121bf960ecb20c79d35adcc4cd5
2014-06-15 12:47:48 -07:00
Jingning Han 6b0bc34b62 Fix C versions of DC calculation functions
This commit fixes the scaling factors used in the C versions of the
DC calculation functions.

Change-Id: Iab41108c2bb93c2f2e78667214f3a772a2b707b5
2014-06-13 16:09:40 -07:00
hkuang 40070a7d00 Merge "Delay decreasing reference count in frame-parallel decoding." 2014-06-13 15:28:24 -07:00
Yunqing Wang feaae409c8 Merge "Revert "skip un-neccessary motion search in the first pass"" 2014-06-13 15:21:26 -07:00
Dmitry Kovalev 3f8508eb61 Moving RD-opt related code from vp9_encoder.h to vp9_rdopt.h.
Change-Id: I8fab776c8801e19d3f5027ed55a6aa69eee951de
2014-06-13 12:34:40 -07:00
Dmitry Kovalev bcfbd2f948 Replacing RC_MODE with vpx_rc_mode.
Both enums are identical.
Change-Id: I06653f9c90a2d3a2dd5c741e75b17ee7d066a56f
2014-06-13 12:22:35 -07:00
Jingning Han 1ba1871786 Fix out of boundary memory read in fuzz test on vpxdec
This commit fixes frame header decoding for superframe index, to
prevent out of boundary memory read triggered by fuzz test
vector. It resolves a chromium security violation issue
crbug.com/376802.

The issue was introduced in the change:

Add VPXD_SET_DECRYPTOR support to the VP9 decoder.
cl-id I88f86c8ff9af34e0b6531028b691921b54c2fc48

where the buffer was read before validation check on index offset
applied.

A test vector is added accordingly.

Change-Id: I41c988e776bbdd1033312a668e03a3dbcf44ca99
2014-06-13 11:10:36 -07:00
Paul Wilkins af8d4054d6 Revert "skip un-neccessary motion search in the first pass"
This patch appears to have introduced non-determinism and/or
mismatch from debug vs release.

This reverts commit 5daef90efc.

Change-Id: I80081e55cfeaaa821b510b58a4e6e6328003c7da
2014-06-13 18:53:36 +01:00
hkuang e4c5f7e2b6 Delay decreasing reference count in frame-parallel decoding.
The current decoding scheme will decrease the reference count
of the output frame when finish decoding. Then the application
could copy the frame from the decoder buffer to application buffer.
In frame-parallel decoding, a decoded frame will not be outputted
until several frames later which depends on thread numbers. So
the decoded frame's reference count should be decreased only
after application finish copying the frame out. But due to the
limitation of vpx_codec_get_frame, decoder could not know when
application finish decoding. So use a index last_show_frame to
release the last output frame's reference count.

Change-Id: I403ee0d01148ac1182e5a2d87cf7dcc302b51e63
2014-06-13 10:53:33 -07:00
Johann 39e28f9f1a Merge "Use lrand48 on Android" 2014-06-13 10:51:49 -07:00
Tim Kopp 123cd3a52c Merge "Added skeleton for VP9 denoiser" 2014-06-13 09:44:39 -07:00
Paul Wilkins 3082565b8d Merge "Cleaning up accumulate_frame_motion_stats()." 2014-06-13 02:27:03 -07:00
Johann 79afb5eb41 Use lrand48 on Android
When building x86 assembly use lrand48 instead of the
undocumented inlined _rand function.

Android now supports rand()
https://android-review.googlesource.com/97731
but only for new versions. Original workaround:
https://gerrit.chromium.org/gerrit/15744

Change-Id: I130566837d5bfc9e54187ebe9807350d1a7dab2a
2014-06-12 19:57:25 -07:00
Dmitry Kovalev 7336903545 Merge "Adding MV_SPEED_FEATURES struct." 2014-06-12 17:15:33 -07:00
Tim Kopp ab8bfb077b Added skeleton for VP9 denoiser
Change-Id: Iccf6ede4c4f85646b0f8daec47050ce93e267c90
2014-06-12 15:12:22 -07:00
hkuang c32a3b8e25 Merge "Initially add frame_parallel_decode flag." 2014-06-12 15:01:38 -07:00
Dmitry Kovalev 48f0935b81 Merge "Removing unused ssim_weighted_pred_err field from FIRSTPASS_STATS." 2014-06-12 14:16:18 -07:00
Dmitry Kovalev 4ff1a614f1 Adding MV_SPEED_FEATURES struct.
Moving all motion vector related speed parameters from SPEED_FEATURES to
MV_SPEED_FEATURES.

Change-Id: I3e9af0039c7162f8671878c5920bce3cb256a84e
2014-06-12 14:15:27 -07:00
Dmitry Kovalev c90cd4d572 Merge "Moving full_pixel_search() to vp9_mcomp.c." 2014-06-12 14:12:45 -07:00
Dmitry Kovalev ab449cd9ba Merge "Adding is_altref_enabled() function." 2014-06-12 13:24:42 -07:00
Dmitry Kovalev f80a346e0e Merge "Replacing txfm_size with tx_size." 2014-06-12 13:07:11 -07:00
Dmitry Kovalev 442cbf565d Moving full_pixel_search() to vp9_mcomp.c.
Change-Id: I12389f801ebd3bd2ae3bf31e125433bfb429ee65
2014-06-12 13:06:37 -07:00
Dmitry Kovalev 86583b2bec Adding is_altref_enabled() function.
Change-Id: I54cdb4ce11590511e6f86bc2fd55771f1c18a20a
2014-06-12 12:13:20 -07:00
Jingning Han d5ae43318e Merge "Fast computation path for forward transform and quantization" 2014-06-12 11:59:52 -07:00
Dmitry Kovalev 4345d12d28 Replacing txfm_size with tx_size.
Change-Id: Ifa6374e9db5919322733b656e0865f5f19ee6f2c
2014-06-12 11:57:26 -07:00
Dmitry Kovalev eaeda536a4 Removing unused ssim_weighted_pred_err field from FIRSTPASS_STATS.
Change-Id: Ia8c7e3905ac21732cb6b8099eaf8df72c7e36b73
2014-06-12 11:28:54 -07:00
Jingning Han ccba289f8d Fast computation path for forward transform and quantization
This commit enables a fast path computational flow for forward
transformation. It checks the sse and variance of prediction
residuals and decides if the quantized coefficients are all
zero, dc only, or more. It then selects the corresponding coding
path in the forward transformation and quantization stage.

It is currently enabled in rtc coding mode. Will do it for rd
coding mode next.

In speed -6, the runtime for pedestrian_area 1080p at 1000 kbps
goes down from 14234 ms to 13704 ms, i.e., about 4% speed-up.
Overall coding performance for rtc set is changed by -0.18%.

Change-Id: I0452da1786d59bc8bcbe0a35fdae9f623d1d44e1
2014-06-12 11:10:54 -07:00
Alex Converse 893433be31 Merge "Fix SEG_LVL_SKIP in non-RD inter mode selection." 2014-06-12 10:38:06 -07:00
Alex Converse 130d9ade25 Merge "Fix SEG_LVL_SKIP in RD inter mode selection." 2014-06-12 10:37:20 -07:00
Yunqing Wang f9d1e66f6a Merge "skip un-neccessary motion search in the first pass" 2014-06-12 09:43:47 -07:00
Pengchong Jin 5daef90efc skip un-neccessary motion search in the first pass
This patch allows the encoder to skip the
un-neccessary motion search in the first pass. It
calculates the error of the zero motion vector using
the last source frame as reference and skips the
further motion search in the first pass if the error
is small.

The encoding speedup of the first pass for slideshow
videos is over 30%. Borg test shows the overall PSNR
performance remain approximately the same (derf -0.009,
hd 0.387, yt 0.021, stdhd 0.065). Individual clips may
have either PSNR gain or loss. The worst PSNR perfomance
is from yt set, with a PSNR loss of -1.1.

Change-Id: I08b2ab110b695e4689573b2567fa531b6457616e
2014-06-12 08:55:52 -07:00
Alex Converse 6c3f311ba2 Fix SEG_LVL_SKIP in non-RD inter mode selection.
Add a set_mode_info_seg_skip function that fills the requisite mode info.

Change-Id: I460b1b6845d720d9b09ed5b64df0ea0aac443f62
2014-06-11 17:53:26 -07:00
Alex Converse b0a8057f67 Fix SEG_LVL_SKIP in RD inter mode selection.
* Only use ZEROMV, disalowing the intra modes that were previously
  tested.
* Score rate and distortion as zero.

Change-Id: Ifcf99e272095725f11da1dcd26bd0f850683e680
2014-06-11 17:52:15 -07:00
hkuang 537cb06036 Initially add frame_parallel_decode flag.
Stub flag temporarily set to 0 until frame parallel
decoding implementations are finished.

Change-Id: I8ab768138e8f8f8eb809875703b2502ea0fe7cea
2014-06-11 17:29:29 -07:00
Dmitry Kovalev e6fadb5ba8 Merge "Cleaning up vp9_variance_mmx.c." 2014-06-10 17:27:12 -07:00
Dmitry Kovalev 4a8103d6c2 Merge "Removing two unused TX_SIZE_SEARCH_METHOD members." 2014-06-10 17:26:41 -07:00
James Zern 9f3a0dbb5e vp9_rtcd: correct avx2 references
s/"\$avx2_x86inc"/"avx2"/

avx2 code is all intrinsics and as a result doesn't rely on x86inc.asm

Change-Id: I76ad39474d8a00658f3e43131830ef0f4f34772a
2014-06-10 16:26:36 -07:00
James Zern cbce09ce62 Merge changes I6abc0657,I8224fba2,I04f64a45,I5d49d119,I76b4d171,I88c11ac3
* changes:
  vp9_sub_pixel_*variance*: disable avx2 variants
  vp9_sad*x4d: disable avx2 variants
  vp9_f(dct|ht): disable avx2 variants
  convolve: disable avx2 variants
  fdct8x8_test: add missing avx2 functions
  dct4x4_test: add missing avx2 functions
2014-06-10 16:14:45 -07:00
James Zern 520cb3f39f vp9_sub_pixel_*variance*: disable avx2 variants
tests failing under Win32/Win64

+ variance_test: add missing avx2 functions (partially disabled)

Change-Id: I6abc0657ea076379ab9ca65c12678b9ea199849d
2014-06-10 16:11:15 -07:00
James Zern d3ff009d84 vp9_sad*x4d: disable avx2 variants
tests failing under Win32/Win64

+ sad_test: add missing avx2 functions (disabled)

Change-Id: I8224fba2b270f6039ab1877d71e1e512f0081856
2014-06-10 16:10:12 -07:00
hkuang 5556d11841 Merge "Add mode info arrays and mode info index." 2014-06-10 14:27:31 -07:00
hkuang cdffeaaae0 Add mode info arrays and mode info index.
In non frame-parallel decoding, this works the same way as
current decoding scheme. Every time after decoder finish
decoding a frame, it will swap the current mode info pointer
and  previous mode info pointer if the decoded frame needs
to be shown. Both mode info pointer and previous mode info
pointer are from mode info arrays.

In frame-parallel decoding, this will become more complicated
as current frame's mode info pointer will be shared with next
frame as previous mode info pointer. But when one decoder
thread finishes decoding one frame and starts to work on next
available frame, it needs to retain the decoded frame's mode
info pointers until next frame finishes decoding. The mode info
index will serve this purpose. The decoder will use different
buffer in the mode info arrays and use the other buffer to save
previous decoded frame’s mode info.

Change-Id: If11d57d8eb0ee38c8876158e5482177fcb229428
2014-06-10 13:43:36 -07:00
Dmitry Kovalev bc93f425d0 Removing two unused TX_SIZE_SEARCH_METHOD members.
Change-Id: I33a38bb9f46e7ef509bbbf0cfd7bc3ea5072d022
2014-06-10 11:08:30 -07:00
Dmitry Kovalev 22368479c0 Merge "Removing chessboard_index from SPEED_FEATURES." 2014-06-10 10:53:53 -07:00
Dmitry Kovalev 9636601146 Merge "Removing unused motion_vector_context enum from vp9_encodeframe.c" 2014-06-10 10:53:25 -07:00
James Zern dd9f502933 vp9_f(dct|ht): disable avx2 variants
tests failing under Win32/Win64

+ dct16x16_test: add missing avx2 functions (partially disabled)

exercises the forward transforms
no idct/iht implementations, so the c-code is used

Change-Id: I04f64a457fa0828a00f32b5c9fe4f55294f21f61
2014-06-09 18:48:11 -07:00
James Zern 5704578f5f convolve: disable avx2 variants
tests failing under Win32/Win64

Change-Id: I5d49d11911bcda3a832b14efe5500d22597bedcf
2014-06-09 18:42:03 -07:00
Yunqing Wang 70eb862fd3 Merge "Use small transform size in non-rd real-time mode" 2014-06-09 13:07:24 -07:00
Dmitry Kovalev e0c6507229 Merge "Removing unused tt_activity_measure()." 2014-06-09 10:45:56 -07:00
Yunqing Wang b04d766800 Use small transform size in non-rd real-time mode
In non-rd real-time mode, choosing smaller transform size in
encoding gives better video quality and good speed gain than
choosing larger transform size. This patch set tx size search
method to ALLOW_8X8, which is better than using 4x4 or other
larger sizes.

Borg tests on rtc set at speed 6 showed significant gain on quality.
PSNR gain: 11.034% and SSIM gain: 15.466%.

The speed gain is 5% - 12% for <720p clips, and 2% - 7% for
720p clips.

Change-Id: If4dc74ed2df359346b059f47fb73b4a0193ec548
2014-06-09 08:26:50 -07:00
Adrian Grange 61c4295af8 Merge "Fix internal stats printing" 2014-06-09 07:13:20 -07:00
Adrian Grange b447b9d978 Merge "Revert "Removing this_frame_stats member from TWO_PASS struct."" 2014-06-06 14:03:52 -07:00
Adrian Grange a4f747921a Revert "Removing this_frame_stats member from TWO_PASS struct."
Use of stack frame variable "fps" beyond the lifetime of the function.

fps is sent as a paremeter to output_stats and stored in the
packet holding this encoded frame. This has scope beyond the
lifetime of the calling function.

This reverts commit 3f95a230c7

Change-Id: Icd8e14b3d7dd733590ada12e619b9dce95b6b0f5
2014-06-06 12:51:56 -07:00
Dmitry Kovalev 5f72de91a8 Merge "Adding encode_tiles() function." 2014-06-06 10:03:18 -07:00
Dmitry Kovalev 923c30a174 Removing chessboard_index from SPEED_FEATURES.
This is not a speed feature, adding inline function instead.

Change-Id: Ia48c41802eec9e92cf990339d724097279695c9a
2014-06-05 18:17:54 -07:00
Dmitry Kovalev 31403fd7d7 Adding encode_tiles() function.
Change-Id: Ib8187c8f2556e1e9268b0683cd2b6ff3489f0205
2014-06-05 18:03:40 -07:00
Deb Mukherjee e219622b80 Fixes qindex for first frame in 1-pass cq/q modes
Produces sane qindex for the first frame in 1-pass constant and
constrained qualirty modes.

Change-Id: Ib2a5091df15a23489e9bb5534a2019cf2689755e
2014-06-05 12:29:44 -07:00
Adrian Grange 323b85088d Fix internal stats printing
Change-Id: I61bd0b127164a591b1c983bfcebd64ba7617f796
2014-06-05 08:01:40 -07:00
Dmitry Kovalev 580d72d3ea Removing unused tt_activity_measure().
Change-Id: Ifcb46e6904730d14b9ef76b648b4d0dc3cd5d0c5
2014-06-04 17:11:30 -07:00
Dmitry Kovalev 8567739396 Removing unused motion_vector_context enum from vp9_encodeframe.c
The same enum defined and used in vp9_mvref_common.c.

Change-Id: I3975103997797add0a258d36c96d20ac9561a73d
2014-06-04 17:03:10 -07:00
Dmitry Kovalev b62ce36ea5 Removing unused alt_freq field from VP9EncoderConfig.
Change-Id: I9b683c8647a864e74073161f4aa6f2911b7825e3
2014-06-04 17:02:13 -07:00
Dmitry Kovalev 4a26b240bc Using 2 instead of 3 elements for avg_frame_qindex array.
The third array element was unused. 2 elements now: key- and interframe.

Change-Id: I5b8b9f5d889cc96a204cedfc432059293256298e
2014-06-03 19:45:13 -07:00
Jingning Han 0c4a4225ec Merge "Enable SSSE3 inverse 2D-DCT with 10 non-zero coeffs" 2014-06-03 16:51:39 -07:00
Dmitry Kovalev 3a1625614d Merge "Removing lossless field from VP9EncoderConfig." 2014-06-03 16:46:22 -07:00
Jingning Han a808dfe3f2 Merge "Fix potential overflow issue in SSSE3 forward 8x8 2D-DCT" 2014-06-03 16:43:49 -07:00
Jingning Han 540d910350 Fix potential overflow issue in SSSE3 forward 8x8 2D-DCT
The SSSE3 implementation might find a potential overflow issue in
its second 1-D transform, if all input residual pixels are close to
255. This commit fixes the issue and re-enables the unit test on
the SSSE3 version.

Change-Id: I0520478abdab7afd3ff2842516bec951111e9b3c
2014-06-03 14:21:47 -07:00
Dmitry Kovalev 1cdc238902 Adding buffer levels to RATE_CONTROL struct.
Change-Id: Ib35ff854378764dc3c6745844c67a33dee545663
2014-06-03 13:56:46 -07:00
Dmitry Kovalev bd0bb363bd Removing lossless field from VP9EncoderConfig.
Right now there is just one place to check: xd->lossless and for the first
pass there is a function is_lossless_requested().

Change-Id: I949a6834e64ce51e422e2892f097f2b871b5429a
2014-06-03 12:52:49 -07:00
Dmitry Kovalev 6cf3d68fe5 Cleaning up accumulate_frame_motion_stats().
Change-Id: I9986f3fd23c5e0677068af768eae0def3db9782f
2014-06-03 10:36:29 -07:00
Dmitry Kovalev 7106f709fc Merge "Cleaning up full_pixel_search()." 2014-06-03 10:22:35 -07:00
Dmitry Kovalev ebd4e47aa6 Merge "Moving first pass related functions to vp9_firstpasss.c." 2014-06-03 10:05:38 -07:00
Dmitry Kovalev 19c492a749 Merge "Reusing existing vp9_get{8x8, 16x16}var() instead of new ones." 2014-06-03 10:04:27 -07:00
Paul Wilkins 090d07984f Fix AQ mode 2 bug where delta causes Q 0.
In Aq mode 2 for kf/arf/gf the segment q delta
is calculated and then applied by re-quantization without
going through the rd loop again. If the base Q != 0
but the segment Q == 0 (lossless) this can could give rise
to a situation where we have an illegal combination of
transform size and Q. (Q == 0 requires that all blocks
are coded 4x4 WHT).

Change-Id: I241a58c6494ed442e9e4630070b0cde0fb99ae45
2014-06-03 13:31:32 +01:00
Deb Mukherjee 81c2fcccbc Merge "Remove Wextra warnings from vp9_sad.c" 2014-06-02 22:39:17 -07:00
Alex Converse 04a8980c65 Merge "Remove an attempt to handle SEG_LVL_SKIP sub8x8." 2014-06-02 18:50:40 -07:00
Deb Mukherjee fc88292ef2 Remove Wextra warnings from vp9_sad.c
As a side-effect, the sad unit tests for VP8 and VP9
had to be separated.

Fixes a bug in original patch:
(https://gerrit.chromium.org/gerrit/#/c/70163/8)
that was reverted due to a nightly test failure.

Change-Id: Ia2a4e9e278fd3c89d6c3c82fcc6381320ec2a8a6
2014-06-02 13:50:20 -07:00
Dmitry Kovalev f5628853d7 Fixing failed ARM build.
Change-Id: I3f74418f07c2dfdd7725a5b4a8ef5c5f4aca6289
2014-06-02 11:14:12 -07:00
Yaowu Xu f13c99562c Merge "seeing a 10x slowing down, revert now for investigation" 2014-06-02 09:02:32 -07:00
Yaowu Xu dbfc3692eb seeing a 10x slowing down, revert now for investigation
Revert "Fix a problem of using an uninitialized parameter"

This reverts commit 538af7db5f

Change-Id: I071aa9b7068ef515abb8ae9584df15067706ccb5
2014-06-02 09:02:19 -07:00
Frank Galligan c40a968e13 Merge "Revert "Remove Wextra warnings from vp9_sad.c"" 2014-06-01 16:58:11 -07:00
Frank Galligan 0b44988952 Revert "Remove Wextra warnings from vp9_sad.c"
This reverts commit 916550428d

Change-Id: I500822b03f09c64ff6ec5396c68edee9ca3b75cb
2014-06-01 16:20:26 -07:00
Dmitry Kovalev 5132e6da1a Merge "Converting disable_inter_mode_mask to inter_mode_mask." 2014-05-31 00:08:45 -07:00
Jingning Han ba6bed372b Merge "Fix a potential overflow issue in inverse 16x16 full 2D-DCT" 2014-05-30 15:52:53 -07:00
hkuang 6a0dcc1337 Merge "Refactor the vp9_get_frame code for frame parallel." 2014-05-30 13:38:36 -07:00
Yaowu Xu 2dc7f506d4 Merge "Fix a problem of using an uninitialized parameter" 2014-05-30 11:37:04 -07:00
Dmitry Kovalev 19b5200172 Merge "Removing unused ref_frame_mask local var." 2014-05-30 11:24:25 -07:00
hkuang 6f5aba069a Refactor the vp9_get_frame code for frame parallel.
In frame parallel decoding mode,  there will be still several frames inside
the decoder when application stop calling vpx_codec_decode to decode frames.
The application will need to keep calling vpx_codec_get_frame to get all the
remaining decoded frames in the decoder.

Change-Id: I2ce8260a91282f045bb9a6093ff8a606b1990f14
2014-05-30 10:37:00 -07:00
Yaowu Xu 538af7db5f Fix a problem of using an uninitialized parameter
This commit added a call to set speed feature before initializing
motion search, fixed the problem where unintialized search method
is used before its value being set.

Change-Id: I537e4612bf0d00fd6f51396fd222d4b3bd6fde58
2014-05-30 10:18:54 -07:00
Paul Wilkins d009c2360e Merge "Re-factor some duplicate code." 2014-05-30 06:14:06 -07:00
Dmitry Kovalev eccae1de19 Removing unused ref_frame_mask local var.
Change-Id: Ie11558c076a0161cc9608788e050b1b16e31c490
2014-05-29 15:03:02 -07:00
Dmitry Kovalev cf83983b9a Merge "Consistent names for intra mask flags." 2014-05-29 13:23:31 -07:00
Alex Converse d30b297c44 Merge "Don't update encoder skip count for SEG_LVL_SKIP." 2014-05-29 12:46:20 -07:00
Dmitry Kovalev 403719963e Converting disable_inter_mode_mask to inter_mode_mask.
Making this consistent with intra mode masks: you need to specify
allowed inter/intra modes to use.

Change-Id: Iaecd28bf79047259707d8e7a59a57bb7b856383e
2014-05-29 12:25:41 -07:00
Dmitry Kovalev 26bdf26ddc Consistent names for intra mask flags.
Change-Id: Ibdd5255d37200fb8a1d50f71a2a49c6089ae21e7
2014-05-29 12:11:02 -07:00
Alex Converse 2a89983999 Remove an attempt to handle SEG_LVL_SKIP sub8x8.
SEG_LEVEL_SKIP requires the block size to be at least 8x8. Attempting to
use it on smaller partitions causes the decoder to reject the bitstream.

Change-Id: Ia7188cdf8ae5ac1df6bd29f3f80dbb0610e1f7b1
2014-05-29 12:04:09 -07:00
Dmitry Kovalev 60866b030a Merge "Making speed checks consistent in set_rt_speed_feature()." 2014-05-29 11:58:42 -07:00
Jingning Han 2c1cdf69b6 Fix a potential overflow issue in inverse 16x16 full 2D-DCT
An overflow issue could potentially happen in the second round 1-D
transform of the SSSE3 full inverse 16x16 2D-DCT. This commit fixes
this issue.

Change-Id: Ia19e4888fda1cc929a28a5f89a5beec612d628dc
2014-05-29 11:46:32 -07:00
Alex Converse aaf3765606 Don't update encoder skip count for SEG_LVL_SKIP.
This aligns the encoder behavior with the decoder.

Change-Id: Ifa0840e4b07b19309e0bf1d1182498883249ec45
2014-05-29 11:24:03 -07:00
Dmitry Kovalev e14f900ae3 Merge "Moving itxm_add pointer from MACROBLOCKD to MACROBLOCK." 2014-05-29 11:16:39 -07:00
Dmitry Kovalev f7ff24cdd0 Reusing existing vp9_get{8x8, 16x16}var() instead of new ones.
Change-Id: I87b7c657d8813d7fb383ab519d150c0ffb1dd377
2014-05-29 11:14:06 -07:00
Dmitry Kovalev d262cda524 Making speed checks consistent in set_rt_speed_feature().
Change-Id: Id3d0a49836fe996b806707d29a8130acf9d7ea0e
2014-05-29 11:11:50 -07:00
Yaowu Xu 2e6040daca Merge "Fixing -Wextra warnings in vp9_{cx, dx}_iface.c." 2014-05-29 09:09:58 -07:00
Yaowu Xu d553cc10dc Merge "Fixed a crash windows build" 2014-05-29 08:16:19 -07:00
Yaowu Xu 43414f3f7b Fixed a crash windows build
Change-Id: I58baa1da1f3bfc8a6da454399139fe6a7473ff10
2014-05-28 15:50:50 -07:00
Dmitry Kovalev ac3d97f124 Cleaning up vp9_variance_mmx.c.
Change-Id: I42d83f91e272c92daed604c233f74439fe6307c5
2014-05-28 12:03:55 -07:00
Dmitry Kovalev 852fcbcc68 Fixing -Wextra warnings in vp9_{cx, dx}_iface.c.
Change-Id: I0abad32551dc534d3db27424c118e4b2f6b50f37
2014-05-28 11:15:43 -07:00
Dmitry Kovalev 39b9731876 Merge "Using 2 instead of 3 elements for last_q array." 2014-05-28 10:57:40 -07:00
Dmitry Kovalev 377950f111 Merge "Removing redundant vp9_zero() call." 2014-05-28 10:55:12 -07:00
Jingning Han 6d21cbd20b Enable SSSE3 inverse 2D-DCT with 10 non-zero coeffs
This commit enables SSSE3 implementation of the inverse 2D-DCT
with only first 10 coefficients non-zero. It reduces the runtime
of SSE2 version from 745 cycles to 538 cycles, i.e., 27% speed-up.

Change-Id: I18ba4128859b09c704a6ee361d69a86c09fe8dfe
2014-05-28 10:53:33 -07:00
Dmitry Kovalev 5023627cb4 Merge "Cleaning up vp9_variance_sse2.c." 2014-05-28 10:50:46 -07:00
Alex Converse f9501295c9 Merge "Always allow ZEROMV when SEG_LVL_SKIP is on." 2014-05-28 10:19:49 -07:00
Alex Converse 8a69cef042 Merge "Fix the all intra modes mask constant." 2014-05-28 10:19:18 -07:00
Paul Wilkins 15600eb8b8 Merge "Removing this_frame_stats member from TWO_PASS struct." 2014-05-28 08:07:50 -07:00
Paul Wilkins 39c91d84ed Re-factor some duplicate code.
Change-Id: I89a1dbea39c50c7633f746d9c93fec3a289f1b42
2014-05-28 14:15:45 +01:00
Paul Wilkins 8df1b869a2 Merge "Remove brightness weighting in two pass." 2014-05-28 02:04:29 -07:00
Deb Mukherjee 5c93c580f8 Removing undeclared identifier - build fix
Fixes build with --enable-internal-stats

Change-Id: I137169c859f561478e45891defe976d595454166
2014-05-27 23:24:06 -07:00
Dmitry Kovalev c7a2e746bf Cleaning up full_pixel_search().
Change-Id: Ie517ac06385133ffb3bbc449d9f23240f245976d
2014-05-27 19:00:53 -07:00
Dmitry Kovalev edccfcebb2 Using 2 instead of 3 elements for last_q array.
Change-Id: I2c6950e7d79fc89c6f97e6dcf47317ef66c453a5
2014-05-27 18:19:19 -07:00
Alex Converse 6fbbb33aaf Always allow ZEROMV when SEG_LVL_SKIP is on.
Change-Id: I6db1dc82f66438ac48f571d2f1a2ac7c39a97a1a
2014-05-27 18:17:17 -07:00
Alex Converse 75d77e36db Fix the all intra modes mask constant.
The new constant expands to 0x3fc00808.

Change-Id: Ib5109e4faf035fe0402b59f8a8d2e412628b9276
2014-05-27 18:17:17 -07:00
Dmitry Kovalev 0becfe42bb Merge "Removing ctrl_id parameter from vpx_codec_control_fn_t." 2014-05-27 17:35:38 -07:00
Dmitry Kovalev 3f95a230c7 Removing this_frame_stats member from TWO_PASS struct.
Change-Id: Id8877fad1f1e88b145e7c40c43174109b9c4f373
2014-05-27 17:09:28 -07:00
Jingning Han d5bcef5242 Merge "Fix compiling error in MSVS" 2014-05-27 16:58:00 -07:00
Dmitry Kovalev 8a8b662eaa Removing ctrl_id parameter from vpx_codec_control_fn_t.
Change-Id: I2b61c8c17ded1074dea92b4f6ad9be84d128b52a
2014-05-27 16:45:58 -07:00
Dmitry Kovalev df6f618079 Removing redundant vp9_zero() call.
rd.tx_select_threshes is cleared in encode_frame_internal().

Change-Id: Ie03776a41c585f13b392a9b62d4e91ef26ebeaf0
2014-05-27 16:24:01 -07:00
Jingning Han 239e68ddbf Fix compiling error in MSVS
Need to include math.h before tmmintrin.h in some versions of MSVS.

Change-Id: Ia6b83ae599316887ecf30c4e4b9e4355fb8a4219
2014-05-27 15:58:47 -07:00
Yaowu Xu 32228ac13a Merge "vp9_rdopt.c: Removed 2 unused parameters" 2014-05-27 15:52:50 -07:00
Dmitry Kovalev 1349e8634c Merge "Converting target_bandwidth to Bit/s at very beginning." 2014-05-27 15:02:21 -07:00
Yaowu Xu 4c9843cbef vp9_rdopt.c: Removed 2 unused parameters
Change-Id: I935ec0e78570ce3d3585f972350e39043eefa30a
2014-05-27 14:45:19 -07:00
Dmitry Kovalev a789bfec87 Cleaning up vp9_variance_sse2.c.
Change-Id: I5ec336848f6489c31cf2b645026fa2025db07466
2014-05-27 13:53:19 -07:00
Yunqing Wang 1f2200080b Revert "Making vp9_get_sse_sum_{8x8, 16x16} static."
This reverts commit e8bbb3d9db.

Change-Id: Ie368d36fd249d323d859d208609c711f04537bbc
2014-05-27 13:37:08 -07:00
Deb Mukherjee 444f93945b Merge "Remove Wextra warnings from vp9_sad.c" 2014-05-27 11:54:05 -07:00
Yunqing Wang a591ac9e5a Merge "Fix decoder mismatch in sub-pixel AVX2 intrinsic filters" 2014-05-27 10:52:16 -07:00
Dmitry Kovalev bf503e5236 Merge "Reusing rd_less_than_thresh() function." 2014-05-27 10:50:55 -07:00
Paul Wilkins f085d128f7 Remove brightness weighting in two pass.
This code dates from the ancient past and
applied an error score weighting based on pixel
brightness. This not seem to be providing any
benefit metrics wise and could be making some
visual issues in dark frames worse.

The field is left in place in the FIRSTPASS_STATS data
structure in this patch, pending changes to unit tests that
use a pre-defined first pass file.

Change-Id: Id50f04205230234858e7548ce523f11acaf3567d
2014-05-27 13:27:49 +01:00
Paul Wilkins debd048531 Merge "Further first pass allocation changes." 2014-05-25 14:48:36 -07:00
Paul Wilkins 620ce56154 Merge "Re-factor bit allocation in first pass." 2014-05-25 14:47:35 -07:00
Dmitry Kovalev 3fff4bd2df Converting target_bandwidth to Bit/s at very beginning.
Change-Id: I1d8c9fe4228e2f1ef67a66883694842a9545e7b9
2014-05-23 18:11:07 -07:00
levytamar82 773596050f Fix decoder mismatch in sub-pixel AVX2 intrinsic filters
The subpixel SSSE3 was fixed in this patch:
https://gerrit.chromium.org/gerrit/#/c/70283/
So the equivalent AVX2 is fixed accordingly.

Change-Id: Ieebbc1949c99d34b12b8b47692df71aca5001f3a
2014-05-23 16:48:40 -07:00
Jingning Han 59c3f446fe Merge "Inverse 16x16 2D-DCT SSSE3 implementation" 2014-05-23 16:01:22 -07:00
Jingning Han 48b0891370 Inverse 16x16 2D-DCT SSSE3 implementation
This commit enables the SSSE3 implementation of full inverse 16x16
2D-DCT. The unit runtime goes down from 1642 cycles to 1519 cycles,
about 7% speed-up.

Change-Id: I14d2fdf9da1fb4ed1e5db7ce24f77a1bfc8ea90d
2014-05-23 15:09:35 -07:00
Yunqing Wang 67ca5b586a Merge "Fix decoder mismatch in sub-pixel SSSE3 intrinsic filters" 2014-05-23 14:24:48 -07:00
Dmitry Kovalev d7d7cedaaa Merge "Removing vp9_pragmas.h." 2014-05-23 12:58:00 -07:00
Paul Wilkins 1edbaeb09d Further first pass allocation changes.
Further changes to first pass allocation for gf/arf groups.
Three variables removed from TWO_PASS structure as only
now used locally. Dont adjust gf_group_bits in the post
encode update as this will no longer have any effect.

Change-Id: Iff89b225db923fc856f5d2aedbc899f1d7d68b55
2014-05-23 20:21:25 +01:00
Yunqing Wang c5443fc881 Fix decoder mismatch in sub-pixel SSSE3 intrinsic filters
In 8-tap filtering, to guarantee the intermediate results fit in
16 bits, the order of accumulating the products needs to be done
correctly, and the largest product should be added last. This
patch fixed the problem using the method in commit "Correct ssse3
8/16-pixel wide sub-pixel filter calculation".

Change-Id: I79d0ad60c057b15011ece84cda9648eee0809423
2014-05-23 11:52:20 -07:00
Alex Converse 52b32ad025 Merge "Use offset mode info when filling pc tree." 2014-05-23 10:19:13 -07:00
Alex Converse 7c8479acea Merge "Always partition check after keyframe (rt speed 5)" 2014-05-23 10:19:03 -07:00
Paul Wilkins 03eb06212a Re-factor bit allocation in first pass.
Restructuring to allocate the bits for each frame in
a GF group at the time the group is defined.

At the moment the allocation closely mirrors what
we had before.

Also changes the default rate adjustment method to
LONG_TERM_VBR_CORRECTION.

Change-Id: Ie5793c46c6b9c888cead5d8790792efd7d60b7c1
2014-05-23 18:01:54 +01:00
Yaowu Xu 9410330893 Merge "change to use assembly version of ssse3 filter code" 2014-05-23 08:02:28 -07:00
Deb Mukherjee 916550428d Remove Wextra warnings from vp9_sad.c
As a side-effect, the sad unit tests for VP8 and VP9
had to be separated.

Change-Id: I068cc2391eed51e9b140ea6aba78338c5fec8d71
2014-05-22 22:21:16 -07:00