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

1540 Коммитов

Автор SHA1 Сообщение Дата
Jingning Han 8783a8a97c Refactor transform block loop for inter mode decoding
Rework the inter mode transform block decoding loop. Replace the
block index with the row and col index as the input argument. It
saves function call to compute the row and col index according to
the block index and overall block size, and many if statements
associated with the transform block position relative to the coding
block. For the test bit-stream pedestrian_area 1080p at 5 Mbps,
the decoding speed goes up from 81.13 fps to 81.92 fps.

Note that the intra coded block decoding needs more refactoring
work than the inter ones. So keep it using foreach_transforme_block
as for now.

Change-Id: I5622bdae7be28ed5af96693274057f55ba9b4fb4
2015-07-08 22:55:16 +00:00
Alex Converse 8bf791e7ef Merge "Don't allocate dqcoeff in MACROBLOCKD." 2015-07-08 20:42:36 +00:00
Alex Converse 89090d8046 Don't allocate dqcoeff in MACROBLOCKD.
The encoder gets its dqcoeff from the context tree. In the decoder move
it to directly after MACROBLOCKD.

Change-Id: I46c9b76f26956a360d17de0b26ecb994dae34ecb
2015-07-08 12:37:55 -07:00
Jingning Han 66da771040 Merge "Refactor inverse_transform_block argument list" 2015-07-08 19:28:25 +00:00
Jingning Han 0497d3a827 Merge "Reset dqcoeff[0] only if eob is 1" 2015-07-08 19:27:22 +00:00
Jingning Han 7e0d0de211 Refactor inverse_transform_block argument list
Replace block index with transform type in the argument list. This
allows to save an extra fetch to the prediction mode. For pedestrian
area 1080p coded at 5 Mbps with single tile, the average decoding
speed goes up from 80.55 fps (before the refactoring series) to
81.13 fps.

Change-Id: Icbebf84ce63c19c0c92f3690ed201f6c3eab7881
2015-07-08 09:26:02 -07:00
James Zern 892128f6ca Merge "vp9_entropymv: remove vp9_get_mv_mag()" 2015-07-08 01:27:13 +00:00
Jingning Han 76ccba9ec8 Reset dqcoeff[0] only if eob is 1
If only the first dequantized coefficient is non-zero, reset
dqcoeff[0] to zero directly.

Change-Id: I0197ba72028a8ec436f0b1b9abcc1c0ae5d70abe
2015-07-07 15:20:34 -07:00
Jingning Han 97d1f1aaae Rework scan order fetch logic for decoder
Save redundant call for getting prediction mode to obtain scan
order for detokenization.

Change-Id: I0683ef119f1579d1261ed5d59052a1745b68ef6f
2015-07-07 15:03:21 -07:00
Jingning Han a652048efd Add vp9_ prefix to init_macroblockd
Change-Id: I202d4924e627eec94838741df004ed9259d38b88
2015-07-07 12:00:01 -07:00
Jingning Han cccad1c5de Reduce dqcoeff array size in decoder
The decoding process handles detokenization and reconstruction per
transform block sequentially. There is no need to offset the dqcoeff
buffer according to the transform block index. This allows to
reduce the memory spill and improve cache performance.

Change-Id: Ibb8bfe532a7a08fcabaf6d42cbec1e986901d32d
2015-07-07 11:36:05 -07:00
James Zern c6d90f0535 vp9_entropymv: remove vp9_get_mv_mag()
inline the code directly in read_mv_component(), the only place where it
was being used; this removes a function call in a hot function

Change-Id: I66f99c0c9ce3bc310101dbca4a470f023cc6fb55
2015-07-06 22:30:21 -07:00
James Zern 8c6d5a874d Merge "inline vp9_reader_has_error()" 2015-07-07 00:48:58 +00:00
James Zern 91c412b6db Merge "remove vp9_get_interp_kernel()" 2015-07-06 21:36:37 +00:00
James Zern 017253b7a3 remove vp9_get_interp_kernel()
expose filter_kernels[] and do the table lookup directly

Change-Id: I0b10bff0327c3e01a723736141a9ffd377cd3d20
2015-07-06 13:04:05 -07:00
Jingning Han 39f03bf9c6 Merge "Rename vpx_thread to vpx_util" 2015-07-06 17:01:30 +00:00
James Zern 823a126d4c Merge "Revert "Correct the inter prediction coordinate..."" 2015-07-03 18:44:02 +00:00
hkuang 52e358f13e Revert "Correct the inter prediction coordinate..."
Change in 92b199061a leads to frame parallel
decode failure in extreme case.

addresses issue #1010

Change-Id: I4fa488dac8e8c584f5eef4cae1640a579130d387
2015-07-03 11:05:28 -07:00
Jingning Han d1b30ceaa3 Rename vpx_thread to vpx_util
Change the dir name to include more util tools.

Change-Id: Id5b16062803ce5eed872fe2edb36d7e56b32eed8
2015-07-02 10:02:37 -07:00
Jingning Han 8565a1c99a Merge "Use vpx prefix for codec independent threading functions" 2015-07-02 04:24:54 +00:00
Jingning Han 66cf8098e6 Merge "Move multi-threading module functions into vpx_thread folder" 2015-07-02 04:24:37 +00:00
James Zern 1e0aa9497f inline vp9_reader_has_error()
this is tested for each block

Change-Id: I229c6f0e9513fb206bdbce8be9699a4bf4008ca4
2015-07-01 19:10:43 -07:00
James Zern e757808429 Merge "vp9_pred_common: inline vp9_get_tx_size_context" 2015-07-02 01:52:40 +00:00
James Zern 0ea304620c Merge "vp9_pred_common: inline vp9_get_segment_id" 2015-07-02 01:52:21 +00:00
Jingning Han 04d2e57425 Use vpx prefix for codec independent threading functions
Replace vp9_ prefix with vpx_ for common multi-threading functions.

Change-Id: I941a5ead9bfe8213fdad345511d2061b07797b55
2015-07-02 00:47:54 +00:00
Jingning Han 3a3b0be09a Move multi-threading module functions into vpx_thread folder
This commit moves the primitive multi-threading files from vp9
folder to vpx_thread, which will be accessible by all vpx codec.

Change-Id: Ib51e66e9c69801c10631fab56d35a0c0aaed5883
2015-07-01 17:45:49 -07:00
James Zern bd7162269f vp9_dsubexp: replace some divides with shifts
Change-Id: I24e10c37ea8f06600cd04b43512efa6170e23e5c
2015-06-30 20:09:00 -07:00
James Zern 5609858785 vp9/inv_remap_prob: simplify inv_map_table[]
add one to each entry to remove the universal 'value + 1'.

Change-Id: I8919b1d7fde8155d1728196c4d577db3064e2c1e
2015-06-30 19:58:08 -07:00
James Zern 8aaf5ec4c7 vp9_dsubexp: remove clamp in inv_remap_prob()
the max value of the lookup in expanded form is:
(((1 << 7) - 1) << 1) - 65 + 1 + 64 = 254

remove the clamp [0, 253] and add one table entry

Change-Id: I0b5d0c66702fdb0b8f1cc9ab9b0dac66326e85a6
2015-06-30 15:49:29 -07:00
Scott LaVarnway 86f4a3d8af Remove tile param
and added to MACROBLOCKD.

Change-Id: I0e60aaa9f84bcc9f2376d71bd934f251baee38db
2015-06-22 06:09:38 -07:00
Scott LaVarnway ce6a6c5411 Moved has_rows, has_cols in vp9_decodeframe.c
from read_partition() to decode_partition().

Change-Id: I6bee2a0e9ff315290a690c9d773c9648dd2a200d
2015-06-16 11:50:54 -07:00
Scott LaVarnway 5fe0e55ca4 Merge "Eliminated frame_type check in get_partition_probs()" 2015-06-16 13:40:23 +00:00
Scott LaVarnway b2658ec321 Eliminated frame_type check in get_partition_probs()
Moved the frame_type check to the tile level and stored
the prob ptr in MACROBLOCKD.

Change-Id: I10b5a4abd58213dc7610e3ade1a1583c01526842
2015-06-16 05:37:54 -07:00
Scott LaVarnway a41fe749a8 Merge "Update use_prev_frame_mvs flag in decoder." 2015-06-16 12:28:46 +00:00
James Zern 3edd293dae vp9_pred_common: inline vp9_get_tx_size_context
+ drop 'vp9_' prefix

Change-Id: If3f3ec32d03026af78b8fcd82749e587a3f43059
2015-06-15 18:41:22 -07:00
James Zern e6add6499f vp9_pred_common: inline vp9_get_segment_id
+ drop 'vp9_' prefix

Change-Id: Id5a3c8d416dbdf93d9f4f1bde662f7b2c2290168
2015-06-15 18:41:14 -07:00
James Zern a4bb5f2a29 Merge "decode_tiles_mt: remove incorrect TODO" 2015-06-12 22:13:38 +00:00
James Zern dc0f0f1cf2 Merge changes I342075eb,I222eaa4e
* changes:
  vp9_decodeframe: simplify init_read_bit_buffer signature
  vp9_decode_frame: remove explicit read_bit_buffer init
2015-06-12 22:13:28 +00:00
James Zern e21c1eab9d Merge changes Iedb5b6a3,Iaea98508,I36580cea,Ia0574320
* changes:
  vp9_decodeframe.h: remove unused prototype
  vp9_decodeframe: move public funcs to end of file
  vp9_decodeframe: reorder some functions
  vp9_decodeframe: hide vp9_dec_build_inter_predictors_sb
2015-06-12 22:12:30 +00:00
Scott LaVarnway cca866f578 inline vp9_get_segdata()
and change name.

Change-Id: I706645cf9d9dc04f1b3b6ac80df80edb7f101854
2015-06-11 09:52:00 -07:00
Scott LaVarnway 42c0b1b1f1 inline vp9_segfeature_active()
and changed name.

Change-Id: Ie023ca66cc2c823032f58d4faeb53fd1863c94f3
2015-06-11 04:20:55 -07:00
James Zern 15c839f563 decode_tiles_mt: remove incorrect TODO
all allocated workers are used, the final one in the main thread.

Change-Id: I04647d4fb2e01d6d404790e7899515289047f553
2015-06-10 15:56:51 -07:00
James Zern b105414118 vp9_decodeframe: simplify init_read_bit_buffer signature
Change-Id: I342075eb5a4ba2a85d36d47ae52d1f3476039e31
2015-06-10 15:53:30 -07:00
James Zern 92146eb8ac vp9_decode_frame: remove explicit read_bit_buffer init
this is done by init_read_bit_buffer()

Change-Id: I222eaa4e9758ff9f7e1e4122106c5c4652ffa99c
2015-06-10 15:50:54 -07:00
James Zern dca319040c vp9_decodeframe.h: remove unused prototype
vp9_init_dequantizer() was deleted in:
bdd249b Optimize the dequantization process on decoder side.

Change-Id: Iedb5b6a3a03964dd6901c1e3b2325194d94bc708
2015-06-10 15:48:59 -07:00
James Zern b0bafd0439 vp9_decodeframe: move public funcs to end of file
Change-Id: Iaea9850890b726c7b5552c5f02b3a309086edc85
2015-06-10 15:47:57 -07:00
James Zern 38dd0448cd vp9_decodeframe: reorder some functions
removes the need for a prototype for the static function
dec_build_inter_predictors_sb

Change-Id: I36580ceae061d27f341ab0a16ece479f92e98004
2015-06-10 15:44:21 -07:00
James Zern 587bd3669e vp9_decodeframe: hide vp9_dec_build_inter_predictors_sb
+ strip 'vp9_' prefix

Change-Id: Ia057432095e5741473275d4da03ab665c37e924e
2015-06-10 15:31:55 -07:00
Scott LaVarnway 97880c3324 Merge "Reducing size of MODE_INFO struct" 2015-06-10 13:15:19 +00:00
Scott LaVarnway c9976b32b4 Update use_prev_frame_mvs flag in decoder.
Added check to see if last frame was all intra.  This will
eliminate two checks in find_mv_refs_idx().  Also, do not
update the frame mvs if the current frame is all intra.

This improved performance on material with frequent
intra-only frames.

Change-Id: I44a4042c3670ab0d38439d565062a0e2a1ba9d1e
2015-06-08 03:38:13 -07:00
hkuang 87c21a95ae Optimize the decode_partition. About 0.7% gain on N10.
Change-Id: Ia689c254bd2d4f274abcc451a9b758f62e3a2b1f
2015-06-05 15:47:09 -07:00
Scott LaVarnway 5831a7127e Merge "BUG FIX: Remove counts param" 2015-06-05 20:04:26 +00:00
Scott LaVarnway 63819c033c BUG FIX: Remove counts param
member access within null pointer of type 'FRAME_COUNTS'

Change-Id: Id3bf75e0a6f2a1abf8522cf9fbb98b3a4443de38
2015-06-05 11:54:04 -07:00
Frank Galligan bfb6d48812 Add control to skip loop filter in VP9 decoder.
This control allows the application to skip the loop filter in the
decoder. This is an advanced control that should only be used in
extreme circumstances as it may introduce and accumulate decode
artifacts.

Change-Id: I278c65c60826f84c9141ebe06c6eeed3c2335fa8
2015-06-05 10:07:09 -07:00
Scott LaVarnway baaaa57533 Reducing size of MODE_INFO struct
Reduced size from 124 bytes to 104 bytes.  For decode only builds,
it is reduced to 68 bytes.

Change-Id: If9e6b92285459425fa086ab5a743d0a598a69de3
2015-06-04 07:32:16 -07:00
Scott LaVarnway 8bb37dd069 Remove cm parameter from vp9_decode_block_tokens() part 2
Change-Id: Iee24b6bb095f748333223e6036fc5c9d9e7e5f1c
2015-06-04 07:13:19 -07:00
Scott LaVarnway f779dba405 Remove counts param
Moved to MACROBLOCKD.

Change-Id: Icce765b334f2755f4fe2a4c39fb2ae2d7660d004
2015-06-02 09:06:00 -07:00
Johann 7c16dcc79b Merge "Check size restrictions before running test vector" 2015-05-28 22:01:53 +00:00
Scott LaVarnway bbea7c95d8 Merge "Re-worked header files" 2015-05-28 19:56:39 +00:00
hkuang 5317185eb0 Merge "Add error handling when running out of free frame buffers." 2015-05-28 17:41:01 +00:00
Johann 1e4473b216 Check size restrictions before running test vector
Change-Id: I60ea7724e6ab06fc658f678c1b76d984a43f5a5e
2015-05-27 15:55:17 -07:00
hkuang 131cab7c27 Add error handling when running out of free frame buffers.
Change-Id: If28b59b9521204a6e3aecedcf75932d76a752567
2015-05-27 14:20:58 -07:00
Scott LaVarnway b962646fc5 Re-worked header files
Various header/test files had to be re-worked in order to
build "Remove cm parameter from vp9_decode_block_tokens()".

This patch reverts the "Remove cm" part and only contains
the re-worked header files.

Change-Id: I520958a88d1991fee988a3c784d0eac40e117a32
2015-05-22 11:19:51 -07:00
Minghai Shang 48bfee8797 [decoder] Optimize context buffer re-allocation
1. Check existing buffer sizes when re-allocate context buffers.
2. Don't need to set mi buffers to 0 during setup_mi.

Change-Id: I6b48b0e077a4d804312b605ad0dc34aec5795a6d
2015-05-20 11:05:22 -07:00
James Zern 85076fc5ab dec_build_inter_predictors: don't return a void fn
split call of extend_and_predict() and return, fixes visual studio build
warning since:
0a80164 Move mc_buf to cut down size of MACROBLOCKD.

Change-Id: I7cdf712941ef773a07f038539cb8080dc27861cd
2015-05-16 10:33:57 -07:00
James Zern f3bf5f2029 vp9_decodeframe.c: make a function static
silences a missing declaration warning

Change-Id: I2f49ebca9ba7a47f3c48f5fe919b90cd4114a9bc
2015-05-15 10:43:47 -07:00
Frank Galligan d610ead258 Merge "Move mc_buf to cut down size of MACROBLOCKD." 2015-05-15 15:20:39 +00:00
Frank Galligan 0a80164c94 Move mc_buf to cut down size of MACROBLOCKD.
Change-Id: Icea64b9e5632b41aaa7cd7018c501d6add9b7a7f
2015-05-14 19:10:02 -07:00
Johann 1d7ccd5325 Relocate memory operations for common code
With the sad functions, and hopefully the variance functions soon,
moving to the vpx_dsp location, place the defines used in the
reference C code in a common location.

Change-Id: I4c8ce7778eb38a0a3ee674d2f1c488eda01cfeca
2015-05-13 11:41:15 -07:00
Adrian Grange 5f0dc57653 Merge "Reduce border extension by 1 line" 2015-05-11 22:47:49 +00:00
Jingning Han 2b2b461d39 Sort variables dependency in read_uncompressed_header
Remove a few repeated data structure reads from
read_uncompressed_header.

Change-Id: I6eb741b39f9415ad0aa4631dfbf4a1ace4eba56a
2015-05-11 10:07:55 -07:00
Johann 76a08210b6 Merge "Move shared SAD code to vpx_dsp" 2015-05-07 18:33:06 +00:00
Johann d5d9289800 Move shared SAD code to vpx_dsp
Create a new component, vpx_dsp, for code that can be shared
between codecs. Move the SAD code into the component.

This reduces the size of vpxenc/dec by 36k on x86_64 builds.

Change-Id: I73f837ddaecac6b350bf757af0cfe19c4ab9327a
2015-05-06 16:58:20 -07:00
Adrian Grange 0af5ff49bd Reduce border extension by 1 line
The code was using one row too many.

Change-Id: Ie0c05d02c22ae3d0d13d3b6565c40de3bc4fa17a
2015-05-06 14:44:24 -07:00
hkuang 92b199061a Correct the inter prediction coordinate calculation which greatly reduced the
times of border extension.

Change-Id: I8e5bd590cc696ee71cfe1f4cc66c12fb24aaf44e
2015-05-06 10:55:56 -07:00
Scott LaVarnway 7b0f24fc21 FIX: Use correct above/left in read_intra_frame_mode_info
Should be using xd->above_mi and xd->left_mi.

Change-Id: Ifab83512db5491a955a3ed44a2d6e3b25b5ae5a5
2015-05-01 08:23:47 -07:00
James Zern 9e81112df2 vp9_decodeframe: simplify compare_tile_buffers
return the difference between the 2 buffer sizes rather than exactly
-1/0/1.

Change-Id: Idf1ccff7088b31845470bcc71bea5927b0598cc7
2015-04-29 17:42:30 -07:00
James Zern f58011ada5 vpx_mem: remove vpx_memset
vestigial. replace instances with memset() which they already were being
defined to.

Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28 20:00:59 -07:00
Scott LaVarnway afcb62b414 WIP: Use LUT for y_dequant/uv_dequant
instead of calculating every block.

Change-Id: Ib19ff2546be8441f8755ae971ba2910f29412029
2015-04-28 07:52:06 -07:00
Scott LaVarnway 8b17f7f4eb Revert "Remove mi_grid_* structures."
(see I3a05cf1610679fed26e0b2eadd315a9ae91afdd6)

For the test clip used, the decoder performance improved by ~2%.
This is also an intermediate step towards adding back the
mode_info streams.

Change-Id: Idddc4a3f46e4180fbebddc156c4bbf177d5c2e0d
2015-04-21 11:16:45 -07:00
Johann 14ef4aeafb Reorganize *_rtcd() calling conventions
Change-Id: Ib1e17d8aae9b713b87f560ab5e49952ee2bfdcc2
2015-04-15 11:12:05 -04:00
hkuang 7e8e507bfb Remove unnecessary mv clamp with on demand border extension.
Change-Id: Ia2956f06f409b9b0ca8320ca4c1ea5680e938402
2015-04-08 17:16:52 -07:00
Frank Galligan 5668dcc7b9 Refactor dec_build_inter_predictors
Refactor the loops in dec_build_inter_predictors to try and decrease
the number of instructions. Limited testing saw about 1% perf
increase on x86 and about 0.67 % perf increase on Arm.

Change-Id: I69cfe6335bb562fbaaebf43fb3f5c5a2a28882a2
2015-04-08 15:00:29 -07:00
hkuang 73c8fe5deb Fix error of "Left shift of negative value -1".
Change-Id: Ia4f3feb20df0e89cc51b02def858e12e927312cc
2015-04-02 17:35:33 -07:00
hkuang 1582ac851f Fix 10-bit video decode failure with --frame-parallel mode.
Also add unit test to avoid same error in the future.

Issue:981

Change-Id: Iaf9889d8d5514cfdff1ea098e6ae133be56d501f
2015-04-01 09:19:35 -07:00
hui su 302e24cb3e Move vp9_coef_con_tree to common/
This tree should be defined in common/, as it is needed for
both encoder and decoder.

Change-Id: I4f5cbc80025cf2ced14182c98f7c82dc7d0f87db
2015-03-31 09:20:46 -07:00
Frank Galligan 6eaca27df2 Refactor read_intra_frame_mode_info
Change-Id: I56b0614154408e8ec613784b2007374df00fbf17
2015-03-09 16:25:01 -07:00
hkuang 9d44fd6bc5 Remove some unnecessary code in thread context copy.
Change-Id: Iddf098e1bae9c10fc2f325f84156f50a0bd0055a
2015-03-06 10:29:15 -08:00
Hangyu Kuang a1ef75bb63 Merge "Only wait for previous frame's motion vector if needed." 2015-03-06 10:27:26 -08:00
Hangyu Kuang d5fa786b4f Only wait for previous frame's motion vector if needed.
Change-Id: Iecce685a33b64844446c0009f21bc85566d7469f
2015-03-05 16:09:44 -08:00
hkuang 915d5c12d3 Merge "Fix a tsan error bug in frame parallel decode." 2015-03-05 14:55:27 -08:00
hkuang 2f06f5087e Merge "Remove unnecessary loopfilter init." 2015-03-04 11:27:58 -08:00
Adrian Grange 3807dd82ab Make encoder buffer allocation dynamic
Frame buffers are now allocated dynamically on-demand.

Entries in the reference frame map, cm->ref_frame_map,
may now be set to -1 (INVALID_IDX) to indicate that
there is not a valid reference buffer in that "slot".

All slots in the reference frame map are now initialized
to the empty state (-1) and each buffer is initialized
to have a reference count of 0.

Change-Id: Id1afe98de98db4ae8b2dfefed7889c3b28c68582
2015-03-04 07:58:32 -08:00
hkuang a723f5ecd1 Fix a tsan error bug in frame parallel decode.
A frame may be waiting for an out of border pixel from another
frame. A frame's row progress variable is set to -1 when start being decoded
and another frame may be waiting for -2 row pixel from this frame.
In this case, vp9_frameworker_wait will return directly and skip the waiting
which leads to tsan error between threads.

Change-Id: Id16604915fb598b823e34393f696e3aa46fb6422
2015-03-03 12:58:25 -08:00
hkuang f9420b45e5 Remove unnecessary loopfilter init.
Loopfilters are init in vp9_decode_frame.

Change-Id: I4fbf6286b9b231451452e4ef3c19877a7b9a6768
2015-03-03 10:40:39 -08:00
Yaowu Xu 6cf3031286 fix the propagation of color space info in decoder
This addresses the issue #960

Change-Id: Iddf45b4bd4f53cb0ddfd879e800a071cd843b915
2015-02-23 13:01:14 -08:00
Hangyu Kuang bdd249be31 Optimize the dequantization process on decoder side.
Change-Id: I00621ff7165bbe86a18794b4a816976c9effaf78
2015-02-19 15:43:15 -08:00
hkuang bf3cb25019 Remove unnecessary border extension when frame size change.
This border extension is not needed with on-demond border extension.

Change-Id: I8501b37f5f756dc7e874cef4c1cfdbfa9a16112a
2015-02-10 14:55:27 -08:00
Yunqing Wang 4ae092c660 Make encoder and decoder share common thread function
Moved vp9_accumulate_frame_counts to vp9_thread_common.c to
eliminate the duplicate code.

Change-Id: I9cf506d729603c8bf1494b4c86a3b7d47af1917a
2015-02-06 11:45:51 -08:00
Yunqing Wang 41063137c3 Rename loopfilter_thread files to thread_common files
Renames the files to allow more common thread code to
be moved to vp9/common.

Change-Id: I7386e64e221086e3cdc087e79812f993c423413b
2015-02-06 10:03:31 -08:00