Граф коммитов

1549 Коммитов

Автор SHA1 Сообщение Дата
Deb Mukherjee 8b810c7a78 Fixes on feature disabling split based on variance
Adds a couple of minor fixes, which may be absorbed in Jingning's
patch. Thanks to Guillaume for pointing these out.
Also adjusts the thresholds for speed 1 and 2 to 16 and 32
respectively, to keep quality drops small.

Results:
--------
derfraw300:  threshold = 16, psnr -0.082%, speedup 2-3%
             threshold = 32, psnr -0.218%, speedup 5-6%
stdhdraw250: threshold = 16, psnr -0.031%, speedup 2-3%
             threshold = 32, psnr -0.273%, speedup 5-6%

Change-Id: I4b11ae8296cca6c2a9f644be7e40de7c423b8330
2013-08-22 07:05:44 -07:00
Scott LaVarnway f39bf458e5 Merge "Initialize mb_skip_coeff before picking modes" 2013-08-22 06:26:04 -07:00
Scott LaVarnway 94bfbaa84e Initialize mb_skip_coeff before picking modes
It appears that the above/left mb_skip_coeff used during
the pick modes, is left over from the previously
encode frame.  This patch initializes the flag to the default
value of zero.


Change-Id: Ida4684cc99611d6e3e82628db35ed717e28ce550
2013-08-22 08:51:04 -04:00
Dmitry Kovalev cb05a451c6 Merge "Cleaning up optimize_init_b function." 2013-08-22 01:35:27 -07:00
Dmitry Kovalev 64c0f5c592 Merge "Cleaning up sum_intra_stats function." 2013-08-22 01:34:39 -07:00
Jingning Han fcb890d751 Merge "Enable zero coeff check in sub8x8 UV rd loop" 2013-08-21 22:07:00 -07:00
Dmitry Kovalev be60924f29 Cleaning up optimize_init_b function.
Change-Id: Ib2c975e1d96deefb7ac4d6b600c8c5388035d111
2013-08-21 16:40:16 -07:00
Dmitry Kovalev 048ccb2849 Cleaning up sum_intra_stats function.
Using size_group_lookup table and better variable names.

Change-Id: I6e67f2ce091845db43ace7d21b7ae31c6f165aec
2013-08-21 16:25:02 -07:00
Dmitry Kovalev 3286abd82e Merge "Adding scale factor check." 2013-08-21 14:11:13 -07:00
Dmitry Kovalev 2f1a0a0e2c Removing PLANE_TYPE argument from cost_coeffs function.
We can determine plane_type for another function arguments.

Change-Id: I85331877aedb357632ae916a37b5b15f22c0bb1f
2013-08-21 13:02:28 -07:00
Dmitry Kovalev 27a984fbd3 Removing a lot of duplicated code.
Adding set_contexts contexts function and call it instead of
set_contexts_on_border. Calling txfrm_block_to_raster_xy to get aoff and
loff.

Change-Id: I41897e344afd2cae1f923f4fdbe63daccf6fe80e
2013-08-21 11:55:12 -07:00
Dmitry Kovalev a3ae4c87fd Adding scale factor check.
We support only [1/16, 2] scale factors, enforcing this now.

Change-Id: I0822eb7cea51720df6814e42d3f35ff340963061
2013-08-21 11:24:47 -07:00
Adrian Grange ce28d0ca89 Fix typos and minor stylistic cleanup
Change-Id: I32e43474e8651ef2eb181d24860a8f118cfea7bf
2013-08-21 08:45:42 -07:00
Dmitry Kovalev 7f814c6bf8 Merge "Passing plane_bsize to foreach_transformed_block_visitor." 2013-08-20 14:25:01 -07:00
Jingning Han 1bf1428654 Enable zero coeff check in sub8x8 UV rd loop
Check the minimum rate-distortion cost of regular quantization and
all zero coeffs cases in the sub8x8 inter prediction rd loop for
luma components. Use this as the cumulative rdcost sent to UV rd
estimation.

Change-Id: Ia4bc7700437d5e13d7cdad4cf9ae57ab036d3e97
2013-08-20 10:33:42 -07:00
Deb Mukherjee 246381faf2 Merge "Cleanup/enhancements of switchable filter search" 2013-08-20 10:16:51 -07:00
Dmitry Kovalev 5826407f2a Merge "Moving plane_block_idx from vp9_blockd.h to vp9_quantize.c." 2013-08-20 10:06:22 -07:00
Deb Mukherjee 2ffe64ad5c Cleanup/enhancements of switchable filter search
Cleans up the switchable filter search logic. Also adds a
speed feature - a variance threshold - to disable filter search
if source variance is lower than this value.

Results: derfraw300
threshold = 16, psnr -0.238%, 4-5% speedup (tested on football)
threshold = 32, psnr -0.381%, 8-9% speedup (tested on football)
threshold = 64, psnr -0.611%, 12-13% speedup (tested on football)
threshold = 96, psnr -0.804%, 16-17% speedup (tested on football)

Based on these results, the threshold is chosen as 16 for speed 1,
32 for speed 2, 64 for speed 3 and 96 for speed 4.

Change-Id: Ib630d39192773b1983d3d349b97973768e170c04
2013-08-20 09:47:04 -07:00
Jingning Han bb64c9a355 Merge "Enable early termination in uv rd loop" 2013-08-20 09:07:26 -07:00
Paul Wilkins e8923fe492 Changes to auto partition size selection.
Changes to code to auto select a partition size range
based on data from spatial neighbors.

Now looks at the sb_type in each 8x8 block of above
and left SB64.

The effect on speed 1 is now weaker giving better
quality but less speed gain. Now also used in speed 2.

Change-Id: Iace33a97d5c3498dd2a9a8a4067351941abcbabc
2013-08-20 14:05:39 +01:00
Yaowu Xu c4048dbdd3 Change to limit the mv search range
As the pixel values beyond image border are duplicates of pixels
on edge, the change limits the mv search range, any mv beyond
the limits no longer produce new/different prediction values
as entire block with pixels used for subpel interpolation are
outside image border.

Change-Id: I4c6fdf06e33c1cef1489f5470ce0fb4e5e01fb79
2013-08-19 17:19:36 -07:00
Yaowu Xu f70330a906 fix a bug when null function pointer is used.
For certain partition size, the function poniter may not be intialized
at all. The patch prevent the call if the pointer is not set.

Change-Id: I78b8c3992b639e8799a16b3c74f0973d07b8b9ac
2013-08-19 17:16:12 -07:00
Dmitry Kovalev 569ca37d09 Moving plane_block_idx from vp9_blockd.h to vp9_quantize.c.
Change-Id: Ib8af21f2e7f603c2fb407e5d15a3bba64b545b49
2013-08-19 16:44:10 -07:00
Jingning Han 3275ad701a Enable early termination in uv rd loop
This commit enables early termination in the rate-distortion
optimization search loop for chroma components. When the cumulative
rd cost is above the current best value, skip the rest per-block
transform/quantization/coeff_cost and continue to the next
prediction mode.

For bus_cif at 2000 kbps, the average run-time goes down from
168546ms -> 164678ms, (2% speed-up) at speed 0
 36197ms ->  34465ms, (4% speed-up) at speed 1

Change-Id: I9d3043864126e62bd0166250d66b3170d520b3c0
2013-08-19 16:31:19 -07:00
Dmitry Kovalev 82d4d9a008 Passing plane_bsize to foreach_transformed_block_visitor.
Updating all foreach_transformed_block_visitor functions to work with
plane block size instead of general block. Removing a lot of duplicated
code.

Change-Id: I6a9069e27528c611f5a648e1da0c5a5fd17f1bb4
2013-08-19 15:47:24 -07:00
Jingning Han 31c97c2bdf Merge "Fix potential use of uninitialized value" 2013-08-19 15:15:58 -07:00
Jingning Han 5dc0b309ab Merge "Fix the returned distortion value in rd_pick_intra" 2013-08-19 14:34:19 -07:00
Dmitry Kovalev 2e3478a593 Using plane_bsize instead of bsize.
This change set is intermediate. The next one will remove all repetitive
plane_bsize calculations, because it will be passed as argument to
foreach_transformed_block_visitor.

Change-Id: Ifc12e0b330e017c6851a28746b3a5460b9bf7f0b
2013-08-19 13:20:21 -07:00
Jingning Han b34ce04378 Fix potential use of uninitialized value
Initialize the best mode and tx_size values in the rate-distortion
optimization search loop.

Change-Id: Ibfb5c0895691f172abcd4265c23aef4cb99fa8af
2013-08-19 11:15:53 -07:00
Jingning Han f67919ae86 Fix the returned distortion value in rd_pick_intra
Return the distortion value in vp9_rd_pick_intra_mode_sb as sum of
dist_y and dist_uv. Remove the right shift operation on dist_uv,
and make it consistent with that of vp9_rd_pick_inter_mode_sb.

Change-Id: I9d564e242d9add38e32595d33b0e0dddb1d55e5b
2013-08-16 21:23:22 -07:00
Dmitry Kovalev 26e5b5e25d Removing unused or redundant arguments from *_args structures.
Redundant dst, pre[2] from build_inter_predictors_args, unused cm from
encode_b_args.

Change-Id: I2c476cd328c5c0cca4c78ba451ca6ba2a2c37e2d
2013-08-16 12:51:20 -07:00
Dmitry Kovalev 367cb10fcf Merge "Moving from ss_txfrm_size to tx_size." 2013-08-16 12:46:45 -07:00
Adrian Grange 79f4c1b9a4 Fixed typos and formatting
Change-Id: I3814984a624bc64147c57efa74fbdda8eda47262
2013-08-16 09:15:26 -07:00
Dmitry Kovalev afd9bd3e3c Moving from ss_txfrm_size to tx_size.
Updating foreach_transformed_block_visitor and corresponding functions
to accept tx_size instead of ss_txfrm_size. List of functions per file:

vp9_decodframe.c
  decode_block
  decode_block_intra

vp9_detokenize.c
  decode_block

vp9_encodemb.c
  optimize_block
  vp9_xform_quant
  vp9_encode_block_intra

vp9_rdopt.c
  dist_block
  rate_block
  block_yrd_txfm

vp9_tokenize.c
  set_entropy_context_b
  tokenize_b
  is_skippable

Change-Id: I351bf563eb36cf34db71c3f06b9bbc9a61b55b73
2013-08-15 17:03:03 -07:00
Jingning Han 5e80a49307 Merge "Refactor rd loop for chroma components" 2013-08-15 16:02:12 -07:00
Dmitry Kovalev 9451e8d37e Merge "Converting code from using ss_txfrm_size to tx_size." 2013-08-15 15:21:09 -07:00
Dmitry Kovalev 939b1e4a8c Merge "Moving segmentation struct from MACROBLOCKD to VP9_COMMON." 2013-08-15 15:14:32 -07:00
Jingning Han 68369ca897 Refactor rd loop for chroma components
This commit makes the rate-distortion optimization search of chroma
components consistent across all block sizes. It removes redundant
codes.

Change-Id: I7e76f54d045e8efdd41d84a164c71f55b484471b
2013-08-15 14:54:48 -07:00
Jingning Han c2ff1882ff Merge "Remove unused RDCOST_8X8 macro" 2013-08-15 13:48:25 -07:00
Jingning Han ca983f34f7 Merge "Unify luma and chroma rd-cost estimation" 2013-08-15 13:48:15 -07:00
Dmitry Kovalev bb3b817c1e Converting code from using ss_txfrm_size to tx_size.
Updated function signatures:
  txfrm_block_to_raster_block
  txfrm_block_to_raster_xy
  extend_for_intra
  vp9_optimize_b

Change-Id: I7213f4c4b1b9ec802f90621d5ba61d5e4dac5e0a
2013-08-15 11:44:57 -07:00
Dmitry Kovalev 6f4fa44c42 Using { 0 } for initialization instead of memset.
Change-Id: I4fad357465022d14bfc7e13b348c6da267587314
2013-08-15 11:37:56 -07:00
Dmitry Kovalev b7616e387e Moving segmentation struct from MACROBLOCKD to VP9_COMMON.
VP9_COMMON is the right place to segmentatation struct because it has
global segmentation parameters, not something specific to macroblock
processing.

Change-Id: Ib9ada0c06c253996eb3b5f6cccf6a323fbbba708
2013-08-15 10:47:48 -07:00
Jingning Han b0646f9e98 Remove unused RDCOST_8X8 macro
Change-Id: I17c7d7eaa60fe69c543403c340f7c1078bfd339f
2013-08-15 10:40:44 -07:00
Dmitry Kovalev 4d73416099 Merge "Quantization code cleanup." 2013-08-15 10:23:01 -07:00
Deb Mukherjee 24856b6abc Speed feature to skip split partition based on var
Adds a speed feature to disable split partition search based on a
given threshold on the source variance. A tighter threshold derived
from the threshold provided is used to also disable horizontal and
vertical partitions.

Results on derfraw300:
threshold = 16, psnr = -0.057%, speedup ~1% (football)
threshold = 32, psnr = -0.150%, speedup ~4-5% (football)
threshold = 64, psnr = -0.570%, speedup ~10-12% (football)

Results on stdhdraw250:
threshold = 32, psnr = -0.18%, speedup is somewhat more than derf
because of a larger number of smoother blocks at higher resolution.

Based on these results, a threshold of 32 is chosen for speed 1,
and a threshold of 64 is chosen for speeds 2 and above.

Change-Id: If08912fb6c67fd4242d12a0d094783a99f52f6c6
2013-08-15 10:01:45 -07:00
Jingning Han ec01f52ffa Unify luma and chroma rd-cost estimation
This commit unifies the rate-distortion cost calculation process of
luma and chroma components. It allows early termination to be enabled
later in the rd search loop of chroma components, in consistent with
luma pixels.

Change-Id: I2e52a7c6496176bf2a5e3ef338d34ceb8aad9b3d
2013-08-15 09:41:33 -07:00
Paul Wilkins 1a3641d91b Merge "Renaming in MB_MODE_INFO" 2013-08-15 02:12:48 -07:00
Dmitry Kovalev bb072000e8 foreach_transformed_block_in_plane cleanup, explicit tx_size var.
Making foreach_transformed_block_in_plane more clear (it's not finished
yet). Using explicit tx_size variable consistently instead of
(ss_txfrm_size / 2) or (ss_txfrm_size >> 1) expression.

Change-Id: I1b9bba2c0a9f817fca72c88324bbe6004766fb7d
2013-08-14 11:39:31 -07:00
Paul Wilkins 26fead7ecf Renaming in MB_MODE_INFO
The macro block mode info context originally contained an
entry for each 16x16 macroblock. In VP9 each entry refers
to an 8x8 region not a macro block, so the naming is misleading.

This first stage clean up changes the names of 3 entries in the
structure to remove the mb_ prefix.

TODO clean up the nomenclature more widely in respect of
mbmi and bmi.

Change-Id: Ia7305c6d0cb805dfe8cdc98dad21338f502e49c6
2013-08-14 12:47:52 +01:00