Commit Graph

4735 Commits

Author SHA1 Message Date
Peter de Rivaz
f610f88be4 Corrected the renaming of CONFIG_VP9_HIGH ro CONFIG_VP9_HIGHBITDEPTH.
Change 71789 renamed CONFIG_VP9_HIGH to CONFIG_VP9_HIGHBITDEPTH.
However, one use of CONFIG_VP9_HIGH was missed.

Change-Id: I0ebb9c71380c6d810a25708d15471abf9533e695
2014-12-04 11:01:46 +00:00
Tom Finegan
7339681ee9 Merge "sse2 visual studio build fix" 2014-12-03 18:05:03 -08:00
Deb Mukherjee
70d9dbd818 Fixes a missing highbitdepth convolve call bug
Bug was introduced in https://gerrit.chromium.org/gerrit/#/c/72122/

Change-Id: Idb500ea619a30e7bc50e22fb8ee03be5282f41db
2014-12-03 17:48:50 -08:00
Adrian Grange
b56451f488 Merge "Use memset for initialization to 0" 2014-12-03 16:50:39 -08:00
Deb Mukherjee
6615706af2 sse2 visual studio build fix
Change-Id: Id8c8c3be882bcd92afea3ccec6ebdf3f208d28ef
2014-12-03 16:35:26 -08:00
Adrian Grange
979ee6e4c9 Free motion vector array before re-allocating
Change-Id: I0c39136d67e1e83020d61f86b062a04182ec9b00
2014-12-03 16:07:32 -08:00
Marco
fb20a07c36 Merge "Increase delta-qp for aq=3 mode, after key frame." 2014-12-03 16:03:06 -08:00
Adrian Grange
73caef0500 Use memset for initialization to 0
Change-Id: I714ca22b5d51016bf8b035cf457616c707257641
2014-12-03 15:22:02 -08:00
Marco
a047e7cdf8 Increase delta-qp for aq=3 mode, after key frame.
For a few refresh periods after key frame, use large qp-delta
to increase quality ramp-up.

Change-Id: Ib5a150fb2dfa6bafd0d4e6b5d28dfd0724b61319
2014-12-03 13:04:45 -08:00
Jingning Han
17176cd452 Fix indent in source_var_based_partition_search_method
Change-Id: I6e5e0571d6967b9b992966336715e35bb97f187e
2014-12-03 12:37:36 -08:00
Jingning Han
8f3db5f22e Merge "Remove unused ONE_LOOP entry from speed feature" 2014-12-03 11:34:42 -08:00
Jingning Han
228ec17ff2 Merge "Rework coeff probability model update for rtc coding" 2014-12-03 11:34:35 -08:00
Marco
8fd3f9a2fb Enable non-rd mode coding on key frame, for speed 6.
For key frame at speed 6: enable the non-rd mode selection in speed setting
and use the (non-rd) variance_based partition.

Adjust some logic/thresholds in variance partition selection for key frame only (no change to delta frames),
mainly to bias to selecting smaller prediction blocks, and also set max tx size of 16x16.

Loss in key frame quality (~0.6-0.7dB) compared to rd coding,
but speeds up key frame encoding by at least 6x.
Average PNSR/SSIM metrics over RTC clips go down by ~1-2% for speed 6.

Change-Id: Ie4845e0127e876337b9c105aa37e93b286193405
2014-12-03 09:18:08 -08:00
Jingning Han
a8d8c0f633 Remove unused ONE_LOOP entry from speed feature
Change-Id: I56ead0ebc2491144c4e79e5859b05e126176702c
2014-12-03 09:17:08 -08:00
Jingning Han
8fe50191c6 Rework coeff probability model update for rtc coding
This commit reworks the ONE_LOOP_REDUCED coefficient probability
model update process. It allows model update for every coefficient
across the spectrum at a coarser resolution, instead of performing
precise update only for certain subset of probability models.

The overall runtime remains nearly same (<1% change) for speed -6.
The compression performance is improved by 7.5% in PSNR for speed
-5 and 4.57% for speed -6, respectively.

Change-Id: Ifb17136382ee7e39a9f34ff4a4f09a753125c8d1
2014-12-03 09:15:25 -08:00
Debargha Mukherjee
99874f55fb Merge "Reinsert macro to fix issue 884." 2014-12-02 15:32:24 -08:00
Deb Mukherjee
1fbe0c7615 Merge "Fix a warning related to VPX_EFLAG_FORCE_KF check" 2014-12-02 14:03:55 -08:00
Peter de Rivaz
2c886953d1 Reinsert macro to fix issue 884.
Change 72056 unfolded some macro definitions,
but lost some alternative behaviour required for
high bitdepth encodes.
This causes the encoder to crash, see issue 884.

Change-Id: I8ce4d73c9fe0a3c10ccb86fba210fabc8b2f0ccc
2014-12-02 13:45:26 -08:00
Deb Mukherjee
02941b0df2 Fix a warning related to VPX_EFLAG_FORCE_KF check
Fixes a warning in chrome build.

Change-Id: I8fa0fd3e7ba1aecf89e5f79ce94cd64ed6a9567c
2014-12-02 11:35:52 -08:00
Peter de Rivaz
7e40a55ef9 Added high bitdepth sse2 transform functions
Also removes some spurious changes in common/vp9_blockd.h which
was introduced by a rebase issue between nextgen and master branches.

Change-Id: If359f0e9a71bca9c2ba685a87a355873536bb282
(cherry picked from commit 005d80cd05)
(cherry picked from commit 08d2f54800)
(cherry picked from commit 4230c2306c)
2014-12-02 11:16:24 -08:00
Paul Wilkins
00e3626e13 Use average mb energy from first pass in AQ2 test.
AQ2 modified to use mb_av_energy in defining variance
thresholds used alongside complexity when defining the
segment to be used for an SB64.

Slight improvements in metrics (ssim and PSNR).

Change-Id: Idb9cb73f7d9c4f7118cd7e84ac77b0f25cacbf81
2014-12-02 16:07:30 +00:00
Marco Paniconi
83fd18977f Cyclic refresh: factor segment delta-q into rate control.
Incorporate segment delta-q into estimated bits.
This generally improves the rate control under cyclic refresh (aq=3) mode.

Change-Id: I1dc60fb230e7d08357fae18909d8ed27bf58e037
2014-12-01 16:56:43 -08:00
Jingning Han
f59cb45e90 Merge "Remove repeated search_type_check_frequency assign" 2014-12-01 14:02:10 -08:00
Yunqing Wang
7af927e324 Merge "vp9_ethread: calculate and save the tok starting address for tiles" 2014-12-01 12:49:03 -08:00
Paul Wilkins
0d3d6e0e31 Increase strength of AQ1.
This patch greatly increase the strength of AQ1.

Visual tests show strong gains on many clips but their is a big
hit on psnr.

SSIM is more mixed with some winners and losers.

Change-Id: Idaa5d3b41d8576096bfa000b62bc531c3d8bf6a1
2014-11-27 10:53:37 +00:00
Jingning Han
a6df0cbcca Remove repeated search_type_check_frequency assign
This parameter is initialized as 50. No need to re-assign the
same value in speed -6.

Change-Id: I8735a5593412df2fdcee53ae45c8ebd1c3d792e7
2014-11-25 18:36:41 -08:00
Yunqing Wang
0993bef7e9 vp9_ethread: calculate and save the tok starting address for tiles
Each tile's tok starting address is calculated before the encoding
process. These addresses are stored so that the same calculation
won't be done again in packing bit stream.

Change-Id: I0a3be0301f002260c19a850303f2f73ebc47aa50
2014-11-25 17:19:35 -08:00
Yaowu Xu
e4234b3f8b Separate rate_correction_factor for boosted GFs
When the golden frame is boosted, the rate correction factor is not
correlated well with other inter frames even in CBR mode. This commit
changes to use GF specific rate_correction_factor when gf_cbr_boost
is greater than 20%.

Change-Id: I6312c1564387bcacc11f4c5e8a9cfdc781b5c3ab
2014-11-25 14:32:07 -08:00
Jingning Han
a04ed98482 Cosmetic change in vp9_pick_inter_mode
Change-Id: Ic072585ebffdb36982ed7b8b9f875ca6c1c656c4
2014-11-25 09:42:57 -08:00
Jingning Han
92a7cfc8bf Adaptively adjust mode test kick-off thresholds in RTC coding
This commit allows the encoder to increase the mode test kick-off
thresholds if the previous best mode renders all zero quantized
coefficients, thereby saving motion search runs when possible.
The compression performance of speed -5 and -6 is down by -0.446%
and 0.591%, respectively. The runtime of speed -6 is improved by
10% for many test clips.

vidyo1, 1000 kbps
16578 b/f, 40.316 dB, 7873 ms -> 16575 b/f, 40.262 dB, 7126 ms

nik720p, 1000 kbps
33311 b/f, 38.651 dB, 7263 ms -> 33304 b/f, 38.629 dB, 6865 ms

dark720p, 1000 kbps
33331 b/f, 39.718 dB, 13596 ms -> 33324 b/f, 39.651 dB, 12000 ms

mmoving, 1000 kbps
33263 b/f, 40.983 dB, 7566 ms -> 33259 b/f, 40.978 dB, 7531 ms

Change-Id: I7591617ff113e91125ec32c9b853e257fbc41d90
2014-11-25 09:42:08 -08:00
Jingning Han
30104207fd Merge "Rework forward txfm/quantization skip system in RTC coding mode" 2014-11-25 09:33:57 -08:00
Jingning Han
6912c44135 Merge "Remove redundant intra mode penalty from vp9_pick_inter_mode" 2014-11-24 22:13:44 -08:00
Yunqing Wang
edbd61e136 vp9_ethread: modify VP9_COMP structure
This patch modified struct VP9_COMP. Created a struct ThreadData
to include data that need to be copied for each thread. In
multiple thread case, one thread processes one tile. all threads
share one copy of VP9_COMP,
(refer to VP9_COMP *cpi in the code)
but each thread has its own copy of ThreadData,
(refer to ThreadData *td in the code).
Therefore, within the scope of encode_tiles(), both cpi and td
need to be passed as function parameters.

In single thread case, the FRAME_COUNTS pointer in ThreadData
points to "counts" in VP9_COMMON.

Change-Id: Ib37908b2d8e2c0f4f9c18f38017df5ce60e8b13e
2014-11-24 17:57:38 -08:00
Jingning Han
25be81e2dd Remove redundant intra mode penalty from vp9_pick_inter_mode
The intra mode penalty is covered by intra_cost_penalty. This
commit removes the other intra cost threshold, provided that the
constant 50 is negligible in normal rate-distortion cost.

Change-Id: I9b8b7483c43b9a41741622e7057def1f7d51bb72
2014-11-24 14:55:59 -08:00
Jingning Han
e6fb9c0b0b Merge "Key frame non-RD mode decision process" 2014-11-24 13:21:56 -08:00
Debargha Mukherjee
e9d9f1adab Merge "Refactored idct routines and headers" 2014-11-24 12:47:03 -08:00
John Stark
71379b87df Changes to assembler for NASM on mac.
fixes non-Apple nasm part of issue #755

Change-Id: I11955d270c4ee55e3c00e99f568de01b95e7ea9a
2014-11-24 12:00:50 -08:00
Peter de Rivaz
3a8c43a479 Refactored idct routines and headers
This change is made in preparation for a
subsequent patch which adds acceleration
for the highbitdepth transform functions.

The highbitdepth transform functions attempt
to use 16/32bit sse instructions where possible,
but fallback to using the C implementations if
potential overflow is detected.  For this reason
the dct routines are made global so they can be
called from the acceleration functions in the
subsequent patch.

Change-Id: Ia921f191bf6936ccba4f13e8461624b120c1f665
(cherry picked from commit 454342d4e7)
2014-11-24 09:57:40 -08:00
Jingning Han
2fbdfd2c66 Key frame non-RD mode decision process
This commit makes a non-RD coding mode decision process for key
frame coding. It can be optionally turned on in speed -6 and above.

Change-Id: I0847258b392877a0210b4768bef88ebc9ad009b5
2014-11-24 09:04:28 -08:00
Marco
681d5e9024 Merge "Only allow for cyclic refresh (aq=3 mode) for base layer." 2014-11-24 07:46:36 -08:00
Paul Wilkins
2232c3e34b Merge "Fix some minor nits." 2014-11-21 17:39:43 -08:00
Debargha Mukherjee
02355a4abf Merge "Added highbitdepth sse2 acceleration for quantize" 2014-11-21 16:08:47 -08:00
Paul Wilkins
d28e9ed452 Merge changes Ie077edd0,Id31a74fc
* changes:
  Remove rate component adjustment for AQ1
  Switch AQ1 segment basis from q ratio to rate ratio.
2014-11-21 15:38:32 -08:00
Paul Wilkins
771259fe10 Merge "Add adaptive midpoint for AQ1." 2014-11-21 15:26:18 -08:00
Paul Wilkins
6dbf83d082 Merge "Add variance restriction to AQ2." 2014-11-21 15:25:43 -08:00
Marco
53c3f2ca4d Only allow for cyclic refresh (aq=3 mode) for base layer.
Condition existed for temporal case, added it for spatial as well.
Issue: https://code.google.com/p/webm/issues/detail?id=878.

Change-Id: I38339207f9a94924f5568a081eabe64f867a686d
2014-11-21 14:47:32 -08:00
Paul Wilkins
ea494c0e76 Fix some minor nits.
Change-Id: Ib8810d431fa20a2c78e0caaa28eb2c99903e60fb
2014-11-21 14:13:59 -08:00
Paul Wilkins
a867bb538b Merge "Further AQ1 clean up." 2014-11-21 12:58:03 -08:00
Jingning Han
7428cebe4f Rework forward txfm/quantization skip system in RTC coding mode
This commit allows more aggressive decision to skip forward
transform and quantization for luma component in RTC coding mode.
The chroma components remains going through the normal coding
routine, since they are not included in the non-RD mode search
process.

It reduces the runtime cost by 2% - 10%. In speed -6,
vidyo1 1000 kbps
16576 b/f, 40.281 dB, 8402 ms -> 16576 b/f, 40.323 dB, 7764 ms

nik720p 1000 kbps
33337 b/f, 38.622 dB, 7473 ms -> 33299 b/f, 38.660 dB, 7314 ms

dark720p 1000 kbps
33330 b/f, 39.785 dB, 13505 ms -> 33325 b/f, 39.714 dB, 13105 ms

The compression performance of speed -6 is improved by 0.44% in
PSNR and 1.31% in SSIM.

Change-Id: Iae9e3738de6255babea734e5897f29118bebc6d7
2014-11-21 12:46:40 -08:00
Paul Wilkins
b87c51ce55 Merge "Initial AQ1 restructuring." 2014-11-21 12:10:03 -08:00
Paul Wilkins
f5209d7e01 Remove rate component adjustment for AQ1
In AQ1 a rate adjustment was applied for blocks coded with a
deltaq. This tends to skew the partition selection and cause
rate overshoot.

For example, consider a 64x64 super block where some but not all
sub blocks are in a low q segment and some are in a high q segment.
The choice of Q when considering large partition and transform sizes
is defined by the lowest sub block segment id (currently this implies the
lowest Q). If some parts of the larger partition are very hard this will
cause a high rate component.

The correct behavior here is for the rd code to discard the large partition
choice and break down to sub blocks where some have low and some
have high Q.  However the rate correction factor above mask the high
cost of coding at a larger partition size.

Change-Id: Ie077edd0b1b43c094898f481df772ea280b35960
2014-11-21 08:51:58 -08:00
Paul Wilkins
1663eff7f8 Switch AQ1 segment basis from q ratio to rate ratio.
In defining the Q deltas for segments in AQ1 use a rate
ratio rather than a q ratio.

Change-Id: Id31a74fcf2b7e55437e42a51c21b3cbcb57028d4
2014-11-21 08:50:57 -08:00
Paul Wilkins
fc47c5d653 Add adaptive midpoint for AQ1.
Make the midpoint variance used in AQ mode 1 segmentation
depend on the overall complexity of the frame in two pass.

Change-Id: I452814ec57f7a32352e41bb250e78066abe952dd
2014-11-20 18:37:34 -08:00
Alex Converse
bc1b3d8412 Allow DC/H/V/TM on screen content.
6.3% better compression
less than 1% compression time increase

Change-Id: Ie83c059436e54c09de9e7c87e06e0a6d40dc38fe
2014-11-20 18:04:57 -08:00
Alex Converse
722e9d611b Drop special inter mode selection for screen content.
Better mode selection was implemented for all content.

Change-Id: I479778ed21d3968892f4dce396c83733583f4f23
2014-11-20 18:04:57 -08:00
Yunqing Wang
72522dbc86 Merge "vp9_ethread: move filter_cache out of RD_OPT struct" 2014-11-20 16:51:31 -08:00
Paul Wilkins
d031237999 Add variance restriction to AQ2.
Add an additional restriction to bit/complexity based
segmentation based on spatial variance.

Only lower Q when both the number of bits spent
in the initial encoding pass and the spatial complexity are
below a threshold. This will prevent the low Q segments
being used just because there is a surfeit of bits.

Small metrics gains especially opsnr.
derf ~0.2% std-hd ~0.3%

Change-Id: I6a8496d466d673f9b0e2b2ca6304ea7b6d8e1cce
2014-11-20 16:23:35 -08:00
Paul Wilkins
3d1e8c9a85 Further AQ1 clean up.
Further patch to restructure AQ mode 1.

Change-Id: I566452a033d047a49a40441a7be24690ea69412d
2014-11-20 16:00:51 -08:00
Paul Wilkins
6a760d483d Initial AQ1 restructuring.
This is the first of a series of patches to restructure and
improve AQ mode 1 (variance based AQ).

Change-Id: Idcf693131a3ea2459dcfd957a54a65b971fa4a2a
2014-11-20 15:50:15 -08:00
Paul Wilkins
b74eeb8675 Merge "Fix bug in calculating number of mbs with scaling." 2014-11-20 15:45:41 -08:00
Yunqing Wang
54ba65a63e Merge "vp9_ethread: move max/min partition size to mb struct" 2014-11-20 14:00:37 -08:00
Yunqing Wang
379334c2d8 vp9_ethread: move filter_cache out of RD_OPT struct
Similar to mask_filter, the filter_cache in RD_OPT struct can be
moved out, and declared as a local variable since it is only
used in pick_inter_mode functions.

Change-Id: I412b99cca82bade07ac912064ec03dd1de6b2c17
2014-11-20 13:44:16 -08:00
Yunqing Wang
0b71fdbf80 Merge "vp9_ethread: change mask_filter to a local variable" 2014-11-20 13:02:55 -08:00
Yunqing Wang
bdaa3eaf43 Merge "Revert "vp9_ethread: include a pointer to mb in VP9_COMP"" 2014-11-20 12:27:34 -08:00
Paul Wilkins
5e5da2e963 Fix bug in calculating number of mbs with scaling.
Correct calculation of number of mbs in two pass code when
frame resizing is enabled. Always use initial number of mbs if
scaling is enabled, as this is what was used in the first pass.

Change-Id: I49a4280ab5a8b1000efcc157a449a081cbb6d410
2014-11-20 12:24:43 -08:00
Yunqing Wang
b0efddd8e6 vp9_ethread: change mask_filter to a local variable
The mask_filter in RD_OPT struct is used to record rd result in
filter decision. It is only used in pick_inter_mode functions,
and is removed from the struct and declared as a local variable.

Change-Id: I3c95c8632ba7241591ce00ef2ef5677b5e297d7b
2014-11-20 09:41:49 -08:00
Yunqing Wang
ad7586a9e1 vp9_ethread: move max/min partition size to mb struct
The max_partition_size and max_partition_size are set at the
beginning while setting speed features, and then adjusted at
SB level. Moving them to mb struct ensures there is a local
copy for each thread.

Change-Id: I7dd08dc918d9f772fcd718bbd6533e0787720ad4
2014-11-20 09:24:50 -08:00
Yunqing Wang
70c9d2983b Revert "vp9_ethread: include a pointer to mb in VP9_COMP"
This reverts commit 6906d218dd.

Another way will be used to handle mb struct.

Change-Id: Ic1111a46b2b1ee00f8f9e3fcd4cf3eb6030b2dc4
2014-11-20 08:31:12 -08:00
Peter de Rivaz
a7b2d09f36 Added highbitdepth sse2 acceleration for quantize
Also includes block error.

(This patch is mostly cherry picked from
commit db7192e0b0)

Change-Id: Idef18f90b111a0d0c9546543d3347e551908fd78
2014-11-19 23:55:19 -08:00
Jingning Han
c42715b721 Enable ssse3 version of vp9_fdct8x8_quant
It improves the speed performance of vp9_fdct8x8_quant_sse2 by
about 5%.

Change-Id: I74b093ba4d81df64caf71ac7693f3d917f673097
2014-11-19 22:14:19 -08:00
Yaowu Xu
21db24efcb Add a reset to rc tracking for dropped frames
VP9/DatarateTestVP9Large.ChangingDropFrameThresh/[34] fails post the
merge of commit#ffa06b37. This commit adds reset of rc tracking info
when frame is dropped, and fixes the causes of the bad interaction
between the tests and the previous commit.

Change-Id: I848acfd9fcb336359662274325190f94aac76eae
2014-11-19 15:32:11 -08:00
Jingning Han
bf63652d34 Merge "Combine fdct8x8 and quantization process" 2014-11-19 11:17:44 -08:00
Jingning Han
ce77a7bcb0 Merge "Add sse2 version for vp9_quantize_fp" 2014-11-19 11:17:36 -08:00
Jingning Han
c6908fd5f7 Combine fdct8x8 and quantization process
This commit reworks the forward transform and quantization process
for 8x8 block coding. It combines the two operations in a single
function to save a store/load stage of the original transform
coefficients. Overall the speed -6 is slightly faster (around 1%
range). The compression performance of speed -6 is improved by
3.4%.

Change-Id: Id6628daef123f3e4649248735ec2ad7423629387
2014-11-18 18:10:56 -08:00
Yaowu Xu
587f0cd39d Merge "Prevent severe rate control errors in CBR mode" 2014-11-18 16:56:06 -08:00
Marco
3c715863da Merge "Modify active_worst_quality setting for one pass CBR." 2014-11-18 11:22:18 -08:00
Yaowu Xu
550707b9e1 Merge "change to call vp9_refining_search_sad() directly" 2014-11-18 09:14:02 -08:00
Yaowu Xu
ffa06b3708 Prevent severe rate control errors in CBR mode
In rare cases, the interaction between rate correction factor and Q
choices may cause severe oscillating frame sizes that are way off
target bandwidth. This commit adds tracking of rate control results
for last two frames, and use the information to prevent oscillating
Q choices.

Change-Id: I9a6d125a15652b9bcac0e1fec6d7a1aedc4ed97e
2014-11-18 09:05:57 -08:00
Jingning Han
2d3cc8ea2b Add sse2 version for vp9_quantize_fp
vp9_quantize_fp is the quantization process used by rtc coding
mode. This commit adds a sse2 implementation of it. The
implementation is modified based on vp9_quantize_b_sse2. No speed
difference from ssse3 version.

Change-Id: I24949c5b27df160b4f35117d28858d269454e64a
2014-11-18 09:01:41 -08:00
Jingning Han
13a999de8e Merge "Add empty pointer check to pred buffering in rtc coding mode" 2014-11-17 17:40:54 -08:00
Marco
b660f723b4 Modify active_worst_quality setting for one pass CBR.
Current setting had active_worst_quality set too high (close to worst_quality)
for first frame(s) following first key frame. This changes that to be somewhat
more aggressive in allowing active_worst_quality to be lower following key frame.

Also remove the 4/5 reduction in active_worst for key frame as
this should be set by the user qp_max setting.

Change-Id: I0530b3ddcc85c00e3eb7568de1b14a31206c4a4c
2014-11-17 11:46:49 -08:00
Yaowu Xu
1687c47bfd change to call vp9_refining_search_sad() directly
The function pointer in compressor instance does not change, so this
commit changes to call the function directly.

Change-Id: I9c9c460e3475711c384b74c9842f0b4f3d037cc5
2014-11-17 11:30:17 -08:00
Jingning Han
a62c87fb04 Add empty pointer check to pred buffering in rtc coding mode
This commit adds a check condition to the prediction buffering
operation used in the rtc coding mode. This resolves a unit test
warning in example/vpx_tsvc_encoder_vp9_mode_7.

Change-Id: I9fd50d5956948b73b53bd8fc5a16ee66aff61995
2014-11-17 11:24:07 -08:00
Yunqing Wang
4539c496bc Merge "Code cleanup: remove unused members in RD_OPT" 2014-11-17 09:10:28 -08:00
Yunqing Wang
3f4a93baf2 Merge "vp9_ethread: combine encoder counts in separate struct" 2014-11-17 08:57:38 -08:00
Debargha Mukherjee
c3a9056df4 Merge "Added sse2 acceleration for highbitdepth variance" 2014-11-14 21:11:27 -08:00
Yunqing Wang
87ae6d73d4 Code cleanup: remove unused members in RD_OPT
These 2 members in RD_OPT were moved to TileDataEnc struct
already, and therefore were removed here.

Change-Id: I22fee3b67f96e473a58e194a7edc76dbd48bfa04
2014-11-14 16:33:25 -08:00
Yunqing Wang
d0b547c676 vp9_ethread: combine encoder counts in separate struct
Several frame counters in encoder are updated at SB level. Combine
those counters and put them in a separate struct, which allows us
to allocate one copy for each thread.

Change-Id: I00366296a13c0ada4d8fa12f5e07728388b6cab7
2014-11-14 16:09:22 -08:00
Peter de Rivaz
48032bfcdb Added sse2 acceleration for highbitdepth variance
Change-Id: I446bdf3a405e4e9d2aa633d6281d66ea0cdfd79f
(cherry picked from commit d7422b2b1e)
(cherry picked from commit 6d741e4d76)
2014-11-14 15:18:53 -08:00
Yunqing Wang
6906d218dd vp9_ethread: include a pointer to mb in VP9_COMP
Modified VP9_COMP struct to include MACROBLOCK *mb. This change
makes it feasible in multi-thread case to allocate a mb for each
thread.

Change-Id: I624d6d1aa9c132362200753e5d90b581b1738d6e
2014-11-14 12:31:06 -08:00
Yunqing Wang
807885b5e0 Merge "vp9_ethread: modify the cyclic refresh struct" 2014-11-13 18:35:01 -08:00
Yaowu Xu
e4e85ad4a8 Merge "adapt the adjustment limit for rate correction factor in RTC mode" 2014-11-13 15:50:30 -08:00
Yunqing Wang
8ee605f188 vp9_ethread: modify the cyclic refresh struct
Two members in struct CYCLIC_REFRESH
  int64_t projected_rate_sb;
  int64_t projected_dist_sb;
are updated at the superblock level, which makes them shared data
in the multi-thread situation, and requires extra work to handle
them. However, those values are updated and used immediately, and
therefore can be removed. This patch cleaned up the code and
removed the two members.

Change-Id: I2c6ee4552bf49fb63ce590cdb47f9723974fffb1
2014-11-13 15:05:46 -08:00
Adrian Grange
35de9db312 Merge "Prepare for dynamic frame resizing in the recode loop" 2014-11-13 15:01:49 -08:00
Paul Wilkins
20517e0627 Merge "Fix 32 bit build emms problem." 2014-11-13 15:00:41 -08:00
Jingning Han
aeff1f7ec2 Merge "Use reconstructed pixels for intra prediction" 2014-11-13 13:59:02 -08:00
Jingning Han
6efafda738 Merge "Refactor nonrd_use_partition coding process" 2014-11-13 13:58:21 -08:00
Adrian Grange
0d085ebc0a Prepare for dynamic frame resizing in the recode loop
Prepare for the introduction of frame-size change
logic into the recode loop.

Separated the speed dependent features into
separate static and dynamic parts, the latter being
those features that are dependent on the frame size.

Change-Id: Ia693e28c5cf069a1a7bf12e49ecf83e440e1d313
2014-11-13 11:41:20 -08:00
Paul Wilkins
b9c4f9a7db Fix 32 bit build emms problem.
Add extra vp9_clear_system_state() calls to fix
double / mmx issue introduced into first pass
code for 32 bit builds.

Change-Id: I84cd2986b80d83650a091ab25c43755efeb82e03
2014-11-13 11:33:55 -08:00
Yaowu Xu
9f79259e54 adapt the adjustment limit for rate correction factor in RTC mode
Rate correction factor is used to correct the estimated rate for any
given quantizer, and feeds into rate control for quantizer selection.
We make use of the actual bits used to calculate this rate correction
factor with an adjustment limit to prevent over-adjustment.

This commit adapts the adjustment limit to the difference between the
estimated bits and the actual bits, allows the adjustment limit to vary
between 0.125 (when estimate is close to actual) and 0.625 (when there
is >10X factor off between estimated and actual bits). By doing this,
the commit appears to have largely corrected two observed issues:
1. Adjustment is too slow when the actual bits used is way off from
estimate due to the small adjustment limit.
2. Extreme oscillating quantizer choices due to the feedback loop.

Change-Id: I4ee148d2c9d26d173b6c48011313ddb07ce2d7d6
2014-11-13 11:26:52 -08:00