Commit Graph

8659 Commits

Author SHA1 Message Date
Scott LaVarnway
6c0ce09029 VP9: remove x_mis, y_mis calculations
Passed as arguments instead.

Change-Id: I884a90baedf772692372e6e3520702c04a968f44
2016-02-19 05:28:00 -08:00
James Zern
b6b40d3015 Merge changes from topic 'vp9-missing-alloc-checks'
* changes:
  vp9_svc_layercontext: add missing alloc checks
  vp9_resize: add missing alloc checks
  vp9_encoder: add missing alloc checks
  vp9/decoder,resize_mv_buffer: add missing alloc check
  vp9_cyclic_refresh_alloc: correct cleanup on error
2016-02-18 18:53:13 +00:00
James Zern
4950dbceaf Merge changes from topic 'rm-loopfilter-count-param'
* changes:
  lpf_8_test: remove unneeded function wrapper
  remove loopfilter 'count' param TODOs
  split vpx_highbd_lpf_horizontal_16 in two
  split vpx_lpf_horizontal_16 in two
  vpx_highbd_lpf_horizontal_4: remove unused count param
  vpx_highbd_lpf_horizontal_8: remove unused count param
  vpx_highbd_lpf_vertical_4: remove unused count param
  vpx_highbd_lpf_vertical_8: remove unused count param
  vpx_lpf_horizontal_4: remove unused count param
  vpx_lpf_horizontal_8: remove unused count param
  vpx_lpf_vertical_4: remove unused count param
  vpx_lpf_vertical_8: remove unused count param
  lpf_8_test: add missing dspr2 tests
  lpf_8_test: add missing vpx_lpf_horizontal_4 tests
  lpf_8_test: add missing vpx_lpf_vertical_4 tests
  lpf_8_test: simplify function wrapper generation
2016-02-18 18:47:48 +00:00
James Zern
00a39d6e04 vp9_svc_layercontext: add missing alloc checks
Change-Id: Ieb305c178c64b3864f0e8fc1a13c29799e1ae8f5
2016-02-17 16:12:40 -08:00
James Zern
efbab73cc1 vp9_resize: add missing alloc checks
Change-Id: I87ef6dec7cd2e8f9a40135e5ca11b13520ebd6d7
2016-02-17 16:12:27 -08:00
Alex Converse
09f9c5d7f9 Better workaround for Bug 1089.
Don't initialize first pass costs for a number of symbols where first
pass probabilities aren't initialized.

This brings a 1.22x first pass speedup.

https://bugs.chromium.org/p/webm/issues/detail?id=1089

Change-Id: I97438c357bd88f52f5a15c697031cf0c3cc8f510
2016-02-17 14:46:26 -08:00
James Zern
1710f6507d vp9_encoder: add missing alloc checks
Change-Id: I08939ab22446b86fae884daaebd1f14c49b21897
2016-02-17 14:33:38 -08:00
James Zern
ac4aeb5714 vp9/decoder,resize_mv_buffer: add missing alloc check
Change-Id: I3bc92175b07d5ef495bd75128638c340f3c2238f
2016-02-17 12:38:40 -08:00
James Zern
7997c68ed4 vp9_cyclic_refresh_alloc: correct cleanup on error
previously only the CYCLIC_REFRESH allocation was being freed

Change-Id: I6e1783d077c5ca83c8d62ea9642f1fb03f2e5bf3
2016-02-17 12:36:49 -08:00
James Zern
110d377899 remove loopfilter 'count' param TODOs
Change-Id: I25ce7314372ce2f521526ea7864ffc4ab62e4519
2016-02-16 23:14:03 -08:00
James Zern
9b44d9d00f split vpx_highbd_lpf_horizontal_16 in two
replace with vpx_highbd_lpf_horizontal_edge_16 and
vpx_highbd_lpf_horizontal_edge_8 to avoid passing a count parameter

Change-Id: I551f8cec0fce57032cb2652584bb802e2248644d
2016-02-16 23:13:58 -08:00
James Zern
1b519fb666 split vpx_lpf_horizontal_16 in two
replace with vpx_lpf_horizontal_edge_16 and vpx_lpf_horizontal_edge_8 to
avoid passing a count parameter

Change-Id: I848c95c02a3c6ebaa6c2bdf0983dce05cd645271
2016-02-16 22:57:45 -08:00
James Zern
e7a23d703b vpx_highbd_lpf_horizontal_4: remove unused count param
Change-Id: I655a771e1b1a8753be5669ef9348a312ba6cfdbc
2016-02-16 22:57:45 -08:00
James Zern
5171857329 vpx_highbd_lpf_horizontal_8: remove unused count param
Change-Id: Iaca71ea3796115d4c2d43563b4e6f3914e21f1bf
2016-02-16 22:57:44 -08:00
James Zern
3c1019e49d vpx_highbd_lpf_vertical_4: remove unused count param
Change-Id: Ic6da723c5cf3cd8127db1f476c3e46ea134cb774
2016-02-16 22:57:44 -08:00
James Zern
72a9f06ac2 vpx_highbd_lpf_vertical_8: remove unused count param
Change-Id: Id16f7259897654831d31642c2d5e0bbe5e13416c
2016-02-16 22:57:44 -08:00
James Zern
b1e97c6a25 vpx_lpf_horizontal_4: remove unused count param
Change-Id: Iec7d8eda343991f7d7d46931dca17af23c821d11
2016-02-16 22:57:27 -08:00
James Zern
bd5a5bb561 vpx_lpf_horizontal_8: remove unused count param
Change-Id: I48741e167a7b09b7c9ad3bfc1c4b88ef1029ae46
2016-02-16 22:54:40 -08:00
James Zern
73f45fcf0b vp9,encoder: relocate setjmp
move to encoder_encode() as vp9_get_compressed_data() allocates data and
would require some modification to make its error return meaningful.

Change-Id: I8ddc390a1441afd0ff937842fa4ad1053c956133
2016-02-16 19:25:54 -08:00
James Zern
0b9925ccec vp9_cx_iface,encode: remove redundant cpi check
this is allocated in init(), a NULL pointer on encode() should be
treated as a failure.

Change-Id: I3f55ea4a98be616bb5ab74d95ce4a3d6262e734a
2016-02-16 18:10:01 -08:00
James Zern
109a47b342 vpx_lpf_vertical_4: remove unused count param
Change-Id: I43a191cb3d42e51e7bca266adfa11c6239a8064c
2016-02-16 14:59:00 -08:00
James Zern
37225744db vpx_lpf_vertical_8: remove unused count param
Change-Id: Ic69406da00afb0f06588e8c0deb2b043952b078c
2016-02-16 14:59:00 -08:00
Marco
89cc682528 vp9-real-time mode: Fix condition for allowing reference masking.
Add frame-level condition for reference masking: under external or
internal dynamic resize, allow for reference masking if none of
the references have been scaled.
Peviously, reference masking was turned off for the stream if dynamic
resize feature was enabled or an external resize event occurred.

reference_masking gives speed up with little/no loss in compression.
For speed 7 on rtc set: encoding time decreases by about 5-7%,
avgPSNR/SSIM goes down ~0.2%.

Change-Id: Ie4444577451ef954414d8fb4b2c99d65cadf1746
2016-02-16 13:10:27 -08:00
James Zern
548889c35a Merge "Fix tsan error in VP9 sub8x8 intra mode search" 2016-02-16 20:26:42 +00:00
Jingning Han
d642294b1c Fix tsan error in VP9 sub8x8 intra mode search
This commit fixes issue 1141. The issue was triggered in multi-tile
encoding. The change properly saves and restores the block context
information in the real-time mode selection process. It removes
several redundant memcpy operations in sub8x8 intra block mode search.

Change-Id: I35c9ad197f4bd500ec39b5fc833f052f19eee010
2016-02-16 11:24:09 -08:00
Marco Paniconi
0546636c74 Merge "vp9-resize: Fix an issue with external dynamic resize." 2016-02-16 16:18:43 +00:00
Marco
3cbc26f31b vp9-resize: Fix an issue with external dynamic resize.
External dynamic resize with swapping width and height was
not handled properly.
Fix is to re-init loop-filter under certain condtions.

Modify unittest to test this case.
Without this change test will fail.

Relates to: https://bugs.chromium.org/p/webm/issues/detail?id=1140

Change-Id: I7d81ca7fe0783b3bc103a52a7b7cf073a96be26e
2016-02-12 15:06:48 -08:00
James Zern
6c323e359a vp9_receive_raw_frame: add missing setjmp
allocations done within this function are protected with
vpx_internal_error; adding the setjmp fixes a crash in
vp9_lookahead_push() under low memory conditions.

Change-Id: I4b79dca37cc7fadc4b7633f0db44c0e406799bc6
2016-02-11 19:20:12 -08:00
Marco
34d12d1160 vp9-resize: Force reference masking off for external dynamic-resizing.
An issue exists with reference_masking in non-rd pickmode for spatial
scaling. It was kept off for internal dynamic resizing and svc, this
change is to keep it off also for external dynamic resizing.

Update to external resize test, and update TODO to re-enable this
at frame level when references have same scale as source.

Change-Id: If880a643572127def703ee5b2d16fd41bdbf256c
2016-02-11 08:35:57 -08:00
Scott LaVarnway
0ae42ee1bd VP9: Pass NULL scale_factors ptr when not scaling
to vp9_setup_pre_planes(), preventing the function
unscaled_value() from being called.  unscaled_value()
returns the same value that was passed in.  See
scaled_buffer_offset() in vp9_reconinter.h.

Change-Id: I2a6fbaf07972c2f212834929d29a2cbe72e399c3
2016-02-10 11:43:23 -08:00
Scott LaVarnway
ad08e0875b Merge "VP9: Refactor read_inter_block_mode_info() -- 2" 2016-02-10 12:59:41 +00:00
Alex Converse
0091fef7a2 Merge "Restore previous motion search bit-error scale." 2016-02-10 01:21:01 +00:00
Scott LaVarnway
2d040dd68c VP9: Refactor read_inter_block_mode_info() -- 2
Change-Id: I96d4764523b8d634eafb4cb3ed6eb3aee4052573
2016-02-09 15:36:01 -08:00
Alex Converse
fac947df77 Restore previous motion search bit-error scale.
The bit to error transformation got doubled as a result of going from
8-bit to 9-bit costs (change d13385c).

Use defines to derive the scale numbers and comment some of the fields.

derf: -0.023 BDRATE
hevcmr: +0.067 BDRATE
stdhd: +0.098 BDRATE
(These are substantially smaller than than the original gains from 8 to
9 bit costing.)

Change-Id: I6a2b3b029b2f1415e4f90a05709b2333ec0eea9b
2016-02-09 13:20:25 -08:00
Marco
f288c943c4 vp9-dynamic resize: Fix bug on releasing scaled reference.
When the codec frame size is the same as the reference frame size,
release the scaled reference before assigning it a new buf_idx.
Only affects 1 pass non-svc mode, where the scaled references are
release only under certain conditions (to prevent un-needed scaling
of the references every frame).

Modified a unittest that can trigger this bug without this change.

https://code.google.com/p/chromium/issues/detail?id=582598

Change-Id: I9a884e36ebd7608b1641ec2a469e20a4f829cf43
2016-02-09 11:10:28 -08:00
Marco
aff0a802e7 vp9-aq-mode=3: Reset cyclic refresh under config/external size change.
If the application changes frame size (external size changes),
and aq-mode=3 is on, reset the cyclic refresh.

Modify the TestExternalResize unittest (longer run with more resize
actions). Without this change an assert would be triggered on this
longer test.

Change-Id: I0eefd2cd7ffa0c557cca96ae30d607034a2599ce
2016-02-09 10:10:36 -08:00
Yaowu Xu
bb8eebc0e0 Merge "Set use_highbitdepth flag to either 1 or 0" 2016-02-09 16:57:28 +00:00
Scott LaVarnway
29e211886f Merge "BUG FIX: undefined reference to `vp9_scale_and_extend_frame_c'" 2016-02-09 14:52:04 +00:00
Yaowu Xu
5c327cb450 Set use_highbitdepth flag to either 1 or 0
This reduces the buffer allocation size for high bit depth buffers by
more than 70%.

Change-Id: Iab9007d9684e8ac30ce7fa94e61f038f01792fc5
2016-02-08 20:30:50 -08:00
Scott LaVarnway
0840c6fb8f BUG FIX: undefined reference to `vp9_scale_and_extend_frame_c'
See https://bugs.chromium.org/p/webm/issues/detail?id=1145

Change-Id: I778ee07dc39a524e3f729bef47a7abeed51e0cee
2016-02-08 13:42:56 -08:00
Marco
2a3f994723 vp9-denoiser: Allow for checking skin for bsize <=32x32.
Change-Id: I6c99ac6fd3735e24cf668479c55bff313c0b4970
2016-02-08 13:01:38 -08:00
Jingning Han
f032c7eaed Merge "Account for sub8x8 block skip mode cost in RD decision" 2016-02-08 19:40:01 +00:00
Jingning Han
203bdd20fb Account for sub8x8 block skip mode cost in RD decision
Make this consistent with regular block size rate-distortion
optimization. It improves the compression performance:
derf    0.055%
hevcmr  0.129%

Change-Id: I112fe734f592c21bc7aa6efb7e3f269c4214ee7b
2016-02-08 10:18:51 -08:00
Jingning Han
ac6d40ece8 Clean up in vp9_rd_pick_inter_mode_sb
Use local variable.

Change-Id: I0d3df36cf4536958a0cda422f6c30da50f0e0bbf
2016-02-08 10:15:02 -08:00
Marco
ae98a61e22 vp9-dynamic resize: On a resize trigger frame refresh alt_ref.
For 1 pass real-time mode. No change in behavior as only last
and golden are used as references in 1 pass real-time mode.

Change-Id: Ie4655014eee1a8b271542f29d74b2c6f7fed54c9
2016-02-05 16:32:49 -08:00
Alex Converse
def519efb3 Fix an uninitialized warning.
Change-Id: I3ac1070df2948f6d8637ade7192400be53a7675c
2016-02-05 12:06:38 -08:00
James Zern
f7b4364cbb vp9_aq_cyclicrefresh: fix unused-function warning
delete apply_cyclic_refresh_bitrate(). unused since:
3472cbb vp9 aq-mode=3: Keep it on even at low bitrates.

Change-Id: I0fac9a31b59504e31000ac3a8f0b68e8d4320113
2016-02-05 11:56:51 -08:00
Marco Paniconi
85dccb6944 Merge "vp9 aq-mode=3: Keep it on even at low bitrates." 2016-02-05 16:38:41 +00:00
James Zern
ecd32d6faa Merge "Vidyo patch: Optimization for 1-to-2 downsampling and upsampling." 2016-02-05 02:36:03 +00:00
Marco
3472cbbd88 vp9 aq-mode=3: Keep it on even at low bitrates.
Change-Id: I6a27db6b9dbe3d8cb3d47ef30fbd52557171cadd
2016-02-04 17:31:10 -08:00