Commit Graph

769 Commits

Author SHA1 Message Date
Dmitry Kovalev
3e51acafec Merge "Finally removing all old block size constants." 2013-08-06 10:30:37 -07:00
Dmitry Kovalev
4a692e4168 Merge "Changing the order switchable filter enum constants." 2013-08-06 10:30:26 -07:00
James Zern
d115cd8b12 Merge changes I082959ab,Ib6932640
* changes:
  vp9/decoder: threaded row-based loop filter
  vp9/decoder: add thread worker
2013-08-05 16:07:09 -07:00
Dmitry Kovalev
b9c7d04e95 Finally removing all old block size constants.
Change-Id: I3aae21e88b876d53ecc955260479980ffe04ad8d
2013-08-05 15:23:49 -07:00
James Zern
a0ffa2794b vp9/decoder: threaded row-based loop filter
Currently the only threaded option for vp9 decode. Enabled when the
decoder config thread count is > 1.

Change-Id: I082959abac9e31aa4a38ed9fd68b94680e57f4df
2013-08-05 13:22:04 -07:00
James Zern
183b77d5ab vp9/decoder: add thread worker
vp9/decoder/vp9_thread.[hc]
Original source:
 http://git.chromium.org/webm/libwebp.git
 100644 blob b1615d0fb8d311666b2fa4561076c62d72c2e3ff  src/utils/thread.c
 100644 blob 13a61a4c84194c3374080cbf03d881d3cd6af40d  src/utils/thread.h

Local modifications:
 - s/WebP/VP9/g
 - camelcase functions -> lower with _'s

Change-Id: Ib6932640ee34f8b4782c6fbd15864a59d5d4c5fe
2013-08-05 13:21:13 -07:00
Dmitry Kovalev
3f611555d7 Changing the order switchable filter enum constants.
This changeset allows to remove vp9_switchable_interp and
vp9_switchable_interp_map arrays and make code much clear. Actually we
still have to use these mapping but only inside read_interp_filter_type and
write_interp_filter_type functions.

Change-Id: I4026c6f8c4acefba6c81421b7bacbaa52cc45f50
2013-08-05 12:26:15 -07:00
Dmitry Kovalev
d007446b3f Replacing long block size enum values with shorter ones (2).
Change-Id: I428c4d42212b757112e3acfe5b81314cfbb5fd6b
2013-08-05 10:51:02 -07:00
Dmitry Kovalev
680ec32d18 Adding is_inter_block function.
Using it instead of long unclear verbose check
"mbmi->ref_frame[0] != INTRA_FRAME".

Change-Id: I9c7b4b3797942fa962bf3ba7460fff3084beabe9
2013-08-02 16:25:33 -07:00
Dmitry Kovalev
769bcab3f5 Cleaning up set_contexts_on_border function.
Change-Id: I8f21c18b29f54b277fb1c167f278f109d9f3b996
2013-08-02 15:52:26 -07:00
Dmitry Kovalev
ce8dedc353 Cleanup: removing unused function arguments.
Change-Id: I27471768980fc631916069f24bc7c482a5c9ca17
2013-08-01 13:41:38 -07:00
Dmitry Kovalev
b621e2d72e Nice looking motion vector clamping functions.
Removing assign_and_clamp_mv function, making implementation of clamp_mv
and clamp_mv2 more clear and consistent.

Change-Id: Iecd08e1c1bf0379f8314ebe01811f8253f4ade58
2013-08-01 13:40:26 -07:00
Dmitry Kovalev
8259cdf298 vp9_decodemv.c cleanup.
Inlining VP9_NMV_UPDATE_PROB constant, consistent local variable names.

Change-Id: I01692501982568fa535882d6b320e3c692f88abb
2013-07-31 15:03:36 -07:00
Dmitry Kovalev
9239e96536 Removing get_mi_{row, col} functions.
Passing mi_row and mi_col parameters to functions explicitly. Removing
unused xd argument from scale_mv function.

Change-Id: Icb4c495ec72d26fb066c14470d3ae0b741fbf18a
2013-07-31 14:06:55 -07:00
Dmitry Kovalev
3be9fd9120 Merge "Removing unused "ishp" arguments." 2013-07-31 12:03:04 -07:00
Dmitry Kovalev
500ade243a Removing unused "ishp" arguments.
Using different variable names "allow_hp" and "use_hp" instead of "usehp".

Change-Id: I0cd5996ddeb46bd754473b680a993c0aaf8eb879
2013-07-31 11:27:53 -07:00
Dmitry Kovalev
8701bc11df Consistent update for inter_mode probabilities.
Using inter-mode counts instead of inter-mode-tree branch counts inside
FRAME_COUNTS structure.

Change-Id: I60dde13af37d06146d7d15543311c1b5044e9e04
2013-07-30 18:06:34 -07:00
Jingning Han
455f2de20b Tune tokenization/detokenization flow for speed-up
This commit optimizes the tokenization and detokenization operational
flow for speed-up. It makes the coding process about 0.3% faster at
speed 0.

Change-Id: I28008df7482874e4b5f237f2d418ff82a249dd56
2013-07-29 16:15:30 -07:00
Jingning Han
5875d7a4a4 Merge "16x16 inverse 2D-DCT with DC only" 2013-07-29 15:29:25 -07:00
Jingning Han
a7c4de22e1 16x16 inverse 2D-DCT with DC only
This commit provides special handle on 16x16 inverse 2D-DCT, where
only DC coefficient is quantized to be non-zero value.

Change-Id: I7bf71be7fa13384fab453dc8742b5b50e77a277c
2013-07-29 14:45:53 -07:00
Dmitry Kovalev
828119d6ab Renaming txfm to tx for consistency in some places.
Change-Id: I2a6a646570e2af66315e7c658d00d99f80c4b127
2013-07-29 14:35:55 -07:00
Dmitry Kovalev
23391ea835 Renaming TX_SIZE_MAX_SB to TX_SIZES.
Change-Id: I6aa4191935aa93461a07c41b59fdae1eb5f5f107
2013-07-29 12:25:34 -07:00
Jingning Han
decb1b94de Merge "Shortcut 8x8/16x16 inverse 2D-DCT" 2013-07-29 11:04:07 -07:00
Jingning Han
38fa487164 Shortcut 8x8/16x16 inverse 2D-DCT
This commit brought back the shortcut implementation of 8x8/16x16
inverse 2D-DCT. When the eob <= 10, it skips the inverse transform
operations on row 4:7/4:15 in the first round. For bus_cif at 1000
kbps, this provides about 2% speed-up at speed 0.

Change-Id: I453e2d72956467d75be4ad8c04b4482ab889d572
2013-07-26 17:19:14 -07:00
Dmitry Kovalev
d42e60d2d8 vp9_decodemv.c cleanup.
Renaming:
  read_intra_mode_info  -> read_intra_frame_mode_info
  read_inter_mode_info  -> read_inter_frame_mode_info
  read_intra_block_part -> read_intra_block_mode_info
  read_inter_block_part -> read_inter_block_mode_info
  read_ref_frame        -> read_ref_frames
  read_reference_frame  -> read_is_inter_block

Using num_4x4_blocks_{wide, high}_lookup instead of bit shifts.

Change-Id: I83c81573b4ef6f53f2f8d24683895014bebfba61
2013-07-26 16:49:49 -07:00
Jingning Han
b9c3dd481a Merge "Special handle on DC only inverse 8x8 2D-DCT" 2013-07-26 16:04:14 -07:00
Dmitry Kovalev
620861dedc Merge "Making read_inter_mode_info function more clear." 2013-07-26 15:47:40 -07:00
Jingning Han
325e0aa650 Special handle on DC only inverse 8x8 2D-DCT
This commit enables a special handle for the 8x8 inverse 2D-DCT,
where only DC coefficient is quantized to be non-zero. For bus_cif
at 2000 kbps, it provides about 1% speed-up at speed 0.

Change-Id: I2523222359eec26b144cf8fd4c63a4ad63b1b011
2013-07-26 14:16:51 -07:00
Dmitry Kovalev
048e9c0991 Making read_inter_mode_info function more clear.
Now read_inter_mode_info calls read_intra_block_part (renamed from
read_intra_block_modes) or read_inter_block_part (just added).

Change-Id: I541badea6b663e0ae692ec158665efb90ed20c03
2013-07-25 15:30:18 -07:00
Dmitry Kovalev
7131cb0e3d General cleanups.
Removing unused constants, macros, and function declarations. Using
ROUND_POWER_OF_TWO macro, vp9_zero, vp9_copy where possible. Moving
#include from *.h to *.c. Merging for loops for motion vectors.

Change-Id: Ic3bf841764a2bb177128bb3a6d7aa8f68229cd13
2013-07-25 14:13:48 -07:00
Dmitry Kovalev
08fd41ccd7 Adding lookup table for size group.
Change-Id: Ia6144d77ebed66e0739b62e4d673e26a95aa9550
2013-07-25 12:58:54 -07:00
Dmitry Kovalev
47d61f008f Removing vp9_adapt_mode_context function.
Moving code from vp9_adapt_mode_context to vp9_adapt_mode_probs.

Change-Id: I60829c30b28968cd813551ef3a206dfb98d323c9
2013-07-25 10:48:45 -07:00
Jingning Han
91fa12429c Merge "Merge vp9_dc_only_idct_add and vp9_short_idct4x4_1" 2013-07-24 23:18:24 -07:00
Jingning Han
d2de1ca37b Merge vp9_dc_only_idct_add and vp9_short_idct4x4_1
They share the same functionality, so merging together.

Change-Id: I98a0386fcee052cb854f9ff90c283c1b844bcb79
2013-07-24 16:51:15 -07:00
Dmitry Kovalev
fcc34796d2 Removing CONFIG_BALANCED_COEFTREE experiment.
Change-Id: I61a8b0101eac3ee2e0621d56151b90c269fd4db4
2013-07-24 15:53:42 -07:00
Dmitry Kovalev
9139ee0908 Adding condition inside get_tx_type_{4x4, 8x8, 16x16}.
Adding plane type check condition because it was always used outside of
get_tx_type_{4x4, 8x8, 16x16}.

Change-Id: I02f0bbfee8063474865bd903eb25b54d26e07230
2013-07-24 12:55:45 -07:00
Dmitry Kovalev
1099a436d3 Moving counts from FRAME_CONTEXT to new struct FRAME_COUNTS.
Counts are separate from frame context. We have several frame contexts but
need only one copy of all counts.

Change-Id: I5279b0321cb450bbea7049adaa9275306a7cef7d
2013-07-23 17:02:08 -07:00
Dmitry Kovalev
8d13b0d1df Removing LOW_PRECISION_MV_UPDATE define.
Change-Id: I78d16ee758e1fae0200b746f00031f6d9c6d6ce7
2013-07-23 15:41:45 -07:00
Dmitry Kovalev
2855d8aea1 Merge "Adding update_tx_counts function." 2013-07-23 13:57:59 -07:00
Paul Wilkins
32042af14b Renaming of segment constants.
Renamed:
  MAX_MB_SEGMENTS to MAX_SEGMENTS
  MB_SEG_TREE_PROBS to SEG_TREE_PROBS

The minimum unit for segmentation in the segment map
is now 8x8 so it is misleading to use MB_ as macro-block
traditionally refers to a 16x16 region.

Change-Id: I0b55a6f0426bb46dd13435fcfa5bae0a30a7fa22
2013-07-23 12:09:04 +01:00
James Zern
38a4412e1b vp9: apply loopfilter inline if possible
excludes tiled content currently

Change-Id: I44155253e8d6771e5e039d663be5f21cc9d0355d
2013-07-22 15:52:10 -07:00
Dmitry Kovalev
b2fc6fa969 Adding update_tx_counts function.
Moving common encoder/decoder code to update_tx_counts. Also renaming
vp9_get_pred_probs_tx_size to get_tx_probs2 and adding get_tx_probs to
call vp9_get_pred_context_tx_size inside read_selected_tx_size only once
(twice before).

Change-Id: Ia50247f3893de88ef8e9041b0d44be44a40aaa4d
2013-07-22 14:57:43 -07:00
Dmitry Kovalev
ee1fe2f750 Merge "Removing pre probabilities from FRAME_CONTEXT." 2013-07-20 22:50:32 -07:00
Dmitry Kovalev
8962d975b2 Merge "Moving all loop filter related variables into new struct." 2013-07-20 22:45:24 -07:00
Dmitry Kovalev
39342db138 Merge "Consistent names for inter mode probabilities and encodings." 2013-07-20 22:40:51 -07:00
Dmitry Kovalev
f66821afbb Merge "Removing frame_type field from MACROBLOCKD struct." 2013-07-20 22:40:06 -07:00
Dmitry Kovalev
7e703de729 Removing pre probabilities from FRAME_CONTEXT.
Using cm->frame_contexts[cm->frame_context_idx] as source of previous
probabilities.

Change-Id: Ie03778acf0e7bebdc3a1f6a51854d4a0712f24a1
2013-07-19 17:33:10 -07:00
Dmitry Kovalev
ee1771ebaa Moving all loop filter related variables into new struct.
Adding loopfilter struct with fields from MACROBLOCKD and VP9Common.
Eventually it will be moved to vp9_loopfilter.h for better code structure.

Change-Id: Iaf5fb71c33719cdfa1b991f671caf071be9ea035
2013-07-19 16:19:10 -07:00
Dmitry Kovalev
d6e74e0d59 Moving vp9_reader into decode_tiles function.
Change-Id: Ic741054836d6c1b89c4f1c75cc6bd938a7d56723
2013-07-19 12:27:56 -07:00
Dmitry Kovalev
e71a4a77bb Merge "Renaming TXFM_MODE to TX_MODE (like TX_SIZE, TX_TYPE)." 2013-07-19 12:14:32 -07:00