Commit Graph

727 Commits

Author SHA1 Message Date
Yaowu Xu
8ba92a0bed changes intra coding to be based on txfm block
This commit changed the encoding and decoding of intra blocks to be
based on transform block. In each prediction block, the intra coding
iterates thorough each transform block based on raster scan order.

This commit also fixed a bug in D135 prediction code.

TODO next:
The RD mode/txfm_size selection should take this into account when
computing RD values.

Change-Id: I6d1be2faa4c4948a52e830b6a9a84a6b2b6850f6
2013-05-22 11:53:19 +01:00
Jingning Han
f153a5d063 Make the intra rd search support 8x4/4x8
This commit allows the rate-distortion optimization of intra coding
capable of supporting 8x4 and 4x8 partition settings.

It enables the entropy coding of intra modes in key frame using a
unified contextual probability model conditioned on its above/left
prediction modes.

Coding performance:
derf 0.464%

Change-Id: Ieed055084e11fcb64d5d5faeb0e706d30268ba18
2013-05-21 21:03:00 -07:00
Jingning Han
1f7d810a72 Merge "Deprecate 4x4 intra modes from bit-stream" into experimental 2013-05-21 15:59:58 -07:00
Dmitry Kovalev
df037b615f Adding API to read/write uncompressed frame header bits.
The API is not final yet and can be changed. Actual layout of
uncompressed frame part will be finalized later. Right now moving
clr_type, error_resilient_mode, refresh_frame_context,
frame_parallel_decoding_mode from first compressed partition to
uncompressed frame part.

Change-Id: I3afc5d4ea92c5a114f4c3d88f96858cccc15b76e
2013-05-21 15:31:32 -07:00
Scott LaVarnway
a143152600 Removed unused idct functions
No longer used.

Change-Id: Id28c9247cebba183c6fa786dff96824ae100132c
2013-05-21 17:59:54 -04:00
Deb Mukherjee
7a645e4e12 Merging the model coef prob experiment
Merges the experiment.

Change-Id: I4eb19af6de6df6aa3a96a2e82f231d47ed9b3ae9
2013-05-21 14:44:38 -07:00
Scott LaVarnway
1db6373267 Merge "WIP: 4x4 idct/recon merge" into experimental 2013-05-21 10:45:53 -07:00
Dmitry Kovalev
060d93d704 Merge "Removing clamp_type from the bitstream." into experimental 2013-05-21 10:35:27 -07:00
Yunqing Wang
e9950b0768 Unnecessary passing of prev_mi
Passing prev_mi is not needed.

Change-Id: I6453bb47514ddafd555864d190ecf6d1a6bdc136
2013-05-21 09:22:49 -07:00
Deb Mukherjee
39a90bc8e8 Updating the model coef experiment
Cleans up the experiment. Actually uses reduced counts for backward
updates, and reduced number of probabilities in the context.

No change in bitstream when the experiment is on.

Between expt on and off:
derfraw300 is down only -0.062% (which is better than when expts
were run previously).

Change-Id: I55285a049a0c22810bdb42914212ab5a4f8521b5
2013-05-20 12:46:36 -07:00
Jingning Han
1e6be7bc75 Deprecate 4x4 intra modes from bit-stream
Replace B_DC_PRED like syntax element writing/reading with sb_ymode
set (e.g., DC_PRED, etc).

Change-Id: I293006a6b3bcd130c08ea9f053e7a79c6819c6f8
2013-05-20 12:14:24 -07:00
Scott LaVarnway
ba48a11130 WIP: 4x4 idct/recon merge
This patch eliminates the intermediate diff buffer usage by
combining the short idct and the add residual into one function.
The encoder can use the same code as well.

Change-Id: I296604bf73579c45105de0dd1adbcc91bcc53c22
2013-05-20 13:03:17 -04:00
Jingning Han
da39272f5c Merge "Enable bit-stream support to 8x4 and 4x8 partition" into experimental 2013-05-20 09:25:51 -07:00
Jingning Han
2c93a8ed5c Give VP9 a different sync code from VP8
The new code is 0x49, 0x83, 0x42

There is nothing particularly special about this code bitstream wise.
Its derivation is the word "sync" coded using 4x6bit alphabetic indices.

Change-Id: Ie2430a854af32ddc5a5c25a6c1c90cf6497ba647
2013-05-20 11:41:31 +01:00
Jingning Han
810b612c23 Enable bit-stream support to 8x4 and 4x8 partition
The recursive partition type search is enabled down to 4x4, 4x8 and
8x4, followed by the corresponding rate-distortion optimization for
the per-partition encoding mode decisions.

The bit-stream writing/reading synchronized in supporting the
rectangular partition of 8x8 block.

This provides above 1% coding performance gains on derf.

To do next:
1. re-design the rate-distortion loop for inter prediction below 8x8.
2. re-design the rate-distortion loop for intra prediction below 4x4.
3. make the loop-filter aware of rectangular partition of 8x8 block.
4. clean the unused probability models.
5. update default probability values.

Change-Id: Idd41a315b16879db08f045a322241f46f1d53f20
2013-05-19 14:59:04 -07:00
Dmitry Kovalev
498b6460a1 Removing clamp_type from the bitstream.
Change-Id: Ica75bdd4905c4a04b7f92795d0b8ce6836a99ef4
2013-05-17 15:50:26 -07:00
Scott LaVarnway
9aa37a51b2 Merge "WIP: 8x8 idct/recon merge" into experimental 2013-05-16 14:28:30 -07:00
Dmitry Kovalev
1e3cdc1dd2 Merge "Combining integer and fractional parts of mvs for entropy coding." into experimental 2013-05-16 14:16:47 -07:00
Dmitry Kovalev
b10b887907 Merge "Removing lossless flag from the bitstream." into experimental 2013-05-16 12:08:27 -07:00
Scott LaVarnway
794a7bedbd WIP: 8x8 idct/recon merge
This patch eliminates the intermediate diff buffer usage by
combining the short idct and the add residual into one function.
The encoder can use the same code as well.

Change-Id: Iacfd57324fbe2b7beca5d7f3dcae25c976e67f45
2013-05-16 13:52:15 -04:00
John Koleszar
418564e7d0 Add vp9_extend_frame_borders
Adds a subsampling aware border extension function. This may be reworked
soon to support more than 3 planes.

Change-Id: I76b81901ad10bb1e678dd4f0d22740ca6c76c43b
2013-05-15 20:58:26 -07:00
Dmitry Kovalev
b0c101e2b4 Removing lossless flag from the bitstream.
Change-Id: If6aee510cbc4910f2f24fcd92dddc65fdf8edeea
2013-05-15 18:20:51 -07:00
Dmitry Kovalev
5c5582242d Moving the same code to new function vp9_setup_scale_factors.
Change-Id: I2408ad22717784a40e23701ccb9d978265440e4f
2013-05-15 16:33:36 -07:00
Dmitry Kovalev
18375238e9 Combining integer and fractional parts of mvs for entropy coding.
Combining encode_nmv_component with encode_nmv_component_fp
and read_nmv_component with read_nmv_component_fp. Bitstream is slightly
changed (only the order of bits), here are the results on test sets:
stdhd: +0.047, yt: -0.038, derf: +0.001, hd: -0.011.

Change-Id: I1be312e976796df78ca63368702d0ee19f2b8c50
2013-05-15 12:37:03 -07:00
Scott LaVarnway
a272ff25cd WIP: 16x16 idct/recon merge
This patch eliminates the intermediate diff buffer usage by
combining the short idct and the add residual into one function.
The encoder can use the same code as well.

Change-Id: Iea7976b22b1927d24b8004d2a3fddae7ecca3ba1
2013-05-15 13:16:02 -04:00
Scott LaVarnway
2cf0d4be12 WIP: 32x32 idct/recon merge
This patch eliminates the intermediate diff buffer usage by
combining the short idct and the add residual into one function.
The encoder can use the same code as well.

Change-Id: I4ea09df0e162591e420d869b7431c2e7f89a8c1a
2013-05-14 15:54:17 -07:00
Jingning Han
1f26840fbf Enable recursive partition down to 4x4
This commit allows the rate-distortion optimization recursion
at encoder to go down to 4x4 block size. It deprecates the use
of I4X4_PRED and SPLITMV syntax elements from bit-stream
writing/reading. Will remove the unused probability models in
the next patch.

The partition type search and bit-stream are now capable of
supporting the rectangular partition of 8x8 block, i.e., 8x4
and 4x8. Need to revise the rate-distortion parts to get these
two partition tested in the rd loop.

Change-Id: I0dfe3b90a1507ad6138db10cc58e6e237a06a9d6
2013-05-14 12:39:56 -07:00
Dmitry Kovalev
4a17238bc9 Moving vp9_decode_frame declaration to vp9_decodframe.h.
Change-Id: Ia7a772718a4b11b413c36d4280df8668e19c9084
2013-05-13 14:42:45 -07:00
Jingning Han
089ed30d07 Merge "Use consistent partition context setup in enc/dec" into experimental 2013-05-13 10:51:51 -07:00
Jingning Han
fc31ae479d Merge "Move get_sb_index to vp9_blockd.h" into experimental 2013-05-13 10:51:29 -07:00
Paul Wilkins
e5f715201a Change to band calculation.
Change band calculation back to simpler model based
on the order in which coefficients are coded in scan order
not the absolute coefficient positions.

With the scatter scan experiment enabled the results were
appear broadly neutral on derf (-0.028) but up a little on std-hd +0.134).

Without the scatterscan experiment on the results were up derf as well.

Change-Id: Ie9ef03ce42a6b24b849a4bebe950d4a5dffa6791
2013-05-13 17:21:49 +01:00
Jingning Han
6910f178f1 Use consistent partition context setup in enc/dec
Move set_partition_seg_context_ to common file. Use consistent
context setup conditions for partition probability model update at
encoder and decoder.

Change-Id: I24b7ed3b1c48e3d2568191a46b70136b99b67b1a
2013-05-11 15:22:13 -07:00
Jingning Han
2117d4ee96 Move get_sb_index to vp9_blockd.h
Use common function to fetch/assign sb_index in rd loop, bit-stream
writing and reading.

Change-Id: I1d8a214a57ed9cbcd026040436ef33e5e39d65b7
2013-05-11 13:26:59 -07:00
John Koleszar
64667d5af7 Merge "Subsampling aware allocs and bitstream" into experimental 2013-05-10 16:55:00 -07:00
Jingning Han
e44678c061 Enable recursive partition type search
This commit enables the search for the optimal superblock
partition types in the recursion form. The intention is to
make the optimization process more concise and ready to
support partition down to 4x4 block size next.

Change-Id: Iae279a67df3a7cc372553c84c775bc4d2f3e4336
2013-05-10 10:13:10 -07:00
Paul Wilkins
4305dd4778 Avoid calls to get_coef_band().
Use value already computed value to save of calls

Change-Id: I42836698e59c116416ccd75395bebdd11dd609fb
2013-05-10 11:49:54 +01:00
John Koleszar
da58436f43 Subsampling aware allocs and bitstream
Make framebuffer allocations according to the chroma subsamping
factors in use. A bit is placed in the raw part of the frame header for
each of the two subsampling factors. This will be moved in a future
commit to make them part of the TBD feature set bits, probably only set
on keyframes, etc.

Change-Id: I59ed38d3a3c0d4af3c7c277617de28d04a001853
2013-05-09 17:50:12 -07:00
Dmitry Kovalev
f66320abff Removing LOOPFILTER_TYPE and corresponding bit in bitstream.
We don't have two loopfilter types anymore.

Change-Id: I53c0137361342c7d00887ad03be3490f0dfa3532
2013-05-08 16:44:08 -07:00
Dmitry Kovalev
7b602cba65 Merge "Eliminating several YV12_BUFFER_CONFIG usages." into experimental 2013-05-08 16:36:24 -07:00
Jingning Han
944ad130b6 Merge "Extend left/above partition context to per mi(8x8)" into experimental 2013-05-08 16:33:25 -07:00
Dmitry Kovalev
81f33bc091 Eliminating several YV12_BUFFER_CONFIG usages.
Change-Id: Ia85b987c935d545920dcae5a6f44136b1a08a008
2013-05-08 14:11:47 -07:00
Dmitry Kovalev
a0b6b8a7d4 Merge "Removing unused code + little cleanup." into experimental 2013-05-08 11:23:14 -07:00
Jingning Han
4a88ad89fd Extend left/above partition context to per mi(8x8)
Update and buffer left/above partition information context per 8x8
block. This allows to further enable recursive partition down to
4x4 block size, and hence deprecating I4X4_PRED and SPLITMV.

This commit also fixes a context buffer swap/restore issue in 32x32
partition type search. This gives 0.1% performance gain for derf/yt.
Will refactor the superblock partition type search into recursion
form.

Change-Id: Ib61975aca5f12b78d8018481d7fa1393d085689b
2013-05-08 10:20:34 -07:00
John Koleszar
d6c490cb15 Merge "Deprecate code_zerogroup experiment." into experimental 2013-05-07 17:09:38 -07:00
Dmitry Kovalev
9cd5406c32 Merge "Removing vp9_swap_yv12_buffer function and corresponding files." into experimental 2013-05-07 17:02:38 -07:00
Dmitry Kovalev
cba0a5db2b Removing unused code + little cleanup.
Change-Id: I81c19a8f19cfb5c7183609656ade833d72feb500
2013-05-07 16:56:22 -07:00
Paul Wilkins
a14ae84749 Deprecate code_zerogroup experiment.
Delete code under the CONFIG_CODE_ZEROGROUP flag.

Change-Id: I5fe6c7b42a5da9b73118e33594301da4129f320a
2013-05-07 16:52:55 -07:00
Dmitry Kovalev
b05247df95 Removing vp9_swap_yv12_buffer function and corresponding files.
Adding static swap_yv12 function to vp9_firstpass.c.

Change-Id: I7da9caab9720498db4a74c627901bf37816ed06c
2013-05-07 16:49:22 -07:00
Paul Wilkins
1ed57a6a62 Deprecate comp_interintra_pred experiment.
Delete code under the CONFIG_COMP_INTERINTRA_PRED
flag.

Change-Id: I3d1079cf46305c08f7e11d738596ea112e7b547f
2013-05-07 16:24:08 -07:00
Paul Wilkins
8c1b516d10 Deprecate the newbintramode experiment.
Clean out code relating to newbintramode.

Change-Id: Ie91f4f156cdf60ce0da8ca407c1c9cb00c7d0705
2013-05-07 16:00:59 -07:00
John Koleszar
64c0b3075e Use common setup_dst_planes function
Previous code assumed 4:2:0 subsampling.

Change-Id: Ie0814e45d099e84d0ded880b62e7bc98f85b7f0c
2013-05-07 10:25:54 -07:00
Jingning Han
c0504a9b24 Merge "Merge SB8X8 into the codebase" into experimental 2013-05-07 09:23:47 -07:00
Jingning Han
776c1482a3 Merge SB8X8 into the codebase
Pull sb8x8 out of experimental list. verified via borg run tests.
Fixed unit test failures.

Change-Id: I12a4bbd17395930580c048ab68becad1ffe46e76
2013-05-07 09:08:25 -07:00
Scott LaVarnway
9c7d06e6f3 Merge "Removed vp9_setup_intra_recon()" into experimental 2013-05-07 08:24:26 -07:00
Jingning Han
35e8072613 Fix tile independency issue in sb8x8
Resolved the unit test failure on tile independence when sb8x8
enabled.

Change-Id: I23ca86c88170e49ca160e8e897d913905e6080ce
2013-05-06 21:56:45 -07:00
Dmitry Kovalev
f7c81ccff0 Removing 3 unused bits from bitstream.
Change-Id: I9cd21c5c9107d6197caab6949700b29c51658af3
2013-05-06 14:00:58 -07:00
Scott LaVarnway
cb7955d83e Removed vp9_setup_intra_recon()
This setup is now handled by vp9_build_intra_predictors()
when left_available and/or up_available is zero.

Change-Id: I59cec0ab95f8be69ce885fd20727510e4deef8a0
2013-05-06 16:13:06 -04:00
Ronald S. Bultje
f7fa367094 Fix first-pass intra4x4 for sb8x8 experiment.
Change-Id: I1df17f45721c690d157800daa6a0b377e3d32bc2
2013-05-04 15:49:41 -07:00
John Koleszar
acc9c125dd Remove old_block_idx_4x4
Removes several instances where the old block numbering was
still in use.

Change-Id: Id35130591455a4abe6844613e45c0b70c1220c08
2013-05-03 17:19:13 -07:00
Adrian Grange
7aae782c37 Merge "Extend number of reference buffers to 8." into experimental 2013-05-03 09:59:54 -07:00
Adrian Grange
d7eea782f2 Extend number of reference buffers to 8.
The number of reference buffers is extended to 8 and
a reference sign-bias added for the LAST_FRAME.

Whilst the number of reference buffers used by an
individual frame remains unchanged at 3, these may
now be selected from 8 possible buffers.

Change-Id: I2d247b9c1c2b3a339d6c9fac125e81ba373f75a7
2013-05-03 09:17:18 -07:00
Scott LaVarnway
be7d4f96a2 Merge "Removed is_inter_mode() check" into experimental 2013-05-03 07:34:29 -07:00
Scott LaVarnway
3041cf8c8b Merge "Reduced y_dequant, uv_dequant size" into experimental 2013-05-03 07:30:31 -07:00
Jingning Han
1e26cdc178 Merge "Cache splitmv motion vectors appropriately in decoder." into experimental 2013-05-02 14:32:57 -07:00
Ronald S. Bultje
c8de931e06 Merge "Fix i4x4 mode reading and writing in sb8x8 bitstream." into experimental 2013-05-02 13:56:06 -07:00
Ronald S. Bultje
168d313888 Cache splitmv motion vectors appropriately in decoder.
This fixes some problems in splitmv-related bitstream parsing in the
sb8x8 experiment.

Change-Id: Id168f9ec9c88626877d8f536e6f394b6f4f782e4
2013-05-02 13:55:35 -07:00
Ronald S. Bultje
e931dac733 Fix i4x4 mode reading and writing in sb8x8 bitstream.
Don't allow i4x4 except for sb8x8 recursion step. Read only 4 (not 16)
i4x4 submodes if we are i4x4.

Change-Id: Iaaaced1a134006b2c96eed66f014300eae41e0ed
2013-05-02 13:01:09 -07:00
Ronald S. Bultje
96f8171d09 Merge "Fix intra4x4 decoder reconstruction stride for sb8x8 experiment." into experimental 2013-05-02 11:10:07 -07:00
Ronald S. Bultje
6c8071b45c Fix intra4x4 decoder reconstruction stride for sb8x8 experiment.
Change-Id: I5a886a6fa19086629a274f9ada7a862fd0ddf62f
2013-05-02 11:01:02 -07:00
Scott LaVarnway
37c3144ed7 Removed is_inter_mode() check
If a reference frame is inter, the only valid modes would
be inter modes.  This check is unnecessary.

Change-Id: Ib8433ab5a3418f94149ee4e3062d48d7740d225a
2013-05-02 13:44:33 -04:00
Dmitry Kovalev
519d9f3e16 Merge "Using treed_read/treed_write functions for segment ids." into experimental 2013-05-02 10:40:58 -07:00
Ronald S. Bultje
29492a5e14 Fix bug in sb8x8 bitstream decoding.
Change-Id: I7ac69a369851b09d9422f2e3c62b12b3fcd49a4c
2013-05-01 17:13:27 -07:00
Jingning Han
650e632400 Merge "Enable bit-stream support to SB8X8" into experimental 2013-05-01 13:48:14 -07:00
Scott LaVarnway
94ed11d89d Reduced y_dequant, uv_dequant size
Currently, only two values are used.  Removed the unused
values.

Change-Id: Idc5b8be354d84ffc68df39ea3e45f9f50d977b35
2013-05-01 16:25:10 -04:00
Jingning Han
2bf1dc2e23 Enable bit-stream support to SB8X8
This commit enables bit-stream writing and reading for recursive
partition down to block 8x8.

Change-Id: I163cd48d191cc94ead49cbb7fc91374f6bf204e2
2013-05-01 13:03:54 -07:00
Dmitry Kovalev
6e4ed2f0fe Merge "Adding vp9_get_qindex function." into experimental 2013-05-01 12:04:21 -07:00
John Koleszar
d139655b14 Merge "Make vp9_optimize_sb* common" into experimental 2013-04-30 21:43:26 -07:00
John Koleszar
1f80a568d2 Make vp9_optimize_sb* common
Unify the various vp9_optimize_sb functions into one that handles all
transform sizes.

Change-Id: I48b642fbfb3e72cc2e0bcf1d0317a80a80547882
2013-04-30 21:34:58 -07:00
Jingning Han
09aaf61e16 Migrating MB decoding into decode_sb/atom
The decode_mb only carries I8X8_PRED decoding, which will be covered
by the regular MB intra modes when SB8X8 is on. To be removed later.

Change-Id: I3b9ee55917a30b42518b81987bc10c22b1a19e7f
2013-04-30 20:48:52 -07:00
Ronald S. Bultje
d068d869b9 sb8x8 integration in rd loop.
Work-in-progress, not yet ready for review. TODO items:
- bitstream writing (encoder) and reading (decoder)
- decoder reconstruction

Change-Id: I5afb7284e7e0480847b47cd0097cb469433c9081
2013-04-30 16:13:20 -07:00
Dmitry Kovalev
b5364d4f3b Using treed_read/treed_write functions for segment ids.
Changing the order of probabilities inside mb_segment_tree_probs in order
to use treed_read/treed_write function instead of custom code.

Change-Id: I843487d5057913b9358db73da270893eefecc6c8
2013-04-30 14:06:49 -07:00
Dmitry Kovalev
3f6c6ffc86 Adding vp9_get_qindex function.
Moving common code from encoder and decoder to vp9_get_qindex function.
Also moving quant-related constants from vp9_onyxc_int.h to
vp9_quant_common.h.

Change-Id: I70c5bfbaa1c8bf00fde0bfc459d077f88b6d46c8
2013-04-30 13:39:50 -07:00
Jingning Han
dc8cd7d9f4 Merge "Migrating SPLITMV_4X4 decoding into decode_atom" into experimental 2013-04-30 12:17:56 -07:00
Dmitry Kovalev
15b5e465f2 Adding vp9_update_frame_size function.
Moving common code from encoder and decoder to vp9_update_frame_size.

Change-Id: I6ca758b7d05ffd52821bd3f7ad68089da11e4165
2013-04-30 11:14:27 -07:00
Jingning Han
ce3a8a6e37 Migrating SPLITMV_4X4 decoding into decode_atom
Separate the decoding process of 4x4 block based coding (both intra
and inter) from decode_mb and move it into decode_atom_. This allows
to further move the rest per 16x16 block decoding of decode_mb into
decode_sb, and hence eventually deprecating decode_mb when SB8X8 is
enabled.

Change-Id: I678cb8007d8a57b792d7a23020edb0c74fbf4237
2013-04-30 10:42:03 -07:00
Dmitry Kovalev
70d12c3a75 Merge "Renaming refresh_entropy_probs to refresh_frame_context." into experimental 2013-04-30 10:21:24 -07:00
Dmitry Kovalev
51a73fbba2 Merge "Consistent names for quant-related functions and variables." into experimental 2013-04-30 10:19:48 -07:00
Jingning Han
7492edac93 Merge "Separate I4X4_PRED coding from macroblock modules" into experimental 2013-04-29 21:51:59 -07:00
Jingning Han
94191b5c82 Separate I4X4_PRED coding from macroblock modules
Separate the functionality of I4X4_PRED from decode_mb. Use
decode_atom_intra instead, to enable recursive partition of superblock
down to 8x8.

Change-Id: Ifc89a3be82225398954169d0a839abdbbfd8ca3b
2013-04-29 18:59:36 -07:00
Ronald S. Bultje
ee0f3a9d31 Make sure 32x32 coefficients fit in int16_t.
Fixes mismatches on yt.

Change-Id: I65444137578b29a4984af5c01b2874c5ab086acc
2013-04-29 17:59:00 -07:00
Ronald S. Bultje
f5ad774814 Merge "Change above/left_context to use an 8x8 basis." into experimental 2013-04-29 11:28:25 -07:00
Ronald S. Bultje
2dbaa4f4f4 Change above/left_context to use an 8x8 basis.
Output changes slightly because of a minor bug in (at least) the sb32x16
block2above tx16x16 tables that previously existed in vp9_blockd.c.

Change-Id: I624af28ac200a8322d64454cf05c79e9502968cc
2013-04-29 10:37:25 -07:00
John Koleszar
d8a120c196 Unify decode_sb for >16x16 in vp9_decodframe.c
First patch to make sb decoding based on the transform size. This patch
is working for the sb modes, combining the parts of decode_mb that fit
into this framework will come as a second patch.

Change-Id: I26123416a7a87e096bbdb5eb944ce5bb198384f8
2013-04-29 09:43:22 -07:00
Jingning Han
9b935f9992 Add forward probability model update for partition
Enable forward model update for partition syntax coding.

Change-Id: If47b423b6d12f34614c57f25d235dc9ba688efc5
2013-04-27 16:47:04 +01:00
Ronald S. Bultje
7f8cbda333 Merge "Grow MODE_INFO array to use an 8x8 basis." into experimental 2013-04-26 14:46:50 -07:00
Dmitry Kovalev
9713a68719 Renaming refresh_entropy_probs to refresh_frame_context.
Change-Id: I5429c02246d198eb1b6aadbc3313b26bf3436062
2013-04-26 14:39:58 -07:00
Johann
9e23bd5df5 Merge "Merge branch 'master' into experimental" into experimental 2013-04-26 13:35:28 -07:00
Johann
32a5c52856 Merge branch 'master' into experimental
Conflicts:
	vp9/common/vp9_findnearmv.c
	vp9/common/vp9_rtcd_defs.sh
	vp9/decoder/vp9_decodframe.c
	vp9/decoder/x86/vp9_dequantize_sse2.c
	vp9/encoder/vp9_rdopt.c
	vp9/vp9_common.mk

Resolve file name changes in favor of master. Resolve rdopt changes in
favor of experimental, preserving the newer experiments.

Change-Id: If51ed8f457470281c7b20a5c1a2f4ce2cf76c20f
2013-04-26 12:57:10 -07:00
Dmitry Kovalev
5a5a1f25a8 Consistent names for quant-related functions and variables.
Change-Id: I3a6d601e90e8740b9c26dd0afbfe9d467b75d367
2013-04-26 12:30:20 -07:00
Ronald S. Bultje
1a46b30ebe Grow MODE_INFO array to use an 8x8 basis.
Change-Id: I087e08e7909a406b71715b8525c104208daa6889
2013-04-26 11:57:17 -07:00
Dmitry Kovalev
eea1fecd06 Merge "Code cleanup inside vp9_decodframe.c." into experimental 2013-04-26 11:35:25 -07:00
John Koleszar
bb41ab4a0c Remove BLOCKD structure
All members can be referenced from their per-plane counterparts, and
removes assumptions about 24 blocks per macroblock.

Change-Id: I7ff2fa72d22c29163eb558981c8193765a8113d9
2013-04-26 10:35:54 -07:00
John Koleszar
4f55c5618a Remove destination pointers from BLOCKD
Access these members from MACROBLOCKD instead.

Change-Id: I7907230dd473ff12ebe182b9280d8b7f12a888c4
2013-04-26 10:14:07 -07:00
Scott LaVarnway
57f180b388 Removed bmi from blockd
This originally was "Removed update_blockd_bmi()".  Now,
this patch removed bmi from blockd and uses the bmi found
in mode_info_context.  Eliminates unnecessary bmi copies between
blockd and mode_info_context.

Change-Id: I287a4972974bb363f49e528daa9b2a2293f4bc76
2013-04-26 10:19:43 -04:00
Johann
863601c589 Normalize more intrinsic filenames
vp9_dequantize_x86 has only sse2 functions.

vp9_dct_sse2_intrinsics has no namespace collision and can drop
_intrinsics.

vp9_idct_mmx.h is unused.

Change-Id: Ic16e31fb372a1d1e841a62ecb4189fe8f95808ec
2013-04-25 23:26:20 -07:00
Dmitry Kovalev
b442dfd4f5 Code cleanup inside vp9_decodframe.c.
Change-Id: I8447565feeadda1a4a06df907b0156728b1ad5bf
2013-04-25 14:59:02 -07:00
Ronald S. Bultje
8d028402d7 Remove implicit assumption that mode_info_stride == mb_cols + 1.
Change-Id: I3030d7adac73109aeaa1ecc0f78ac968c092d9aa
2013-04-25 14:21:01 -07:00
Ronald S. Bultje
c849eaca59 Use b_width/height_log2 instead of mb_ where appropriate.
Basic assumption: when talking about transform units, use b_; when
talking about macroblock indices, use mb_.

Change-Id: Ifd163f595d4924ff892de4eb0401ccd56dc81884
2013-04-25 14:20:59 -07:00
John Koleszar
e40a769036 Fix incorrect dequant used in detokenize
The quantizer can vary per-plane, and the dequantization vector is
available in the per-plane part of MACROBLOCKD. The previous code would
incorrectly use the Y quantizer for the whole macroblock.

Change-Id: I3ab418aef9168ea0ddcfa4b7c0be32ae48b536d7
2013-04-25 12:08:32 -07:00
John Koleszar
15255eef82 Move dequant from BLOCKD to per-plane MACROBLOCKD
This data can vary per-plane, but not per-block.

Change-Id: I1971b0b2c2e697d2118e38b54ef446e52f63c65a
2013-04-25 11:57:20 -07:00
Dmitry Kovalev
61a47da869 Adding is_inter_mode function.
Change-Id: I2d32d46002cb92c63050c2b8328865c406103621
2013-04-25 10:23:00 -07:00
Dmitry Kovalev
22c6ce03fa Merge "Handling frame references and scale factors in one for loop." into experimental 2013-04-25 10:17:34 -07:00
Jingning Han
b42b41c856 Merge "Move sbsegment out of experimental list" into experimental 2013-04-25 09:18:01 -07:00
Scott LaVarnway
a426c7f343 Merge "Moved dequantization into the token decoder" into experimental 2013-04-25 08:53:42 -07:00
Dmitry Kovalev
994c79cccf Handling frame references and scale factors in one for loop.
Using ALLOWED_REFS_PER_FRAME constants instead of hard coded 3, replacing
memcpy with plain struct assignment.

Change-Id: Ibc86f5d175fcb3f3a3eddacf593525370f1f854c
2013-04-24 17:20:53 -07:00
Yaowu Xu
bcf82cf503 Merge two similar functions into one
Function set_mb_row() and set_mb_col() do similar work and are always
called together, this commit merged them into a single function for
clarity and easy maintainence.  This was a TODO item.

Change-Id: I956bd9ed6afb8b2b0469b20fd8bc893b26f8a0f3
2013-04-24 15:58:03 -07:00
Jingning Han
b0e3b3df18 Move sbsegment out of experimental list
Move rectangular superblock coding out of experimental list.

Change-Id: I96c37547d122330d666a67b4bf577ae54547857f
2013-04-24 15:19:17 -07:00
Jingning Han
ff2b8aa2c9 Contextual entropy coding of partition syntax
This commit enables selecting probability models for recursive block
partition information syntax, depending on its above/left partition
information, as well as the current block size. These conditional
probability models are reasonably stationary and consistent across
frames, hence the backward adaptive approach is used to maintain and
update the contextual models.

It achieves coding performance gains (on top of enabling rectangular
block sizes):
derf:   0.242%
yt:     0.391%
hd:     0.376%
stdhd:  0.645%

Change-Id: Ie513d9673337f0d27abd65fb566b711d0844ec2e
2013-04-24 14:23:14 -07:00
Paul Wilkins
31ee193a9c Extension of segmentation to 8 segments.
Also some further simplification following removal
of top node code.

There is an issue in regards to the shared file vp8cx.h
in regard to the roi_map as this interface assumes that
there are only 4 segments. I have left the value here as
4 for now meaning that the roi_map interface is broken
for VP9.

Note that this change would have been easier if I hadn't
had to search for hard wire instances of the number 4
and <= 3.

Change-Id: Ia8b6deea4be4dbd20deb1656e689dd43a5f190e8
2013-04-24 16:36:47 +01:00
Paul Wilkins
c77aff1286 Simplify Segment Coding
Remove top node optimization.
The improvement this gives is not sufficient to justify
the extra complexity.

Change-Id: I2bb4a12a50ffd52cacfa4a3e8acbb2e522066905
2013-04-24 10:47:12 +01:00
Paul Wilkins
27bb4777cd Simple implicit segmentation experiment.
Change-Id: Iaef16122732c2a81e0927f9862b51b68dc788712
2013-04-24 10:04:27 +01:00
Dmitry Kovalev
97ac785e65 Merge "Simple cleanup inside vp9_decodframe.c and vp9_entropymode.c." into experimental 2013-04-23 18:02:46 -07:00
John Koleszar
4f35e3e1c1 Merge "Move src_diff to per-plane MACROBLOCK data" into experimental 2013-04-23 16:24:08 -07:00
Dmitry Kovalev
144f49c6aa Simple cleanup inside vp9_decodframe.c and vp9_entropymode.c.
Change-Id: I62dde981f5201c5fbc22001609ee4b5fd0a9bdf5
2013-04-23 15:50:56 -07:00
Ronald S. Bultje
276a1106e6 Merge changes I54acef34,I72d42971 into experimental
* changes:
  Make some sb_type comparisons independent of literal enum values.
  Make loopfilter aware of rectangular blocks.
2013-04-23 15:29:19 -07:00
Dmitry Kovalev
a21359cbea Merge "Adding select_txfm_size function + vp9_decode_frame cleanup." into experimental 2013-04-23 13:53:14 -07:00
Dmitry Kovalev
d0d1094a05 Merge "Adding get_scan_{4x4, 8x8, 16x16} functions." into experimental 2013-04-23 12:44:51 -07:00
Ronald S. Bultje
5ba98ebcf1 Make some sb_type comparisons independent of literal enum values.
Change-Id: I54acef342b8e787e05af0febd7cf0d7d10288383
2013-04-23 12:34:32 -07:00
John Koleszar
cbd1315ac4 Move src_diff to per-plane MACROBLOCK data
First in a series of commits making certain MACROBLOCK members
addressable per-plane. This commit also refactors the block subtraction
functions vp9_subtract_b, vp9_subtract_sby_c, etc to be
loops-over-planes and variable subsampling aware.

Change-Id: I371d092b914ae0a495dfd852ea1a3d2467be6ec3
2013-04-23 12:18:51 -07:00
Scott LaVarnway
e3167b8c23 Merge "Eliminated prev_mip memsets/memcpys" into experimental 2013-04-23 10:22:13 -07:00
Scott LaVarnway
e732bc298c Moved dequantization into the token decoder
Mostly for cleanup purposes.  Now we should be able to rework
the encoder/decoder to use a common idct/add function.

Change-Id: I1597cc59812f362ecec0a3493b6101a6cc6fa7ff
2013-04-22 17:53:07 -04:00
Dmitry Kovalev
d5413a8e82 Adding select_txfm_size function + vp9_decode_frame cleanup.
Change-Id: I7594ca84106ee48f83e6fc3098c0de7a28d5a183
2013-04-22 14:39:21 -07:00
Dmitry Kovalev
5de7e16ca2 Adding get_scan_{4x4, 8x8, 16x16} functions.
Change-Id: Id4306ef6d65d4a3984aed50b775bdf48d4f6c438
2013-04-22 14:08:41 -07:00
Deb Mukherjee
94fa3bcc06 Merge "Bugfix from reordering frame probs patch" into experimental 2013-04-22 12:59:51 -07:00
Deb Mukherjee
5fa64bdef0 Bugfix from reordering frame probs patch
This fixes an intermittent mismatch issue cause by moving
the lossless mode decoding bit to after the loop filter
setup information. We need to ensure that the lossless bit
is decoded prior to loop filter setup.

Change-Id: I3faa3fff8e1013b7405dac91268350e059ed121e
2013-04-22 12:43:12 -07:00
John Koleszar
a443447b8b Move pre, second_pre to per-plane MACROBLOCKD data
Continue moving framebuffers to per-plane data.

Change-Id: I237e5a998b364c4ec20316e7249206c0bff8631a
2013-04-22 12:05:24 -07:00
Deb Mukherjee
f12509f640 Merge "Removes the code_nonzerocount experiment" into experimental 2013-04-22 11:53:14 -07:00
Deb Mukherjee
0aa79be7d5 Removes the code_nonzerocount experiment
This patch does not seem to give any benefits.

Change-Id: I9d2b4091d6af3dfc0875f24db86c01e2de57f8db
2013-04-22 10:58:49 -07:00
Deb Mukherjee
6ce718eb18 Merge "End of orientation zero group experiment" into experimental 2013-04-22 10:33:12 -07:00
Deb Mukherjee
70d9f116fd End of orientation zero group experiment
Adds an experiment that codes an end-of-orientation symbol
for every eligible zero encountered in scan order.

This cleans out various other sub-experiments that were part
of the origiinal patch, which will be later included if found
useful.

Results are slightly positive on all sets (0.1 - 0.2% range).

Change-Id: I57765c605fefc7fb9d1b57f1b356843602abefaf
2013-04-22 09:27:59 -07:00
John Koleszar
6d5ac8f2e1 reconinter: remove unnecessary functions, params
Removes the redundant dst pointers from vp9_build_inter_predictors_sb{y,uv}
and the remaining mb specific functions.

Change-Id: I7b6bf439d9394b85ea79b4fe61a3ffc1025720da
2013-04-22 08:20:54 -07:00
Sami Pietilä
fbe9098c9f Merge "Reordering frame header probs." into experimental 2013-04-22 03:13:34 -07:00
Dmitry Kovalev
c7a38f77ef Merge "Removing get_segment_id function and using existing vp9_get_pred_mb_segid." into experimental 2013-04-20 11:05:50 -07:00
Dmitry Kovalev
d6da2ae308 Merge "Finally removing BOOL_DECODER and using vp9_reader instead." into experimental 2013-04-20 11:04:06 -07:00
John Koleszar
fa8ddbd2a6 Merge "Move dst to per-plane MACROBLOCKD data" into experimental 2013-04-19 16:33:45 -07:00
John Koleszar
d12376aa2c Move dst to per-plane MACROBLOCKD data
First in a series of commits moving the framebuffers pointers to
per-plane data, so that they can be indexed numerically rather than
by name.

Change-Id: I6e0d60fd4d51e6375c384eb7321776564df21775
2013-04-19 16:16:10 -07:00
Scott LaVarnway
9662531d77 Eliminated prev_mip memsets/memcpys
For 1080 material, this buffer is currently 2,270,928 bytes.  This patch swaps
ptrs instead of copying and uses the last show_frame flag instead of setting
the entire buffer to zero.  For the test clip used, the decoder improved by up
to 1%.


Change-Id: I686825712ad56043e09ada9808dc489f875a6ce0
2013-04-19 18:38:10 -04:00
Dmitry Kovalev
c09f652590 Removing get_segment_id function and using existing vp9_get_pred_mb_segid.
Change-Id: Iff35d4b2f8f65511f80c594958c01fb4673fa033
2013-04-19 14:25:32 -07:00
Paul Wilkins
fb754fd37e Merge "Mv ref candidates cut to 2." into experimental 2013-04-19 14:09:44 -07:00
Dmitry Kovalev
ce50f911f0 Segmentation cleanup, adding {set, get}_segment_id functions.
Change-Id: I55c2688e06ae5d7dfccc1b1983f233ab1c7978db
2013-04-19 11:17:23 -07:00
Dmitry Kovalev
0b44624c37 Finally removing BOOL_DECODER and using vp9_reader instead.
Change-Id: I03d5b6f22f0930893709c6db5f1b06762ad3354e
2013-04-19 10:37:24 -07:00
Dmitry Kovalev
2a1efafd29 Merge "Replacing BOOL_DECODER with vp9_reader inside vp9_decodframe." into experimental 2013-04-19 10:09:53 -07:00
Paul Wilkins
de80da39dc Mv ref candidates cut to 2.
Further simplification of mvref search to return
only the top two candidates. Distance weights removed
as the test order reflects distance anyway.

Change-Id: I0518cab7280258fec2058670add4f853fab7b855
2013-04-19 16:13:53 +01:00
Paul Wilkins
aa76bf3d28 Removal of CONFIG_NEW_MVREF experiment.
This experiment has failed to give much benefit but
does add complexity so deprecated.

Change-Id: Ic7b929ba706390b9907ef0b4f965bd401ca799a4
2013-04-19 11:54:02 +01:00
Dmitry Kovalev
9e170c1d4d Replacing BOOL_DECODER with vp9_reader inside vp9_decodframe.
Change-Id: Ia6722bc26f34ae7fc5cb15e491aba39d2f20a85b
2013-04-18 16:08:10 -07:00
Jingning Han
f0b065e946 Merge "Make the use of pred buffers consistent in MB/SB" into experimental 2013-04-18 15:24:55 -07:00
Jingning Han
6f43ff5824 Make the use of pred buffers consistent in MB/SB
Use in-place buffers (dst of MACROBLOCKD) for  macroblock prediction.
This makes the macroblock buffer handling consistent with those of
superblock. Remove predictor buffer MACROBLOCKD.

Change-Id: Id1bcd898961097b1e6230c10f0130753a59fc6df
2013-04-18 14:59:36 -07:00
Dmitry Kovalev
2d15043900 Replacing BOOLEAN_DECODER with vp9_reader inside vp9_detokenize.
Change-Id: I71369a30a86111ae737168c795a29b4d8cff6ebf
2013-04-18 14:50:08 -07:00
Dmitry Kovalev
8726752cb6 Merge "Adding DEFAULT_PRED_PROB_{0, 1, 2} constants." into experimental 2013-04-18 14:39:14 -07:00
Dmitry Kovalev
3fe7b64722 Merge "Motion vector decoding code cleanup." into experimental 2013-04-18 14:38:38 -07:00
Dmitry Kovalev
bef4e474e7 Merge "Changing argument type of vp9_get_mv_joint from MV to MV*." into experimental 2013-04-18 14:27:44 -07:00
Dmitry Kovalev
a8d903e539 Merge "Replacing VP9_COMBINEENTROPYCONTEXTS macro with function." into experimental 2013-04-18 14:26:34 -07:00
Dmitry Kovalev
ef67a49407 Merge "Moving functions from vp9_dboolhuff.c to vp9_decodframe.c." into experimental 2013-04-18 14:26:18 -07:00
Dmitry Kovalev
8b20aa2337 Merge "Renaming y1dc_delta_q, uvdc_delta_q, uvac_delta_q fields from VP9Common." into experimental 2013-04-18 14:26:06 -07:00
Dmitry Kovalev
d731079781 Merge "Transforming decode_sb_row to decode_tile function." into experimental 2013-04-18 14:25:52 -07:00
Dmitry Kovalev
eae38910ce Motion vector decoding code cleanup.
Change-Id: I9790baedbd4acb7113575efc6f228b2656c42ff7
2013-04-18 11:05:34 -07:00
Sami Pietilä
04ebca53ff Reordering frame header probs.
Moving all the probability updates after frame context selection.
This makes it clean and simple to store all the probs in single
struct that can be sent to hardware codec.

Change-Id: I2ec3de81adbd468d8ef34a914caae80a18c3ef56
2013-04-18 14:30:56 +03:00
John Koleszar
38f6232118 Merge "Use BLOCK_SIZE_TYPE in foreach_ walker" into experimental 2013-04-17 21:02:58 -07:00
Yunqing Wang
1461abb89f Merge "Remove skip_recon_sb" into experimental 2013-04-17 15:56:58 -07:00
Frank Galligan
2bb8ecad02 libvpx: Fix vp9 clang build.
- UNINITIALIZED_IS_SAFE Macro triggers a warning in Clang for
  structs.

Change-Id: Ib02c82f1fede7826564e17ccb7171c6fb18b8e44
2013-04-17 15:46:12 -07:00
Yunqing Wang
373389610d Remove skip_recon_sb
Removed skip_recon_sb(). Cleanup code so that we could combine
decode_sb and decode_mb later.

Change-Id: I24d1dd5283e2565072838a03c344938b88bfd35c
2013-04-17 15:34:50 -07:00
John Koleszar
ff3f93639c Use BLOCK_SIZE_TYPE in foreach_ walker
Change-Id: I655305c9e22bdd9abc893d3c40d4bc6616aa1d35
2013-04-17 15:08:37 -07:00
Dmitry Kovalev
27533fa245 Transforming decode_sb_row to decode_tile function.
Also moving frame size check into read_frame_size function.

Change-Id: Ib098d83bd50081bfc2941c87aea0dc58cb39583e
2013-04-17 13:42:51 -07:00
Dmitry Kovalev
db015c8390 Moving functions from vp9_dboolhuff.c to vp9_decodframe.c.
List of moved functions: vp9_decode_uniform, vp9_decode_term_subexp,
vo9_inv_recenter_nonneg, vp9_decode_unsigned_max.

Change-Id: Ib518beb90b791690c5c93de17b8bdbf560033b41
2013-04-17 12:14:27 -07:00
Dmitry Kovalev
ecff8d71ab Adding DEFAULT_PRED_PROB_{0, 1, 2} constants.
Also using ALLOWED_REFS_PER_FRAME instead of 3.

Change-Id: I810dd8521d8138edb9dbd78edede49b62f706554
2013-04-17 11:45:35 -07:00
Dmitry Kovalev
0db175ffed Changing argument type of vp9_get_mv_joint from MV to MV*.
Change-Id: I28c3026946fc1bde7074e6e0198da93bb0d75dfe
2013-04-17 11:21:28 -07:00
Ronald S. Bultje
e693472236 Fairly basic integration of rectangular blocks in encoding RD loop.
Adds RD integration for 32x16, 16x32, 64x32 and 32x64 rectangular blocks.
Derf almost +0.6%, HD a little over +1.0%, STDHD +1.3%.

Change-Id: Id651fdb6a655fdbb5c47009757e63317acfb88a5
2013-04-17 09:25:06 -07:00
Jingning Han
90a91cc683 Recursive partition syntax coding
Enable recursive partition information coding from SB64X64 down to
MB16X16. The bit-stream syntax is now supporting rectangular block
sizes. It starts from SB64X64 and recursively describes the partition
type of the current block. If the partition type is PARTITION_NONE,
the block is coded as a single unit; if it is PARTITION_HORZ or
PARTITION_VERT, the block is segmented into two independently coded
rectangular units, with no further partition needed; otherwise, the
block is segmented into 4 square blocks. i.e., PARTITION_SPLIT case,
each can be potentially further partitioned.

Forward adaptive probability modeling is used for the partition
information coding, conditioned on the current block size.

Change-Id: I499365fb547839d555498e3bcc0387d8a3587d87
2013-04-16 18:41:26 -07:00
Dmitry Kovalev
1db8fa5280 Replacing BOOL_DECODER with vp9_reader inside vp9_decodemv.
Also a little bit of code cleanup: replacing pbi->common with cm,
pbi->mb with xd.

Change-Id: I2f70a005704a2833d644dfaafc4cd354e6e8532b
2013-04-16 17:45:57 -07:00
Dmitry Kovalev
9087d6d470 Replacing VP9_COMBINEENTROPYCONTEXTS macro with function.
Change-Id: I3bbc31840af69481e1d9bb4427c9ee25abf82946
2013-04-16 15:30:28 -07:00
Dmitry Kovalev
1ad7c1f250 Renaming y1dc_delta_q, uvdc_delta_q, uvac_delta_q fields from VP9Common.
New names are y_dc_delta_q, uv_dc_delta_q, uv_ac_delta_q.

Change-Id: I4acae1fc23a4697ce2c5a5becb8dc28ef0a4b552
2013-04-16 15:05:52 -07:00
Dmitry Kovalev
07cde4fdc8 Merge "Moving tx_type == DCT_DCT checks inside iht_add functions." into experimental 2013-04-16 14:18:37 -07:00
John Koleszar
e3cfe4e89e Remove the mb_no_coeff_skip flag
This flag was added to VP8 to allow a mode where MB-level skipping
was not allowed, saving a bit per mb. It was never used in practice,
and hasn't been tested in VP9, so remove it.

Change-Id: Id450ec6904c6d06c1919508e7efc52d05cde5631
2013-04-16 12:36:16 -07:00
Dmitry Kovalev
3609856ac5 Moving tx_type == DCT_DCT checks inside iht_add functions.
tx_type == DCT_DCT check is an implementation detail of iht_add. Also
adding dequant_add_y function with explicit DCT_DCT check inside.

Change-Id: Ia3cb0225601752cdef0ff6f0acd3a09d9dbd8938
2013-04-16 11:02:57 -07:00
Dmitry Kovalev
b30182c733 Merge "Adding mv_joint_vertical and mv_joint_horizontal functions." into experimental 2013-04-16 10:24:01 -07:00
Scott LaVarnway
466f395148 Merge "Removing extra params from x_add_residual() functions" into experimental 2013-04-16 08:58:28 -07:00
John Koleszar
e9c2bb0816 Merge "Replacing vp9_read, vp9_read_literal, vp9_read_bit macros with functions." into experimental 2013-04-16 07:00:40 -07:00
Scott LaVarnway
6f95d53e37 Removing extra params from x_add_residual() functions
Now that the predictor is the dest, we do not need the
extra parameters.

Change-Id: I31e2c3d2015f4a1cd12e7f04536d8db478582a0a
2013-04-16 09:59:01 -04:00
Scott LaVarnway
5393379c84 Merge "Removing extra params in dequant functions" into experimental 2013-04-16 06:37:00 -07:00
Dmitry Kovalev
67d060067e Replacing vp9_read, vp9_read_literal, vp9_read_bit macros with functions.
This is the first CL with vp9_reader changes. All another macro
definitions will be replaced after.

Change-Id: I1c6bd9c9a612ec1663d484d6adb4fb720af54063
2013-04-15 14:54:19 -07:00
Dmitry Kovalev
fd61b7ea10 Adding mv_joint_vertical and mv_joint_horizontal functions.
Change-Id: Ieaec2c48f3752b8558ba051caaf4ba2ab0e9e84d
2013-04-15 12:07:26 -07:00
Dmitry Kovalev
b800ec1772 Merge "Motion vector decoder cleanup." into experimental 2013-04-15 11:28:52 -07:00
Scott LaVarnway
74610b1ae4 Removing extra params in dequant functions
Now that the predictor is the dest, we do not need the
extra parameters.

Change-Id: I78db73d39b5aff62f15303f3d51ad2797eae74b6
2013-04-15 13:43:11 -04:00
Adrian Grange
4ee671a15c Merge "Initial addition of multiple ARF frames" into experimental 2013-04-15 09:46:16 -07:00
Adrian Grange
c2876cf0fd Initial addition of multiple ARF frames
This is work-in-progress, it implements multiple ARF
encoding behind an experimental flag.

It adds the ability to insert multiple ARF frames into a
single ARF group. This patch implements the reordering
of the coded frames, and implements a fixed-length coding
pattern. It applies a fixed quantizer strategy based on
where the frame is in the coding sequence.

Further work to modify the rate control strategy is
ongoing and will be submitted via a set of future patches.

In this first step, each ARF group is recursively
bisected and an ARF frame added at that position in the
sequence. The recursion continues until ARF frames are
within MIN_GF_INTERVAL frames.

The code sits behind the "multiple-arf" experimental
flag ("CONFIG_MULTIPLE_ARF"). The experimental flag
"oneshotq" ("CONFIG_ONESHOTQ") also needs to be enabled
for this patch to work correctly.

Change-Id: Ie473b05ebb43ac473c0cfb659b2b8042823085e2
2013-04-15 09:11:39 -07:00
Dmitry Kovalev
ab96e9cdaf Merge "Adding vp9_read_and_apply_sign function." into experimental 2013-04-14 04:37:39 -07:00
Dmitry Kovalev
50a85d1428 Motion vector decoder cleanup.
Change-Id: I7d3b2ef26aba3dfb1d5c83309aab2024e04ee819
2013-04-12 12:31:23 -07:00
John Koleszar
626d06502f Merge "Enable inter predictor for rectangular block size" into experimental 2013-04-12 12:21:13 -07:00
Jingning Han
3ba9dd4165 Enable inter predictor for rectangular block size
Combine superblock inter predictors into a unified function that
allows configurable block width and height. The inter predictions
of block sizes smaller than 16x16 are handled differently. To be
continued on merging them later.

Change-Id: I14075959dd5e221f00c205c99ca35c1c31ef728e
2013-04-12 11:51:58 -07:00
Scott LaVarnway
d7b7d625b1 Removed unnecessary copy from vp9_dequant_iht_add_8x8_c
Change-Id: I8fff2216c169c872f7073e66357e400f78a3445d
2013-04-12 14:33:39 -04:00
Yaowu Xu
7de5edd14a Rename B_PRED to I4X4_PRED
So it is consistent with I8x8_PRED.

Change-Id: Iefa65124b2419690d83e526c611129c0ede29d11
2013-04-12 09:23:58 -07:00
Scott LaVarnway
aa25f6a3df Merge "Remove unnecessary vp9_copy_memNxN() calls" into experimental 2013-04-12 05:24:30 -07:00
Scott LaVarnway
02162f1be5 Remove unnecessary vp9_copy_memNxN() calls
The build predictors now output directly to the dest.  These
copies are no longer required.

Change-Id: I8e91eda6b49993e6c16cfadc705d82a7e80f19b2
2013-04-11 20:03:48 -04:00
Jingning Han
815e95fbeb Make intra predictor support rectangular blocks
The intra predictor supports configurable block sizes. It can handle
intra prediction down to 4x4 sizes, when enabled in BLOCK_SIZE_TYPE.

Change-Id: I7399ec2512393aa98aadda9813ca0c83e19af854
2013-04-11 16:45:57 -07:00
Dmitry Kovalev
4fdf8ccca2 Adding vp9_read_and_apply_sign function.
Change-Id: I9951a06dbe4514cc1cf69ff4349c4e12cb4a318c
2013-04-11 15:36:43 -07:00
Scott LaVarnway
cff266bbef Merge "WIP: removing predictor buffer usage from decoder" into experimental 2013-04-11 15:24:33 -07:00
Deb Mukherjee
7a97959f13 Merge "Turning model-based updates on with modelcoefprob" into experimental 2013-04-11 14:54:53 -07:00
Deb Mukherjee
66f413af4f Turning model-based updates on with modelcoefprob
This patch changes the default with the modecoefprob expt
to use mode-based forward updates with one-node pegged
modeling.

The maximum difference with fully trained tables is now
less that 0.1%.

Change-Id: I06b44322e10c6703f93f3c1d48d973b1136a0618
2013-04-11 14:45:26 -07:00
Scott LaVarnway
6189f2bcb1 WIP: removing predictor buffer usage from decoder
This patch will use the dest buffer instead of the
predictor buffer.  This will allow us in future commits
to remove the extra mem copy that occurs in the dequant
functions when eob == 0.  We should also be able to remove
extra params that are passed into the dequant functions.

Change-Id: I7241bc1ab797a430418b1f3a95b5476db7455f6a
2013-04-11 13:55:18 -07:00
John Koleszar
8bf6de725c Merge changes I6721e42f,Iaffb1ae8 into experimental
* changes:
  tokenize: convert skippable functions
  Add foreach_transformed_block
2013-04-11 13:36:25 -07:00
John Koleszar
42471f6b72 Add foreach_transformed_block
Adds a framework for doing arbitrary functions on each transform-
sized block in the mb/sb.

Change-Id: Iaffb1ae8db5ff2abfa8720c608c78376b42f2096
2013-04-11 11:42:19 -07:00
John Koleszar
c18b2617a4 Remove vp9_reset_mb_tokens_context
Use sb-common version instead.

Change-Id: If2552b5a39fd2e5272f66a41c5667dda85fd3939
2013-04-11 11:39:19 -07:00
Ronald S. Bultje
4eb537c0e6 A few more cases where sb_type was used arithmetically.
With these fixed, the codec produces identical results regardless of
what literal values are used for the enum members in BLOCK_SIZE_*.

Change-Id: I26db8e08019b58ba432af1f0950ebe6b0eb4ad8c
2013-04-10 18:04:57 -07:00
Ronald S. Bultje
8fb5be48a6 Make usage of sb_type independent of literal values.
Change-Id: I0d12f9ef9d960df0172a1377f8e5236eb6d90492
2013-04-10 17:38:57 -07:00
Jingning Han
a4579e04c9 Merge "Make dequant/idct block size independent" into experimental 2013-04-10 16:47:53 -07:00
Jingning Han
bbd0063b5c Make dequant/idct block size independent
The unified dequantization, inverse transform, and adding functions
support rectangular block sizes. Also separate the operations on
luma and chroma components, in the consideration of the txfm_size
for uv components in rectangular block sizes.

Change-Id: I2a13246b2a9086b37d575d346070990d854cc110
2013-04-10 15:54:43 -07:00
Jingning Han
5b9dc7c68e Merge "Make SB Decoding units size-independent" into experimental 2013-04-10 13:43:51 -07:00
Dmitry Kovalev
0cef7234e1 Merge "Fixing upper case names." into experimental 2013-04-10 13:29:38 -07:00
Jingning Han
e63099d199 Make SB Decoding units size-independent
Unify the sb32x32 and sb64x64 decoding units, which also allow for
other rectangular block sizes.

Change-Id: Ia5187ab2af56f98c3f99272bdf4dbcabe798ad5d
2013-04-10 10:52:10 -07:00
Dmitry Kovalev
2759ce85ad Merge "Adding setup_quantization function." into experimental 2013-04-10 10:16:30 -07:00
Dmitry Kovalev
b41e297582 Merge "Renaming inverse hybrid transform functions." into experimental 2013-04-10 10:16:00 -07:00
Dmitry Kovalev
20645ec4fb Merge "Cleanup of set_offsets function." into experimental 2013-04-10 10:15:13 -07:00
Ronald S. Bultje
1932828d19 Merge "Make SB coding size-independent." into experimental 2013-04-10 08:51:58 -07:00
Ronald S. Bultje
a3874850dd Make SB coding size-independent.
Merge sb32x32 and sb64x64 functions; allow for rectangular sizes. Code
gives identical encoder results before and after. There are a few
macros for rectangular block sizes under the sbsegment experiment; this
experiment is not yet functional and should not yet be used.

Change-Id: I71f93b5d2a1596e99a6f01f29c3f0a456694d728
2013-04-09 21:28:27 -07:00
Dmitry Kovalev
f370db0cf4 Adding setup_quantization function.
Change-Id: I8fe25a905717a3cd2da5f87ba0403357536183cf
2013-04-09 18:24:08 -07:00
Yunqing Wang
d3c526fbda Merge "Fix an issue in set_refs()" into experimental 2013-04-09 14:31:51 -07:00
John Koleszar
a3ec4cbd33 Merge "detokenize: use consistent structure for all block sizes" into experimental 2013-04-09 14:18:59 -07:00
Yunqing Wang
01a3bd67d8 Fix an issue in set_refs()
Scale factor for second ref frame wasn't assigned in the code.

Change-Id: I6ef3f3f71bd652a879ad847369c54c744782ea37
2013-04-09 12:33:28 -07:00
Dmitry Kovalev
02349561b6 Renaming inverse hybrid transform functions.
Renaming vp9_ht_dequant_idct_add* functions to vp9_dequant_iht_add*.

Change-Id: Ie427b322b1cc7c8f39d1155f5df91dedfbd944af
2013-04-09 11:09:23 -07:00
Dmitry Kovalev
c34f6fcb54 Fixing upper case names.
Renaming Y1dequant to y_dequant, UVdequant to uv_dequant, QIndex to qindex.

Change-Id: I1c356e5f886deb3f8807dc212de9799b55b09d58
2013-04-09 10:46:57 -07:00
Dmitry Kovalev
df76a617b4 Cleanup of set_offsets function.
Adding ALLOWED_REFS_PER_FRAME constant instead of hard coded number 3.

Change-Id: I46146aa837896936f920c748c7d4aa4c27f026e4
2013-04-09 10:17:22 -07:00
Dmitry Kovalev
2a6e09d8fe Merge "Simplification of decoder's code." into experimental 2013-04-09 10:10:29 -07:00
John Koleszar
e6deea4e60 detokenize: use consistent structure for all block sizes
Restructure the code to avoid the majority of per-block-size
switches, code duplication, etc. All block types (mb/sb32/sb64)
can be handled by the same code.

Change-Id: I4022718d66e31a15a7074e43f3b98cd0a5124ea7
2013-04-08 13:11:40 -07:00
Dmitry Kovalev
5811d7e865 Simplification of decoder's code.
Removing several commented code blocks, using uint32_t and uint8_t types,
removing redundant code.

Change-Id: Ifc5cc9863897925ea2a7cab4f7309ccf28d80bfe
2013-04-08 12:14:40 -07:00
Jingning Han
12bf0796e6 Clamp inferred motion vectors only
Clamp only the motion vectors inferred from neighboring reference
macroblocks. The motion vectors obtained through motion search in
NEWMV mode are constrained during the search process, which allows
a relatively larger referencing region than the inferred mvs.
Hence further clamping the best mv provided by the motion search may
affect the efficacy of NEWMV mode.

Synchronized the decoding process. The decoded mvs in NEWMV modes
should be guaranteed to fit in the effective range. Put a mv range
clamping function there for security purpose.

This improves the coding performance of high motion sequences, e.g.,
derf set:
foreman 0.233%
husky   0.175%
icd     0.135%
mother_daughter 0.337%
pamphlet        0.561%

stdhd set:
blue_sky 0.408%
city     0.455%
also saw sunflower goes down by -0.469%.

Change-Id: I3fcbba669e56dab779857a8126a91b926e899cb5
2013-04-08 11:37:03 -07:00
John Koleszar
0e7b7e47c2 Merge "Small cleanup inside setup_loopfilter function." into experimental 2013-04-05 16:13:46 -07:00
John Koleszar
8bbabbea70 Merge "Segmentation code cleanup." into experimental 2013-04-05 16:03:25 -07:00
John Koleszar
fa135d7b9e Merge changes Ibbfa68d6,Idb76a0e2 into experimental
* changes:
  Move EOB to per-plane data
  Move qcoeff, dqcoeff from BLOCKD to per-plane data
2013-04-05 15:56:50 -07:00
Ronald S. Bultje
36c3a67c20 Remove full-pixel-related code.
This is a VP8-only feature (part of profile 3) that is unsupported in
VP9.

Change-Id: I78016eede8d9c834d44d4c517f3e8b8fc2a378b1
2013-04-05 12:50:19 -07:00
Dmitry Kovalev
421baef49e Small cleanup inside setup_loopfilter function.
Change-Id: If7fa8aea02f26c2c2bb5daf4e65c3e661d7031ca
2013-04-05 12:48:48 -07:00
Dmitry Kovalev
2c42499513 Segmentation code cleanup.
Cleaning up the code, removing unused vp9_check_segref_inter function and
useless comments.

Change-Id: Ia0e1a3878dc0f9789cba84aeb507a83d9dccd26b
2013-04-05 11:55:52 -07:00
John Koleszar
98466e8962 Merge "Simplifying get_delta_q function." into experimental 2013-04-05 09:16:15 -07:00
John Koleszar
05a79f2fbf Move EOB to per-plane data
Continue migrating data from BLOCKD/MACROBLOCKD to the per-plane
structures.

Change-Id: Ibbfa68d6da438d32dcbe8df68245ee28b0a2fa2c
2013-04-04 21:30:23 -07:00
John Koleszar
4c05a051ab Move qcoeff, dqcoeff from BLOCKD to per-plane data
Start grouping data per-plane, as part of refactoring to support
additional planes, and chroma planes with other-than 4:2:0
subsampling.

Change-Id: Idb76a0e23ab239180c818025bae1f36f1608bb23
2013-04-04 16:30:57 -07:00
Deb Mukherjee
ffc92da4c2 Fixing the newbintramodes experiment
Adds back special casing B_PRED mode decoding but protected
within the experimental macro.

Change-Id: If98dc8e56b0ecfb1202540c2b7dfdd070cb81ca0
2013-04-04 12:40:55 -07:00
Dmitry Kovalev
52128c5894 Simplifying get_delta_q function.
Change-Id: I3a1e9cc5c3ed5be01ff75a84a6c82ec02c75af9c
2013-04-04 12:10:39 -07:00
Dmitry Kovalev
f857e074d7 Fixing bug introduced by previous commit.
Inside decode_sb_4x4 it should be
"get_tx_type_4x4(mb, y_idx * y_size + x_idx)"
but it was
"get_tx_type_4x4(mb, y_idx * (2 * y_size) + x_idx)".
Also making code of decode_sb_4x4, decode_sb_8x8, and decode_sb_16x16
formatted in the same way.

Change-Id: I15c7bef4fb575f7e9da19f953912324cb35d24dd
2013-04-04 10:49:17 -07:00
John Koleszar
ccc0577ab2 Merge "Remove special case vp9_decode_coefs_4x4" into experimental 2013-04-04 07:11:31 -07:00
John Koleszar
74e8bd11c2 Merge "Adding decode_sb_16x16 function." into experimental 2013-04-03 21:07:53 -07:00
John Koleszar
4d9dbb2ae8 Merge "Reimplementation of setup_frame_size." into experimental 2013-04-03 21:04:29 -07:00