Commit Graph

1383 Commits

Author SHA1 Message Date
James Zern
db8af0b0b3 Merge "Fix TODO typo" 2014-04-09 11:29:44 -07:00
Dmitry Kovalev
5ed83c3220 Merge "Converting set_prev_mi() to get_prev_mi()." 2014-04-09 10:27:05 -07:00
Frank Galligan
bbf8971a28 Fix TODO typo
Change-Id: I7a5230852cb24ce22bfe85ea2608cdb4619b5200
2014-04-09 08:48:44 -07:00
Deb Mukherjee
0cca5dd8d7 Merge "High-level hooks for Profile 2 (10/12 bit)" 2014-04-08 22:19:38 -07:00
Frank Galligan
9893fb9859 Merge "Fix decoder resolution change with tiles" 2014-04-08 17:13:33 -07:00
Deb Mukherjee
d35df2d8ea High-level hooks for Profile 2 (10/12 bit)
Adds some high-level hooks for profile 2 before further
progress on the implementation.

According to the definitiion in this patch:
1. Profile 2 only supports 10 or 12 bit color but not 8
2. Profile 2 supports all color sampling modes: 444, 422 and 420,
and alpha plane.
3. Profile 3 is currently undefined.

Please consider the definition carefully and suggest modifications
to the definition as needed.

Change-Id: I5b284fc679e54ac5aee171af72fa7994cfd28995
2014-04-08 16:18:34 -07:00
Frank Galligan
6ae58931d6 Fix decoder resolution change with tiles
There was a bug with the decoder that if you started the decoder
with more threads than the first frame had tile columns. Afterwards
tried to decode a frame with more tile columns than the first frame,
the decoder would hang. E.g. run vpxdec --threads=4. The first frame
had two tile columns, then the next key frame had 4 tile columns, the
decoder would hang. If you started with 4 tiles and switched to 2
tiles the decoder would be fine. The issue is that the worker the thread
loop is using is stale.

I added a test vector "vp90-2-14-resize-848x480-1280x720.webm" that
exhibited the bug.

Change-Id: I7bdd47241a52ac0fe1c693a609bc779257e94229
2014-04-08 15:16:11 -07:00
Dmitry Kovalev
56c2f41ccb Renaming VP9D_COMP & VP9Decompressor to VP9Decoder.
Change-Id: Ieb9b455b8aaef9884391021b7f640ef24c554687
2014-04-08 11:41:12 -07:00
Dmitry Kovalev
22a3e30790 Converting set_prev_mi() to get_prev_mi().
Change-Id: Iad4002d7aecaae0e25d88e286bacde7e6cd7264f
2014-04-07 16:01:34 -07:00
Dmitry Kovalev
b5e12dda52 Cleaning up vp9_{cx, dx}_iface.c files.
Change-Id: Ib4e31ba74c4b882bd93942ef743f4a189892738d
2014-04-07 10:38:51 -07:00
hkuang
0678104164 Merge "Code clean up." 2014-04-04 15:32:14 -07:00
hkuang
272e030f70 Code clean up.
No need to check pbi->common.frame_to_show again.

Change-Id: I572ea4afd0d8b6000c0bb7575b7023d75cad5a4e
2014-04-03 16:20:26 -07:00
Dmitry Kovalev
a9f324fa7f Removing interp_kernel from MACROBLOCKD.
Now interp_kernel is obtained when it is really required (based on
mbmi->interp_filter value).

Change-Id: I4c7a93c179d1045eba16e7526c293d02c9b8b47e
2014-04-03 15:28:42 -07:00
Dmitry Kovalev
5f8dd6c9ec Adding return value to set_offsets() function.
Change-Id: I88e018442c527cf21eac791f0768e805dda244f1
2014-04-01 20:06:47 -07:00
Dmitry Kovalev
86f44a91f4 Renaming two members in MACROBLOCKD struct.
Renames:
  mi_8x8 -> mi
  mode_info_stride -> mi_stride

Change-Id: I66f3e5fd1e7b7f46f108af5bb711c5fd9493c1be
2014-04-01 17:46:40 -07:00
Dmitry Kovalev
d42976c515 Common configuration for MACROBLOCKD struct.
Change-Id: Ie2ea9dd8bd338cc9fe12ca9033df64f7644c68b3
2014-04-01 10:57:59 -07:00
Dmitry Kovalev
03349d2ba2 Moving dqcoeff array to MACROBLOCKD in decoder.
Change-Id: I3e20c0cdb9d2437bddf21afb255855f2dead8e02
2014-03-28 10:36:16 -07:00
Dmitry Kovalev
63f86c149a Removing prev_mi_8x8 from MACROBLOCKD.
Change-Id: I32beb5f18c10b5771146c55933b5555487f53633
2014-03-26 10:50:34 -07:00
Dmitry Kovalev
6f139773a2 Merge "Removing redundant references to VP9D_COMP struct." 2014-03-25 16:56:33 -07:00
Dmitry Kovalev
9366624cc4 Removing redundant references to VP9D_COMP struct.
Change-Id: I4c4772c0e6aca2c7d7085a72412ac8dba8874a3d
2014-03-25 14:21:26 -07:00
Dmitry Kovalev
72d431b69f Removing redundant vpx_free() call.
above_seg_context is alreaded freed during vp9_remove_common() call.

Change-Id: I16b72c710e71d2f143df2d47e876d220c8d374e0
2014-03-25 14:07:49 -07:00
Dmitry Kovalev
ed39c40a2e Moving above_context to VP9_COMMON.
Change-Id: I713af99d1e17e05a20eab20df51d74ebfd1a68d2
2014-03-25 10:40:08 -07:00
Yaowu Xu
ebb4a26202 Merge "Align threading LFWorkerData to 32 bytes." 2014-03-24 17:19:48 -07:00
Dmitry Kovalev
0e84fb08e9 Merge "Making c++ compiler happier." 2014-03-24 17:17:57 -07:00
Dmitry Kovalev
79c51573c1 Merge "Initialization code cleanup." 2014-03-24 16:12:42 -07:00
Dmitry Kovalev
a5d51fbdf3 Merge "General cleanup in vp9_decoder.{h, c}." 2014-03-24 15:56:25 -07:00
Yaowu Xu
bc2761d3cb Align threading LFWorkerData to 32 bytes.
This is to silent a number misalignment warning reported by valgrind.

Change-Id: Ia47a06010b28d7a88dde21f3e4ccb9308fc6f8cf
2014-03-24 12:48:27 -07:00
Dmitry Kovalev
5b8c834c1a Initialization code cleanup.
Change-Id: I47a8b4bf9a6cc0063d1a6785eaaad641d0659e24
2014-03-24 12:21:22 -07:00
Dmitry Kovalev
c9a8c32bce Merge "Removing unused members from VP9D_CONFIG struct." 2014-03-24 09:27:06 -07:00
Dmitry Kovalev
9347e55f12 Making c++ compiler happier.
Change-Id: Ie224e968589bdb0774dc112e6f6df56cc0447465
2014-03-21 14:37:01 -07:00
Dmitry Kovalev
b09cbae0dd General cleanup in vp9_decoder.{h, c}.
Change-Id: I68819558a9c5ac6ea85fe62260712af6f4cc46b7
2014-03-21 14:20:13 -07:00
Dmitry Kovalev
89ec46e6b8 Removing unused members from VP9D_CONFIG struct.
Change-Id: I83a201ab4dcf2f00131f2030f382c6dbfcb39d7e
2014-03-21 14:08:19 -07:00
Dmitry Kovalev
4cb37bff96 Removing redundant {above, left}_seg_context manipulation code.
Change-Id: Ib3c1746e61220c629cbd971b2458aa686b5c9e36
2014-03-21 12:12:55 -07:00
Dmitry Kovalev
a57de9da03 Merge "Reusing {above, left}_seg_context vars in both encoder and decoder." 2014-03-21 12:02:42 -07:00
Dmitry Kovalev
d82766155c Merge "Removing source & source_sz from VP9Decompressor struct." 2014-03-21 12:01:25 -07:00
Yaowu Xu
46c71e5eba Merge "Remove duplicate declaration" 2014-03-21 08:44:04 -07:00
Dmitry Kovalev
7ad40117f1 Reusing {above, left}_seg_context vars in both encoder and decoder.
Change-Id: Id1fa36c92cb007b73a450cc8552e810cedad38b9
2014-03-20 16:15:57 -07:00
Dmitry Kovalev
88a10abe7c Removing source & source_sz from VP9Decompressor struct.
Change-Id: If4c1a48c60e8b27dd021a83170289ccc5467c6de
2014-03-20 15:01:37 -07:00
Yaowu Xu
7ef16efca1 Remove duplicate declaration
Change-Id: Ic8e52a89e0df816c38cd8ff1b7c53862b9a6dff2
2014-03-19 12:23:32 -07:00
Dmitry Kovalev
8ccfcb765f Removing mi_stream.
Change-Id: If674140e30c223c88894b983fd22a583efb99dcf
2014-03-19 10:47:32 -07:00
Dmitry Kovalev
b8bc2d337a Fixing warnings/errors from c++ compiler.
Change-Id: Ia561dda53f2dd10e3a10a2df2adb8027ab19397a
2014-03-18 10:47:51 -07:00
Dmitry Kovalev
e65c564c78 Adding vp9_swap_mi_and_prev_mi() function.
Change-Id: I18b3939f0b51085cdd25c9182c3a9c7536ca7e3e
2014-03-13 13:55:33 -07:00
Dmitry Kovalev
aa7ec14c9a Merge "Speeding up reading of intra block modes." 2014-03-13 13:45:32 -07:00
Dmitry Kovalev
90fed85ce0 Renaming decode_modes_{b, sb}.
decode_modes_b => decode_block
decode_modes_sb => decode_partition

Change-Id: I2a208f5f7bcaa1105f6a2244e37c53b8958c5d76
2014-03-12 15:11:07 -07:00
Dmitry Kovalev
ba54a886c3 Speeding up reading of intra block modes.
Reimplementing sub8x8-reading of intra block modes in
read_intra_frame_mode_info() and read_intra_block_mode_info(). Code looks
more readable as well.

Change-Id: Ia42fc7d0dad708bc0c7a8bff1f8b37809b843f40
2014-03-12 12:32:09 -07:00
Dmitry Kovalev
c909b43e3c Merge "Moving mi_streams from VP9Decompressor to VP9Common." 2014-03-12 12:20:18 -07:00
Dmitry Kovalev
dff81e6c7a Moving mi_streams from VP9Decompressor to VP9Common.
Change-Id: I7ad79c061ad4efbc4914ac49723b48183fdbdd47
2014-03-10 16:12:45 -07:00
Dmitry Kovalev
ff935ff781 Removing last_mi from MACROBLOCKD struct.
Change-Id: Ied12b39c55667b26fd3bf90eb331e601c53a10f6
2014-03-10 16:02:03 -07:00
Dmitry Kovalev
32866fd80a Merge "Renaming vp9_onyxd.h and vp9_onyxd_if.c to vp9_decoder.{h, c}." 2014-03-10 12:11:09 -07:00
Dmitry Kovalev
f8f8c6d44c Adding reusable get_y_mode_prob() function.
Change-Id: Iebd182d7aeebc0f8964b6fd35057449bb25b00c1
2014-03-10 10:50:16 -07:00
Jim Bankoski
04e7607bd0 Merge "vp9_read_bit_buffer.h convert header statics to global functions" 2014-03-10 07:36:24 -07:00
Jim Bankoski
622f06eb59 Merge "vp9_reconinter.h static functions in header converted to global" 2014-03-10 07:36:05 -07:00
Dmitry Kovalev
5233e10a84 Renaming vp9_onyxd.h and vp9_onyxd_if.c to vp9_decoder.{h, c}.
Change-Id: Ibd0892be1ddadd93b8a22fa2c2e2053001f2948f
2014-03-06 12:08:20 -08:00
Dmitry Kovalev
8c2d3c6ee7 Merge "Removing vp9_onyxd_int.h file." 2014-03-05 21:40:31 -08:00
Dmitry Kovalev
ea88da7492 Removing vp9_onyxd_int.h file.
Moving VP9Decompressor struct from vp9_onyxd_int.h to vp9_onyxd.h.

Change-Id: Ic86c15e44130541a7f692db43ef9109293f99ae8
2014-03-05 10:39:29 -08:00
Dmitry Kovalev
d31fc628a7 Renaming NMV_UPDATE_PROB to MV_UPDATE_PROB.
Change-Id: I7f3bcca103f0b1f6b3c064b61472543de9a8288a
2014-03-05 10:37:52 -08:00
Jim Bankoski
a1fbe1e15f vp9_read_bit_buffer.h convert header statics to global functions
Change-Id: Ibea71b22de898832320d9e49a711a0cb0092901b
2014-03-03 15:21:22 -08:00
Jim Bankoski
e5e9b05d68 vp9_reconinter.h static functions in header converted to global
Change-Id: I916944950deb22f4c2301d83a803b732bf3ecd77
2014-03-03 14:58:43 -08:00
Dmitry Kovalev
46af01d719 Adding get_tx_type() instead of get_tx_type_{8x8, 16x16}.
Change-Id: I4a54b12e5229705222c5a101258b9d1f81e2948d
2014-03-03 12:20:51 -08:00
Dmitry Kovalev
cf123f40ee Merge "Removing VP9D_PTR." 2014-03-03 09:18:28 -08:00
Yaowu Xu
501fce7270 vp9_decodeframe.c: remove unused params
Change-Id: Ie83e18802234199491dbb6e90886739814558f96
2014-03-02 14:34:50 -08:00
Yaowu Xu
2f4eb5f096 Remove vp9_create_common()
The function has evolved over time, now only calls vp9_rtcd(), so this
commit removes the function and changes to call vp9_rtcd() directly.

Change-Id: I8cfa6190daa4b28f6f3d1e11bb3a07f9c95322bf
2014-03-01 10:59:24 -08:00
Yaowu Xu
0fa4d89042 Fix unused parameters in vp9_extend_frame_borders
Change-Id: I7255b3bc47d760333f58ac4878becbcc8ad30967
2014-02-28 15:50:32 -08:00
Dmitry Kovalev
e4159100bc Merge "Adding get_y_mode() function." 2014-02-28 11:12:22 -08:00
Dmitry Kovalev
af62e09684 Removing VP9D_PTR.
Change-Id: I17276e25db4592ffeff0961dd9eeaabe4bde110c
2014-02-27 19:08:10 -08:00
Dmitry Kovalev
bb65be98bb Reusing existing mem_{get, put}_be32() functions.
Change-Id: Iba128039534e16a6e0a8cfe7e58306c4655e9f0d
2014-02-27 17:40:30 -08:00
Dmitry Kovalev
1ae91f7784 Adding get_y_mode() function.
Change-Id: Iaac57b24f79cd205a8c62bc1177412d22f5787a8
2014-02-27 16:05:50 -08:00
Dmitry Kovalev
8fc8583a4c Merge "Consistent names for reference_mode functions." 2014-02-25 11:04:37 -08:00
Adrian Grange
709fecac83 Trap request to display non-existant frame
If show_existing_frame indicates that the decoder should
display an existing (previously decoded) frame, add a
check to make sure that the signaled buffer does contain
a valid decoded frame.

Change-Id: Iac8c686b321827414d69a3f2d0467566911bcba2
2014-02-24 10:19:31 -08:00
Dmitry Kovalev
69fd030dc8 Consistent names for reference_mode functions.
Change-Id: I48c9e5e4ca21e11740c750ca2eabf7e8a51c52d2
2014-02-19 15:33:59 +01:00
Dmitry Kovalev
9b75f381cf Adding is_mv_valid() function.
Change-Id: I9d036244b558765b252d8c6681b22721cb2e51bb
2014-02-19 13:57:18 +01:00
Yaowu Xu
8d646becb6 Merge "Removed the reset of mode_info from previous frame" 2014-02-13 17:03:50 -08:00
Yaowu Xu
896d79a57e Removed the reset of mode_info from previous frame
Prior to this commit, both encoder and decoder reset mode/mv info from
previous frame in error resilient mode to ensure bitstreams are able to
decode when there is loss of frame in decoder side. However, this is
not necessary. This commit changed to remove the reset, so encoder can
continue to use mode/mv/partition information from previously encoded
frame without affecting decodeablilty under loss of frame.

Change-Id: I0279f862900dc647fb471ae3389770bb1b9f454f
2014-02-13 12:48:08 -08:00
Dmitry Kovalev
004c8c636e Renaming skip_coeff to skip for consistency.
Change-Id: I036e815ca63d00cba71202ae09ba0f6ef745dcb8
2014-02-12 17:44:12 -08:00
Frank Galligan
1604ad2149 Fix frames that have no references to them.
BasicRateTargeting3TemporalLayers found an error with
the get/release frame buffer management.

Change-Id: Iccff25cba1d2f276f2a0d0fb7b20cf99b4405549
2014-02-11 18:34:21 -08:00
Frank Galligan
d51ca0db00 Merge "Add get release decoder frame buffer functions." 2014-02-11 08:19:37 -08:00
Frank Galligan
e8e152799b Add get release decoder frame buffer functions.
This CL changes libvpx to call a function when a frame buffer
is needed for decode. Libvpx will call a release callback when
no other frames reference the frame buffer. This CL adds a
default implementation of the frame buffer callbacks. Currently
only VP9 is supported. A future CL will add support for
applications to supply their own frame buffer callbacks.

Change-Id: I1405a320118f1cdd95f80c670d52b085a62cb10d
2014-02-10 14:08:11 -08:00
James Zern
4e44457b4d vp9_dthread: interleave mutex/cond alloc+init
this ensures both are properly initialized when calling _dealloc().
+ check the arrays before access

Change-Id: I789af39b41c271b5cb3c029526581b4d9903b895
2014-02-06 12:39:24 -08:00
Alex Converse
41d3c989fd Propgate constants through subexp routines.
This avoids calls to get_unsigned_bits() with constants and
replaces hard to trace loops with simpler structures.

Change-Id: Ic1afc5a17d7df5bcfc85b76efda316b0bf118467
2014-02-03 11:55:46 -08:00
Jim Bankoski
9dec7712ab static function convert to inline or global vp9_blockd.h
Change-Id: Ifdd951f24932839f06d1c700371662511dde6ebe
2014-01-31 19:50:40 -08:00
Yunqing Wang
11a9366e3b Rename a loopfilter parameter
As pointed out by Dmitry and James, "partial" is a Microsoft-
specific c++ keyword, and it is renamed.

Change-Id: Ia0fc11ceb89e54b3195287f89f7e26edbbe9beb8
2014-01-31 16:30:04 -08:00
Dmitry Kovalev
88340b173b Merge "Combining fb_idx_ref_cnt[] and yv12_fb[] arrays." 2014-01-31 15:55:04 -08:00
Dmitry Kovalev
a8a2f22958 Merge "Renaming "mbskip" to "skip"." 2014-01-31 15:52:35 -08:00
Yunqing Wang
903801f1ef vp9 decoder: row-based multi-threaded loopfilter
Implemented parallel loopfiltering, which uses existing tile-
decoding threads. Each thread works on one row, and when that row
is loopfiltered, it moves to next unattended row. To ensure the
correct filtering order, threads are synchronized and one
superblock is filtered only if the superblocks it depends on are
filtered already.

To reduce synchronization overhead and speed up the decoder, we use
nsync > 1 for high resolution.

Performance tests:
1. on desktop:
8-tile 4k video using 8 threads, speedup: 70% - 80%
4-tile HD video using 4 threads, speedup: ~35%
2. on mobile device(Nexus 7):
4-tile 1080p video using 4 threads, speedup: 18% - 25%
4-tile 1080p video using 2 threads, speedup: 10% - 15%

Change-Id: If54b4a11960dd706c22d5ad145ad94156031f36a
2014-01-31 14:44:53 -08:00
Adrian Grange
64e2597465 Disable update of last_show_frame for existing frame
When showing a previously decoded frame, i.e. when
show_existing_frame=1, the update of the
last_show_frame flag must be disabled.

This is to ensure that the last_show_frame flag
reflects the state of the flag for the immediately
previously decoded frame rather then the value that
was forced to ensure that a previously decoded frame
would be displayed.

This patch also adds a test vector to verify that the
display_existing_frame flag works as expected. Code
for generating the test vector can be found in this
patch:
https://gerrit.chromium.org/gerrit/#/c/68581/

(Bug originally reported by Alexander Voronov
<ru.xalba@gmail.com>).

Change-Id: I731d288fba02088959f7fcc87707137fffc6acf5
2014-01-31 08:55:01 -08:00
Dmitry Kovalev
b107f2c470 Renaming "mbskip" to "skip".
Change-Id: I27a30b43eae026a77f92958e2238d02d9cdf7832
2014-01-29 14:48:42 -08:00
Dmitry Kovalev
6332063475 Combining fb_idx_ref_cnt[] and yv12_fb[] arrays.
Adding new RefCntBuffer struct which contains reference counter and image
buffer.

Change-Id: I71c1f532faa13442c32c43fc03ec45b6f88fb844
2014-01-29 12:48:01 -08:00
Dmitry Kovalev
8691565441 Removing subpix_fn_table struct.
We don't use different filter kernels for x and y, it is always one kernel
for both directions.

Change-Id: Iefcbb02ec74bf46ea20d9dca672a3efd5d631517
2014-01-24 17:06:26 -08:00
Dmitry Kovalev
4264c93844 Renaming INTERPOLATION_TYPE to INTERP_FILTER.
Corresponding renames:
  subpel_kernel              => interp_kernel
  vp9_get_filter_kernel()    => vp9_get_interp_kernel()
  pred_filter_type           => pred_interp_filter
  adaptive_pred_filter_type  => adaptive_pred_interp_filter
  mcomp_filter_type          => interp_filter
  read_interp_filter_type()  => read_interp_filter()
  write_interp_filter_type() => write_interp_filter()
  fix_mcomp_filter_type()    => fix_interp_filter()

Change-Id: I1fa61fa1dc81ebbf043457c3ee2d8d4515bee6d3
2014-01-24 15:57:28 -08:00
Frank Galligan
c6d537155c Merge "Revert external frame buffer code." 2014-01-24 11:31:23 -08:00
James Zern
26c88ec14e Merge changes I826655a7,I5164df72,Iba9b198c,Ide9a6846,I4f51ce85,I0e6aa00f,Ic334da9a,I252f5f8a,I7865db2d,I13b434b1
* changes:
  test/: remove unnecessary extern "C"s
  top-level: add extern "C" to headers
  vpx_ports: add extern "C" to headers
  vpx: add extern "C" to headers
  vp9/encoder: add extern "C" to headers
  vp9/decoder: add extern "C" to headers
  vp9/common: add extern "C" to headers
  vp8/encoder: add extern "C" to headers
  vp8/decoder: add extern "C" to headers
  vp8/common: add extern "C" to headers
2014-01-24 10:47:00 -08:00
Frank Galligan
b1c72b633e Revert external frame buffer code.
A future CL will add external frame buffers
differently.

Squash commit of four revert commits:
Revert "Increase required number of external frame buffers"

This reverts commit 9e41d569d7.

Revert "Add external constants."

This reverts commit bbf53047b0.

Revert "Add frame buffer lru cache."

This reverts commit fbada948fa.

Conflicts:
	vpxdec.c

Change-Id: I76fe42419923a6ea6c75d9997cbbf941d73d3005

Revert "Add support to pass in external frame buffers."

This reverts commit 10f891696b.

Conflicts:
	test/external_frame_buffer_test.cc
	vp9/common/vp9_alloccommon.c
	vp9/common/vp9_reconinter.c
	vp9/decoder/vp9_decodeframe.c
	vp9/encoder/vp9_onyx_if.c
	vp9/vp9_dx_iface.c
	vpx/vpx_decoder.h
	vpx/vpx_external_frame_buffer.h
	vpx_scale/generic/yv12config.c
	vpxdec.c

Change-Id: I7434cf590f1c852b38569980e4247fad0d939c2e
2014-01-24 10:10:20 -08:00
James Zern
40aa910c19 vp9/decoder: add extern "C" to headers
Change-Id: I0e6aa00f220280e22d30d098545265835d0c1079
2014-01-23 16:21:24 -08:00
Yaowu Xu
10b0813a9c Changed to prevent decoder crash
The change prevent a decoder crash for invalid stream with negative
size.

Change-Id: I7411765f3524c783058fa3d436549be4e75d8969
2014-01-23 15:43:08 -08:00
hkuang
7f30a6f877 Merge "Seperate the border size for encoder and decoder." 2014-01-22 10:59:31 -08:00
Adrian Grange
c77c5413e0 Merge "Force show_frame=1 when show_existing_frame=1" 2014-01-22 08:34:48 -08:00
hkuang
437004c710 Seperate the border size for encoder and decoder.
Encoder's boarder is still 160, while decoder's boarder will be 32.
With on demand and separate boarder buffer for boarder extension.
The decoder's boarder does not need to to 160 anymore.

Change-Id: I93d5aaff15a33a2213e9761eaa37c5f2870747db
2014-01-21 15:28:41 -08:00
Adrian Grange
3246692ebc Force show_frame=1 when show_existing_frame=1
When showing a previously decoded frame, we need to
explicitly set the show_frame flag.

For the current frame being decoded this flag is
explicitly set in the frame header.

This should fix WebM Issue 696:
http://code.google.com/p/webm/issues/detail?id=696

Change-Id: I5751a809813f88d2ca6f62c47c3878475ff9ba8d
2014-01-21 10:39:39 -08:00
Jingning Han
318e177f4a Deprecate the use of best_mv in decoding process
This commit removes the use of best_mv in the decoding process. This
variable can be replaced with nearest_mv. It saves a few cycles on
assigning the values for best_mv.

Change-Id: Ic183f9c1fb615c54efd7e6ccfedcf09d493435e4
2014-01-16 18:04:58 -08:00
Dmitry Kovalev
bbb25e6a39 Merge "Adding RefBuffer struct." 2014-01-06 14:19:44 -08:00
Dmitry Kovalev
5771276fda Moving get_scan() call out of decode_coeffs() function.
Change-Id: I5db2e5a6c36e6c503dea2e07d9d2e0daf4ac9d89
2014-01-03 18:18:39 -08:00
Dmitry Kovalev
ba41e9d459 Adding RefBuffer struct.
Adding RefBuffer to simplify reference buffer management. The struct has a
pointer to image data and scale factors relative to the current frame.

Change-Id: If38eb1491ff687cc11428aee339f3e052e2c5d9e
2014-01-03 15:21:55 -08:00
Yaowu Xu
8458c8c450 Merge "Fix show existing frame" 2014-01-02 09:27:28 -08:00
Dmitry Kovalev
1e8b5bf4ac Merge "Removing vp9_findnearmv.{h, c} files." 2013-12-26 13:38:38 -08:00
Dmitry Kovalev
f69b5609ff Renaming vp9_dboolhuff.{h, c} to vp9_reader.{h, c}.
Change-Id: I50c009ff8108bda1c57427f23d63a79c04f7e776
2013-12-20 12:53:03 -08:00
Dmitry Kovalev
987810ad95 Removing vp9_findnearmv.{h, c} files.
Moving all code from that files to vp9_mvref_common.{h, c}.

Change-Id: Ibc4afcb8cea6847166ff411130e93611ebe63b20
2013-12-19 17:39:57 -08:00
Dmitry Kovalev
a3fbcc88bb Using single struct to represent scale factors.
Moving back to scale_factors struct. We don't need anymore x_offset_q4 and
y_offset_q4 because both values are calculated locally inside vp9_scale_mv
function.

Change-Id: I78a2122ba253c428a14558bda0e78ece738d2b5b
2013-12-19 16:06:33 -08:00
Dmitry Kovalev
c67ee5ea24 Merge "Converting vp9_treecoder.h to vp9_prob.{h, c}" 2013-12-19 11:03:30 -08:00
Johann
dc2c62eba8 Cast away Windows warning
Subtracting the pointers promoted to a signed type.

Change-Id: Ied0e822a1756ed7b2f514efafcb6dce4efb9b9d6
2013-12-18 15:52:51 -08:00
Johann
85770264ac Fix incorrect size reading
Guard against incorrect size values moving *data past data_end.

Check read length against the difference of the buffers.

Change-Id: Ie0b54e2db517fd41a0f3ceb23402ee44839a4739
2013-12-17 18:48:55 -08:00
Johann
83baed0b6b Merge "Add const to match declaration" 2013-12-16 19:17:43 -08:00
Johann
5894e7ef50 Add const to match declaration
The definition fell out of sync in
I7d2fda72de5fc27e86c6589543b41fa044681dbf

Change-Id: I3ce3f6ba96bb121f51efaa08f64a69ad9f731a9e
2013-12-16 15:46:11 -08:00
hkuang
fb53409d2a Merge "Remove border extension in intra frame prediction." 2013-12-16 14:48:54 -08:00
hkuang
25e5552630 Remove border extension in intra frame prediction.
Change-Id: Id677df4d3dbbed6fdf7319ca6464f19cf32c8176
2013-12-16 14:05:58 -08:00
Dmitry Kovalev
b5c9261832 Converting vp9_treecoder.h to vp9_prob.{h, c}
Moving vp9_norm probability table from vp9_entropy.c to vp9_prob.c

Change-Id: Ie757b73860c6f43130790c332b292e2a1a81b788
2013-12-16 12:53:09 -08:00
Frank Galligan
d0ee1fd797 Merge "Add support to pass in external frame buffers." 2013-12-15 19:18:25 -08:00
Frank Galligan
10f891696b Add support to pass in external frame buffers.
VP9 decoder can now use frame buffers passed in by the application.

Change-Id: I599527ec85c577f3f5552831d79a693884fafb73
2013-12-15 18:45:46 -08:00
Dmitry Kovalev
f54b515797 Merge "Cleaning up vp9_append_sub8x8_mvs_for_idx()." 2013-12-13 15:38:53 -08:00
James Zern
3aa75bcef6 Merge "vp9 asserts: fix compile warning" 2013-12-13 12:41:31 -08:00
Dmitry Kovalev
e121bf4c1d Moving mi configuration loop from vp9_read_mode_info to set_offsets.
set_offsets() is a right place to configure all mi-related pointers.

Change-Id: I7d2fda72de5fc27e86c6589543b41fa044681dbf
2013-12-12 19:56:30 -08:00
James Zern
178db94cd6 vp9 asserts: fix compile warning
string literal to int within an assert

Change-Id: I0c889256b67a078e6e2a79577f0b7ae084243258
2013-12-12 19:49:19 -08:00
James Zern
345fbfef06 vp9 mt decode: reorder tile decode
reorder the tiles based on size and their presumed complexity. this
minimizes the cases where the main thread is waiting on a worker to
complete.

Change-Id: Ie80642c6a1d64ece884f41683d23a3708ab38e0c
2013-12-10 18:33:27 -08:00
Dmitry Kovalev
098d13ba10 Cleaning up vp9_append_sub8x8_mvs_for_idx().
Replacing if-else with switch statement, reordering function arguments.

Change-Id: I4825d2ef311ba8999b6d4ceb0eef003587a13434
2013-12-10 17:56:53 -08:00
Dmitry Kovalev
1048a7e314 Merge "Cleaning up skip context calculation." 2013-12-10 15:00:22 -08:00
Dmitry Kovalev
bcee73f7ae Merge "Cleaning up read_inter_block_mode_info() function." 2013-12-10 14:59:36 -08:00
Dmitry Kovalev
2dd20e468a Cleaning up skip context calculation.
Renames:
  vp9_get_pred_context_mbskip => vp9_get_skip_context
  vp9_get_pred_prob_mbskip    => vp9_get_skip_prob

Change-Id: I2af499848ef73f3f5cd8cdb27852d0bcdfe31d09
2013-12-10 14:11:26 -08:00
Dmitry Kovalev
e18eb7721e Merge "Renaming comp_pred_mode to reference_mode." 2013-12-10 10:52:34 -08:00
hkuang
d70a8c09c6 Merge "Implenment on demand border extension. In place extend the border now. Next commit will totally remove the border." 2013-12-09 17:16:31 -08:00
hkuang
ff2c96be1f Implenment on demand border extension. In place extend
the border now. Next commit will totally remove the border.

Change-Id: Ic1e1ca9cc34f81c688715b3948689b47df63a151
2013-12-09 16:44:08 -08:00
Dmitry Kovalev
08c48ddc01 Renaming comp_pred_mode to reference_mode.
Change-Id: I83ffed2b1878a35ac35f07f9ee74309adc9c7b11
2013-12-09 15:13:34 -08:00
Dmitry Kovalev
347df4ce55 Merge "Renaming vp9_get_pred_context_tx_size() function." 2013-12-09 15:10:49 -08:00
Dmitry Kovalev
7293ef7ac0 Cleaning up read_inter_block_mode_info() function.
Change-Id: Ib4e215a80f00e342d857a54a4ca1b2dc82b6db1d
2013-12-09 14:45:17 -08:00
Dmitry Kovalev
a19d694f09 Merge "Removing BLOCK_TYPES and adding PLANE_TYPES constant instead." 2013-12-07 02:20:41 -08:00
Dmitry Kovalev
cb92f4f042 Renaming vp9_get_pred_context_tx_size() function.
Change-Id: Ia6d6f4dfb1fd1ec0f8ba53796b59a802e9d7881d
2013-12-06 15:31:06 -08:00
Dmitry Kovalev
63963f51ef Renaming reference mode context calculation function.
Renames:
  vp9_get_pred_context_comp_inter_inter => vp9_get_reference_mode_context
  vp9_get_pred_prob_comp_inter_inter    => vp9_get_reference_mode_prob

Change-Id: I3bbb69481e6b0c848028667c9269f567f293d3bd
2013-12-06 11:23:01 -08:00
Dmitry Kovalev
d6b159d4a6 Removing BLOCK_TYPES and adding PLANE_TYPES constant instead.
Change-Id: Ic3bb862e93aedf6a489a33ea6f7e5097d96855ee
2013-12-06 10:54:00 -08:00
Dmitry Kovalev
8eac2ca840 Merge "Renaming constants." 2013-12-06 09:55:02 -08:00
Dmitry Kovalev
5be34ba80f Merge "vp9_get_pred_context_intra_inter() clean up." 2013-12-06 09:14:36 -08:00
Dmitry Kovalev
377fa8aff8 Renaming PREV_COEF_CONTEXTS to COEFF_CONTEXTS.
Also adding BAND_COEFF_CONTEXTS macro to simplify for loop logic.

Change-Id: I12a78a49cf1addf81e6b3fe2a3736ec2b79bd79e
2013-12-05 17:08:06 -08:00
Dmitry Kovalev
6fd71e1b09 vp9_get_pred_context_intra_inter() clean up.
Renaming:
 vp9_get_pred_context_intra_inter => vp9_get_intra_inter_context
 vp9_get_pred_prob_intra_inter    => vp9_get_intra_inter_prob

Change-Id: I2c1affea2e84f4e616137c6df82adb11c7845781
2013-12-05 17:01:03 -08:00
Dmitry Kovalev
da519166e9 Merge "Cleaning up vp9_detokenize.c file." 2013-12-05 16:45:10 -08:00
Dmitry Kovalev
0d4b8d7e43 Renaming constants.
NUM_YV12_BUFFERS        => FRAME_BUFFERS
ALLOWED_REFS_PER_FRAME  => REFS_PER_FRAME
NUM_REF_FRAMES_LOG2     => REF_FRAMES_LOG2
NUM_REF_FRAMES          => REF_FRAMES
NUM_FRAME_CONTEXTS_LOG2 => FRAME_CONTEXTS_LOG2
NUM_FRAME_CONTEXTS      => FRAME_CONTEXTS

Change-Id: I4e1ada08f25d8fa30fdf03aebe1b1c9df0f87e63
2013-12-05 16:23:09 -08:00
Tero Rintaluoma
047b0b01bb Fix show existing frame
- Disable mode info update in case where current frame is coded
  as "show existing frame".
- Should fix issue 676.

Change-Id: Ibee681850eb307f982da6528d3e31cb94f881c08
2013-12-05 12:10:10 +02:00
Frank Galligan
8363349b84 Merge "Fix the initial references to frame buffers." 2013-12-04 19:26:40 -08:00
Dmitry Kovalev
934e10d0f1 Cleaning up vp9_detokenize.c file.
Using consistent names (block_idx => block, dqcoeff_ptr => dqcoeff,
pt => ctx), inlining get_tx_eob() call.

Change-Id: I05208e57df81bbb8f25b8274684a48192e9de464
2013-12-04 17:24:18 -08:00
Frank Galligan
9ed616a56c Fix the initial references to frame buffers.
The old code would start in a mixed state, where all the reference
frames were pointing to frame buffer 0, but the reference counts
were 0. This is why we needed special code for the first frame.

Change-Id: I734961012917654ff8c0c8b317aac00ab75ded1a
2013-12-04 16:53:18 -08:00
Dmitry Kovalev
3712b58c2f Merge "Cleaning up vp9_entropy.h file." 2013-12-04 16:46:41 -08:00
Dmitry Kovalev
f00d157c12 Moving eob array to the encoder.
In the decoder we don't need to save eobs, we can pass eob as an argument.
That's why removing eob arrays from VP9Decompressor and TileWorkerData,
and moving eob pointer from macroblockd_plane to macroblock_plane.

Change-Id: I8eb919acc837acfb3abdd8319af63d1bbca8217a
2013-12-03 17:59:32 -08:00
Dmitry Kovalev
8e89e2f2e0 Cleaning up vp9_entropy.h file.
Renaming constants for consistency:
  DCT_VAL_CATEGORY1 => CATEGORY1_TOKEN
  DCT_VAL_CATEGORY2 => CATEGORY2_TOKEN
  DCT_VAL_CATEGORY3 => CATEGORY3_TOKEN
  DCT_VAL_CATEGORY4 => CATEGORY4_TOKEN
  DCT_VAL_CATEGORY5 => CATEGORY5_TOKEN
  DCT_VAL_CATEGORY6 => CATEGORY6_TOKEN
  DCT_EOB_TOKEN     => EOB_TOKEN
  DCT_EOB_MODEL_TOKEN => EOB_MODEL_TOKEN
  MAX_ENTROPY_TOKENS => ENTROPY_TOKENS

Moving constants:
  INTER_MODE_CONTEXTS from vp9_entropy.h to vp9_blockd.h.
  EOSB_TOKEN from vp9_entropy.h to vp9_tokenize.h

Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
2013-12-03 17:23:03 -08:00
Dmitry Kovalev
fd16baae25 Merge "Making names consistent with REFERENCE_MODE enum name." 2013-12-03 12:48:34 -08:00
Dmitry Kovalev
4585b9dbac Merge "Removing token_to_counttoken array." 2013-12-03 12:29:56 -08:00
Dmitry Kovalev
54b5deff77 Removing token_to_counttoken array.
Change-Id: I02050bcca4c9fd68a00abdea5aba0c3f8993d9a9
2013-12-02 18:41:53 -08:00
Dmitry Kovalev
5ab920d2ae Using local variable for token_cache.
The difference with the old code is that originally the whole token_cache
was initialized with zeros at the beginning of decode_coefs() function.
Now we set several zero values explicitly with "token_cache[scan[c]] = 0".

Change-Id: I88cc5031f01d13012d1a4491739c36cb44f9401e
2013-12-02 15:44:26 -08:00
Dmitry Kovalev
9144111296 Cleaning up decode_coefs() function.
Removing goto and using while loop instead, renaming seg_eob to max_eob,
moving eob token counter increment.

Change-Id: Idcc4b3a45e4f313596a71776aef56691a6647e5f
2013-12-02 14:36:06 -08:00
Dmitry Kovalev
d3a2e55af4 Removing qcoeff buffers from the decoder.
We only need qcoeff buffers in the encoder. Reducing TileWorkerData struct
and VP9Decompressor struct sizes by 24K.

Change-Id: Id148868461f7ffa3d3dd634b371503ae9c57e207
2013-11-26 18:52:10 -08:00
Dmitry Kovalev
c5bdc9dfd2 Making names consistent with REFERENCE_MODE enum name.
Change-Id: I17268af3e0cbf7e5788c3154466e404947c944b3
2013-11-26 16:46:13 -08:00
Dmitry Kovalev
d7efe068d2 Deleting vp9_treereader.h file.
Renaming treed_read() to consistent vp9_read_tree() and moving it from
deleted vp9_treereader.h to vp9_dboolhuff.h file.

Change-Id: Iedd8655acbe25e4fcf62b79e5a13bdea69b6b004
2013-11-26 12:38:58 -08:00
Dmitry Kovalev
e8af3db88a Merge "Renaming COMPPREDMODE_TYPE enum and its members." 2013-11-25 10:59:08 -08:00
Jingning Han
ba8b5e8d6d Use separate inter predictors for enc/dec
The decoder will construct inter predictor using lazy border extension,
while the encoder, going with multiple runs of motion search in the rate-
distortion optimization loop for each block, does border extension at
frame level. This commit makes separate the inter predictors for encoder
and decoder, respectively.

Change-Id: Ieca2fecba3a7201a6d64ef9f219e5d91e50559c3
2013-11-25 09:43:34 -08:00
Jingning Han
12e5ec6aa8 Merge "Separate setup_scale_factor/extend_frame_borders" 2013-11-25 09:14:46 -08:00
Dmitry Kovalev
52b43a2876 Inlining and removing vp9_set_pred_flag_seg_id() function.
Change-Id: I0fd76937e847f78378a7ab3fa0af00a7c2c52b42
2013-11-22 17:32:11 -08:00
Dmitry Kovalev
fb9c19c62d Renaming COMPPREDMODE_TYPE enum and its members.
List of renames:
  COMPPREDMODE_TYPE      => REFERENCE_MODE
  SINGLE_PREDICTION_ONLY => SINGLE_REFERENCE
  COMP_PREDICTION_ONLY   => COMPOUND_REFERENCE
  HYBRID_PREDICTION      => REFERENCE_MODE_SELECT (like TX_MODE_SELECT)
  NB_PREDICTION_TYPES    => REFERENCE_MODES

Change-Id: If723dabe9435325d0165dcd028142a2c78b417b4
2013-11-22 16:35:37 -08:00
Dmitry Kovalev
350731e8f9 Organizing all scan tables into lookup table.
Change-Id: Ie829ee58a55157e6972c63cebe69a5d0a3221349
2013-11-22 16:20:45 -08:00
Jingning Han
86d2a9b978 Separate setup_scale_factor/extend_frame_borders
This commit takes out vp9_extend_frame_borders from
vp9_setup_scale_factors.

The refactoring is for the preparation of the use of lazy border
extension at decoder. This makes it necessary to handle border
extension separately at encoder/decoder. The use of
vp9_extend_frame_borders will be removed, when lazy border extension
is ready.

Change-Id: Ia3baba3d179d5f11eee1634f19b3b319d2a59186
2013-11-22 12:02:08 -08:00
Dmitry Kovalev
e0ec61187e Merge "Removing txfrm_block_to_raster_xy() call from extend_for_intra()." 2013-11-22 10:51:38 -08:00
Jim Bankoski
a64a192c90 Merge changes Id1698a35,Idcabd0b9
* changes:
  detokenization speedups
  Don't write 0's to token_cache
2013-11-22 08:16:17 -08:00
Dmitry Kovalev
7c8cac3c21 Removing txfrm_block_to_raster_xy() call from extend_for_intra().
Change-Id: I6a48d1f35ed5fe7a2c7499675b339994c9c3bdf2
2013-11-21 19:30:58 -08:00
Jim Bankoski
70ffd5d055 detokenization speedups
removed unnecessary ifs and branches ..

Change-Id: Id1698a35292659388f48926791024d1400f2cea9
2013-11-21 16:55:22 -08:00
Jim Bankoski
b38e42fe9d Don't write 0's to token_cache
This code only updates the token_cache if the result is non0.

Change-Id: Idcabd0b993a926fea9c29dbec134b9c5c4859b40
2013-11-21 12:52:15 -08:00
Dmitry Kovalev
4956fcd31b Adding MV_FP_SIZE constant.
Change-Id: I98d750ee92ff51fb714980418ea28be3b1d0f3c6
2013-11-20 12:07:57 -08:00
Jim Bankoski
7a8a68e2bd Merge "scan order table lookup same for encoder and decoder" 2013-11-19 16:22:48 -08:00
Jim Bankoski
d6667dd54f scan order table lookup same for encoder and decoder
Change-Id: I473947b5ca70b7a81151926284bff86f8555492a
2013-11-19 15:31:43 -08:00
Dmitry Kovalev
86b629efb6 Merge "Calculating dst pointer only once per transform block." 2013-11-19 15:05:46 -08:00
Jim Bankoski
8cf352abac entropy code speedup
Change-Id: Ic316d3374ff9a2b43897272260947d56765a0fdd
2013-11-19 14:31:38 -08:00
Jim Bankoski
ff4f1c4b76 scan order / neighbors converted to lookup
Change-Id: I64b189dfeee1cf3e90134a1a93497072f3361e5e
2013-11-19 12:55:44 -08:00
Dmitry Kovalev
b5c4520101 Calculating dst pointer only once per transform block.
Change-Id: I23fea0a2e85be8373600e3e2dae98d36acde389c
2013-11-18 18:37:53 -08:00
Yaowu Xu
1c61e1960d Move vp9_extend.{h,c} from common to encoder
Since they used in encoder only. This commit also re-order includes
for the files that include vp9_extend.h

Change-Id: I929fc113f2135d3198cd1fc6a17434e5a2f8a459
2013-11-18 12:43:36 -08:00
Yaowu Xu
49cbe4580d Renamed two files
from vp9_decodframe.{c,h} to vp9_decodeframe.{c,h}

Change-Id: I21ac4b14fc90246e3f16bd90c52c12d126d791f8
2013-11-15 12:48:43 -08:00
Adrian Grange
38144ed8b2 fix scalling bug by buffer auto-reallocation
Change-Id: Ib748eb287520c794631697204da6ebe19523ce95
2013-11-14 15:53:09 -08:00
Dmitry Kovalev
e6b72d0119 Removing unused coefband_trans_8x8plus array from VP9Decompressor.
Change-Id: Ic1367d767705377402ebfec0705f9f553a834400
2013-11-14 13:37:18 -08:00
Deb Mukherjee
cfcd5c4f61 Simplifies band-getting with a static array
Simplifies the code by implementing band mapping with static arrays.
A lot of the code complexity introduced in a previous patch
disappears.

Change-Id: Ia3fac36e594fb5ad2d55ae141c58bba4c55c2d28
2013-11-13 22:15:16 -08:00
Dmitry Kovalev
11631fec16 Cleaning up decode_coefs() function.
Removing vp9_read_and_apply_sign macro which was used only once.

Change-Id: I6a1625b720d89fc1291c99deccd6638b705f9b06
2013-11-13 16:46:21 -08:00
Dmitry Kovalev
919eeef5c8 Merge "Calculating transform block offsets (x and y) only once." 2013-11-12 16:57:30 -08:00
Dmitry Kovalev
73a5cbeba4 Merge "Using max_tx_size instead of bsize when possible." 2013-11-12 16:54:30 -08:00
Dmitry Kovalev
ed5a993a97 Calculating transform block offsets (x and y) only once.
Change-Id: I4b5106bdc08fd4551339b968c13428a8f43122e2
2013-11-12 13:55:13 -08:00
Deb Mukherjee
5ade423774 Removes conditional statements from band getting
Implements scan order to band map with arrays in both the encoder
and decoder to remove conditional statements.

Encoding seems to be about 1% faster at speed 0, tested on football.
Decoding seems to be about 0.5-1% faster on a set of 25 videos.

Change-Id: Idb233ca0b9e0efd790e30880642e8717e1c5c8dd
2013-11-12 10:13:27 -08:00
Dmitry Kovalev
42b1f62085 Removing redundant assignment.
xd->mi_8x8 is assigned inside set_offsets() for each prediction block.

Change-Id: I20e5974a9eaf105e5a04fc7f99b7a93bd50e3d0a
2013-11-11 17:39:43 -08:00
Jingning Han
d8b4c79270 Decouple macroblockd_plane buffer usage
Make the macroblockd_plane contain dynamic buffer pointers instead
static pointers to the memory space allocated therein. The decoder
uses the buffer allocated in pbi, while encoder will use a dual
buffer approach for rate-distortion optimization search.

Change-Id: Ie6f24be2dcda35df7c15b4014e5ccf236fb3f76c
2013-11-11 15:26:10 -08:00
Dmitry Kovalev
ec8128e27f Merge "Replacing (raster_block >> tx_size) with (block >> (tx_size << 1))." 2013-11-11 12:27:42 -08:00
Dmitry Kovalev
c53a9c70fb Merge "Localizing NEARESTMV special cases in the code." 2013-11-11 11:12:06 -08:00
Dmitry Kovalev
3aa4b42a35 Merge "Cleaning up read_mv_probs() function." 2013-11-11 11:01:35 -08:00
Dmitry Kovalev
974a27131e Merge "Adding read_reference_mode() function." 2013-11-11 11:00:51 -08:00
Yaowu Xu
cae7e0741a [BITSTREAM]Fix row tile mode_info pointer setup
This commit fixes the assignment of mode_info pointer per tile. It
makes recognition of tiles in both row and column formats and properly
arrange the use of mode_info.

The bug was first introduced in
I6226456dd11f275fa991e4a7a930549da6675915
https://gerrit.chromium.org/gerrit/#/c/67492/

Change-Id: Ie12cd209f53241513728c461ee3d7b9599ddb860
2013-11-08 22:06:53 -08:00
Yaowu Xu
a596975eb6 Correct a couple of typos
Change-Id: Ic470c6c9ce27b615c9645b9cb0d67526417bc374
2013-11-08 12:43:51 -08:00
Dmitry Kovalev
614effc0f6 Merge "Unifying tile decoding for both direct and inverse tile order." 2013-11-08 10:59:02 -08:00
Dmitry Kovalev
d28f30ef4e Replacing (raster_block >> tx_size) with (block >> (tx_size << 1)).
The new expression is much more logical than previous one. Surprisingly
both expressions give exactly the same set of dependent values
-- have_top, have_left, have_right -- in vp9_predict_intra_block.

Change-Id: I63eb1b592b8c37883b3a0dbb1f3daa271e446109
2013-11-07 15:26:57 -08:00
Deb Mukherjee
6cf3b98ac2 Merge "Miscelleneous changes in detokenize for speed" 2013-11-07 09:40:07 -08:00
Dmitry Kovalev
672ba3ddf5 Unifying tile decoding for both direct and inverse tile order.
Now tile decoding consists of two stages:
1. Find tile buffer start and its size, put this info into tile_buffers.
2. Decode each tile based on information from tile_buffers.

It seems that stage 1 can also be reused by multithreaded tile decoder.

Change-Id: If0cdaefdd6d10bb41c63561346c9ae4cfac081dd
2013-11-06 18:15:33 -08:00
Dmitry Kovalev
af36c1f2e7 Merge "Using pd->dqcoeff instead of pd->qcoeff in the decoder." 2013-11-06 16:59:57 -08:00
Dmitry Kovalev
a1dc97beb1 Using pd->dqcoeff instead of pd->qcoeff in the decoder.
It is more logical to use dqcoeff buffer to put there *dequantized*
transform coefficients (inside inverse_transform_block and
decode_coefs functions). Dequantization happens inside WRITE_COEF_CONTINUE
macro.

qcoeff buffer should be only used in the encoder for *quantized*
transform coefficients.

Change-Id: Ifd54bef272bbf5311ced6669c4f1079f998af5d7
2013-11-06 16:14:45 -08:00
Dmitry Kovalev
7b011c5467 Replacing mi_{width,height}_log2 with num_8x8_blocks_{wide,high}_lookup.
Change-Id: I04c55daef89bca2b85cb7db0850f9b052abc5a7c
2013-11-06 13:34:23 -08:00
Yaowu Xu
103c4603d2 Merge "optimize decode_bool operation" 2013-11-06 10:25:52 -08:00
Dmitry Kovalev
4a96e64dc2 Using max_tx_size instead of bsize when possible.
Change-Id: I246364bc4270ca13aefb4bc3445bcf102b3170dc
2013-11-05 17:36:43 -08:00
Yaowu Xu
278856319b Simply a macro
Change-Id: I1c0c1b92aab33b1e4321b8e584a934fe58e0b324
2013-11-05 17:13:00 -08:00
Dmitry Kovalev
6c217d97df Adding read_reference_mode() function.
Change-Id: I517ad7e1a48910f0d2e95feacd23f143d28b42d6
2013-11-05 14:57:05 -08:00
Dmitry Kovalev
d172201403 Cleaning up read_mv_probs() function.
Change-Id: I7a1e88b5977076e22736c0d6af1d4dcc19d39a6a
2013-11-05 14:43:35 -08:00
Dmitry Kovalev
815189613b Localizing NEARESTMV special cases in the code.
Removing special case handling from vp9_tree_probs_from_distribution(),
tree_merge_probs(), and vp9_tokens_from_tree_offset() functions. Replacing
inter_mode_offset() function with macro INTER_OFFSET which is used now for
vp9_inter_mode_tree definition.

Change-Id: Iff75a1499d460beb949ece543389c8754deaf178
2013-11-05 11:58:57 -08:00
Deb Mukherjee
551829d8f3 Miscelleneous changes in detokenize for speed
Changes to reduce branching in detokenization  in order
to improve decode speed.

Change-Id: I23a74d072cc14d99f6fc054c1e6a72021e777903
2013-11-05 10:27:36 -08:00
Deb Mukherjee
3a833ea38f token_cache changes in decoder
Removes stack-alocation of token_cache in decode_coefs function

Seems to achieve about 1% decode speed improvement as tested on
25 480p videos.

Change-Id: I8e7eb3361fa09d9654dfad0677a6d606701fdc6e
2013-11-05 09:32:58 -08:00
Yaowu Xu
9f37d89037 optimize decode_bool operation
Change-Id: I7fe44633d29046ddd38c88c00e8520d27ac748bf
2013-11-04 17:10:18 -08:00
Dmitry Kovalev
dde8069e57 Splitting partition_probs array into two arrays.
We only update partition_probs for inter frames but they are constant
for key frames. It is not necessary to have constants inside frame
context and copy them every time. This change reduces FRAME_CONTEXT size
by at least 48 bytes.


Change-Id: If70a53be51043f37fe7d113853217937710932a7
2013-11-04 14:26:16 -08:00
Dmitry Kovalev
5113d9c3c9 Merge "Cleaning up read_skip_coeff() function." 2013-11-01 10:56:55 -07:00
Yaowu Xu
a272530bf0 Two optimizations:
1. Reduced the size memset based on eob for 32x32 transform. The reset
of non-zero coefficient should probably go into where they are read in
inverse transform functions. (TODO)
2. Removed a redundant level of indirection.
vp9_iht4x4_add() checks transform type and call vp9_iht4x4_16_add()
for tranforms other than DCT_DCT. In this case, the DCT_DCT case
has been already handled here.

Change-Id: Iacbc77da761f0b308df5acea0f20c9add9f33d20
2013-11-01 07:24:07 -07:00
Yaowu Xu
a49e77af50 simplify read_coef_prob()
Change-Id: I529c634db4f81ba5386092c126f53312b1e51b2b
2013-10-31 16:39:08 -07:00
Dmitry Kovalev
970eb39bdc Cleaning up read_skip_coeff() function.
Making code easier to read and avoiding calculation of skip context twice.

Change-Id: I42c376b1a1811bc842bf6420bf81d2de7a1bf980
2013-10-31 14:53:18 -07:00
Dmitry Kovalev
47b6030dda Reducing the number of foreach_transformed_block() calls.
The change doesn't affect the bitstream. It changes the order or function
calls and affects how we reconstruct intra- and inter-blocks. Speed up is
about 1...1.5%.

For intra-blocks:
  Before:
    for each transform block read tokens
    for each transform block do prediction
    for each transform block do inverse transform
  Now:
    for each transform block
      read tokens
      do prediction
      do inverse transform

For inter-blocks:
  Before:
    for each transform block read tokens
    for each transform block do inverse transform
  Now:
    for each transform block
      read tokens
      do inverse transform

Change-Id: I12a79bf1aa5a18c351b8010369bd3ff1deae1570
2013-10-31 13:52:08 -07:00
Dmitry Kovalev
ca39a00822 Merge "Reducing the number of recursive calls." 2013-10-30 15:14:18 -07:00
Dmitry Kovalev
6761872e49 Replacing (SWITCHABLE_FILTERS + 1) with SWITCHABLE_FILTER_CONTEXTS.
Change-Id: I9781a62bc1a4cd9176554d1271d87dbcafda9cb0
2013-10-30 14:40:34 -07:00
Dmitry Kovalev
2901bf2d00 Reducing the number of recursive calls.
Both decode_modes_sb and decode_modes_b had conditions to immediately
return at the beginning. Eliminating these conditions here and calling
these functions only to do a real work. Also unrolling loop for
PARTITION_SPLIT.

Change-Id: I2fc41cb74ac491f045a2f04fe68d30ff4aaa555d
2013-10-30 12:17:05 -07:00
James Zern
54c2854fe2 vp9/decode: align tile worker data allocation
fixes a crash in assembly on 32-bit linux/windows

Change-Id: I0c27e6c0ece9732b5eb2ee5b59ff42c3c8016c50
2013-10-30 08:33:09 +01:00
Johann
2a67a34f4a Merge "vp9_decodframe.c: use vpx_memset instead of cast" 2013-10-29 18:40:18 -07:00
James Zern
ce053e7006 Merge "vp9: add multi-threaded tile decoder" 2013-10-29 17:44:22 -07:00
James Zern
3b47e05908 Merge "vp9/decode: add get_tile()" 2013-10-29 17:34:56 -07:00
James Zern
fb484524bd vp9: add multi-threaded tile decoder
tiles are decoded in parallel within a single frame

Change-Id: I7aca87cb1c239b74eceef72bdc9f672faebac373
2013-10-30 01:00:20 +01:00
James Zern
6b00202f1b vp9/decode: add get_tile()
factorizes the code in decode_tiles(). reading the offsets backwards
wasn't doing anything to prove tile independence

Change-Id: I0395d3c77205852ebdc55efedc68291e93cef85c
2013-10-30 01:00:07 +01:00
Johann
dc799a875b vp9_decodframe.c: use vpx_memset instead of cast
Fix warning with -Wstrict-aliasing=1

Change-Id: Idfac09be1ab328923883e63436577f1018c895b8
2013-10-29 13:52:48 -07:00
Dmitry Kovalev
156de9c3ef Correct handling of show_bit in uncompressed header.
"keyframe" variable in the current code actually means that previous
frame is a keyframe because cm->frame_type has not been initialized
in read_uncompressed_header.

Change-Id: I5645b0816c70abdef5dfc70113018d06276dac77
2013-10-29 11:24:08 -07:00
Dmitry Kovalev
e5956258dd Merge "Making get_tx_counts() similar to get_tx_probs()." 2013-10-29 10:48:50 -07:00
James Zern
7795c1911e Merge "vp9_decode_frame: group assignments/setup calls" 2013-10-29 03:34:10 -07:00
James Zern
d39f279daa vp9_decode_frame: group assignments/setup calls
group error checking at the top followed by allocations, setup then
decode.

Change-Id: I877d21326bb767885520511ecea70e5fd1e28054
2013-10-29 11:03:50 +01:00
Dmitry Kovalev
fa1ac00aee Making get_tx_counts() similar to get_tx_probs().
Change-Id: I5b17f40e515c4bcf9ebef5380270a214af4e0115
2013-10-28 19:52:38 -07:00
Dmitry Kovalev
19cf72eddc Adding {read, write}_partition() instead of check_bsize_coverage().
Making partition read/write logic more clear.

Change-Id: I1981e90327257d37095567c62d72a103cda1da33
2013-10-28 15:14:45 -07:00
James Zern
58a0f6dbdd vp9: add TileInfo
replaces use of cur_tile_mi_(row|col)_(start|end) by VP9_COMMON, making
it less stateful and more reusable for parallel tile decoding

Change-Id: I1df09382b4567a0e5f4434825d47c79afe2399be
2013-10-28 20:54:43 +01:00
James Zern
f0eabfd432 vp9_decodframe: limit scope of private function params (2)
replace VP9D_COMP usage with the (slightly) more targeted
VP9_COMMON/MACROBLCKD structures.

Change-Id: Ifdd9034f44d69eb94e232dd03c922de763b96a30
2013-10-28 20:48:59 +01:00
James Zern
3ffa41aae3 Merge changes If9b16f7d,I75aab21c,I9cbb768c,If5cea3d3,I96940657,I025595d8,Ie0bc3935,I3ebb172d
* changes:
  vp9: remove partition+entropy contexts from common
  vp9: add above/left_context to MACROBLOCKD
  vp9: add above/left_seg_context to MACROBLOCKD
  vp9: add above/left_context to encoder
  vp9: add above/left_seg_context to encoder
  vp9: pass entropy context directly to set_skip_context
  vp9: pass context directly to partition functions
  vp9/decode: add alloc_tile_storage()
2013-10-28 12:45:11 -07:00
James Zern
e571d3badc vp9: add above/left_context to MACROBLOCKD
Change-Id: I75aab21c1692cbad717564cbb436578fddbc348d
2013-10-28 11:34:18 +01:00
James Zern
d9a317c8b2 vp9: add above/left_seg_context to MACROBLOCKD
Change-Id: I9cbb768c5f857a096cf6c29d6755d0e5e6728435
2013-10-28 11:32:16 +01:00
James Zern
8f177bb0b6 vp9 decode: defer loop filter allocation
wait until do_loopfilter_inline is true before committing the resources

Change-Id: I01661bd40599b47362bb3fb534668471f2a9d8d7
2013-10-26 11:57:44 +02:00
Dmitry Kovalev
07502f1963 Merge "Adding get_frame_new_buffer() function to replace duplicated code." 2013-10-25 15:25:13 -07:00
James Zern
d2bf696ee0 vp9: pass entropy context directly to set_skip_context
this will allow for separate storage to be used in tile decoding

Change-Id: I025595d83118bdc82a545dae69bc6602e8d2a6e3
2013-10-25 22:01:13 +02:00
James Zern
88d79eabdc vp9: pass context directly to partition functions
update_partition_context / partition_plane_context: this will allow for
separate storage to be used in tile decoding

Change-Id: Ie0bc393531ab7e9d2ce35c95111849b294aad4ed
2013-10-25 22:01:13 +02:00
James Zern
71097d9cf2 vp9/decode: add alloc_tile_storage()
Change-Id: I3ebb172d4f2ae7db73b72fb42eb93833a295fb55
2013-10-25 22:01:13 +02:00
Dmitry Kovalev
d5ac877f7f Adding COLOR_SPACE enum.
Change-Id: If5711eb166609cce0a88b3cb5b56b3afeebc4fb0
2013-10-25 12:35:20 -07:00
Dmitry Kovalev
237ce8724a Adding get_frame_new_buffer() function to replace duplicated code.
Change-Id: I6e0e19231a48364c1de7dfab730b121ab227f111
2013-10-24 12:20:35 -07:00
Dmitry Kovalev
dfc7945d1e Adding get_frame_ref_buffer() function + cleanup.
Change-Id: Ib9ead216fc54b2df6f6f1fe82d2ea137197beebd
2013-10-24 11:05:35 -07:00
Dmitry Kovalev
4a59def9b4 Merge "Eliminating usage of allow_comp_inter_inter in the decoder." 2013-10-24 10:09:37 -07:00
Dmitry Kovalev
710ca1fe36 Merge changes I1868fb75,I9ff504c6
* changes:
  Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE.
  Adding VP9_FRAME_MARKER constant.
2013-10-24 10:08:19 -07:00
Yunqing Wang
93ec31dff6 Merge "Improve scale_factors struct" 2013-10-24 09:13:41 -07:00
Dmitry Kovalev
ad867fe237 Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE.
Change-Id: I1868fb75ed88bfa65c1c2ca24677d65f2894d713
2013-10-23 17:45:52 -07:00
Dmitry Kovalev
a53075f7c5 Adding VP9_FRAME_MARKER constant.
Also renaming SYNC_CODE_* to VP9_SYNC_CODE_*.

Change-Id: I9ff504c6ebce6cd6673d7df2085d597b818f5960
2013-10-23 17:24:17 -07:00