Commit Graph

1897 Commits

Author SHA1 Message Date
Jingning Han
cd6932db77 Merge "Add 8x8 dct/adst unit tests" 2013-06-25 11:21:17 -07:00
Yaowu Xu
c2e3ee13e7 Merge "Changed size of mb_mode_context to 8 bits" 2013-06-25 10:44:47 -07:00
Scott LaVarnway
855e23ce8c Merge "Small mode_info_context cleanup in filter_block_plane" 2013-06-25 10:34:19 -07:00
Dmitry Kovalev
87ee34aacb Removing unused code.
Removing block index (ib) parameter from get_tx_type_{8x8, 16x16}
functions.

Change-Id: Ia213335aae7a7cb027f97b9cc9b04519840250f1
2013-06-25 10:17:19 -07:00
Dmitry Kovalev
70e9622185 Merge "Removing find_seg_id and using vp9_get_pred_mi_segid instead." 2013-06-25 10:16:06 -07:00
Dmitry Kovalev
529679bd52 Merge "Transforming scale_mv_component_q4 into scale_mv_q4 function." 2013-06-25 10:15:33 -07:00
Jingning Han
ab362621fe Add 8x8 dct/adst unit tests
This commit enables 8x8 DCT and hybrid transform unit tests. It
also tunes the forward hybrid transform rounding opertions for
more precise round-trip performance.

Change-Id: If05c1ce59d75d641b9c6c91527d02d3a6ef498c3
2013-06-25 09:57:01 -07:00
Jingning Han
67365520e7 Merge "Use aligned buffer operations in 8x8/16x16 2D-DCT" 2013-06-25 09:49:03 -07:00
Scott LaVarnway
c787f40bc4 Small mode_info_context cleanup in filter_block_plane
Unnecessary updates to xd->mode_info_context.

Change-Id: I36d2d68ca48366f727548526726b1b5437f62968
2013-06-25 12:28:50 -04:00
Yaowu Xu
b9c934df8e Merge "Enable sse2 implmentation of 8x8 ADST/DCT" 2013-06-25 09:13:22 -07:00
Yaowu Xu
ca976db44d Merge "change to enable use_largest_txform feature" 2013-06-25 09:07:01 -07:00
Jingning Han
82d504b50f Use aligned buffer operations in 8x8/16x16 2D-DCT
This reduces 16x16 2D-DCT runtime from 865 cycles to 837 cycles.

Change-Id: I137758b81cd127b936175284310e81378db64552
2013-06-24 19:56:23 -07:00
Jingning Han
a32a086d23 Enable sse2 implmentation of 8x8 ADST/DCT
This commit makes use of the butterfly structure to enable the sse2
version implementation of 8x8 ADST/DCT hybrid transform coding.

The runtime of hybrid transform module goes down from 1170 cycles
to 245 cycles. Overall speed-up around 1.5%.

Change-Id: Ic808ffd21ece8a9d0410d8c0243d7b6c28ac3b3f
2013-06-24 18:41:33 -07:00
Yaowu Xu
e371cd73a3 change to enable use_largest_txform feature
for all regular inter frames at speed 1

Change-Id: I0a8b301273ecf2b8730ab1f6b7a05f89f4d498e0
2013-06-24 16:43:26 -07:00
John Koleszar
4ecd6dbead Move vp9_counts_to_nmv_context to encoder
This function only used from within vp9_encodemv.c.

Change-Id: Ib3fc7c30b1e2d27321397ac474cbc8976bc1f4b1
2013-06-24 15:58:18 -07:00
John Koleszar
08b1798ae7 Move vp9_full_to_model_counts to encoder
This function is not called from the decoder, so it doesn't need to be
in common/.

Change-Id: I6977dd462a25b4ff39c9c7e1b0b5b16aa58ee733
2013-06-24 15:46:15 -07:00
John Koleszar
ece724ae16 Merge "Remove unused vp9_build_intra_predictors_sb{y,uv}_s" 2013-06-24 15:08:58 -07:00
John Koleszar
ee4a7e4e46 Merge "Remove unused vp9_model_to_full_probs_sb()" 2013-06-24 15:08:54 -07:00
Scott LaVarnway
dfa2ecc3f1 Changed size of mb_mode_context to 8 bits
This reduced the size of the MODE_INFO array (mip and prev_mip)
by 425,568 bytes each for 1080p resolutions.

Change-Id: Ifa513ec2d0a49e8ec0867ec90620762fb7f1261d
2013-06-24 17:11:16 -04:00
Ronald S. Bultje
4dc70fa7f9 Don't re-allocate comp_pred buffers for each call to comp motion search.
Instead, just allocate a few bytes on the stack, this is 4k, which isn't
all that much.

Change-Id: I82af6ee89e6ed01faaa23ff891ee7ced76df8c16
2013-06-24 14:05:13 -07:00
John Koleszar
858475a03a Fix loopfilter of leftmost 4x4 edges in SB
For cases where there's no transform set in bit 0 (the left edge of
the SB) but bit 0 of mask_4x4_int is set (the edge 4 pixels from the
left edge needs filtering), it was incorrectly being skipped before.
This situation only happens on the leftmost edge of the image, as
the edge at column 0 is intentionally skipped since there aren't
pixels to the left to read.

Change-Id: Ib2fbbcb40166e90af31b1a0e13b85b68c226cbd3
2013-06-24 08:26:00 -07:00
John Koleszar
9e7019f7df Remove unused vp9_build_intra_predictors_sb{y,uv}_s
The functions no longer referenced.

Change-Id: If2705dfbc607f79ec8ec2242d5e03bec27a35aaf
2013-06-21 16:10:05 -07:00
John Koleszar
5c32215e27 Remove unused vp9_model_to_full_probs_sb()
This function never referenced.

Change-Id: I1c42cd355bfa88e17d169f7335a44be682af58cc
2013-06-21 15:38:55 -07:00
Dmitry Kovalev
f27f76dfb3 Transforming scale_mv_component_q4 into scale_mv_q4 function.
Using MV instead of int_mv for function arguments.

Change-Id: Ic25e13dccbc98fac1fa1b3255127e00cca2a57f6
2013-06-21 15:34:29 -07:00
Ronald S. Bultje
fc033b38ee Remove emms - that shouldn't be there.
Change-Id: I8fcab81e390f93dc17e9666bbf8f77883b5aa897
2013-06-21 14:45:04 -07:00
Dmitry Kovalev
40141681c0 Removing find_seg_id and using vp9_get_pred_mi_segid instead.
Change-Id: Ia40229903c08f14020e90e94cfdf494aba1be827
2013-06-21 13:05:10 -07:00
Ronald S. Bultje
ba42c02654 Add missing SECTION .text marker in assembly file.
Fixes a crash on Windows when building with MSVC.

Change-Id: I124ac756a1be55d190fadda5fcc46d23b1445dbf
2013-06-21 12:55:46 -07:00
Ronald S. Bultje
54b2a59623 Implement SSE2 block_error.
Change vp9_block_error() to return a 64bit error variable, change all
callers to expect a 64bit return value (this will prevent overflows,
which we basically don't check for at all right now). Remove duplicate
block_error() function, which fixed that through truncation. Remove
old (incompatible) mmx/sse2 block_error SIMD versions and replace with
a new one that returns a 64bit value.

Encoding time of first 50 frames of bus @ 1500kbps goes from 3min29 to
3min23, i.e. a 3% overall speedup.

Change-Id: Ib71ac5508b5ee8a80f1753cd85d72df1629abe68
2013-06-21 12:54:52 -07:00
Ronald S. Bultje
7756e9892b Merge "Add subtract_block SSE2 version and unit test." 2013-06-21 12:49:50 -07:00
Ronald S. Bultje
9a480482cb Merge "SSE2/SSSE3 optimizations and unit test for sub_pixel_avg_variance()." 2013-06-21 12:49:43 -07:00
Ronald S. Bultje
25c588b1e4 Add subtract_block SSE2 version and unit test.
3% faster overall (3min35.0 to 3min28.5).

Change-Id: I5ff8a5c2c91586b6632ca5009ad1ea51ce94af5e
2013-06-21 09:35:37 -07:00
Yaowu Xu
869d770610 Merge "Get some speed back for cpuused 1" 2013-06-20 22:37:01 -07:00
Yaowu Xu
45e25a7814 Get some speed back for cpuused 1
and remove unused code.

Change-Id: If380440c4450294b5450b7a9eeb94a376846ec01
2013-06-20 19:05:18 -07:00
Yaowu Xu
61721181ec Merge "rename variables to avoid build error in MSVC" 2013-06-20 19:04:30 -07:00
Yaowu Xu
ee07a261a0 rename variables to avoid build error in MSVC
Change-Id: I7960178c95c54d5c4497e44cfc8c493566294b34
2013-06-20 18:31:48 -07:00
Yaowu Xu
e6cd5ed307 Merge "Implement sse2 and ssse3 versions for all sub_pixel_variance sizes." 2013-06-20 17:42:50 -07:00
Ronald S. Bultje
1e6a32f1af SSE2/SSSE3 optimizations and unit test for sub_pixel_avg_variance().
Encoding of bus @ 1500kbps (first 50 frames) goes from 3min57 to
3min35, i.e. approximately a 10.5% speedup. Note that the SIMD versions
which use a bilinear filter (x_offset & 7 || y_offset & 7) aren't
perfectly interleaved, and can probably be improved further in the
future. I've marked this with a few TODOs/FIXMEs in the code.

Change-Id: I5c9e900c0f0d32e431a50fecae213b510b2549f9
2013-06-20 15:59:48 -07:00
Frank Galligan
c259af4f73 Fix win64 warning.
- size_t vs int.

Change-Id: Ib47ebd932a4b69db9f52a43000bb69d0a96b9134
2013-06-20 14:07:11 -07:00
Dmitry Kovalev
8283d893eb Merge "Renaming 'nmv' to 'mv' for several functions." 2013-06-20 10:17:12 -07:00
Dmitry Kovalev
77186ee61a Merge "Function decomposition inside vp9_decodemv.c file." 2013-06-20 10:17:05 -07:00
Deb Mukherjee
7947a33d72 Improving model rd with variance and quant step
Improves the rd modeling function and implements them using interpolation
from a table which is a little faster. Also uses sse as input to the
modeling function rather than var - since there is no dc prediction
used and as a result the sse works a little better.

derfraw300: +0.05%
Speedup: ~1%

Change-Id: I151353c6451e0e8fe3ae18ab9842f8f67e5151ff
2013-06-20 10:06:28 -07:00
Jim Bankoski
9f2a1ae23e adds force partitioning greater than or less than block size
adds a new speed feature to force partitioning to be greater than
or less than a certain size

Change-Id: I8c048eeeef93700ae822eccf98f8751a45b2e7d0
2013-06-20 09:51:42 -07:00
Jim Bankoski
18bdf708e7 adds a set partitioning to speed features
this feature lets you set a partitioning size to be used by the entire
frame.

Change-Id: I208a4c8c701375cbb054418266f677768b6f8f06
2013-06-20 09:50:44 -07:00
Jim Bankoski
476d73d294 partition by variance using var from last frame
This uses variance to split partition. Variance is calculated using
nearest mv,  always from last ref frame.

Change-Id: Idd015b4a9aa3bc82591759eac239680c07496896
2013-06-20 09:48:22 -07:00
Jim Bankoski
1f94b97694 convert all speed things to speed features
Change-Id: Ie24489a4d39f3e53e816eeebf75a1c9c7d94515a
2013-06-20 09:42:44 -07:00
Jim Bankoski
727fa7b1e4 new partition via variance
Change-Id: Ideee45cad8b38087c509cd404484728e85d0c427
2013-06-20 09:42:05 -07:00
Jim Bankoski
0fad6a9d99 fix to set up new speed feature
This uses the speed feature functionality for code.

Change-Id: I9cd16c0c5f98520ae27ebba81aa2c178546587f8
2013-06-20 09:35:02 -07:00
Jim Bankoski
df2314cfdd don't copy partitions for key frames or altrefs
force us to go through slow partitioning for keyframes, altref and
overlays.

Change-Id: I1a286361bf74083e71973575a7296be46eb98742
2013-06-20 09:34:32 -07:00
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