Commit Graph

1849 Commits

Author SHA1 Message Date
Ronald S. Bultje
8fb6c58191 Implement sse2 and ssse3 versions for all sub_pixel_variance sizes.
Overall speedup around 5% (bus @ 1500kbps first 50 frames 4min10 ->
3min58). Specific changes to timings for each function compared to
original assembly-optimized versions (or just new version timings if
no previous assembly-optimized version was available):

sse2   4x4:    99 ->   82 cycles
sse2   4x8:           128 cycles
sse2   8x4:           121 cycles
sse2   8x8:   149 ->  129 cycles
sse2   8x16:  235 ->  245 cycles (?)
sse2  16x8:   269 ->  203 cycles
sse2  16x16:  441 ->  349 cycles
sse2  16x32:          641 cycles
sse2  32x16:          643 cycles
sse2  32x32: 1733 -> 1154 cycles
sse2  32x64:         2247 cycles
sse2  64x32:         2323 cycles
sse2  64x64: 6984 -> 4442 cycles

ssse3  4x4:           100 cycles (?)
ssse3  4x8:           103 cycles
ssse3  8x4:            71 cycles
ssse3  8x8:           147 cycles
ssse3  8x16:          158 cycles
ssse3 16x8:   188 ->  162 cycles
ssse3 16x16:  316 ->  273 cycles
ssse3 16x32:          535 cycles
ssse3 32x16:          564 cycles
ssse3 32x32:          973 cycles
ssse3 32x64:         1930 cycles
ssse3 64x32:         1922 cycles
ssse3 64x64:         3760 cycles

Change-Id: I81ff6fe51daf35a40d19785167004664d7e0c59d
2013-06-20 09:34:25 -07:00
Jim Bankoski
f954490bbf disable speed > 1 speed corrections in firstpass
need to rework these

Change-Id: I17dc2c88d2faadd2f8fb117c52c25f04ea2e9856
2013-06-20 09:34:03 -07:00
Jim Bankoski
2c6bdbbc78 new debug modes code
The new print out includes skips and has prefixed sections so you can
grep to find things like transforms chosen on each frame.

Change-Id: I195043424647d9514cfc3ff6720a5b20d010fa1b
2013-06-20 09:33:11 -07:00
Jim Bankoski
fbcce4dd6f Merge "copy partitioning from last fame" 2013-06-20 09:32:43 -07:00
Jim Bankoski
f033b44e74 copy partitioning from last fame
Change-Id: I26e80ede80cb4389378a95afa95d229092a9859a
2013-06-20 09:32:19 -07:00
Yaowu Xu
6e3b34bdc3 Removed a number of unnecessary check on ref_frame
Since intra block decoding is handled by decode_sb_intra() separately.

Change-Id: I42d757884714084c92fc23ec5d35d4dc946f4b15
2013-06-19 17:53:07 -07:00
Dmitry Kovalev
15eaba103d Function decomposition inside vp9_decodemv.c file.
Change-Id: Iab96e6a50aec543c63e15cd134f9d5f01ca7ceff
2013-06-19 13:09:34 -07:00
Yunqing Wang
3656835771 Merge "Add two-pass quantization" 2013-06-19 11:35:40 -07:00
Yunqing Wang
b5bf7b13a8 Add two-pass quantization
Optimized the quantization function by making it a two-pass
process. The first pass does a quick checking of the transform
coefficients against the base ZBIN, and only keep the good
enough set of coefficients for quantization. A skipping
check is added. If all coefficients are within the base ZBIN, no
quantization is needed. The second pass is the actual quantization
pass, which only processes the coefficient subset determined
in first pass. This reduces the computation. Furthermore, an
alternitive method is used for large transform size, which often
has sparse nonzero quantized coefficients.

Overall, the encoder speedup is about 4%. The quantization function
itself gets 20% faster.

Change-Id: I3a9dd0da6db030260b6d9c314a9fa48ecae89f22
2013-06-19 10:35:02 -07:00
Yaowu Xu
12180c8329 Remove unnecessary copying of probs.
Change-Id: Ic924f07c6ab0c929c6cdf11880d3c625806e272c
2013-06-18 23:02:27 -07:00
Dmitry Kovalev
87e1fa7627 Renaming 'nmv' to 'mv' for several functions.
Change-Id: I183a38997a9d01e4a1b869e92509f6915216fa09
2013-06-18 18:28:10 -07:00
Jingning Han
7088426976 Merge "Make fdct32 computation flow within 16bit range" 2013-06-18 11:40:14 -07:00
Dmitry Kovalev
f231a3edee Merge "Code cleanup inside the decoder code." 2013-06-18 10:16:46 -07:00
Dmitry Kovalev
dfc0385291 Merge "Removing vp9_invtrans.{c, h} files." 2013-06-18 10:16:25 -07:00
Jingning Han
a41a4860c0 Make fdct32 computation flow within 16bit range
This commit makes use of dual fdct32x32 versions for rate-distortion
optimization loop and encoding process, respectively. The one for
rd loop requires only 16 bits precision for intermediate steps.
The original fdct32x32 that allows higher intermediate precision (18
bits) was retained for the encoding process only.

This allows speed-up for fdct32x32 in the rd loop. No performance
loss observed.

Change-Id: I3237770e39a8f87ed17ae5513c87228533397cc3
2013-06-18 09:46:24 -07:00
Dmitry Kovalev
6f06450cec Code cleanup inside the decoder code.
Change-Id: I927c7223996cdeb44f46e0e6c2e2054d458c300b
2013-06-17 17:19:00 -07:00
Ronald S. Bultje
d9fc451666 Move subpixel variance function from common/ to encoder/.
This seems to only be used in the encoder. Also remove an empty wrapper
file that contained forward declarations for this function, but didn't
actually define any actual functions.

Change-Id: Ifc561eef7ebe374a7d03698055e51e105f6d614b
2013-06-17 16:54:09 -07:00
Dmitry Kovalev
686b99741c Removing vp9_invtrans.{c, h} files.
Moving single function from vp9_invtrans.c to vp9_encodemb.c.

Change-Id: I26bf6bb90de342a3036c0dbfba78a7dd75a61fe7
2013-06-17 16:09:03 -07:00
Ronald S. Bultje
a2f33e2505 Use assembly-optimized variance functions in sub_pixel_{avg}_var().
2.5% faster when encoding first 50 frames of bus @ 1500kbps.

Change-Id: I5a64703996cf7fd39b07e32c72311c4b125ec6d4
2013-06-17 14:57:13 -07:00
Ronald S. Bultje
53729c7786 Fix typo ('weight' instead of 'width').
Change-Id: I5d3944051d091b4bf3eb13e2a30132d34203ef74
2013-06-17 13:56:24 -07:00
John Koleszar
61ecc282b5 Merge "Remove unused need_to_clamp_mvs" 2013-06-17 10:31:58 -07:00
John Koleszar
141ab2d5d0 Merge "Fix type mismatch in array definition" 2013-06-14 17:07:22 -07:00
John Koleszar
c2da365484 Merge "Remove constant vp9_coef_update_prob table" 2013-06-14 17:07:19 -07:00
John Koleszar
a9415d2e4c Fix type mismatch in array definition
vp9_default_inter_mode_probs was being accessed with a different type
than it was defined with. Ensure that its declaration is included
prior to its definition.

Change-Id: I2f963f513ab2f4e339f8a3c17e3d0f03749eba16
2013-06-14 16:38:42 -07:00
John Koleszar
0f7a66e962 Remove constant vp9_coef_update_prob table
All elements of this table are equal to 252, so replace it with a
single constant VP9_COEF_UPDATE_PROB.

Change-Id: I1e2d1d284326ce6df9899a740c2fc344b3ec81c9
2013-06-14 15:12:31 -07:00
Jingning Han
0b7910b9ff Merge "Enable sse2 version of sad8x4/4x8" 2013-06-14 13:15:49 -07:00
Jingning Han
c43af9a8a3 Enable sse2 version of sad8x4/4x8
The encoding time for bus at CIF goes from 661s to 625s. This commit
also enabled unit test of sad8x4/4x8 in sad_test.cc.

Change-Id: If3d10ebb56bda584bdb69bcf056599d580b12cb1
2013-06-14 09:19:28 -07:00
John Koleszar
1dfc717ba8 Merge "Avoid inverse transform/recon without residual" 2013-06-14 08:49:58 -07:00
Deb Mukherjee
4ad96115cd Some cleanups in rd motion search
No bitstream or output change - only cosmetics.

Change-Id: Ic8c1d7ad010a87dcf27d12a38cd7dd5adba683a7
2013-06-13 17:25:23 -07:00
John Koleszar
a5657f2cd6 Avoid inverse transform/recon without residual
Avoid calling decode_block, inverse transform/add in the block is
a skip block for SBs smaller than 8x8 and intra-coded SBs.

Change-Id: I1684182f4a0050c8d6bb46cba6830d9425e7127d
2013-06-13 16:39:00 -07:00
Frank Galligan
a136b87185 Fix win64 warning.
- size_t is 64bits in win64. int is 32 bits.

Change-Id: I4e756427ad42c841098a01a216469f65313987e7
2013-06-13 16:27:21 -07:00
Jingning Han
15f50e7b42 Enable sse2 version of sad8x4/4x8
The encoding time for bus at CIF goes from 661s to 625s. This commit
also enabled unit test of sad8x4/4x8 in sad_test.cc.

Change-Id: If3d10ebb56bda584bdb69bcf056599d580b12cb1
2013-06-13 16:18:18 -07:00
John Koleszar
8e47093c9e Remove unused need_to_clamp_mvs
This flag no longer needed.

Change-Id: If13482015ddb92d225792ea5c0ee455d2285d1f6
2013-06-12 16:50:14 -07:00
Scott LaVarnway
a81bd12a2e Quick modifications to mb loopfilter intrinsic functions
Modified to work with 8x8 blocks of memory.  Will revisit
later for further optimizations.  For the HD clip used, the
decoder improved by almost 20%.

Change-Id: Iaa4785be293a32a42e8db07141bd699f504b8c67
2013-06-12 19:23:03 -04:00
Yaowu Xu
d682243012 Merge "Quick modifications to wide loopfilter intrinsic functions" 2013-06-12 15:16:11 -07:00
Ronald S. Bultje
fa96eeb835 Implement SSE version for sad4x8x4d and SSE2 version for sad8x4x4d.
Encoding time of crew (CIF, first 50 frames) @ 1500kbps goes from 4min56
to 4min42.

Change-Id: I92c0c8b32980d2ae7c6dafc8b883a2c7fcd14a9f
2013-06-12 17:40:01 -04:00
Scott LaVarnway
26496c52bf Quick modifications to wide loopfilter intrinsic functions
Modified to work with 8x8 blocks of memory.  Will revisit
later for further optimizations.  For the HD clip used, the
decoder improved my 20%.

Change-Id: Ia0057f55d66d1445882351ea6c43b595a5a980e5
2013-06-12 16:49:08 -04:00
John Koleszar
1fa04e1a03 Merge changes I86fe51b0,I4c9a9e0f
* changes:
  Remove unused vp9_idct_add_{y,uv}_block
  Remove some unused loopfilter code
2013-06-12 13:43:30 -07:00
Johann
bbd5cb2bd4 Merge "Fix compile warnings on windows." 2013-06-12 13:36:50 -07:00
John Koleszar
495ff8e0c7 Merge "Enable mmx loop filter routines" 2013-06-12 12:52:04 -07:00
Ronald S. Bultje
b55f8b696a Merge "Fix row tiling." 2013-06-12 12:41:57 -07:00
John Koleszar
ad3b12f857 Merge "Fix chroma output when scaling" 2013-06-12 12:39:10 -07:00
John Koleszar
ceee4563d6 Remove unused vp9_idct_add_{y,uv}_block
These functions are not used, and appear to have been superceded.

Change-Id: I86fe51b088264f6b1b8d4d232bba97b371b98120
2013-06-12 12:24:22 -07:00
Jingning Han
1a5bb3cc76 Fix the comments in boundary block partition check
Change-Id: Ic6b2881d8d495269edbc514b33376ca963798b45
2013-06-12 12:05:06 -07:00
John Koleszar
8933a652fc Remove some unused loopfilter code
This code is unreachable, and not useful for later reference.

Change-Id: I4c9a9e0fbf859c1081bbcfbcda9710afb4b4741f
2013-06-12 11:36:00 -07:00
Frank Galligan
4524548f80 Fix compile warnings on windows.
Change-Id: If74bc6110016bc75ea3883ab136fbbac88f6a913
2013-06-12 11:34:15 -07:00
Yaowu Xu
16b876fb63 Merge "Quick fix to stop vpxdec infinite loop" 2013-06-12 11:28:46 -07:00
John Koleszar
0e1e16db90 Enable mmx loop filter routines
The mmx routines work as expected for the loop filter, so enable them.

Change-Id: I2bbd9b99a4445fcba17bb95002f1fb6e01fe8f85
2013-06-12 11:28:21 -07:00
Scott LaVarnway
9dead02b09 Quick fix to stop vpxdec infinite loop
vpxdec stays in a loop when decoding vp9.  This patch is a
quick fix to stop the loop when all data has been decoded.
Eventually we should move the vp9_get_raw_frame() call into
vp8_get_frame().

Change-Id: I3f97b6b4e1fe9ba69f746a29fc54c3304956f661
2013-06-12 13:46:47 -04:00
Ronald S. Bultje
8a0808a145 Fix row tiling.
Change-Id: I57be4eeaea6e4402f6a0cc04f5c6b7a5d9aedf9b
2013-06-12 13:42:59 -04:00
Yaowu Xu
efe05b7437 fix a mis use of ref_frame
Change-Id: I9aac140d775b7b4a8727494d15b185b75501a546
2013-06-12 10:32:38 -07:00
John Koleszar
01016ff9a6 Fix chroma output when scaling
The encode-side scaling was not indexing through the image correctly
for the chroma planes, causing a green checkerboard-like output in
the unit test.

Change-Id: I9abbd73615404cd6699588be3e64dcf59005bc14
2013-06-12 10:11:53 -07:00
Frank Galligan
15f9077ee2 Fix duplicate const.
Change-Id: I86be1f7421ed49d577cacf405f6e4b0daa85cfdc
2013-06-12 08:52:34 -07:00
John Koleszar
d0ed677a34 Merge branch 'master' into experimental
Change-Id: Ie648398b82f7311143709f55c0e30ba452f50eff
2013-06-11 16:29:28 -07:00
John Koleszar
76e0c95dd9 Trap reference frames of invalid size
A corrupt bitstream could refer to a reference frame that has no size.

Change-Id: I56c3b71a9dbb58b498e9969403e289c0e574f948
2013-06-11 15:16:38 -07:00
John Koleszar
2bcc473602 decode_tiles(): validate buffer reads
Previous code indexed using the tile length coded in the bitstream
without checking that the read would be valid.

Change-Id: Ia5047762223a4f80d75016dd546dc2ef18b6887d
2013-06-11 14:52:32 -07:00
Deb Mukherjee
e3d3ace314 Merge "Minor change in forward updates" into experimental 2013-06-11 12:48:41 -07:00
John Koleszar
0b792cf97f Merge "Disallow wide loopfilter on some chroma borders" into experimental 2013-06-11 12:29:03 -07:00
John Koleszar
9831f20594 Disallow wide loopfilter on some chroma borders
Don't do the 15 tap filter if there aren't 8 pixels below/right of the
edge.

Change-Id: I62f16437c1d9ba59b6901a5fe71ddb2f472da344
2013-06-11 11:28:38 -07:00
Deb Mukherjee
a4d906c132 Minor change in forward updates
Removes the case of coding prob = 0 for forward updates, since that
is not an allowed probability to code.
Slightly improves efficiency but may not matter in practice.

Change-Id: I3b4caf82e8f0891992f0706d4089cc5a27568dba
2013-06-11 10:33:07 -07:00
Jim Bankoski
fca6c82b29 Fix rd partition search for corner blocks
This commit enables proper partition type search for the bottom-
right corner blocks.

Change-Id: Id1123d0e4e81eba648ed4f3c0c7ab587e174f650
2013-06-11 09:29:21 -07:00
Jingning Han
551f37d63d Fix partition coding of corner block
This commit fixed the allowable partition types for bottom-right
corner blocks.

When a block has over half of its pixels as valid content in both
vertical and horizontal directions, allow all the four partition
types in the bit-stream. Otherwise, apply partition type constraints.

Change-Id: I2252e2de7125a8bfb1c824bf34299a13c81102e3
2013-06-10 21:43:17 -07:00
Deb Mukherjee
f18328cbf1 Adds a zero check in model_rd function
Avoids divide-by-zero when variance is 0.

Change-Id: I3c7f526979046ff7d17714ce960fe81d6e1442a0
2013-06-10 17:04:47 -07:00
John Koleszar
9b78ed8229 Merge "Using network byte order (big-endian) to encode tile size." into experimental 2013-06-10 16:48:11 -07:00
Deb Mukherjee
51a7c7631d Merge "New probs for filters/tx_size and a few others" into experimental 2013-06-10 16:39:43 -07:00
Deb Mukherjee
a43ff15399 New probs for filters/tx_size and a few others
* New probs for subpel filters/tx_count
* Makes a change to not reset to defaults for the tx_size
probs if an intermediate frame reverts to using a fixed tx_size.
* A few updates to the parameters for backward adaptation for mode/mv
* some cosmetic cleanups

derf300: +0.06%

Change-Id: I22994d659bc31ca7a4fc8820fde24001e64a2920
2013-06-10 16:38:47 -07:00
John Koleszar
091e23c3e6 Merge "Remove remnants of VP8 profiles/versions" into experimental 2013-06-10 16:16:17 -07:00
Dmitry Kovalev
85381e3416 Using network byte order (big-endian) to encode tile size.
This is consistent with uncompressed header encoding.

Change-Id: Iccf40a44b493ed36ee085b81ed56f7952cde70a9
2013-06-10 16:13:08 -07:00
John Koleszar
0fcb625e35 Remove remnants of VP8 profiles/versions
Remove the bilinear filter mode, and the no-loopfilter mode, and the
related vp9_setup_version() function.

Change-Id: I32311367812faf37863131df3af37d63d03973d7
2013-06-10 15:55:03 -07:00
Jim Bankoski
ba2af976cb print debugging info from mode info struct
This commit has no impact but to help us debug issues.   To Use call like
this:

  vp9_print_modes_and_motion_vectors(cpi->common.mi, cpi->common.mi_rows,
                                     cpi->common.mi_cols,
                                     cpi->common.current_video_frame,
                                     "decode_mi.stt");

Change-Id: I89e27725dae351370eb7f311a20a145ed4f1d041
2013-06-10 14:03:17 -07:00
John Koleszar
44db42c114 Merge the new loopfilter experiment
Change-Id: I524ba98841f2e1850e3276ac365c501cea31546d
2013-06-10 12:30:12 -07:00
John Koleszar
c37a1e5ef2 Merge "Loopfilter: Fix chroma edge selection" into experimental 2013-06-10 12:17:24 -07:00
John Koleszar
2f3cbfdde1 Merge "Fix use of get_uv_tx_size in loopfilter" into experimental 2013-06-10 12:17:11 -07:00
Adrian Grange
c4e5b77d74 Merge "Implement intra-coded frames" into experimental 2013-06-10 12:08:09 -07:00
Deb Mukherjee
995ce523eb Cosmetic cleanups of filters
No bitstream change.

Removes unused filters and the code for the case of 2 switchable filters;
also changes the 8tap-smooth filter coefficients for integer shifts to be
interpolating to be consistent with the way it is implemented currently.

Change-Id: I96c542fd8c06f4e0df507a645976f58e6de92aae
2013-06-10 12:06:36 -07:00
Adrian Grange
eac344ef10 Implement intra-coded frames
Implements ability to signal and decode frames that are
encoded using only intra coding modes. Only the decode
side has been implemented here.

Change-Id: I53ac6a8d90422cd08ba389e5236e15b45f9e93de
2013-06-10 11:43:16 -07:00
John Koleszar
48b7cbcac5 Loopfilter: Fix chroma edge selection
A 32x32 transform should have no internal filtering (check c==4)

Change-Id: I7414cf4748ed053208217692ef00cd8b20d49a91
2013-06-10 11:40:57 -07:00
John Koleszar
717d744a01 Fix use of get_uv_tx_size in loopfilter
Change the argument of get_uv_tx_size() to be an MBMI pointer, so that the
correct column's MBMI can be passed to the function.

Change-Id: Ied6b8ec33b77cdd353119e8fd2d157811815fc98
2013-06-10 11:40:57 -07:00
Paul Wilkins
de6ec27d1a Rd check on segment level reference mode.
Do not allow the rd code to check compound modes if
a segment level reference frame is selected.

Change-Id: I95f0c57789e0eaceed7caf227e94b4ba3130a06c
2013-06-10 11:03:15 -07:00
Ronald S. Bultje
b12a8dac98 Allow non-zeromv if ref_frame=intra with segmentation skip/ref enabled.
Change-Id: Ib5a95bb6ab643b276df3faa9bf99595e4a69ff18
2013-06-10 10:55:10 -07:00
Ronald S. Bultje
eedd98ac0a Fix crash on RD iterations with segmentation enabled.
Change-Id: I3baf93c2fa5c2f7f45c6bc5514d317040975da71
2013-06-10 10:42:09 -07:00
John Koleszar
ec38b6150d Merge "Fixed point reference picture scaling" into experimental 2013-06-10 09:45:34 -07:00
Ronald S. Bultje
549258b1c2 Merge "border mvref issue" into experimental 2013-06-10 09:22:49 -07:00
Jim Bankoski
75459d65df border mvref issue
Fixes mvref issue.

Change-Id: I07dc1b0682845bc18fe0efa6af5e4f4da3abfa3a
2013-06-10 09:21:11 -07:00
Yaowu Xu
7f99844e91 Merge "Loopfilter: bug fix in sb_type usage" into experimental 2013-06-10 08:56:38 -07:00
Tero Rintaluoma
86bb6df005 Fixed point reference picture scaling
Fixed point scaling factors are calculated once for each
reference frame by using integer division. Otherwise fixed point
scaling routines are used in all scaling calculations. This makes it
possible to calculate fixed point scaling factors on device driver
software and pass them to hardware and thus avoid division on hardware.

TODO:
 - Missing check for maximum frame dimensions
   (currently scaling uses 14 bits)
 - Missing check for maximum scaling ratio
   (upscaling 16:1, downscaling 2:1)

Problems:
 - Straightforward fixed point implementation can cause error +-1
   compared to integer division (i.e. in x_step_q4). Should only
   be an issue for frames larger than 16k.

Change-Id: I3cf4dabd610a4dc18da3bdb31ae244ebaf5d579c
2013-06-10 08:07:55 -07:00
Janne Salonen
548f90d2ce Loopfilter: bug fix in sb_type usage
Was always using sb_type of first column in a row of 8x8 units when
determining decoded block edges as a subcondition for loop filter
skipping.

Change-Id: Ib17554633a63a90b70cdaa7bed65db035a8ad9d8
2013-06-10 06:40:05 -07:00
Yaowu Xu
4852a8023d Merge "Loopfilter: Always filter intra edges" into experimental 2013-06-09 21:18:00 -07:00
Yaowu Xu
9c44ce9f4b Merge "Loopfilter: use the current block only for skip" into experimental 2013-06-09 21:17:54 -07:00
Yaowu Xu
2e1fd0a497 Merge "Modified loop filter edge skipping" into experimental 2013-06-09 21:17:47 -07:00
John Koleszar
140ac34e57 Loopfilter: Always filter intra edges
Change-Id: Ifb1ce2bd52147981ca1aec9ec6cfea8738a23e45
2013-06-09 09:02:47 -07:00
Ronald S. Bultje
c3f9b070ca Merge "New comp_inter defaults." into experimental 2013-06-09 06:40:02 -07:00
Ronald S. Bultje
3993d30922 Merge "Fix firstpass if framesize is not a multiple of 16." into experimental 2013-06-08 17:40:17 -07:00
Ronald S. Bultje
d30968c32a Merge "New default tables" into experimental 2013-06-08 17:39:50 -07:00
Ronald S. Bultje
20760254f6 Merge "Align frame size to 8 instead of 16." into experimental 2013-06-08 17:39:41 -07:00
Ronald S. Bultje
99e10253b0 New comp_inter defaults.
It seems like I inverted the meaning of the contexts by accident?

Change-Id: Iafb2346d9933930949578342b84519b719dd5dd3
2013-06-08 15:13:57 -07:00
Ronald S. Bultje
073c7d5eec Fix firstpass if framesize is not a multiple of 16.
Change-Id: Iec41736c2b6140715f90f40de5ae6cf52497a9b8
2013-06-08 13:32:05 -07:00
Yaowu Xu
c08317e4f2 Merge "Fix the rd loop over partition types" into experimental 2013-06-08 13:30:27 -07:00
Ronald S. Bultje
b64be43998 New default tables
Change-Id: Ice8c73a2a843113877b8f8ed78737a1442c25ced
2013-06-08 13:29:14 -07:00
Deb Mukherjee
17da2cab78 TX_SIZE contexts simplification.
Reduces TX_SIZE contexts to 2 for each kind. The code is
cleaner and there is hardly any performance difference with
more than two contexts.

Results: almost neutral

Change-Id: I17656bd6db76224ae2856adf882504560e7dbaa4
2013-06-08 12:32:26 -07:00
Deb Mukherjee
67cb1f093c Minor fix in TX_SIZE contexts
Change-Id: I9e81f84877e18ba7e55d66389ed60e64a5b7abcc
2013-06-08 07:14:58 -07:00
Jingning Han
e1d63c010e Fix the rd loop over partition types
This commit enables boundary blocks properly tested over allowable
partition types.

Change-Id: I405a9a46ddcfa0c7af2b63e3644cabfa3b6a951d
2013-06-07 23:36:35 -07:00
Jingning Han
b0003e4972 Merge "Fix mv range border in pixels" into experimental 2013-06-07 23:20:36 -07:00
Dmitry Kovalev
f576e79272 Merge "Uncompressed header: new encoding for frame size" into experimental 2013-06-07 18:22:53 -07:00
Yaowu Xu
b7da6d0c5a Merge "Handle partition type coding of boundary blocks" into experimental 2013-06-07 18:16:16 -07:00
Dmitry Kovalev
4053fde7ee Uncompressed header: new encoding for frame size
For key frames everything is the same as before. For inter frames we try
to reference last/golden/altref frame size. If there is no match then the
actual size is encoded. Also we don't allow zero width and height anymore.

Change-Id: I49d791fd94af749c823579b0c5ef17c961372678
2013-06-07 18:09:29 -07:00
John Koleszar
f7e4b72df8 Loopfilter: use the current block only for skip
Use the current block's skip flag to determine edge skipping.

Change-Id: I4ba81f899286afbc3f6bb83eba2ef146a01b6fa4
2013-06-07 17:48:57 -07:00
Ronald S. Bultje
71701f3d40 Align frame size to 8 instead of 16.
Change-Id: Ic606ef1b31e49963a779455a1e010a9ebb0f3f1f
2013-06-07 17:20:50 -07:00
Adrian Grange
07a5777bde Frame header changes to support intra_only frames
Made changes to the frame header to write the sync
code in the frame header for a non-displayable,
intra-only frame.

Extended reset_frame_context to 2-bits.

(Submitting on behalf of Dmitri)

Change-Id: Ie836ae0df9ed572fb4f08aabe9351a555c4f3b96
2013-06-07 16:19:34 -07:00
Deb Mukherjee
21401942b0 Coding tx-size selection by use of spatial context
Adds coding of transform size within a frame by use of context
of transform sizes selected in left and above blocks.

Also incorporates code for generating stats.

TODO: generate and incorporate new default stats

Change-Id: I6a7af099f6ad61d448521d9a51167aedaf638ed6
2013-06-07 16:07:58 -07:00
Deb Mukherjee
869a39ba60 Cleans up mbskip encoding
Refactors mbskip coding to be compatible with coding of the rest of
the symbols. Adds forward/backward adaptation and removes a lot of
the legacy code.

Results:
fast50: +1.6%
derfraw300: +0.317%

Change-Id: I395a2976d15af044d3b8ded5acfa45f6f065f980
2013-06-07 16:00:26 -07:00
Jingning Han
c0167cbbc2 Fix mv range border in pixels
WIP: trying to resolve the mismatch issue in extending frame
dimension into multiples of 8.

Change-Id: I24e7638ab3c50e21e6969c1eeed4f607d6f11f65
2013-06-07 15:49:30 -07:00
Ronald S. Bultje
36f02bf3c1 Add slightly more colorspace variations.
Change-Id: Ib44541fbbdcf71ec881814bd6715ea1c6bd82cf4
2013-06-07 14:45:49 -07:00
Dmitry Kovalev
6533ac7352 Merge "Preparation to new frame size encoding." into experimental 2013-06-07 14:42:49 -07:00
Jingning Han
78b8190cc7 Handle partition type coding of boundary blocks
The partition types of blocks sitting on the frame boundary are
constrained by the block size and the position of each sub-block
relative to the frame. Hence we use truncated probability models
to handle the coding of such information.

100 frames run:
yt 0.138%

Change-Id: I85d9b45665c15280069c0234ea6f778af586d87d
2013-06-07 14:19:40 -07:00
Ronald S. Bultje
6462afe088 Fix ref_frame segment feature when it is intra.
Change-Id: Ifbf790c14cee0c08a27f6728e3c637404e1f8477
2013-06-07 13:57:55 -07:00
Ronald S. Bultje
28164eb962 Fix segment feature data size.
Change-Id: I4331cfd99a717938f4f970cad81c468cbf287b00
2013-06-07 13:57:28 -07:00
Ronald S. Bultje
d5c2d2dc94 Fix line that disables the line above it.
Change-Id: I19d5cb60a00a001f6e5b3d90ce2db6e49d6209ad
2013-06-07 13:57:28 -07:00
Ronald S. Bultje
fb1f6f1db4 Fix segment feature data type.
It has a range of -255,255, so should be int16_t, not int8_t.

Change-Id: I5ef4b6aefb6212b0f35f4754f3c4d73fddbc52a0
2013-06-07 13:57:27 -07:00
Ronald S. Bultje
363dc6ceda Don't crash if motion vector ref points to out-of-bounds area.
This can only happen if partition is partly out-of-frame, in which
case the referenced mv is either out-of-frame also (and thus has the
same value as an already-read one), or it is actually uninitialized,
in which case we don't want to use it.

Change-Id: Icf39fa4d987c7abcbebb9bbdcdd6311e8fb9d3c9
2013-06-07 13:57:27 -07:00
Ronald S. Bultje
7dbd8a5d2b Fix static segmentation feature.
Change-Id: Ia36f626b9b3c2fe7eb89bb9acddf4701db1baef2
2013-06-07 13:57:27 -07:00
Paul Wilkins
340c7a48e6 Change to segment ref frame feature.
Simplify feature to only support a single reference frame
instead of a mask.

Change-Id: I5dd3a98c7a224aafb35708850ab82e2f220e68fb
2013-06-07 21:42:22 +01:00
Dmitry Kovalev
514b8adacd Preparation to new frame size encoding.
Just an intermediate change set to simplify merges. Reordering several
uncompressed header bits, code restructuring + minor cleanups.

Change-Id: I28272f520762f8c4e3ad230ae39fff5102ba5c0d
2013-06-07 13:41:44 -07:00
John Koleszar
fd935f309c Merge "Add cheap show-buffer operation" into experimental 2013-06-07 11:41:08 -07:00
John Koleszar
229f9a5f09 Merge "Add bits for colorspace, profile" into experimental 2013-06-07 11:41:02 -07:00
John Koleszar
8c6bff6c0c Merge "Add marker bit to bool-coded partition start" into experimental 2013-06-07 11:40:58 -07:00
Yaowu Xu
0bb6da3668 Merge "Remove two un-used entries in mode_lf_delta[]" into experimental 2013-06-07 10:10:45 -07:00
Yaowu Xu
254f46bc5b Merge "Specify mv neighborhood for block larger than 8x8" into experimental 2013-06-07 10:09:35 -07:00
Yaowu Xu
b097a3ba82 Remove two un-used entries in mode_lf_delta[]
With the removal of i4X4 and SPLIT_MV modes, the two entries for the
modes are no longer used. This patch remove the coding of the deltas.

Change-Id: Iea4eb500404ebe9706159380a03b8eca542fb4c3
2013-06-07 09:24:09 -07:00
Deb Mukherjee
78fbaf4d84 Merge "Coding updates for tx-size selection" into experimental 2013-06-07 09:19:36 -07:00
Ronald S. Bultje
def6bc765c Merge "Revert "Align frame size to 8 instead of 16."" into experimental 2013-06-07 09:01:33 -07:00
Yaowu Xu
8b3ad75266 Specify mv neighborhood for block larger than 8x8
The new neighorbhood adapts to the shape and size of the block type
cif +.16%
stdhd +.13%

Change-Id: I978db58278e9ae3fbd6726ef831bdfc5f5f37d02
2013-06-07 08:59:48 -07:00
Ronald S. Bultje
e7d306aae6 Revert "Align frame size to 8 instead of 16."
This reverts commit c2574414d4

Change-Id: Ie9013cb0bb43e639e01b4588f630b1da59295d38
2013-06-07 08:59:27 -07:00
Deb Mukherjee
3ee1a21a42 Coding updates for tx-size selection
Changes to the coding of transform sizes, along with forward
and backward probability updates.

Results:
derf300: +0.241%

Context based coding of transform sizes will be in a separate
patch.

Change-Id: I97241d60a926f014fee2de21fa4446ca56495756
2013-06-07 08:54:00 -07:00
Janne Salonen
5c5223860a Modified loop filter edge skipping
Added condition to not to skip filtering of transform block edges when
the edge is also a decoding block edge.

Change-Id: Iaccb6206c4202b78e5dca3b89379556e0f4aba0c
2013-06-07 06:36:22 -07:00
Paul Wilkins
576c2bb021 Fix bug in segment skip.
Wrong max data size (skip has no data) and use of vp9_get_segdata()
when it should be vp9_segfeature_active().

Change-Id: I1eb97d33df6e2a42cc589049f704266fe3639902
2013-06-07 13:27:08 +01:00
Paul Wilkins
653a25569b Compound inter encoder bug fix.
In the longer term the encoder should allow compound as long
as one of the buffers has opposite sign bias and as per the decoder
this buffer is then set as the fixed reference. However at the moment
the encoder and RD loop only supports the case where the ALTREF_FRAME
buffer (or third of the 3 allowed in any given frame) is the odd one out.

This patch fixes a bug that would allow compound inter and set
fixed ref to ALTREF_FRAME when it is not the odd one out.

Change-Id: Ic83a69486e088a147ba83a4aedc2a0042f6b3721
2013-06-07 12:31:54 +01:00
John Koleszar
2584a5e5e5 Add cheap show-buffer operation
Adds the ability to have the decoder show one of the existing reference
frames directly, without having to code it indirectly as a series of
skip blocks.

Change-Id: Ib6c26c5f6a8709863cf304ab890db8559687d25e
2013-06-07 00:48:03 -07:00
John Koleszar
e5b956f620 Add bits for colorspace, profile
Adds 3 bits for colorspace (sent on keyframes), 2 bits for version.

Change-Id: Iaa0cf1dcdd085cebb46e2bc4a7c78cd33cf24325
2013-06-07 00:00:16 -07:00
John Koleszar
a425e2cc06 Add marker bit to bool-coded partition start
Adds a marker bit to allow distinguishing the frame header from its residual
data.

Change-Id: Id75d47acc9e5a97007e4690c4f8748a4ce63e641
2013-06-06 23:06:26 -07:00
Yaowu Xu
4df9e7883c Merge "Removed rectangular intra prediction code" into experimental 2013-06-06 22:58:07 -07:00
Yaowu Xu
e127bdc04c fix a typo
Change-Id: I8fd21e3a8435b873c5687d8b273922fc60988295
2013-06-06 22:25:13 -07:00
Yaowu Xu
472669befb Fix a merge conflict
ref_frame in MB_Mode_Info was changed in the ref frame coding patch
to be an array to handle first and second reference frame, this patch
fix the loop filter code that use the pointer directly as reference
frame.

Change-Id: I71afa5a49deb50c1bc38029fd07470b984c6dfe9
2013-06-06 22:10:07 -07:00
Yaowu Xu
9470c1a2a1 Removed rectangular intra prediction code
As all intra predictions happen on squared transform block now.

Change-Id: I7ec91e3f0ad01383a03d2bd3099bbf32e87e3466
2013-06-06 21:35:10 -07:00
Jim Bankoski
fa9db8da15 Merge "Fix FIXME." into experimental 2013-06-06 20:50:51 -07:00
Jim Bankoski
686f437264 Merge "Align frame size to 8 instead of 16." into experimental 2013-06-06 20:49:59 -07:00
John Koleszar
736c7b804a Merge "Reimplementation of loop filter" into experimental 2013-06-06 17:34:26 -07:00
Ronald S. Bultje
c2574414d4 Align frame size to 8 instead of 16.
Change-Id: Ic22f416a33de558519d5c30a929f6a954546ade9
2013-06-06 17:28:11 -07:00
Ronald S. Bultje
bc41af00cf Fix FIXME.
Change-Id: I47a9857d35da1bff6153f8090c6b98b689b31a61
2013-06-06 17:28:11 -07:00
Ronald S. Bultje
6ef805eb9d Change ref frame coding.
Code intra/inter, then comp/single, then the ref frame selection.
Use contextualization for all steps. Don't code two past frames
in comp pred mode.

Change-Id: I4639a78cd5cccb283023265dbcc07898c3e7cf95
2013-06-06 17:28:09 -07:00
Jim Bankoski
9062b92b0f Merge "fix vp9_wb_write_bit uninitialized variable" into experimental 2013-06-06 17:13:57 -07:00
Jim Bankoski
c003b97d11 fix vp9_wb_write_bit uninitialized variable
This fixes a valgrind error.

Change-Id: I0e1ef212ba09d65e3d71dd209f0786ae6530d2c8
2013-06-06 16:48:34 -07:00
Dmitry Kovalev
395ae7abed Merge "Moving segmentation and tile info to uncompressed header." into experimental 2013-06-06 15:34:00 -07:00
Dmitry Kovalev
a23757633d Moving segmentation and tile info to uncompressed header.
Change-Id: I0ca77329d882a2026f6c1941b8e447d86bc87bda
2013-06-06 12:33:12 -07:00
Ronald S. Bultje
ad34368786 New intra mode and partitioning probabilities.
Split partition probabilities between keyframes and non-keyframes,
since they are fairly different. Also have per-blocksize interframe
y intramode probabilities, since these vary heavily between different
blocksizes.

Lastly, replace default probabilities for partitioning and intra modes
with new ones generated from current codec. Replace counts with actual
probabilities also.

Change-Id: I77ca996e25e4a28e03bdbc542f27a3e64ca1234f
2013-06-06 10:45:30 -07:00
Jingning Han
d03e974fbd Bug fix in rd_pick_inter_mode_sb_
Fix the calculation of step size in height.

Change-Id: I0e0c0175f141f5a41214ae51cef233d13942d3c5
2013-06-06 10:04:26 -07:00
Paul Wilkins
26e24b1dd7 Merge "Rd thresholds change with block size." into experimental 2013-06-06 09:27:44 -07:00
Paul Wilkins
02590a5b1b Merge "Turn off compound inter search refinement for good quality." into experimental 2013-06-06 09:27:31 -07:00
Jim Bankoski
b4c4f64862 signs reverted
Change-Id: Ieface458c83eb6e7ee95595d9fc662f372117c9a
2013-06-06 08:59:22 -07:00
John Koleszar
043d348aae Reimplementation of loop filter
This version of the loop filter supports non-4:2:0 subsampling and
a fourth plane, as well as changing the filtering order to be more
friendly to hardware implementations.

The filters are applied first to all vertical edges within the
64x64 SB, followed by the top horizontal edge and any internal
horizontal edges. Since filtering is applied on each 4x4 edge
serially, a dependency is created from filtering one block edge
to the next. It would be possible to remove this depencnecy by
building all filtering decisions from the unfiltered
reconstruction data.

Change-Id: I08f3e9683eb7bded8a76651cbc50fc0dfdd05fa7
2013-06-06 08:45:45 -07:00
Paul Wilkins
c3316c2bc5 Rd thresholds change with block size.
Added structures to support independent rd thresholds
for different block sizes (and set experimental block
size correction factors).

Added structure to to allow dynamic adaptation of thresholds
per mode and per block size basis depending on how often
the mode/block size combination is seen (currently fixed factor).

Removed some unused variables.

TODO
- Adaptation of thresholds based on how often each mode chosen.
- The baseline mode values could also be adjusted based on
  the block size (e.g. for a particular intra mode use a low threshold
  for 4x4 prediction blocks but a relatively high value for 64x64.

Change-Id: Iddee65ff3324ee309815ae7c1c5a8584720e7568
2013-06-06 15:45:53 +01:00
Paul Wilkins
c880e02f97 Turn off compound inter search refinement for good quality.
Turn this feature off for some modes in  "good" quality.

Change-Id: I3f262d62cca8f01736b977af1465291e8be29f0a
2013-06-06 15:44:25 +01:00
Jim Bankoski
5a88271b09 don't tokenize & encode tokens for blocks in UMV
This avoids encoding tokens for blocks that are entirely
in the UMV border. This changes the bitstream.

Change-Id: I32b4df46ac8a990d0c37cee92fd34f8ddd4fb6c9
2013-06-06 06:10:25 -07:00
Dmitry Kovalev
28d31aed7f Merge "Moving bits from compressed header to uncompressed one." into experimental 2013-06-06 01:15:44 -07:00
Deb Mukherjee
9504f5fac7 Merge "Fix in forward updates for INTRA modes/partitions" into experimental 2013-06-06 00:07:06 -07:00
Jingning Han
61e6586230 Merge "Fix UV intra coding rd loop" into experimental 2013-06-05 21:47:00 -07:00
Jingning Han
f04b15486a Fix UV intra coding rd loop
This commit makes the coding/reconstruction operations of intra
coding rate-distortion loop for UV components consistent with those
of the encoding process.

key frame coding gains:
derf:   0.11%
stdhd:  0.42%

Change-Id: I8d49f83924a320e3689ef2d60096c49d7f0c7a40
2013-06-05 21:18:02 -07:00
Dmitry Kovalev
12345cb391 Moving bits from compressed header to uncompressed one.
Bits moved: refresh_frame_flags, active_ref_idx[], ref_frame_sign_bias[],
allow_high_precision_mv, mcomp_filter_type, ref_pred_probs[].

Derf results: +0.040%

Change-Id: I011f43c7eac0371d533b255fd99aee5ed75b85a5
2013-06-05 20:56:37 -07:00
Deb Mukherjee
2693704621 Fix in forward updates for INTRA modes/partitions
Results:
derfraw300: +0.2

Change-Id: Ie40dc3b31e877ee705f936066d7fa5702bd01ecd
2013-06-05 15:43:44 -07:00
Deb Mukherjee
30226a658f Cosmetic renaming VP9_MVREFS to VP9_INTER_MODES
NO bitstream change

Change-Id: I79f6146dac5fdd157051b6f8dc611c0b7b5e5f7f
2013-06-05 11:24:01 -07:00
Deb Mukherjee
83885235a7 Clean-ups on switchable interpolation and mv_ref
Adds backward adaptation and differential forward updates of switchable
interpolation filter probabilities. Also adds some cosmetic cleanups
and minor fixes on mv_ref probabilities.

derfraw300: +0.353% (with most coming from switchable interp changes)

Change-Id: Ie2718be73528c945fd0d80cfd63ca2d9cb3032de
2013-06-05 10:11:52 -07:00
Jingning Han
513d326d75 Merge "Make sb intra rd search consistent with encoding" into experimental 2013-06-04 14:59:05 -07:00
Jingning Han
51b6e73a68 Make sb intra rd search consistent with encoding
This commit makes operations of the superblock intra coding rate
distortion optimization consistent with those used in the encoding
process. Given the test prediction mode and transform size, the rd
optimizer encodes and reconstructs each transformed block of the
superblock consecutively, then computes the total rate-distortion
costs accosicated with the current superblock to select the coding
decisions.

It achieves coding performance gains:
derf 0.353%
yt   1.111%

Change-Id: I0da2eb7a71361dfb8c1384927fc536b0c2790d07
2013-06-04 13:54:48 -07:00
Yaowu Xu
6ad061de58 Merge "Fix a off-by-one bug" into experimental 2013-06-03 14:56:38 -07:00
Dmitry Kovalev
6a961e7dc8 Merge "Replacing memcpy with struct assignment." into experimental 2013-06-03 14:32:05 -07:00
Dmitry Kovalev
87ab7b0fdd Merge "Moving quantization and loopfilter data to uncompressed header." into experimental 2013-06-03 14:29:34 -07:00
Yaowu Xu
0449ee0fec Fix a off-by-one bug
in the calculation of maximum number of tiles in log2 scale.

Change-Id: Id283d6e51a8b926015fd3fc631cdbfb4b8268d4a
2013-06-03 14:25:28 -07:00
Dmitry Kovalev
b8b91b2f91 Moving quantization and loopfilter data to uncompressed header.
Overall PSNR drop on derf set is -0.024.

Change-Id: I1c05d2ace83488205ca16e3b06cd5f0ebceec8d6
2013-06-03 10:50:57 -07:00
Jingning Han
9068bce4e7 Put iterative motion search under speed control
Enable iterative motion search for compound inter-inter prediction
of block sizes 4x4/4x8/8x4 only when best coding quality is selected.
The iterative motion search provides about 0.1% gains for derf and
stdhd at this point, at the expense of longer runtime.

Change-Id: Idc03e7f827e51f1bb8d269bc3752ee297a6bbfe5
2013-06-03 09:18:57 -07:00
Paul Wilkins
6dd3a6320e Merge "Replace scatter scan 32x32 with HW friendly scan." into experimental 2013-06-03 02:42:37 -07:00
Paul Wilkins
3f380d5252 Merge "vp9_find_mv_refs_idx change for last frame." into experimental 2013-06-03 02:34:46 -07:00
Dmitry Kovalev
3b9ec31eaf Replacing memcpy with struct assignment.
Change-Id: Ib557cc6351404b9e178e95a545883eb3666f11f0
2013-05-31 16:00:32 -07:00
Dmitry Kovalev
317d832d38 Merge "Adding plane_block_width and plane_block_height functions." into experimental 2013-05-31 15:28:45 -07:00
Dmitry Kovalev
127932e699 Merge "Adding new encode_txfm function." into experimental 2013-05-31 14:13:58 -07:00
Deb Mukherjee
0048ec2329 Costing fixes related to trellis optimization
Migrates costing changes/fixes from the rebalance expt to the head
without the expt on.

Rebased.

Change-Id: I51677d62f77ed08aca8d21a4c9a13103eb8de93f
Results:
derfraw300: +0.126%
2013-05-31 13:56:32 -07:00
Dmitry Kovalev
75cf80ee8e Adding new encode_txfm function.
Moving some code from vp9_pack_bitstream to encode_txfm function.

Change-Id: Icc25d6083e54f09886216fea632ceac002042d7f
2013-05-31 12:33:44 -07:00
Dmitry Kovalev
d771bba27e Renaming 'motion_vector' to 'mv' for consistency.
Change-Id: Ie869ea4992e26867caec46cb878fc86a646aeb9f
2013-05-31 12:32:53 -07:00
Dmitry Kovalev
120a878199 Adding plane_block_width and plane_block_height functions.
Change-Id: I02c17fb733c0f3c22dc3167c3d3182797415f1ae
2013-05-31 12:31:49 -07:00
Ronald S. Bultje
d404e820d4 Merge "Fix silly bug with ENTROPY_STATS enabled." into experimental 2013-05-31 10:33:29 -07:00
Ronald S. Bultje
c78f61dcd8 Fix silly bug with ENTROPY_STATS enabled.
Change-Id: I615125483da71a623a930d6e20c42df82ea0e6ee
2013-05-31 10:05:37 -07:00
Ronald S. Bultje
a288cb3b10 Merge "Merge all various transform size data trackers into single variables." into experimental 2013-05-31 09:59:24 -07:00
Scott LaVarnway
1e025dbfd1 Merge "Moved use_prev_in_find_mv_refs check to frame level" into experimental 2013-05-31 09:35:51 -07:00
Ronald S. Bultje
e9d68a5e36 Merge all various transform size data trackers into single variables.
Change-Id: I2dfc569106b29fbe4da20585a0e85e5e9ea6a4db
2013-05-31 09:18:59 -07:00
Paul Wilkins
cf61fae8ee vp9_find_mv_refs_idx change for last frame.
Restrict get_matching_candidate() to considering
mvs at 8x8 and larger sizes for last frame case.

This is to reduce the HW load of using vectors down
to the 4x4 level from the previous frame.

Change-Id: I6505e610fd63a4e22d67f136aec7905a01b893ba
2013-05-31 15:37:27 +01:00
Jim Bankoski
5da753bef9 Merge "put back in lost speedups" into experimental 2013-05-31 07:12:43 -07:00
Jim Bankoski
9e176494c2 put back in lost speedups
speed >1 can be spead up by turning these on - lost in a prior commit

Change-Id: Iaef85e10ecfeec3aea5ab0e691edf02bb7f5190d
2013-05-31 06:47:40 -07:00
Sami Pietila
0835a35347 Fix inter mode context adaptation.
Change-Id: Ibaa47be878c1cd84d88d7518418d2d8d38224e70
2013-05-31 12:58:31 +03:00
Paul Wilkins
aaf61dfbca Merge "Patch to remove implicit segmentation." into experimental 2013-05-31 02:56:20 -07:00
Yaowu Xu
7ca651a383 Merge "Changed to use a new variant of WHT" into experimental 2013-05-30 21:53:12 -07:00
Yaowu Xu
c971855697 Merge "Changed to use new intra coding calls for 1st pass" into experimental 2013-05-30 21:52:41 -07:00
Yaowu Xu
1e733747ee Changed to use new intra coding calls for 1st pass
And removed 1st pass specific version of intra coding funcitons

Change-Id: Ia54e67c71d750957cb2efda8360bf2133468498a
2013-05-30 21:21:14 -07:00
Ronald S. Bultje
b480d413e7 Minor cosmetic changes.
Change-Id: Ieb4a8c97bf1b1dfb993f40a9a3ef3bed5ae7d948
2013-05-30 20:58:53 -07:00
Ronald S. Bultje
a4e7c6bd4d Merge "Remove unused define." into experimental 2013-05-30 20:58:22 -07:00
Ronald S. Bultje
310bc1030a Merge "Merge VP9_YMODES, VP9_UV_MODES, INTRA_MODE_COUNT and cousins." into experimental 2013-05-30 20:58:19 -07:00
Ronald S. Bultje
7d549870f7 Merge "Remove TX_SIZE_MAX_MB." into experimental 2013-05-30 20:58:16 -07:00
Ronald S. Bultje
6ea6f4d253 Merge "Remove one (unused) entry from mvref tables." into experimental 2013-05-30 20:58:13 -07:00
Jim Bankoski
21595f8e38 Merge "Creates a new speed 1:" into experimental 2013-05-30 20:36:05 -07:00
Jim Bankoski
ced21bd6a6 Creates a new speed 1:
This speed 1 - uses variance threshold stolen from static-thresh
to determine split.  Any superblock with greater than the variance
set by static thresh * quantizer index squared is split. In addition
transform size is set to largest size less than or equal to partition
size, sub pixel filter is set to normal,  and only 12 modes are used
at all.

Change-Id: If7a2858ee70f96d1eb989c04fd87a332b147abef
2013-05-30 19:53:00 -07:00
Ronald S. Bultje
16482bddf7 Merge "Remove splitmv." into experimental 2013-05-30 19:07:12 -07:00
Ronald S. Bultje
d2205f92c3 Merge changes I98c18fe5,I80c37cff into experimental
* changes:
  Remove i4x4_pred.
  Remove unused table.
2013-05-30 19:06:44 -07:00
Ronald S. Bultje
117282a690 Remove unused define.
Change-Id: Ic6555128206d61f47a46c550cb3dcaf3b4ec6374
2013-05-30 17:21:06 -07:00
Ronald S. Bultje
a433abbcad Merge VP9_YMODES, VP9_UV_MODES, INTRA_MODE_COUNT and cousins.
These are now merged in a new define called VP9_INTRA_MODES.

Change-Id: I0890f895756a7395d84c92f98f43e43f4cf9050d
2013-05-30 17:21:06 -07:00
Ronald S. Bultje
4d3d00b195 Remove TX_SIZE_MAX_MB.
Change-Id: I715870513d1fef8471bfd0f5218a79360a1ef126
2013-05-30 17:21:06 -07:00
Ronald S. Bultje
580d29bdbb Remove one (unused) entry from mvref tables.
Change-Id: Ieb4669ae564bec9f3051485ecdf186cb4e00decb
2013-05-30 17:21:06 -07:00
Ronald S. Bultje
e6485581fe Remove splitmv.
We leave it in rdopt.c as a local define for now - this can be removed
later. In all other places, we remove it, thereby slightly decreasing
the size of some arrays in the bitstream.

Change-Id: Ic2a9beb97a4eda0b086f62c039d994b192f99ca5
2013-05-30 17:21:01 -07:00
Ronald S. Bultje
1efa79d32f Remove i4x4_pred.
It remains as a local define in rdopt.c so we can distinguish between
split and non-split modes in the RD loop, but disappears outside that
scope in the codec.

Change-Id: I98c18fe5ab7e4fbd1d6620ec5695e2ea20513ce9
2013-05-30 16:44:58 -07:00
Ronald S. Bultje
9175082c4e Remove unused table.
Change-Id: I80c37cffa176bac942ab3051abdfd585ed5555e1
2013-05-30 16:44:56 -07:00
Yaowu Xu
042e70e45e Changed to use a new variant of WHT
The commit changed to use a new variant of Walsh-Hadamard Transform
by Tim Terriberry. This new variant has the best compression among a
number of variants that developed by Tim.

Change-Id: Icb3a88515463cfc644b17ca046fcd139db2557e9
2013-05-30 15:37:52 -07:00
Yunqing Wang
1badebc821 Merge "Remove set_scale_factors call" into experimental 2013-05-30 15:25:01 -07:00
Deb Mukherjee
0807e1b8f6 Merge "Bugfix in forward update with modeling on." into experimental 2013-05-30 13:33:51 -07:00
Deb Mukherjee
84c5ed0e98 Bugfix in forward update with modeling on.
Fixes an issue with reducing branch cts in the encoder causing
a drop in performance. The bug was introduced in a previous
clean up patch.

Test: Went back to the offending patch, applied this same fix
to it, and checked that results are identical to the parent
of that patch.

Change-Id: I0bad8e2d930235d0284300fcebf836ceb56f2498
2013-05-30 12:58:11 -07:00
Ronald S. Bultje
f5827699bf Merge "Merge all intra mode coding trees into a single one." into experimental 2013-05-30 11:27:51 -07:00
Jingning Han
5e97862a71 Merge "Enable iterative motion search for 4x4 inter pred" into experimental 2013-05-30 11:02:10 -07:00
Adrian Grange
6f361f5841 Merge "Add intra_only and reset_frame_context flags" into experimental 2013-05-30 10:56:25 -07:00
Dmitry Kovalev
4c021c1d54 Merge "Using vp9 function prefix instead of vp8 inside vp9_cx_iface.c." into experimental 2013-05-30 10:41:55 -07:00
Ronald S. Bultje
98c192ae83 Merge all intra mode coding trees into a single one.
Also merge all counters. This removes a few unused probability updates
from the bitstream.

Change-Id: I20f58853e9dac84d8c0d9703ae012c55917516eb
2013-05-30 09:58:53 -07:00
Jim Bankoski
e987f03acd Merge "valgrind - txfm_thresh not set" into experimental 2013-05-30 09:34:48 -07:00
Deb Mukherjee
c98bfcfbbb Merge "Balancing coef-tree to reduce bool decodes" into experimental 2013-05-30 08:10:47 -07:00
Jim Bankoski
ecf023f6e4 Merge "fix valgrind warning" into experimental 2013-05-30 08:04:49 -07:00
Sami Pietila
5700b4ea42 Replace scatter scan 32x32 with HW friendly scan.
The first 240 coeff positions (15 top-left blocks) are scanned in the
same order as in scatter scan, after that the coeffs are scanned in
"block bands", each band at a time, all coeffs in one band before
moving on to the next band. This brings down the amount of 4x4 coeff
blocks that need to be buffered while scanning, from 15 blocks to 8 blocks.

Change-Id: I478a991d63c48bd5e64d36e59fed7a00c9a651ba
2013-05-30 15:32:46 +03:00
Paul Wilkins
1b103f250f Patch to remove implicit segmentation.
This patch removes the implicit segmentation
experiment from the code base as the benefits
were still unproven as of the bitstream deadline.

Change-Id: I273b99d8d621d1853eac4182f97982cb5957247e
2013-05-30 11:06:29 +01:00
Jingning Han
87626a8f6e Enable iterative motion search for 4x4 inter pred
This commit enables iterative motion search for 4x4/4x8/8x4 block
size compound inter-inter prediction.

WIP: borg run testing

Change-Id: I2b318db4a03cdca5a8002b3fa6c0fa89b129288b
2013-05-30 10:49:35 +01:00
Ronald S. Bultje
17544d1478 Merge "Remove some unused code related to macroblock/splitmv coding." into experimental 2013-05-29 17:35:05 -07:00
Ronald S. Bultje
7873de1481 Merge "Remove unused and outdated debug code." into experimental 2013-05-29 17:33:32 -07:00
Adrian Grange
9e5bb9598c Add intra_only and reset_frame_context flags
Added two flags to the frame header:

intra_only:
Signals that the frame is encoded using only INTRA
coding modes.

reset_frame_context:
Indicates that the coding context specified
in the frame header should be reset to default values before the
frame is encoded/decoded.

Change-Id: I182d46f1f84fb67a13c46ad767f246a38d7861a2
2013-05-29 17:16:00 -07:00
Yunqing Wang
c725ad3756 Remove set_scale_factors call
We could remove calling set_scale_factors() since it is also
done in set_refs() right after vp9_decode_mb_mode_mv() call in
decode_modes_b().

Change-Id: I9e62c90ffb770240987cd42815786567261b5d97
2013-05-29 17:07:53 -07:00
Deb Mukherjee
407eb03ad7 Merge "Build fix when ENTROPY_STATS is defined" into experimental 2013-05-29 17:01:43 -07:00
Jingning Han
5c05fbf6bb Merge "Refactor 4x4 block level rd loop" into experimental 2013-05-29 16:35:02 -07:00
Deb Mukherjee
b8b3f1a46d Balancing coef-tree to reduce bool decodes
This patch changes the coefficient tree to move the EOB to below
the ZERO node in order to save number of bool decodes.

The advantages of moving EOB one step down as opposed to two steps down
in the other parallel patch are: 1. The coef modeling based on
the One-node becomes independent of the tree structure above it, and
2. Fewer conext/counter increases are needed.

The drawback is that the potential savings in bool decodes will be
less, but assuming that 0s are much more predominant than 1's the
potential savings is still likely to be substantial.

Results on derf300: -0.237%

Change-Id: Ie784be13dc98291306b338e8228703a4c2ea2242
2013-05-29 16:25:52 -07:00
Dmitry Kovalev
38cb616fbf Merge "Compressed/uncompressed frame header changes." into experimental 2013-05-29 15:29:44 -07:00
Jim Bankoski
aae78c8ac7 valgrind - txfm_thresh not set
For 4x4 blocks valgrind points out the cache was uninitalized.
This resolves the issue by setting it.

Change-Id: I22733000da048643762813a84fbda66d8e4040d2
2013-05-29 13:56:08 -07:00
Jingning Han
d0a3872019 Refactor 4x4 block level rd loop
This commit makes clean-ups in the rate-distortion loop for 4x4,
4x8, and 8x4 block sizes for the use of iterative motion search.

Removed unnecessary use of bmi in handle_inter_mode.

Deprecated loop over labels in the 4x4/4x8/8x4 block rd search.

Change-Id: I71203dbb68b65e66f073b37abd90d82ef5ae6826
2013-05-29 13:44:52 -07:00
Scott LaVarnway
353642bc53 Moved use_prev_in_find_mv_refs check to frame level
This patch checks at the frame level to see if the previous
mode info context can be used.  This patch eliminates the
flag check that was done for every mode and removes another
check that was done prior to every vp9_find_mv_refs().

Change-Id: I9da5e18b7e7e28f8b1f90d527cad087073df2d73
2013-05-29 16:42:23 -04:00
Jim Bankoski
5e5470b254 fix valgrind warning
scales for second reference frame vars are unitialized if the
second ref frame is one of of those disallowed by refframeflags

Change-Id: I4ce42de391178c1699dcaede18c5f12c84993c61
2013-05-29 12:34:10 -07:00
Jingning Han
84deeddbaf Merge "Refactor rd loop for inter modes" into experimental 2013-05-29 10:55:23 -07:00
Jingning Han
6c97bba403 Merge "further clean-ups on intra4x4 coding" into experimental 2013-05-29 10:55:14 -07:00
Sami Pietila
88a4d4c510 Residual coding to cache energy class of tokens.
Proposal for tuning the residual coding by changing how the context
from previous tokens is calculated. Storing the energy class of previous
tokens instead of the token itself eases the critical path of
HW implementations.

Change-Id: I6d71d856b84518f6c88de771ddd818436f794bab
2013-05-29 15:21:01 +01:00
Ronald S. Bultje
4487f5a690 Remove some unused code related to macroblock/splitmv coding.
Change-Id: Ic40d56fb162f4e201547dfae33e62ccd9e865889
2013-05-29 06:29:56 -07:00
Ronald S. Bultje
2afc3422c6 Remove unused and outdated debug code.
Change-Id: I0e789bdeaed60f920f7a470e56a8d4ea374233fc
2013-05-28 19:15:57 -07:00
Dmitry Kovalev
18c83b3714 Compressed/uncompressed frame header changes.
Adding API to read/write uncompressed frame header bits (it is not final
yet). Separate functions to read/write uncompressed header. Moving
clr_type, error_resilient_mode, refresh_frame_context,
frame_parallel_decoding_mode, frame_context_idx from compressed partition
to uncompressed frame header.

Change-Id: Id3ed8a387980c652ae147549412f4ec24a0a5bd0
2013-05-28 18:07:54 -07:00