Commit Graph

3844 Commits

Author SHA1 Message Date
Alex Converse
20adfc5350 Merge "Fork vp9_rd_pick_inter_mode_sb_seg_skip" 2014-06-23 18:25:46 -07:00
Adrian Grange
8c1f071f1e Allocate buffers based on correct chroma format
The encoder currently allocates frame buffers before
it establishes what the chroma sub-sampling factor is,
always allocating based on the 4:4:4 format.

This patch detects the chroma format as early as
possible allowing the encoder to allocate buffers of
the correct size.

Future patches will change the encoder to allocate
frame buffers on demand to further reduce the memory
profile of the encoder and rationalize the buffer
management in the encoder and decoder.

Change-Id: Ifd41dd96e67d0011719ba40fada0bae74f3a0d57
2014-06-23 11:45:13 -07:00
Alex Converse
6118dcfe40 Merge "Actually skip blocks in skip segments in non-rd encoder." 2014-06-23 10:23:20 -07:00
Jingning Han
961bafc366 Merge "Remove unused vp9_init_quant_tables function" 2014-06-23 09:37:30 -07:00
Alex Converse
aeacaac574 Switch active map implementation to segment based.
Change-Id: Ibb841a1fa4d08d164cf5461246ec290f582b1f80
2014-06-20 13:13:23 -07:00
Alex Converse
e8a4edf49e Fork vp9_rd_pick_inter_mode_sb_seg_skip
Change-Id: I549868725b789f0f4f89828005a65972c20df888
2014-06-20 13:13:18 -07:00
Alex Converse
173a86b2a2 Actually skip blocks in skip segments in non-rd encoder.
Copy split from macroblock to pick mode context so it doesn't get lost.

Change-Id: Ie37aa12558dbe65c4f8076cf808250fffb7f27a8
2014-06-20 11:49:02 -07:00
Tim Kopp
6d2ebfabb1 Merge "VP9 denoiser bugfixes" 2014-06-20 10:37:46 -07:00
Jingning Han
48b8ce21f0 Merge "Allow key frame more flexibility in mode search" 2014-06-20 09:38:02 -07:00
Tim Kopp
b79d5b62bd Fixed VP9 denoiser COPY_BLOCK case
Now copies the src to the correct location in the running average buffer.

Change-Id: I9c83c96dc7a97f42c8df16ab4a9f18b733181f34
2014-06-20 07:18:42 -07:00
Tim Kopp
31c03b31fe VP9 denoiser bugfixes
s/stdint.h/vpx\/vpx_int.h

Added missing 'break;'s

Also included other minor changes, mostly cosmetic.

Change-Id: I852bba3e85e794f1d4af854c45c16a23a787e6a3
2014-06-20 07:18:42 -07:00
Tim Kopp
7820abe53c Merge "Added CFLAG for outputting vp9 denoised signal" 2014-06-20 07:16:08 -07:00
Jingning Han
c99a8fd7c8 Allow key frame more flexibility in mode search
This commit allows the key frame to search through more prediction
modes and more flexible block sizes. No speed change observed. The
coding performance for rtc set is improved by 1.7% for speed -5 and
3.0% for speed -6.

Change-Id: Ifd1bc28558017851b210b4004f2d80838938bcc5
2014-06-19 14:47:12 -07:00
Tim Kopp
ab9755f3af Merge "Fixes in VP9 alloc, free, and COPY_FRAME case" 2014-06-19 12:43:00 -07:00
Jingning Han
b202e475e9 Merge "Separate rate-distortion modeling for DC and AC coefficients" 2014-06-19 11:47:55 -07:00
Tim Kopp
26955b2b6a Merge "Improved vp9 denoiser running avg update." 2014-06-19 11:22:50 -07:00
Tim Kopp
40d8a20106 Merge "Implemented COPY_BLOCK case for vp9 denoiser" 2014-06-19 11:02:46 -07:00
Yunqing Wang
8297b4d7cd Merge "Modify non-rd intra mode checking" 2014-06-19 09:30:04 -07:00
Tim Kopp
c9c4e13d09 Added CFLAG for outputting vp9 denoised signal
Change-Id: Iab9b4e11cad927f3282e486c203564e1a658f377
2014-06-19 08:41:36 -07:00
Tim Kopp
b56f3af7db Fixes in VP9 alloc, free, and COPY_FRAME case
Change-Id: I1216f17e2206ef521fe219b6d72d8e41d1ba1147
2014-06-19 08:41:36 -07:00
Tim Kopp
0fec8f9712 Improved vp9 denoiser running avg update.
Change-Id: Ie0aa41fb7957755544321897b3bb2dd92f392027
2014-06-19 08:41:36 -07:00
Tim Kopp
ff38807165 Implemented COPY_BLOCK case for vp9 denoiser
Change-Id: Ie89ad1e3aebbd474e1a0db69c1961b4d1ddcd33e
2014-06-19 08:41:36 -07:00
Tim Kopp
2614e56c58 Changed buf_2ds in vp9 denoiser to YV12 buffers
Changed alloc, free, and running average code as necessary.

Change-Id: Ifc4d9ccca462164214019963b3768a457791b9c1
2014-06-18 14:18:09 -07:00
Tim Kopp
a4b7a713a4 Update running avg for VP9 denoiser
Change-Id: I9577d648542064052795bf5770428fbd5c276b7b
2014-06-18 14:18:09 -07:00
Tim Kopp
2a72067301 Implemented vp9_denoiser_{alloc,free}()
Change-Id: I79eba79f7c52eec19ef2356278597e06620d5e27
2014-06-18 14:18:09 -07:00
Jingning Han
3b9c19aaa7 Remove unused vp9_init_quant_tables function
This function is not effectively used, hence removed.

Change-Id: I2e8e48fa07c7518931690f3b04bae920cb360e49
2014-06-18 11:51:41 -07:00
Yunqing Wang
55834d42cc Modify non-rd intra mode checking
Speed 6 uses small tx size, namely 8x8. max_intra_bsize needs to
be modified accordingly to ensure valid intra mode checking.
Borg test on RTC set showed an overall PSNR gain of 0.335% in speed
-6.

This also changes speed -5 encoding by allowing DC_PRED checking
for block32x32. Borg test on RTC set showed a slight PSNR gain of
0.145%, and no noticeable speed change.

Change-Id: I1502978d8fbe265b3bb235db0f9c35ba0703cd45
2014-06-18 11:38:44 -07:00
Jingning Han
7c45dc98a8 Separate rate-distortion modeling for DC and AC coefficients
This is the first step to rework the rate-distortion modeling used
in rtc coding mode. The overall goal is to make the modeling
customized for the statistics encountered in the rtc coding.

This commit makes encoder to perform rate-distortion modeling for
DC and AC coefficients separately. No speed changes observed.
The coding performance for pedestrian_area_1080p is largely
improved:

speed -5, from 79558 b/f, 37.871 dB -> 79598 b/f, 38.600 dB
speed -6, from 79515 b/f, 37.822 dB -> 79544 b/f, 38.130 dB

Overall performance for rtc set at speed -6 is improved by 0.67%.

Change-Id: I9153444567e5f75ccdcaac043c2365992c005c0c
2014-06-18 10:50:38 -07:00
Dmitry Kovalev
bf46feb379 Merge "Moving RD-opt related code from vp9_encoder.h to vp9_rdopt.h." 2014-06-17 14:20:17 -07:00
Pengchong Jin
bed7cf2eeb Merge "skip the un-necessary motion search in the first pass" 2014-06-17 12:08:42 -07:00
Jingning Han
6cfb854eef Merge "Fix C versions of DC calculation functions" 2014-06-16 18:33:21 -07:00
Pengchong Jin
cdc954fdc8 skip the un-necessary motion search in the first pass
This patch allows the VP9 encoder to skip the un-necessary
motion search in the first pass. It computes the motion error
of 0,0 motion using the last source frame as the reference,
and skips the further motion search if this error is small.

Borg test shows overall the patch gives PSNR gain (derf -0.001%,
yt 0.341%, hd 0.282%). Individual clips may have PSNR gain or
loss. The best PSNR performance is 7.347% and the worst is -0.662%.
The first pass encoding speedup for slideshow clips is over 30%.

Change-Id: I4cac4dbd911f277ee858e161f3ca652c771344fe
2014-06-16 10:16:27 -07:00
unknown
45648532bc vp9_pickmode.c: fix vs12 compiler warnings
Change-Id: I5042b76a7050c121bf960ecb20c79d35adcc4cd5
2014-06-15 12:47:48 -07:00
Jingning Han
6b0bc34b62 Fix C versions of DC calculation functions
This commit fixes the scaling factors used in the C versions of the
DC calculation functions.

Change-Id: Iab41108c2bb93c2f2e78667214f3a772a2b707b5
2014-06-13 16:09:40 -07:00
Yunqing Wang
feaae409c8 Merge "Revert "skip un-neccessary motion search in the first pass"" 2014-06-13 15:21:26 -07:00
Dmitry Kovalev
3f8508eb61 Moving RD-opt related code from vp9_encoder.h to vp9_rdopt.h.
Change-Id: I8fab776c8801e19d3f5027ed55a6aa69eee951de
2014-06-13 12:34:40 -07:00
Dmitry Kovalev
bcfbd2f948 Replacing RC_MODE with vpx_rc_mode.
Both enums are identical.
Change-Id: I06653f9c90a2d3a2dd5c741e75b17ee7d066a56f
2014-06-13 12:22:35 -07:00
Paul Wilkins
af8d4054d6 Revert "skip un-neccessary motion search in the first pass"
This patch appears to have introduced non-determinism and/or
mismatch from debug vs release.

This reverts commit 5daef90efc.

Change-Id: I80081e55cfeaaa821b510b58a4e6e6328003c7da
2014-06-13 18:53:36 +01:00
Tim Kopp
123cd3a52c Merge "Added skeleton for VP9 denoiser" 2014-06-13 09:44:39 -07:00
Paul Wilkins
3082565b8d Merge "Cleaning up accumulate_frame_motion_stats()." 2014-06-13 02:27:03 -07:00
Dmitry Kovalev
7336903545 Merge "Adding MV_SPEED_FEATURES struct." 2014-06-12 17:15:33 -07:00
Tim Kopp
ab8bfb077b Added skeleton for VP9 denoiser
Change-Id: Iccf6ede4c4f85646b0f8daec47050ce93e267c90
2014-06-12 15:12:22 -07:00
Dmitry Kovalev
48f0935b81 Merge "Removing unused ssim_weighted_pred_err field from FIRSTPASS_STATS." 2014-06-12 14:16:18 -07:00
Dmitry Kovalev
4ff1a614f1 Adding MV_SPEED_FEATURES struct.
Moving all motion vector related speed parameters from SPEED_FEATURES to
MV_SPEED_FEATURES.

Change-Id: I3e9af0039c7162f8671878c5920bce3cb256a84e
2014-06-12 14:15:27 -07:00
Dmitry Kovalev
c90cd4d572 Merge "Moving full_pixel_search() to vp9_mcomp.c." 2014-06-12 14:12:45 -07:00
Dmitry Kovalev
ab449cd9ba Merge "Adding is_altref_enabled() function." 2014-06-12 13:24:42 -07:00
Dmitry Kovalev
f80a346e0e Merge "Replacing txfm_size with tx_size." 2014-06-12 13:07:11 -07:00
Dmitry Kovalev
442cbf565d Moving full_pixel_search() to vp9_mcomp.c.
Change-Id: I12389f801ebd3bd2ae3bf31e125433bfb429ee65
2014-06-12 13:06:37 -07:00
Dmitry Kovalev
86583b2bec Adding is_altref_enabled() function.
Change-Id: I54cdb4ce11590511e6f86bc2fd55771f1c18a20a
2014-06-12 12:13:20 -07:00
Jingning Han
d5ae43318e Merge "Fast computation path for forward transform and quantization" 2014-06-12 11:59:52 -07:00
Dmitry Kovalev
4345d12d28 Replacing txfm_size with tx_size.
Change-Id: Ifa6374e9db5919322733b656e0865f5f19ee6f2c
2014-06-12 11:57:26 -07:00
Dmitry Kovalev
eaeda536a4 Removing unused ssim_weighted_pred_err field from FIRSTPASS_STATS.
Change-Id: Ia8c7e3905ac21732cb6b8099eaf8df72c7e36b73
2014-06-12 11:28:54 -07:00
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
Alex Converse
893433be31 Merge "Fix SEG_LVL_SKIP in non-RD inter mode selection." 2014-06-12 10:38:06 -07:00
Alex Converse
130d9ade25 Merge "Fix SEG_LVL_SKIP in RD inter mode selection." 2014-06-12 10:37:20 -07:00
Yunqing Wang
f9d1e66f6a Merge "skip un-neccessary motion search in the first pass" 2014-06-12 09:43:47 -07:00
Pengchong Jin
5daef90efc skip un-neccessary motion search in the first pass
This patch allows the encoder to skip the
un-neccessary motion search in the first pass. It
calculates the error of the zero motion vector using
the last source frame as reference and skips the
further motion search in the first pass if the error
is small.

The encoding speedup of the first pass for slideshow
videos is over 30%. Borg test shows the overall PSNR
performance remain approximately the same (derf -0.009,
hd 0.387, yt 0.021, stdhd 0.065). Individual clips may
have either PSNR gain or loss. The worst PSNR perfomance
is from yt set, with a PSNR loss of -1.1.

Change-Id: I08b2ab110b695e4689573b2567fa531b6457616e
2014-06-12 08:55:52 -07:00
Alex Converse
6c3f311ba2 Fix SEG_LVL_SKIP in non-RD inter mode selection.
Add a set_mode_info_seg_skip function that fills the requisite mode info.

Change-Id: I460b1b6845d720d9b09ed5b64df0ea0aac443f62
2014-06-11 17:53:26 -07:00
Alex Converse
b0a8057f67 Fix SEG_LVL_SKIP in RD inter mode selection.
* Only use ZEROMV, disalowing the intra modes that were previously
  tested.
* Score rate and distortion as zero.

Change-Id: Ifcf99e272095725f11da1dcd26bd0f850683e680
2014-06-11 17:52:15 -07:00
Dmitry Kovalev
e6fadb5ba8 Merge "Cleaning up vp9_variance_mmx.c." 2014-06-10 17:27:12 -07:00
Dmitry Kovalev
bc93f425d0 Removing two unused TX_SIZE_SEARCH_METHOD members.
Change-Id: I33a38bb9f46e7ef509bbbf0cfd7bc3ea5072d022
2014-06-10 11:08:30 -07:00
Dmitry Kovalev
22368479c0 Merge "Removing chessboard_index from SPEED_FEATURES." 2014-06-10 10:53:53 -07:00
Dmitry Kovalev
9636601146 Merge "Removing unused motion_vector_context enum from vp9_encodeframe.c" 2014-06-10 10:53:25 -07:00
Yunqing Wang
70eb862fd3 Merge "Use small transform size in non-rd real-time mode" 2014-06-09 13:07:24 -07:00
Dmitry Kovalev
e0c6507229 Merge "Removing unused tt_activity_measure()." 2014-06-09 10:45:56 -07:00
Yunqing Wang
b04d766800 Use small transform size in non-rd real-time mode
In non-rd real-time mode, choosing smaller transform size in
encoding gives better video quality and good speed gain than
choosing larger transform size. This patch set tx size search
method to ALLOW_8X8, which is better than using 4x4 or other
larger sizes.

Borg tests on rtc set at speed 6 showed significant gain on quality.
PSNR gain: 11.034% and SSIM gain: 15.466%.

The speed gain is 5% - 12% for <720p clips, and 2% - 7% for
720p clips.

Change-Id: If4dc74ed2df359346b059f47fb73b4a0193ec548
2014-06-09 08:26:50 -07:00
Adrian Grange
61c4295af8 Merge "Fix internal stats printing" 2014-06-09 07:13:20 -07:00
Adrian Grange
b447b9d978 Merge "Revert "Removing this_frame_stats member from TWO_PASS struct."" 2014-06-06 14:03:52 -07:00
Adrian Grange
a4f747921a Revert "Removing this_frame_stats member from TWO_PASS struct."
Use of stack frame variable "fps" beyond the lifetime of the function.

fps is sent as a paremeter to output_stats and stored in the
packet holding this encoded frame. This has scope beyond the
lifetime of the calling function.

This reverts commit 3f95a230c7

Change-Id: Icd8e14b3d7dd733590ada12e619b9dce95b6b0f5
2014-06-06 12:51:56 -07:00
Dmitry Kovalev
5f72de91a8 Merge "Adding encode_tiles() function." 2014-06-06 10:03:18 -07:00
Dmitry Kovalev
923c30a174 Removing chessboard_index from SPEED_FEATURES.
This is not a speed feature, adding inline function instead.

Change-Id: Ia48c41802eec9e92cf990339d724097279695c9a
2014-06-05 18:17:54 -07:00
Dmitry Kovalev
31403fd7d7 Adding encode_tiles() function.
Change-Id: Ib8187c8f2556e1e9268b0683cd2b6ff3489f0205
2014-06-05 18:03:40 -07:00
Deb Mukherjee
e219622b80 Fixes qindex for first frame in 1-pass cq/q modes
Produces sane qindex for the first frame in 1-pass constant and
constrained qualirty modes.

Change-Id: Ib2a5091df15a23489e9bb5534a2019cf2689755e
2014-06-05 12:29:44 -07:00
Adrian Grange
323b85088d Fix internal stats printing
Change-Id: I61bd0b127164a591b1c983bfcebd64ba7617f796
2014-06-05 08:01:40 -07:00
Dmitry Kovalev
580d72d3ea Removing unused tt_activity_measure().
Change-Id: Ifcb46e6904730d14b9ef76b648b4d0dc3cd5d0c5
2014-06-04 17:11:30 -07:00
Dmitry Kovalev
8567739396 Removing unused motion_vector_context enum from vp9_encodeframe.c
The same enum defined and used in vp9_mvref_common.c.

Change-Id: I3975103997797add0a258d36c96d20ac9561a73d
2014-06-04 17:03:10 -07:00
Dmitry Kovalev
b62ce36ea5 Removing unused alt_freq field from VP9EncoderConfig.
Change-Id: I9b683c8647a864e74073161f4aa6f2911b7825e3
2014-06-04 17:02:13 -07:00
Dmitry Kovalev
4a26b240bc Using 2 instead of 3 elements for avg_frame_qindex array.
The third array element was unused. 2 elements now: key- and interframe.

Change-Id: I5b8b9f5d889cc96a204cedfc432059293256298e
2014-06-03 19:45:13 -07:00
Dmitry Kovalev
3a1625614d Merge "Removing lossless field from VP9EncoderConfig." 2014-06-03 16:46:22 -07:00
Jingning Han
a808dfe3f2 Merge "Fix potential overflow issue in SSSE3 forward 8x8 2D-DCT" 2014-06-03 16:43:49 -07:00
Jingning Han
540d910350 Fix potential overflow issue in SSSE3 forward 8x8 2D-DCT
The SSSE3 implementation might find a potential overflow issue in
its second 1-D transform, if all input residual pixels are close to
255. This commit fixes the issue and re-enables the unit test on
the SSSE3 version.

Change-Id: I0520478abdab7afd3ff2842516bec951111e9b3c
2014-06-03 14:21:47 -07:00
Dmitry Kovalev
1cdc238902 Adding buffer levels to RATE_CONTROL struct.
Change-Id: Ib35ff854378764dc3c6745844c67a33dee545663
2014-06-03 13:56:46 -07:00
Dmitry Kovalev
bd0bb363bd Removing lossless field from VP9EncoderConfig.
Right now there is just one place to check: xd->lossless and for the first
pass there is a function is_lossless_requested().

Change-Id: I949a6834e64ce51e422e2892f097f2b871b5429a
2014-06-03 12:52:49 -07:00
Dmitry Kovalev
6cf3d68fe5 Cleaning up accumulate_frame_motion_stats().
Change-Id: I9986f3fd23c5e0677068af768eae0def3db9782f
2014-06-03 10:36:29 -07:00
Dmitry Kovalev
7106f709fc Merge "Cleaning up full_pixel_search()." 2014-06-03 10:22:35 -07:00
Dmitry Kovalev
ebd4e47aa6 Merge "Moving first pass related functions to vp9_firstpasss.c." 2014-06-03 10:05:38 -07:00
Dmitry Kovalev
19c492a749 Merge "Reusing existing vp9_get{8x8, 16x16}var() instead of new ones." 2014-06-03 10:04:27 -07:00
Paul Wilkins
090d07984f Fix AQ mode 2 bug where delta causes Q 0.
In Aq mode 2 for kf/arf/gf the segment q delta
is calculated and then applied by re-quantization without
going through the rd loop again. If the base Q != 0
but the segment Q == 0 (lossless) this can could give rise
to a situation where we have an illegal combination of
transform size and Q. (Q == 0 requires that all blocks
are coded 4x4 WHT).

Change-Id: I241a58c6494ed442e9e4630070b0cde0fb99ae45
2014-06-03 13:31:32 +01:00
Deb Mukherjee
81c2fcccbc Merge "Remove Wextra warnings from vp9_sad.c" 2014-06-02 22:39:17 -07:00
Alex Converse
04a8980c65 Merge "Remove an attempt to handle SEG_LVL_SKIP sub8x8." 2014-06-02 18:50:40 -07:00
Deb Mukherjee
fc88292ef2 Remove Wextra warnings from vp9_sad.c
As a side-effect, the sad unit tests for VP8 and VP9
had to be separated.

Fixes a bug in original patch:
(https://gerrit.chromium.org/gerrit/#/c/70163/8)
that was reverted due to a nightly test failure.

Change-Id: Ia2a4e9e278fd3c89d6c3c82fcc6381320ec2a8a6
2014-06-02 13:50:20 -07:00
Yaowu Xu
f13c99562c Merge "seeing a 10x slowing down, revert now for investigation" 2014-06-02 09:02:32 -07:00
Yaowu Xu
dbfc3692eb seeing a 10x slowing down, revert now for investigation
Revert "Fix a problem of using an uninitialized parameter"

This reverts commit 538af7db5f

Change-Id: I071aa9b7068ef515abb8ae9584df15067706ccb5
2014-06-02 09:02:19 -07:00
Frank Galligan
c40a968e13 Merge "Revert "Remove Wextra warnings from vp9_sad.c"" 2014-06-01 16:58:11 -07:00
Frank Galligan
0b44988952 Revert "Remove Wextra warnings from vp9_sad.c"
This reverts commit 916550428d

Change-Id: I500822b03f09c64ff6ec5396c68edee9ca3b75cb
2014-06-01 16:20:26 -07:00
Dmitry Kovalev
5132e6da1a Merge "Converting disable_inter_mode_mask to inter_mode_mask." 2014-05-31 00:08:45 -07:00
Yaowu Xu
2dc7f506d4 Merge "Fix a problem of using an uninitialized parameter" 2014-05-30 11:37:04 -07:00
Dmitry Kovalev
19b5200172 Merge "Removing unused ref_frame_mask local var." 2014-05-30 11:24:25 -07:00
Yaowu Xu
538af7db5f Fix a problem of using an uninitialized parameter
This commit added a call to set speed feature before initializing
motion search, fixed the problem where unintialized search method
is used before its value being set.

Change-Id: I537e4612bf0d00fd6f51396fd222d4b3bd6fde58
2014-05-30 10:18:54 -07:00
Paul Wilkins
d009c2360e Merge "Re-factor some duplicate code." 2014-05-30 06:14:06 -07:00