Commit Graph

8639 Commits

Author SHA1 Message Date
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
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
Scott LaVarnway
989c69303d Vidyo patch: Optimization for 1-to-2 downsampling and upsampling.
Change-Id: I9cc9780f506e025aea57485a9e21f0835faf173c
2016-02-04 14:50:26 -08:00
Zoe Liu
0f7dd40324 Define a macro to replace hardcoded values
The definition is for the number of frames to check to determine the
recent decay rate, further to determine the next key frame in the
first pass of the encoder.

Change-Id: Ic696d6eb518a86fa296842273cf8767ef0b0e27a
2016-02-04 05:33:22 -08:00
James Zern
497b6744ea Merge changes from topic 'dead-code'
* changes:
  yv12config.c: remove dead CONFIG_ALPHA code
  vp9_encoder.c: remove unused macro
  vpx_mem.c: remove unused macro
  vp9_svc_layercontext.c: relocate a macro definition
  vp9_encoder.c: protect SNPRINT* macros w/CONFIG check
  vp9_aq_360.c: remove some unused macros
  vp9_diamond_search_sad_avx.c: rename (un)likely macros
  vp9_resize.c: add missing include
  vp9_aq_complexity.c: remove unused macros
  vp9_detokenize.c: remove unused macros
2016-02-04 06:25:44 +00:00
Marco Paniconi
37c8f57318 Merge "vp9-skinmap. Some adjustments for model=1." 2016-02-03 23:34:07 +00:00
Marco
82148c02c1 vp9-skinmap. Some adjustments for model=1.
-use larger threshold on y (as in vp8).
-add distance threshold for each cluster
-use larger skin distance threshold for first cluster
-add some early exist checks.

Keep default setting to model=0.

Change-Id: I1044b99ade4bb1f215a860a019a4d84cee2f7715
2016-02-03 14:47:15 -08:00
Jingning Han
6f49e8a186 Merge "Use precise rate cost estimate for skip block mode" 2016-02-03 20:40:10 +00:00
Jingning Han
bcce658d31 Use precise rate cost estimate for skip block mode
It improves the compression performance of VP9 by 0.1% across all
test sets. No speed change is observed.

Change-Id: I59338c5c9e67bae22188f35fc3afbfe2a6bba6b0
2016-02-03 11:09:16 -08:00
Hui Su
2231d1063c Merge "Fix some interger overflow errors" 2016-02-03 18:12:26 +00:00
James Zern
fc110235ad vp9_encoder.c: remove unused macro
SHARP_FILTER_QTHRESH

unused since:
5373119 Merging in the Switchable interp experiment

Change-Id: I9ccc1883828babffd1886810b59aa16aca4766bf
2016-02-02 18:03:26 -08:00
James Zern
c9e057a9a0 vp9_svc_layercontext.c: relocate a macro definition
move SMALL_FRAME_FB_IDX closer to its first use. this is only used with
CONFIG_SPATIAL_SVC.

Change-Id: Ibf2b3e59a3aab2be2c3b3f89b4380ebe272e0ed6
2016-02-02 18:02:33 -08:00
James Zern
d6c66d4691 vp9_encoder.c: protect SNPRINT* macros w/CONFIG check
these are only used with CONFIG_INTERNAL_STATS

Change-Id: Ibbcefbdc1db79d93f75e5865289f9960a8c2358a
2016-02-02 18:02:32 -08:00
James Zern
d78ebb82f5 vp9_aq_360.c: remove some unused macros
ENERGY_MIN
ENERGY_MAX
ENERGY_SPAN
ENERGY_IN_BOUNDS

unused since first commit

Change-Id: I5507d36487aaee3e64f7a5fba582791ef9a533b0
2016-02-02 18:01:49 -08:00
James Zern
8647792975 vp9_diamond_search_sad_avx.c: rename (un)likely macros
avoid using '__' this is a reserved namespace for the compiler

Change-Id: I7d2be4dba2bdddc6f1010a16ad9e59a2e211b064
2016-02-02 18:01:49 -08:00
James Zern
8a515c16fd vp9_resize.c: add missing include
Change-Id: I429e3c80216102ed0a85ce348ecac0bf1e1e28eb
2016-02-02 18:01:49 -08:00
James Zern
59b560acef vp9_aq_complexity.c: remove unused macros
DEFAULT_COMPLEXITY
VAR_STRENGTH_STEP

unused since first commit

Change-Id: I4a47544098caf0d72e571633b7776146be88237c
2016-02-02 18:01:30 -08:00
James Zern
8ec0159159 vp9_detokenize.c: remove unused macros
LOW_VAL_CONTEXT_NODE
TWO_CONTEXT_NODE
THREE_CONTEXT_NODE
HIGH_LOW_CONTEXT_NODE
CAT_ONE_CONTEXT_NODE
CAT_THREEFOUR_CONTEXT_NODE
CAT_THREE_CONTEXT_NODE
CAT_FIVE_CONTEXT_NODE

unused since:
adaec4d Speeding up decode_coeffs().

Change-Id: Id07d2b0b76ff0ee6ef40d1b7a8e085e5e9e4aa8d
2016-02-02 18:00:46 -08:00
hui su
1c9b0918b3 Fix some interger overflow errors
Change-Id: I7e44bd952f28ce9925e8bdf6ee8ca2bb13de1b49
2016-02-02 17:32:15 -08:00
James Zern
dee831c484 Merge changes I4a365757,I14a3b328
* changes:
  vp10: remove unused (read|write)_uniform
  vp9_denoiser: mark total_adj_strong_thresh inline
2016-02-03 00:51:42 +00:00
Alex Converse
614f0727e4 Merge "Fix a signed overflow in vp9 motion cost." 2016-02-02 21:12:49 +00:00
Paul Wilkins
e062eb16fb Merge "Loop filter search resets on overlay frame." 2016-02-02 14:44:47 +00:00