Commit Graph

269 Commits

Author SHA1 Message Date
Jingning Han
ccba289f8d Fast computation path for forward transform and quantization
This commit enables a fast path computational flow for forward
transformation. It checks the sse and variance of prediction
residuals and decides if the quantized coefficients are all
zero, dc only, or more. It then selects the corresponding coding
path in the forward transformation and quantization stage.

It is currently enabled in rtc coding mode. Will do it for rd
coding mode next.

In speed -6, the runtime for pedestrian_area 1080p at 1000 kbps
goes down from 14234 ms to 13704 ms, i.e., about 4% speed-up.
Overall coding performance for rtc set is changed by -0.18%.

Change-Id: I0452da1786d59bc8bcbe0a35fdae9f623d1d44e1
2014-06-12 11:10:54 -07:00
Dmitry Kovalev
35a83677a5 Moving itxm_add pointer from MACROBLOCKD to MACROBLOCK.
The final goal is eventually to get rid of both itxm_add and fwd_txm4x4.
This patch does it in the decoder.

Change-Id: Ibb3db57efbcbb1ac387c6742538a9fcf2c6f24a5
2014-05-21 11:09:44 -07:00
Yaowu Xu
d22faee98d Cleanup unused parameters
Remove unused function parameters from:
vp9_encodemb.c
vp9_encodeframe.c

Change-Id: I07725e5099cf98486e70c9c70babb0cd785c58a9
2014-05-12 09:53:11 -07:00
Dmitry Kovalev
14967cd4f5 Removing unused alt_activity_measure() function.
Change-Id: I6b520553cb5334b44356dc4651a2dbc1cb93cca5
2014-04-29 16:58:22 -07:00
Dmitry Kovalev
e608418899 Renaming MB_PREDICTION_MODE to PREDICTION_MODE.
Actually, it would be great to have two separate enums INTRA_MODES and
INTER_MODES in future.

Change-Id: I6c4147cf0002853da9c1e03fe9514eab876f01c8
2014-04-22 17:48:31 -07:00
Dmitry Kovalev
a4c3e2e4f2 Cleaning up optimize_b().
Change-Id: I81eb1e931e00acfcb65f824e394bbe7795d6deaa
2014-04-10 17:45:07 -07:00
Dmitry Kovalev
9cf7a0f0da Cleaning up optimize_b().
Change-Id: I5c62fabd380492740c1c2c0d71861e64ee1b05e8
2014-04-10 11:19:38 -07:00
Dmitry Kovalev
86f44a91f4 Renaming two members in MACROBLOCKD struct.
Renames:
  mi_8x8 -> mi
  mode_info_stride -> mi_stride

Change-Id: I66f3e5fd1e7b7f46f108af5bb711c5fd9493c1be
2014-04-01 17:46:40 -07:00
Jingning Han
98fd11c567 Fix the use of uninitialized skip flag
The use of uninitialized skip flag will trigger inconsistency in
coding statistics, when alternate RD and non-RD coding modes are
enabled. This commit fixes this issue and removes unnecessary if
statements from update_state_rt.

Change-Id: I7d549dcb0e3ef48b999e5bbc78174ba84502cfcf
2014-03-18 15:03:45 -07:00
Dmitry Kovalev
b07ae88ec4 Cleaning up optimize_b() function.
Change-Id: Id4c5b73ad747a8851969e9daf5bac40b4b9beefc
2014-03-06 12:47:55 -08:00
Dmitry Kovalev
46af01d719 Adding get_tx_type() instead of get_tx_type_{8x8, 16x16}.
Change-Id: I4a54b12e5229705222c5a101258b9d1f81e2948d
2014-03-03 12:20:51 -08:00
Dmitry Kovalev
e4159100bc Merge "Adding get_y_mode() function." 2014-02-28 11:12:22 -08:00
Dmitry Kovalev
1ae91f7784 Adding get_y_mode() function.
Change-Id: Iaac57b24f79cd205a8c62bc1177412d22f5787a8
2014-02-27 16:05:50 -08:00
Dmitry Kovalev
6c7b5e38a9 Inlining optimize_init_b() function.
Change-Id: If41459f8ba186bb47d977b76e2f4bab97078462d
2014-02-27 15:48:22 -08:00
Dmitry Kovalev
5a3d1a88ea Cleaning up vp9_xform_quant() function.
Change-Id: Id56089107b7458aa59f345edc1b49e62eac41035
2014-02-27 12:02:09 -08:00
Dmitry Kovalev
9349b82bd2 Moving common code into vp9_get_entropy_contexts().
Change-Id: I197670a405f7c2e7796424faa187a61081db8567
2014-02-26 16:20:17 -08:00
Dmitry Kovalev
6232917608 Merge "Cleaning up vp9_encodemb.c file." 2014-02-26 16:03:19 -08:00
Dmitry Kovalev
9774962a24 Cleaning up vp9_encodemb.c file.
Usage of encode_b_args is unnecessary because encode_block_pass1() doesn't
use them. That's why optimize_init_b() call is also not required.

Change-Id: Ib6cfe4916c2ca85749c90bb0adcba6fea592f9ac
2014-02-26 13:51:12 -08:00
Dmitry Kovalev
0444deb8d1 Removing vp9_optimize_b() function.
Change-Id: If859c9d58a8fe3f478d409b9e9ca59bcee8fd35d
2014-02-25 17:23:01 -08:00
Dmitry Kovalev
4632a96d97 Merge "Using vp9_subtract_plane instead of vp9_subtract_{sb, sby, sbuv}." 2014-02-25 11:06:05 -08:00
Dmitry Kovalev
f6fd5b2704 Using vp9_subtract_plane instead of vp9_subtract_{sb, sby, sbuv}.
Change-Id: I67a82a347245076b6c3b0bc41b587f9961a29943
2014-02-17 13:57:40 +01:00
Dmitry Kovalev
9141272235 Cleaning up vp9_encodemb.c.
Change-Id: Ia5b35494e4e18758f9f6c172526db83a87fdaa26
2014-02-17 12:34:02 +01:00
Dmitry Kovalev
e9cefd1b20 Cleanup: removing "ptr" suffix from var names.
Change-Id: If8e340dd6823323025a12f851e78fffdbcaaf6f8
2014-02-13 19:23:24 -08:00
Dmitry Kovalev
004c8c636e Renaming skip_coeff to skip for consistency.
Change-Id: I036e815ca63d00cba71202ae09ba0f6ef745dcb8
2014-02-12 17:44:12 -08:00
Dmitry Kovalev
79dd1f8441 Removing vp9_foreach_transformed_block_uv() function.
Change-Id: I35ec77b71e6fd686865cead9281e4dd9e9bc9e86
2014-02-11 18:06:00 -08:00
Dmitry Kovalev
441b990017 Hiding encode_b_args struct inside vp9_encodemb.c.
Change-Id: I5bcd32874f8a8a693e3eb68ef6728dfbf5475bda
2014-02-08 19:30:45 -08:00
Dmitry Kovalev
005fc6970b Finally removing "short" from transform names.
Change-Id: I5259b68dc1bcceb153e3ffe638a79a59a3019e9d
2014-02-06 11:54:15 -08:00
Jim Bankoski
9dec7712ab static function convert to inline or global vp9_blockd.h
Change-Id: Ifdd951f24932839f06d1c700371662511dde6ebe
2014-01-31 19:50:40 -08:00
Yaowu Xu
96dc80da61 Merge "create super fast rtc mode" 2014-01-29 16:36:20 -08:00
Dmitry Kovalev
b00eb5c464 Finally removing vp9_setup_interp_filters() function.
Change-Id: If446225afbb49f6033c2a4516a37c377de6f70f7
2014-01-29 11:29:34 -08:00
Jim Bankoski
ea8aaf15b5 create super fast rtc mode
This patch only works if the video is a width and height that are both
a multiple of 32..   It sets every partition to 16x16, and does INTRADC
only on the first frame and ZEROMV on every other frame.   It always does
does the largest possible transform, and loop filter level is set to 4.

Was ~20% faster than speed -5 of vp8

Now 20% slower but adds motion search ( every block ), nearest, near
and zeromv

The SVC test was changed because - while this realtime mode produces
bad quality albeit quickly, it isn't obeying all the rules it should
about which frames are available.

Change-Id: I235c0b22573957986d41497dfb84568ec1dec8c7
2014-01-29 08:39:39 -08:00
Dmitry Kovalev
e5b31a1d8c Decoupling set_ref_ptrs() and vp9_setup_interp_filters().
Change-Id: I8d17867a4772554cbba2bd113cc5b4c99d50146d
2014-01-27 16:00:20 -08:00
Dmitry Kovalev
8691565441 Removing subpix_fn_table struct.
We don't use different filter kernels for x and y, it is always one kernel
for both directions.

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

Change-Id: I1fa61fa1dc81ebbf043457c3ee2d8d4515bee6d3
2014-01-24 15:57:28 -08:00
Adrian Grange
e37eb0ade7 Rename set_scale_factors as set_ref_ptrs
New name better describes what the function does.

Change-Id: I33be1366a81f058a9854b804bcde211061187dc7
2014-01-22 13:04:30 -08:00
Jim Bankoski
73cd22f8d4 As you go mbmi->skip_coeff
Calculate the skip_coeff as part of the encode process, rather than
checking the eobs after the fact with another pass.

Change-Id: Ib41b139e96a97dee30e4b993b4cc53d86337128d
2014-01-14 17:58:25 -08:00
Dmitry Kovalev
a3fbcc88bb Using single struct to represent scale factors.
Moving back to scale_factors struct. We don't need anymore x_offset_q4 and
y_offset_q4 because both values are calculated locally inside vp9_scale_mv
function.

Change-Id: I78a2122ba253c428a14558bda0e78ece738d2b5b
2013-12-19 16:06:33 -08:00
hkuang
fb53409d2a Merge "Remove border extension in intra frame prediction." 2013-12-16 14:48:54 -08:00
hkuang
25e5552630 Remove border extension in intra frame prediction.
Change-Id: Id677df4d3dbbed6fdf7319ca6464f19cf32c8176
2013-12-16 14:05:58 -08:00
James Zern
3aa75bcef6 Merge "vp9 asserts: fix compile warning" 2013-12-13 12:41:31 -08:00
Jingning Han
930ae71ef0 Rename so -> scan_order in vp9_encodemb.c
Change-Id: I7ff2899ea18a55b37f5c581431ef59806f01e009
2013-12-13 11:06:23 -08:00
James Zern
178db94cd6 vp9 asserts: fix compile warning
string literal to int within an assert

Change-Id: I0c889256b67a078e6e2a79577f0b7ae084243258
2013-12-12 19:49:19 -08:00
Dmitry Kovalev
1b92ab0ecb Little cleanup in vp9_encode_block_intra().
Change-Id: Ibfe04b920648e15bf7116f4fdc98960572a7007e
2013-12-11 15:26:45 -08:00
Dmitry Kovalev
3712b58c2f Merge "Cleaning up vp9_entropy.h file." 2013-12-04 16:46:41 -08:00
Dmitry Kovalev
f00d157c12 Moving eob array to the encoder.
In the decoder we don't need to save eobs, we can pass eob as an argument.
That's why removing eob arrays from VP9Decompressor and TileWorkerData,
and moving eob pointer from macroblockd_plane to macroblock_plane.

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

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

Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
2013-12-03 17:23:03 -08:00
Jingning Han
f01ad926d0 Fix intra prediction ref selection in skip_encode
This commit fixes the intra prediction reference source selection
in the settings of skip_encode. Use original boundary pixels as
prediction reference, when the inverse transform and reconstruction
are skipped in the per block size rate-distortion optimization loop.

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

Change-Id: Id148868461f7ffa3d3dd634b371503ae9c57e207
2013-11-26 18:52:10 -08:00
Dmitry Kovalev
939b297ac7 Reusing txfrm_block_to_raster_xy in vp9_xform_quant().
Change-Id: Ib273dfff3be284f3c9ae288e5315fb6c6126f9c2
2013-11-25 11:13:55 -08:00
Dmitry Kovalev
350731e8f9 Organizing all scan tables into lookup table.
Change-Id: Ie829ee58a55157e6972c63cebe69a5d0a3221349
2013-11-22 16:20:45 -08:00