Commit Graph

1568 Commits

Author SHA1 Message Date
Yaowu Xu
75b6cfe1c5 Prevent read to invalid RefBuffer
This commit adds check to validate RefBuffer before reading into the
data structure, to prevent invalid read.

BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=614701

Change-Id: Ie111e95bd18e88fa19d8b25e097cdf52b7139cb6
2016-05-25 09:28:36 -07:00
Yaowu Xu
489f8b2d88 Merge "Prevent invalid read" 2016-05-18 23:54:56 +00:00
Alex Converse
284be1c9e0 Merge "Move, rename, and inline high_inter_predictor." 2016-05-18 21:20:04 +00:00
Alex Converse
a5191f3e60 Move, rename, and inline high_inter_predictor.
The inlining mirrors what was done with the low bit depth
inter_predictor. And the new highbd_inter_predictor name is more
consistent with other high bit depth functions.

Change-Id: I96437f745759aeec6260c6e39a974bf36f1c211c
2016-05-18 09:39:49 -07:00
Yaowu Xu
4f0e4d6cef Prevent invalid read
This commit adds a check before reading into RefBuffer to prevent OOB
read.

BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=612023

Change-Id: I5b02951932e7f457cfbe6b2e650790496b8577ae
2016-05-18 07:40:49 -07:00
Scott LaVarnway
8b8e296019 Merge "VP9: _get_pred_context_switchable_interp()" 2016-05-18 12:42:54 +00:00
Scott LaVarnway
3036fd761a VP9: _get_pred_context_switchable_interp()
Remove unnecessary checks.

Change-Id: Ic7bce8277ac5f4ae88d4ab7d0ae3ab110b2f225b
2016-05-17 15:26:12 -07:00
Yaowu Xu
2240d83d78 Promote to uint32_t before left shift
This commit change to promote uint8_t explicitly to uint32_t before
left shift operation.

BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=612021

Change-Id: Id7059154efb5bdfa45889dabe72aaafd46d79f23
2016-05-17 11:39:57 -07:00
Scott LaVarnway
ef98a8f61f VP9: inline vp9_get_intra_inter_context()
Change-Id: I71366140799b9b39474b9b459082cdb250bd1905
2016-04-15 04:58:37 -07:00
Scott LaVarnway
ad47d1d194 Merge "VP9: Combine TileData with TileWorkerData" 2016-04-10 22:17:45 +00:00
Scott LaVarnway
7cb4ab56ea VP9: Combine TileData with TileWorkerData
Change-Id: I83536734a54ef7b85f90f56a51878d94fac7ff22
2016-04-07 11:44:27 -07:00
Scott LaVarnway
25920137ec VP9: refactor read_switchable_interp_filter()
Change-Id: I8f88b7ff21a0991297860c4a744a014629b0fa05
2016-04-06 04:53:43 -07:00
Scott LaVarnway
a2a97b869f VP9: Refactor vp9_decode_block_tokens()
Change-Id: I30ab27808ec903f9490f36621fb16c197bd35d16
2016-04-01 04:57:39 -07:00
Jean-Yves Avenard
6f51672c4e Properly propagate out of memory errors.
It would otherwise result in an infinite loop.

Change-Id: Ic03fb220cc048538bd62dee599653187f2093079
2016-03-28 14:14:49 -07:00
James Zern
79dc6c0393 Merge changes Id0a490bc,I1b4a0504
* changes:
  vp9/inverse_transform_block_inter: move eob check
  vp9/inverse_transform_block_intra: move eob check
2016-03-24 22:04:11 +00:00
Scott LaVarnway
82762e240c VP9: Eliminate extra mv clamp in decoder
The mv is clamped in dec_find_mv_refs() to a smaller region
than the clamp in dec_find_best_ref_mvs().  See clamp_mv_ref
and clamp_mv2.

Change-Id: I47dd5f7fa8b42f2cc593559b4d7c782fe7bcb1db
2016-03-24 04:04:37 +00:00
James Zern
c20c955e73 vp9/inverse_transform_block_inter: move eob check
1 level up. the function is a no-op for eob == 0 and shouldn't be called

Change-Id: Id0a490bcce78c2b2ec6ea24d942191eb9b2bc16e
2016-03-23 20:41:05 -07:00
James Zern
f64a30acef vp9/inverse_transform_block_intra: move eob check
1 level up. the function is a no-op for eob == 0 and shouldn't be called

Change-Id: I1b4a050424cf2d0ea820120c8e7c4fb3065e39e7
2016-03-23 20:24:17 -07:00
Scott LaVarnway
6ccf854061 Merge "VP9: rename vpx_read_mode_info to vp9_read_mode_info" 2016-02-22 13:45:27 +00:00
Scott LaVarnway
0499e06f2f VP9: rename vpx_read_mode_info to vp9_read_mode_info
Change-Id: I3cb3da864e33012ba68d61ee8bafa8c42f00313c
2016-02-19 05:34:12 -08:00
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
ac4aeb5714 vp9/decoder,resize_mv_buffer: add missing alloc check
Change-Id: I3bc92175b07d5ef495bd75128638c340f3c2238f
2016-02-17 12:38:40 -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
2d040dd68c VP9: Refactor read_inter_block_mode_info() -- 2
Change-Id: I96d4764523b8d634eafb4cb3ed6eb3aee4052573
2016-02-09 15:36:01 -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
Scott LaVarnway
0c60282786 Merge "VP9: Refactor read_inter_block_mode_info()" 2016-02-01 12:52:15 +00:00
Scott LaVarnway
d12f87cd07 VP9: Refactor read_inter_block_mode_info()
Change-Id: I8e6a1a1b6eec17d0076660b559f6fc120a78c538
2016-01-29 15:30:27 -08:00
Scott LaVarnway
7203100127 VP9: Refactor dec_build_inter_predictors_sb()
Change-Id: I336fe2006288214977b5ee854124ee7b5bba5796
2016-01-27 07:37:59 -08:00
Scott LaVarnway
5232326716 VP9: Eliminate MB_MODE_INFO
Change-Id: Ifa607dd2bb366ce09fa16dfcad3cc45a2440c185
2016-01-19 16:40:20 -08:00
Scott LaVarnway
de993a847f VP9: inline vp9_use_mv_hp()
Change-Id: Ib275bfc4c29c572d6c70e5ec6dbfc241590d3e3e
2016-01-13 08:02:05 -08:00
Scott LaVarnway
15939cb2d7 Merge "VP9: Eliminate unnecessary nearest/near searches" 2016-01-12 20:00:59 +00:00
Scott LaVarnway
d8aa40634a VP9: Eliminate unnecessary nearest/near searches
Prior to this patch, read_inter_block_mode_info() would
find the nearmv and nearestmv for all modes.  Now it does not
search for ZEROMV modes and breaks out early for NEARMV and
NEWMV modes.

Change-Id: Ifa7b1eaf58bb03b9c7792ea5012fef477527d0fd
2016-01-12 05:09:06 -08:00
Yaowu Xu
2bd4f44409 Assert no mv clamping for scaled references
Under --enable-better-hw-compabibility, this commit adds the asserts
that no mv clamping is applied for scaled references, so when built
with this configure option, decoder will assert if an input bitstream
triggger mv clamping for scaled reference frames.

Change-Id: I786e86a2bbbfb5bc2d2b706a31b0ffa8fe2eb0cb
2016-01-05 14:55:05 -08:00
Alex Converse
4b038ad2ef Merge "Deduplicate some high bit depth tables" 2015-11-24 18:24:32 +00:00
Scott LaVarnway
2c3b737af6 VP9: Only zero counts when !frame_parallel_decoding_mode (2)
The counts are never used when frame_parallel_decoding_mode
is set.

Change-Id: I293aa68abadcdd30973adacb9f5f5a3aecf8daa2
2015-11-23 14:42:15 -08:00
Zoe Liu
8a782c7eac Fixed a few sanity checks.
Change-Id: Ieec4a7be5945dc6de192e2d8292ab978baf47f53
(cherry picked from commit 2096296421)
2015-11-17 22:54:03 +00:00
James Zern
8f7bc45b5b Revert "VP9: Only zero counts when !frame_parallel_decoding_mode"
This reverts commit 380a5519cc.

This causes an assertion failure in debug_check_frame_counts() which
probably isn't valid with this change; leaving the investigation for
later now.

Change-Id: Ieda5ca811ed2fa50a0cc6935919a8d10dca996e0
2015-11-11 11:11:00 -08:00
Scott LaVarnway
380a5519cc VP9: Only zero counts when !frame_parallel_decoding_mode
The counts are never used when frame_parallel_decoding_mode
is set.

Change-Id: Ic7a566a048297f7373c9ffbb48929ea09eff674f
2015-11-09 10:14:13 -08:00
Alex Converse
246e0eaa71 Deduplicate some high bit depth tables
Change-Id: I6977f7d155cc1e81ae2393933893caac6770821f
2015-11-03 15:40:44 -08:00
James Zern
68ecfc1e62 vp9_decodeframe.h: add missing include
Change-Id: I8ef772a016a79cab88bee8e9739530aa030baaa9
2015-10-29 16:41:25 -07:00
Alex Converse
a736bf6bfb Shrink probability remap tables.
Saves 2288 bytes in vp8+vp9 libvpx.a.

Change-Id: Iaa5712e59a9693ed58cea63de63781a96827e44e
2015-10-27 12:08:23 -07:00
Yaowu Xu
568429512e Add a new enum type vpx_color_range_t
to make meaning of color_range obvious.

Change-Id: I303582e448b82b3203b497e27b22601cc718dfff
2015-10-16 16:27:18 -07:00
James Zern
ba7ea4456f tile_worker_hook: fix -Wclobbered warning
*tile should be marked volatile like the others due to the use of
setjmp()

Change-Id: I5dbf8e6792e4c0f34a683434b4fd06e3b4c75c4b
2015-10-10 11:17:08 -07:00
James Zern
50b20b90aa vp9/decode_tiles_mt: remove unnecessary local
reuse the common loop index

Change-Id: I9db45a93c219c2123917514cb8e9d4ea86454711
2015-10-07 17:46:13 -07:00
James Zern
0bd82af834 vp9/tile_worker_hook: pass pbi directly
reduces the size of TileWorkerData reusing the storage in the worker
itself

Change-Id: If8a62fcb35167037c3da5814ab84fb81893f9cab
2015-10-06 20:14:24 -07:00
James Zern
1f4a6c8a4e vp9/tile_worker_hook: add multiple tile decoding
this reduces the number of synchronizations in decode_tiles_mt() and
improves overall performance when the number of threads is less than the
number of tiles

Change-Id: Iaee6082673dc187ffe0e3d91a701d1e470c62924
2015-10-06 20:13:54 -07:00
Scott LaVarnway
2f8625d824 VP9: remove plane_type from macroblockd_plane
Change-Id: Ia5072a3a92212d8565f33359f6c146469bdfbbec
2015-09-30 15:15:11 -07:00
Scott LaVarnway
66de2b710f Merge "VP9: move loopfilter build masks to decode loop" 2015-09-29 21:40:48 +00:00
Scott LaVarnway
7718117104 VP9: move loopfilter build masks to decode loop
The loopfilter masks are now built in the decode loop.
This is done so we can eventually reduce the number of
MODE_INFO structs required by the decoder.

The encoder builds the masks for the entire frame prior
to calling the loopfilter.

Change-Id: Ia2146b07e0acb8c50203e586dfae0c4c5b316f11
2015-09-29 05:20:49 -07:00
Ronald S. Bultje
812945a8f1 vp9/10: improve support for render_width/height.
In the decoder, map this to the output variable vpx_image_t.r_w/h.
This is intended as an improved version of VP9D_GET_DISPLAY_SIZE,
which doesn't work with parallel frame decoding. In the encoder,
map this to a codec control func (VP9E_SET_RENDER_SIZE) that takes
a w/h pair argument in a int[2] (identical to VP9D_GET_DISPLAY_SIZE).

Also add render_size to the encoder_param_get_to_decoder unit test.

See issue 1030.

Change-Id: I12124c13602d832bf4c44090db08c1009c94c7e8
2015-09-25 22:18:22 -04:00