Commit Graph

4399 Commits

Author SHA1 Message Date
Minghai Shang
3e7b04af54 Merge "[spatial svc] Output psnr for all layers in one packet." 2014-09-12 10:52:42 -07:00
Deb Mukherjee
83c76118eb Use bigdia search with pruned subpel search
Improves function to return sad of integer pels by reusing integer
pels already visited in the smallest scale.
Turns on BIGDIA search for speed 4. Also, turns on the
first version of the pruned subpel search at this speed.

derf: -0.32% (speed 4)

Speed seems to improve by at least 5% but subject to verification.

Change-Id: Iaec8eaffd61d6237ac029e6a2a1b0a88b2a35271
2014-09-12 10:25:12 -07:00
Jingning Han
7f77a1c3c9 Merge "Unify intra mode mask into mode_skip_mask scheme" 2014-09-12 09:06:35 -07:00
Deb Mukherjee
10783d4f3a Adds high bitdepth transform functions and tests
Adds various high bitdepth transform functions and tests.
Much of the changes are related to using typedefs tran_low_t
and tran_high_t for the final transform cofficients and intermediate
stages of the transform computation respectively rather than fixed
types int16_t/int. When vp9_highbitdepth configure flag is off,
these map tp int16_t/int32_t, but when the flag is on, they map
to int32_t/int64_t to make space for needed extra precision.

Change-Id: I3c56de79e15b904d6f655b62ffae170729befdd8
2014-09-11 19:56:33 -07:00
Deb Mukherjee
1e4136d35d Adds high bit depth sad and variance functions
Moves high bit depth sad/var functions from highbitdepth
branch to master.

Change-Id: If03845d8ef9c9c494e13350e7a587c289306b94d
2014-09-11 17:30:44 -07:00
Jingning Han
74ddde01c0 Format fixes in vp9_rd_pick_inter_mode_sb
Change-Id: Ie45687405dcaa34ba465dce2aa14f76017d3a794
2014-09-11 17:15:15 -07:00
Minghai Shang
e3fff31aff [spatial svc] Output psnr for all layers in one packet.
Change-Id: I97d0cf095e9cfefdfa0f65eb5e96d6848cc9ffca
2014-09-11 16:21:35 -07:00
Jingning Han
8e3f7a52a1 Remove unused best_inter_rd variable
The variable best_inter_rd is effectively not in use in the rate-
distortion mode search loops of both regular block sizes and sub8x8
block sizes.

Change-Id: I178f909f8c9629772e13adc6257908653b2adf31
2014-09-11 16:16:26 -07:00
Jingning Han
00fe92c22f Remove unused speed feature
The speed feature that skips compound inter prediction modes was
subsumed by other speed features and effectively was not in use.
This commit removes it.

Change-Id: I22b0c71a8ddd15d93b25d86fa63a1dce2ba6a1a9
2014-09-11 15:54:53 -07:00
James Zern
d555dfdc69 Merge "vp9_picklpf: search_filter_level: remove filt_err" 2014-09-11 15:39:19 -07:00
Jingning Han
71b4bee33f Merge "Remove inter_mode_mask from rate-distortion search loop" 2014-09-11 12:08:13 -07:00
James Zern
49d7abc0ec vp9_picklpf: search_filter_level: remove filt_err
inspect ss_err[] directly, removes an unnecessary assignment

Change-Id: I14db5e8e567e7e541a57fce73389ffe7651d5614
2014-09-11 11:37:56 -07:00
Jingning Han
0cf599b573 Merge "Move intra block size skip outside mode search loop" 2014-09-11 11:15:35 -07:00
Jingning Han
387ec881d3 Merge "Fix format in vp9_rd_pick_inter_mode_sub8x8" 2014-09-11 11:15:25 -07:00
Jingning Han
3556ab56f6 Merge "Move overlay frame speed feature setting out of mode search loop" 2014-09-11 11:14:37 -07:00
Jingning Han
82757250d6 Merge "Refactor to remove speed feature dependency on mode search order" 2014-09-11 11:14:26 -07:00
Jingning Han
bdd8eb6fcc Unify intra mode mask into mode_skip_mask scheme
Integrate intra mode mask speed feature with the mode_skip_mask
scheme. Move it outside the mode search loop in the
vp9_rd_pick_inter_mode_sb function.

Change-Id: I7738fea749bfdc08ad05d7f2524feb8ff67568d9
2014-09-11 10:36:48 -07:00
Minghai Shang
fb754540e9 Merge "[spatial svc]Add golden frame to first pass rate control" 2014-09-11 10:24:28 -07:00
Jingning Han
8cefed1568 Remove inter_mode_mask from rate-distortion search loop
This speed feature is used in real-time setting only. Remove the
related condition check in the rate-distortion optimization search
loop.

Change-Id: Iaacc1e268214634e6f95c5048c28a60cec6c42fc
2014-09-11 10:18:55 -07:00
Jingning Han
238b2ace86 Move intra block size skip outside mode search loop
Unify this speed feature in the ref_frame_skip_mask scheme.

Change-Id: I7ea5646da02d3ea643680c22d50dabd448d55a27
2014-09-11 09:54:19 -07:00
Jingning Han
8b06a24ce7 Fix format in vp9_rd_pick_inter_mode_sub8x8
Change-Id: I0da29c858c6c1eb5ef07cee8f599329f5a002da9
2014-09-11 09:28:47 -07:00
Jingning Han
8d42fad9c1 Move overlay frame speed feature setting out of mode search loop
Refactor overlay frame speed-up related function. Make it unified
with the ref_frame_skip_mask system and Move it out of the mode
search loop.

Change-Id: I0dde9baf44354f6ba00b4679cba02fa6a30c7316
2014-09-10 19:44:58 -07:00
JackyChen
d9050af683 Merge "Fix the bug which made VP8 denoiser not bit-exact between C code and SSE code." 2014-09-10 18:08:59 -07:00
Minghai Shang
0a0ccf669b [spatial svc]Add golden frame to first pass rate control
Change-Id: If3035f0e7dfcfe88c4bbf4eec66761e070476df0
2014-09-10 17:35:02 -07:00
Jingning Han
f9f0879756 Refactor to remove speed feature dependency on mode search order
This commit refactor the rate-distortion optimization search for
regular block sizes to remove the speed feature dependency on mode
search order.

Change-Id: Ied033ee484c2957e17baa7b6450b720fe7dd0e7d
2014-09-10 17:09:14 -07:00
JackyChen
47380c3350 Fix the bug which made VP8 denoiser not bit-exact between C code and SSE code.
This issue is found when the denoising mode is set to kDenoiserOnYUVAggressive.
Updated the C code to make it the same with SSE version.

I also changed several lines in VP9 denoiser for the code style.

Change-Id: I640d48cf946fe8c6a400e6e252107501d1e226d3
2014-09-10 16:18:43 -07:00
Jingning Han
6facdfdd7d Merge "Fix a bug in vp9_rd_pick_inter_mode_sb" 2014-09-10 14:46:19 -07:00
Jingning Han
5ac97d101d Merge "Remove redundant ref frame pointer assignment" 2014-09-10 14:46:11 -07:00
Jingning Han
68d79146ea Fix a bug in vp9_rd_pick_inter_mode_sb
This commit fixes a bug related to skipping intra mode checking, by
using a separate variable to store the best prediction error from
inter mode. It avoids unintentionally overwriting intra mode
rate-distortion cost, and hence affecting other speed features.

Change-Id: I99e12993339c84c8b4f597996b372012e5858fae
2014-09-09 15:39:54 -07:00
Jingning Han
9a9e2aef09 Remove redundant ref frame pointer assignment
Assigning selected reference frame pointer is done in the
encode_superblock function. No need to do this at the end of
rate-distortion optimization search.

Change-Id: I33fcede0fd304b4a4c4deef2d126d79546a9c070
2014-09-09 15:15:11 -07:00
Jingning Han
89ffda0ddf Merge "Remove dependency of intra mode search skip check on mode order" 2014-09-09 14:10:28 -07:00
Jingning Han
1614306913 Merge "Replace best_mode_index table retrieve with fetching best_mbmode" 2014-09-09 14:10:19 -07:00
Jingning Han
33593d1f03 Remove dependency of intra mode search skip check on mode order
This commit refactors the vp9_rd_pick_inter_mode_sb function to
remove the intra mode early termination dependency on the mode
search order.

Change-Id: If6ac49aa7c530c7b9a5bd31b0ab84db83e192bec
2014-09-09 12:30:47 -07:00
Jingning Han
d96228a07c Replace best_mode_index table retrieve with fetching best_mbmode
This commit allows the encoder to find current best prediction mode
state using best_mbmode, instead of fetching from the static mode
search table via best_mode_index.

Change-Id: Ibefeab83aed33a49c2be03e83f09153856ca4271
2014-09-09 11:58:10 -07:00
Yunqing Wang
f10d7eeda2 Remove the use of use_lastframe_partitioning at speed 4
The use of use_lastframe_partitioning is totally removed in good-
quality encoding. Its usage in real-time encoding needs to be
evaluated to see if it can be removed too.

The Borg tests at speed 4 showed:
stdhd set: 0.220% psnr gain, 0.166% ssim gain;
derf set:  0.329% psnr gain, 0.476% ssim gain.

Speed test on selected clips showed 1.54% speedup.(Worst case:
pedestrian_area_1080p25.y4m, speed loss: 1.5%)

Change-Id: I1c844d329b0b5678558439b887297c1be7ddab00
2014-09-09 10:54:07 -07:00
James Zern
3610d0a3e0 Merge changes I4c74dcab,Ifbfc1422,I2450b485,Ibdb07f6d,I3737772f,Ic3be55ed
* changes:
  vp9_pick_inter_mode: normalize some types
  vp9_pick_inter_mode: cosmetics: localize var. defs
  vp9_pick_inter_mode: cosmetics: add const
  vp9_pick_inter_mode: cosmetics: fix indent
  vp9_pickmode: move PRED_BUFFER definition to .c
  vp9_pickmode: make vp9_pick_inter_mode() void
2014-09-08 19:19:31 -07:00
Yaowu Xu
b73c9df1a4 Merge "No longer use use_lastframe_partitioning speed feature" 2014-09-08 18:10:20 -07:00
Paul Wilkins
f24054574d Fix VS build issue.
Compile fails when CONFIG_INTERNAL_STATS
flag is set.

Change-Id: Iba7701c058169ca3fc0b9008619ac55a1fe1a8b6
2014-09-08 15:29:33 -07:00
Jingning Han
a61973bf29 Merge "Enable adaptive motion search for ARF coding" 2014-09-08 08:51:05 -07:00
Dmitry Kovalev
1f19ebbab6 Replacing vp9_get_mb_ss_sse2 asm implementation with intrinsics.
Change-Id: Ib4f5dd733eb2939b108070a01e83da5d9990bac0
2014-09-06 00:10:25 -07:00
James Zern
49bb8fbaca vp9_pick_inter_mode: normalize some types
Change-Id: I4c74dcab6358817f03d3bc4d526006d241f0c10e
2014-09-05 19:22:54 -07:00
James Zern
7fe86bba2e vp9_pick_inter_mode: cosmetics: localize var. defs
Change-Id: Ifbfc142291697a1847ef85ced0b0eb4d6dab161e
2014-09-05 19:22:54 -07:00
James Zern
6f094e2a71 vp9_pick_inter_mode: cosmetics: add const
Change-Id: I2450b4856e48dbc4d5b938b2edcea0704f756c8e
2014-09-05 19:22:53 -07:00
James Zern
0adfacad75 vp9_pick_inter_mode: cosmetics: fix indent
+ delete a dead comment

Change-Id: Ibdb07f6dbdb30fc7888f6115ddc326fcec1157a7
2014-09-05 19:22:53 -07:00
James Zern
5ed806a608 vp9_pickmode: move PRED_BUFFER definition to .c
Change-Id: I3737772fe53f9885c82e2ac4c1af478ab951c16c
2014-09-05 19:22:53 -07:00
James Zern
94968c6d14 vp9_pickmode: make vp9_pick_inter_mode() void
the previous return value was constant and unused.

Change-Id: Ic3be55edb4a884448c7bb07977a80dfb58b7b940
2014-09-05 19:22:53 -07:00
Yunqing Wang
1092140379 No longer use use_lastframe_partitioning speed feature
The speedup in rd_pick_partition() function makes it possible
to drop use_lastframe_partitioning feature. By doing that, we
achieve good PSNR gain with small speed loss. Also, this makes
encoding loop less complicated. The code cleanup patch will
follow.

Borg tests showed:
1. At speed 2,
   stdhd set: 0.201% PSNR gain, 0.133% SSIM gain;
   derf set:  0.262% PSNR gain, 0.276% SSIM gain.
2. At speed 3,
   stdhd set: 0.139% PSNR gain, 0.109% SSIM gain;
   derf set:  0.447% PSNR gain, 0.442% SSIM gain.

The average speed loss over selected test clips is within 1%
with the worst case of 4%.

Change-Id: Icfd2ded7869372b585a6972855d933b3d0280d90
2014-09-05 16:24:41 -07:00
Yunqing Wang
ebac8f3487 Merge "Correct the mode decisions in special cases" 2014-09-05 13:45:41 -07:00
Dmitry Kovalev
54bec0971f Merge "Initializing intra modes without vpx_once()." 2014-09-05 12:03:36 -07:00
Yunqing Wang
1dd9a63929 Correct the mode decisions in special cases
The rate costs calculated for inter modes are not precise in some
cases, which causes NEWMV is chosen instead of NEARESTMV, NEARMV,
and ZEROMV. This patch added checks for these cases, and corrected
the mode decisions.

Borg tests at speed 3 showed:
1. stdhd set: 0.102% PSNR gain and 0.088% SSIM gain.
2. derf set:  0.147% PSNR gain and 0.132% SSIM gain.
No speed change.

Change-Id: I35d17684b89ad4734fb610942d707899146426db
2014-09-05 12:01:07 -07:00
JackyChen
f8e5105b47 Merge "Map motion magnitude in VP9 denoiser." 2014-09-04 16:59:53 -07:00
Jingning Han
d435148fe6 Enable adaptive motion search for ARF coding
This commit turns on adaptive motion search for ARF coding, in
addition to other normal inter frame coding. It improves the
average compression efficiency:

stdhd 0.1%
derf  0.04%

For the test sequences, the speed 3 runtime is reduced:

pedestrian 1080p 2000 kbps, 149932 ms -> 144580 ms, (3.3% speed-up)
bus CIF 1000 kbps, 8050 ms -> 7895 ms, (1.9%)
highway CIF 100 bkps, 45033 ms -> 44078 ms, (2.2%)

Change-Id: I5228565b609f99e8ae04f6140a2bf2b64a831d21
2014-09-04 16:26:40 -07:00
Jingning Han
3de038f396 Merge "Speed up compound inter prediction mode check" 2014-09-04 16:09:07 -07:00
JackyChen
b869b970c1 Merge "Update the condition when COPY_BLOCK is chosen." 2014-09-04 15:48:22 -07:00
Dmitry Kovalev
46b83391e2 Merge "Removing local set_speed_features() function." 2014-09-04 15:36:52 -07:00
JackyChen
b1153f34d4 Map motion magnitude in VP9 denoiser.
This is to keep the same with VP8 denoiser.
If motion magnitude is small,
make denoiser more aggressive.

Change-Id: I942a6e2f2ed9aec6f0c4c1f9e5fa47066cadcc0c
2014-09-04 14:53:33 -07:00
JackyChen
d75266f141 Update the condition when COPY_BLOCK is chosen.
The change is just to keep the condition the same with VP8.

Change-Id: I9662b40996126605945dd853c0cbe8916c1ce578
2014-09-04 14:28:12 -07:00
JackyChen
7ba600dc89 Merge "Fix a bug in VP9 denoiser." 2014-09-04 14:16:26 -07:00
JackyChen
e30f7698f5 Fix a bug in VP9 denoiser.
When the first try of denoising turns out to be too much,
we will use a softer filter by adopting an adjustment to
make the result closer to original pixel (as in VP8 denoiser).
The old code made the adjustment in the wrong direction.

Change-Id: I84e28fa9e01eef47c5a37d5a2e6d3d378a06786b
2014-09-04 11:46:36 -07:00
Dmitry Kovalev
48197f0a70 Adding sse2 variant for vp9_mse{8x8, 8x16, 16x8}.
Change-Id: I6786d25ce4f32b8d8912f2d239a45ca15b310c4b
2014-09-03 19:02:14 -07:00
Dmitry Kovalev
ab73dba65f Merge "Replacing asm 16x16 variance calculation with intrinsics." 2014-09-03 18:57:33 -07:00
Dmitry Kovalev
406404af63 Merge "Small cleanup: reusing existing code." 2014-09-03 18:57:25 -07:00
Jingning Han
d62d804e64 Speed up compound inter prediction mode check
This commit allows the encoder to store outcomes of single reference
frame modes and compares them to decide if the inter prediction
filter, forward transform, and quantization can be skipped.

The compression performance of speed 3 is down
derf  -0.364%
stdhd -0.198%

For test sequences, the speed 3 runtime is reduced
highway CIF 100 kbps, 51976 ms -> 45033 ms, 13% speed-up
stockholm 720p 1000 kbps, 71826 ms -> 67838 ms, 5.5% speed-up
pedestrian 1080p 2000 kbps, 154924 ms -> 150702 ms, 2.6% speed-up

Change-Id: I5aa26f918d2b4b5197a2c0afa2779319f1c88e44
2014-09-03 15:28:01 -07:00
Yaowu Xu
7ab5de04fd Merge "Change last_partition_redo_frequency for speed 3" 2014-09-03 14:57:02 -07:00
Yaowu Xu
44879ceea7 Merge "Remove redundant code" 2014-09-03 14:55:28 -07:00
Dmitry Kovalev
7f4c3b8d93 Merge "Cleaning up vp9_variance_avx2.c." 2014-09-03 13:21:38 -07:00
Yaowu Xu
ad3616a1fb Merge "Merge two similar functions into one" 2014-09-03 13:00:02 -07:00
Dmitry Kovalev
a7ccc12973 Small cleanup: reusing existing code.
Change-Id: Iac4775ad98e988f2b9cf5bd0dc91ab994d0262ce
2014-09-03 12:20:29 -07:00
Dmitry Kovalev
4eab7c28b8 Merge "Removing duplicated code." 2014-09-03 12:11:37 -07:00
Yaowu Xu
9a15835812 Merge "select_tx_mode(): remove special case for key frame" 2014-09-03 11:54:44 -07:00
Dmitry Kovalev
bf778e7d8e Initializing intra modes without vpx_once().
Change-Id: I0a9d52432f2500f1bd8f43f229e70e38bb9a0343
2014-09-03 11:39:02 -07:00
Yaowu Xu
e759d95743 Merge two similar functions into one
intra_super_block_yrd() and inter_super_block_yrd() are largely same,
this commit merges them into one to reduce code duplication.

Change-Id: I64d7042a5b099345627cf55663010c185b25ec37
2014-09-03 11:21:06 -07:00
Dmitry Kovalev
095d48a419 Merge "Removing clear_system_state() call from update_coef_probs()." 2014-09-03 11:05:45 -07:00
Minghai Shang
759afe525c Merge "[svc] Temporal svc with two pass rate control" 2014-09-03 10:51:19 -07:00
Yaowu Xu
7a33712475 Change last_partition_redo_frequency for speed 3
From 3 to 2, which seems to be slightly positive on compression for
all test sets, also reduces encoding time by 2%-5%, varying on the
test clips.

Change-Id: If045417bd27311700c919b4a335eff0dc1130ae0
2014-09-03 09:34:10 -07:00
Yaowu Xu
cdda17ed77 Remove redundant code
Change-Id: I453b167f03811a3cd3592089593b3f2823f62ab3
2014-09-03 09:34:10 -07:00
Yaowu Xu
c1058e5bbe select_tx_mode(): remove special case for key frame
This commit removes the special case for key frame, as transform size
decision is controlled by the appropriate speed feature for all lossy
coding modes: tx_size_search_method.

Change-Id: I9677171e3f2432ec23705f7c5ea8170dd4562fae
2014-09-03 09:34:10 -07:00
Paul Wilkins
819e231b93 Merge "Skip comp inter mode test in RD loop with same frame bias signs" 2014-09-03 02:26:47 -07:00
Jingning Han
801fef26ec Skip comp inter mode test in RD loop with same frame bias signs
This commit allows the encoder to skip check on compound inter
modes in the rate-distortion optimization loop, if the reference
frame bias signs are the same.

Change-Id: Ib753e6bb11cbdd338aee69dbe2b649671f75a6b0
2014-09-02 18:17:33 -07:00
Dmitry Kovalev
070210e20b Removing duplicated code.
Change-Id: I7b5c776d5e6f5ca428b87fa9411ae4012a9538ba
2014-09-02 17:57:35 -07:00
Dmitry Kovalev
0ecc75c819 Merge "Removing MMX SAD calculation code." 2014-09-02 17:35:59 -07:00
Deb Mukherjee
a4ef1a0819 Merge "Adds config opt for highbitdepth + misc. vpx" 2014-09-02 15:41:27 -07:00
Dmitry Kovalev
318fc0c34f Removing MMX SAD calculation code.
Removed functions:
* vp9_sad_16x16_mmx
* vp9_sad_8x16_mmx
* vp9_sad_16x8_mmx
* vp9_sad_8x8_mmx
* vp9_sad_4x4_mmx

Change-Id: Ic5174b93b64d65d846f0c11e72cab149e9472bc3
2014-09-02 14:41:36 -07:00
Deb Mukherjee
5acfafb18e Adds config opt for highbitdepth + misc. vpx
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.

Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-09-02 14:37:10 -07:00
Dmitry Kovalev
6f6bd282c9 Replacing asm 16x16 variance calculation with intrinsics.
New code is 20% faster for 64-bit and 15% faster for 32-bit. Compiled
using clang.

Change-Id: Icfea461238411001fd093561293dbfedfbf8d0bb
2014-09-02 13:54:34 -07:00
Minghai Shang
be3b08da3e [svc] Temporal svc with two pass rate control
It's built based on current spatial svc code.
We only support one spatial two temporal layers at this time.
Change-Id: I1fdc8584354b910331e626bfae60473b3b701ba1
2014-09-02 12:05:14 -07:00
Jingning Han
33176fef87 Skip comp inter mode tests for arf coding
This commit skips the compound inter mode prediction check in the
rate-distortion optimization loop for ARF coding. It reduces the
runtime for certain test clips at speed 3, at no compression
performance change:

bus CIF 1000 kbps, 8260 ms -> 8090 ms, 1.8% speed-up
stockholm 720p 1000 kbps, 74453 ms -> 71826 ms, 2.9% speed-up

No visible speed-up for pedestrian area 1080p at 2000 kbps.

Change-Id: Ic68aa56837159b726563b784e2e3729e846465ad
2014-09-02 11:23:47 -07:00
Dmitry Kovalev
5c937db029 Cleaning up vp9_variance_avx2.c.
Change-Id: I75eb47dd21f87015efd673dbd2aa71f4386afdf5
2014-09-02 11:01:29 -07:00
Dmitry Kovalev
0a4403992a Merge "Removing 'frames' field from VP9_COMP." 2014-09-02 10:01:20 -07:00
Dmitry Kovalev
7c24d21f2e Merge "Removing lookup_next_frame_stats()." 2014-09-02 09:25:16 -07:00
Jingning Han
bac0268716 Merge "Skip intra mode tests depending on inter residuals" 2014-09-02 08:32:52 -07:00
Dmitry Kovalev
dbe2170595 Merge "Replacing asm 8x8 variance calculation with intrinsics." 2014-08-31 18:39:46 -07:00
Dmitry Kovalev
4ab2241f5b Removing dummy_packing member from VP9_COMP.
Change-Id: I571ce84c97087f8a1a36a10058393bfdcefbf72a
2014-08-29 17:33:20 -07:00
Dmitry Kovalev
0b721db543 Replacing asm 8x8 variance calculation with intrinsics.
New code is 10% faster for 64-bit and 25% faster for 32-bit. Compiled
using clang.

Change-Id: I8ba1544c30dd6f3ca479db806384317549650dfc
2014-08-29 17:28:31 -07:00
Jingning Han
deb8882cca Merge "Fix int64_t to unsigned int conversion warnings" 2014-08-29 17:15:46 -07:00
Jingning Han
dc3327c9dc Merge "Extend block level sse to support multiple txfm blocks" 2014-08-29 17:15:30 -07:00
Jingning Han
6ddf1e152a Fix int64_t to unsigned int conversion warnings
Use unsigned int type to store the sse in the pixel domain. The
precision is sufficient to handle sse of block size up to 64x64.
The transform domain version however needs int64_t, since there is
a transfer gain applied in the forward transformation that might
cause unsigned int overflow.

Change-Id: Ifef97c38597e426262290f35341fbb093cf0a079
2014-08-29 14:29:31 -07:00
Dmitry Kovalev
72037944df Merge "Removing variance MMX code." 2014-08-29 14:08:02 -07:00
Yunqing Wang
a4a1ca109c Merge "Minor fix in vp9_encoder.h" 2014-08-29 13:44:10 -07:00
Yunqing Wang
96c43e8aa9 Minor fix in vp9_encoder.h
Added the missing "int".

Change-Id: I7c8af3dee700837b40f010d53e1431a59370ae3a
2014-08-29 11:27:24 -07:00
Dmitry Kovalev
12cd6f421d Removing variance MMX code.
Removed functions:
* vp9_mse16x16_mmx
* vp9_get_mb_ss_mmx
* vp9_get4x4var_mmx
* vp9_get8x8var_mmx
* vp9_variance4x4_mmx
* vp9_variance8x8_mmx
* vp9_variance16x16_mmx
* vp9_variance16x8_mmx
* vp9_variance8x16_mmx

They all have SSE2 equivalent.

Change-Id: I3796f2477c4f59b35b4828f46a300c16e62a2615
2014-08-29 10:26:42 -07:00
Jingning Han
4282955ee1 Skip intra mode tests depending on inter residuals
This commit allows encoder to skip intra coding mode test, when
the known inter residual is less than the source variance. It
reduces the runtime of speed 3 for test clips:
bus cif 1000 kbps: 8587 ms -> 8260 ms, 3.8% speed-up
pedestrian 1080p 2000 kbps: 161381 ms -> 155241 ms, 3.7% speed-up.

The compression performance is down by
derf   -0.36%
stdhd  -0.25%

Change-Id: I75ce1e035b4da2153cb1ac14111d1a07c05a735d
2014-08-29 08:37:35 -07:00
Jingning Han
02e6ecdc4c Extend block level sse to support multiple txfm blocks
This commit extends the sse and forward transform computation flag
to support the case 64x64 blocks where there are 4 32x32 2D-DCT
blocks.

Change-Id: I86a3e805dfaa0f3abd812f590520c71aa0e40473
2014-08-29 08:29:34 -07:00
Dmitry Kovalev
dcac083cf3 Implementing 4x4 variance calculation with SSE2.
New SSE2 function is three times faster than MMX one.

Change-Id: I4f387ce9f75b88379176ec7bdc62d86eb5f70fbe
2014-08-28 15:01:16 -07:00
Dmitry Kovalev
e9d106bd45 Merge "Removing unused arnr_type from VP9EncoderConfig and vp9_extracfg." 2014-08-28 13:50:05 -07:00
Yunqing Wang
5ac75188cb Merge "Early termination in encoding partition search" 2014-08-28 13:49:39 -07:00
Dmitry Kovalev
c0383912df Merge "Removing unused debug code under WRITE_RECON_BUFFER." 2014-08-28 11:46:45 -07:00
Dmitry Kovalev
57e0b2baf3 Merge "Converting configure_skippable_frame() to is_skippable_frame()." 2014-08-28 11:45:32 -07:00
Yunqing Wang
4d2c376923 Early termination in encoding partition search
In the partition search, the encoder checks all possible
partitionings in the superblock's partition search tree.
This patch proposed a set of criteria for partition search
early termination, which effectively decided whether or
not to terminate the search in current branch based on the
"skippable" result of the quantized transform coefficients.
The "skippable" information was gathered during the
partition mode search, and no overhead calculations were
introduced.

This patch gives significant encoding speed gains without
sacrificing the quality.

Borg test results:
1. At speed 1,
   stdhd set: psnr: +0.074%, ssim: +0.093%;
   derf set:  psnr: -0.024%, ssim: +0.011%;
2. At speed 2,
   stdhd set: psnr: +0.033%, ssim: +0.100%;
   derf set:  psnr: -0.062%, ssim: +0.003%;
3. At speed 3,
   stdhd set: psnr: +0.060%, ssim: +0.190%;
   derf set:  psnr: -0.064%, ssim: -0.002%;
4. At speed 4,
   stdhd set: psnr: +0.070%, ssim: +0.143%;
   derf set:  psnr: -0.104%, ssim: +0.039%;

The speedup ranges from several percent to 60+%.
                 speed1    speed2    speed3    speed4
(1080p, 100f):
old_town_cross:  48.2%     23.9%     20.8%     16.5%
park_joy:        11.4%     17.8%     29.4%     18.2%
pedestrian_area: 10.7%      4.0%      4.2%      2.4%
(720p, 200f):
mobcal:          68.1%     36.3%     34.4%     17.7%
parkrun:         15.8%     24.2%     37.1%     16.8%
shields:         45.1%     32.8%     30.1%      9.6%
(cif, 300f)
bus:              3.7%     10.4%     14.0%      7.9%
deadline:        13.6%     14.8%     12.6%     10.9%
mobile:           5.3%     11.5%     14.7%     10.7%

Change-Id: I246c38fb952ad762ce5e365711235b605f470a66
2014-08-28 11:27:28 -07:00
Deb Mukherjee
bb2a9abb1e Merge "Updates vp9_pattern search to return integer sads" 2014-08-28 09:38:56 -07:00
Dmitry Kovalev
c4c0b2e765 Merge "Replacing int_mv with MV." 2014-08-28 09:18:11 -07:00
Deb Mukherjee
04b100b23e Updates vp9_pattern search to return integer sads
Updates the vp9_pattern_search function to return integer one-away
neighbors' sad values, for subsequent use in speeding up the
sub-pel search. Also, removes code for the do_refine option
which is not being used currently.
Updates the integer and subpel functions to pass in a 5-element
sad list for output or input.

A new pruned sub-pel search algorithm is implemented that uses
the sad returned from the integer pel search. But it is not
deployed yet.

Change-Id: Ifa9f5ad024b5b660570366d2bd900343e1891520
2014-08-28 06:49:58 -07:00
Jingning Han
143be253b6 Merge "Re-work RD modeling based on inter frame prediction residual" 2014-08-27 18:48:49 -07:00
Jingning Han
34675e6631 Merge "Re-use switchable rate value in handle_inter_mode" 2014-08-27 18:48:41 -07:00
Jingning Han
4e4f4ba868 Merge "Add an early termination check in handle_inter_mode" 2014-08-27 18:48:32 -07:00
Jingning Han
6924fddb08 Merge "Use max txfm size unit in rate-distortion cost modeling" 2014-08-27 18:48:24 -07:00
Jingning Han
993ef8bd4c Re-work RD modeling based on inter frame prediction residual
This commit re-work the operation flow related to prediction
residual generation and the rate-distortion modeling. It saves one
call for model_rd_for_sb.

Change-Id: Icaf96c0ff09c903637ed5283448afe01d798195f
2014-08-27 15:03:32 -07:00
Jingning Han
4db022c368 Re-use switchable rate value in handle_inter_mode
The value of switchable rate has been stored in a local variable.
This change skips the second call to vp9_get_switchable_rate() by
reusing the local variable.

Change-Id: Ib7d3fef7621cc4bde94c6d6e6b3a71f1fd4559f2
2014-08-27 15:03:16 -07:00
Jingning Han
cd228fcdb8 Add an early termination check in handle_inter_mode
Check the mode and motion vector cost. If it is already above
the existing best rate-distortion cost, skip the rest check process
on this mode.

Change-Id: Ie065cebdfda2a3be3be18b8e8b43dc29aaa8c179
2014-08-27 14:59:52 -07:00
Jingning Han
ec7ce316d2 Use max txfm size unit in rate-distortion cost modeling
This commit makes the rate distortion modeling run in the unit of
maximum transform block size. No compression/speed change observed.
It is for the use of later fast forward transform purpose.

Change-Id: Ibaaedb69c765e8d0c5d5012f0ec07f36fd9f68fd
2014-08-27 14:59:02 -07:00
Yaowu Xu
bcfb1ffb9d Merge "add a new interp filter search strategy." 2014-08-26 17:30:42 -07:00
Dmitry Kovalev
668d3cf402 Replacing int_mv with MV.
Change-Id: I483a2fefc5f9ea4533dfd64448f3b6b426dd9eed
2014-08-26 10:53:05 -07:00
Yaowu Xu
1144fee3d5 add a new interp filter search strategy.
This commit addes a new strategy to reduce the search for optimal
interpolation filter type. The encoder counts and store how many each
filter type is selected and used for each of the reference frames.
A filter type that is rarely used for all three reference frames is
masked out to avoid computation.

The impact on compression is neglectible:
-0.02% on derf
+0.02% on stdhd

Encoding time is seen to reduce by 2~3%.

Change-Id: Ibafa92291b51185de40da513716222db4b230383
2014-08-26 09:05:04 -07:00
Dmitry Kovalev
33f4e5707c Removing unused arnr_type from VP9EncoderConfig and vp9_extracfg.
Change-Id: Icab9a4399c5687453f4bec14b8cb5000464335e5
2014-08-25 23:48:52 -07:00
Dmitry Kovalev
a00278c6dc Removing 'frames' field from VP9_COMP.
Using local variable instead.

Change-Id: If592d73ba2b04972cdae938751155c183a6db25a
2014-08-25 23:27:08 -07:00
Dmitry Kovalev
0586975912 Merge "Removing tx_stepdown_count from VP9_COMP." 2014-08-25 18:37:40 -07:00
Dmitry Kovalev
48edc8df31 Merge "Adding oxcf temp variable." 2014-08-25 18:37:33 -07:00
Dmitry Kovalev
0082727cb7 Merge "Adding is_keyframe temp var." 2014-08-25 18:36:59 -07:00
Dmitry Kovalev
4478553efc Removing tx_stepdown_count from VP9_COMP.
The variable is never read.

Change-Id: I94141c1667fa5d10604cd6f83c5f64df107dee94
2014-08-25 14:42:05 -07:00
Minghai Shang
42ad07a138 Merge "[spatial svc]Multiple frame context feature" 2014-08-25 14:29:49 -07:00
Dmitry Kovalev
eba83a0fdb Merge "Replacing int_mv with MV inside the first pass code." 2014-08-25 13:56:14 -07:00
Dmitry Kovalev
aa33346215 Merge "Cleaning up is_background()." 2014-08-25 13:27:03 -07:00
Dmitry Kovalev
8710df8c49 Merge "Removing source field from VP9_COMP." 2014-08-25 12:53:19 -07:00
Dmitry Kovalev
feb1e07c1d Merge "Removing is_best_mode() function." 2014-08-25 12:52:35 -07:00
Dmitry Kovalev
e576c42f1b Cleaning up is_background().
Change-Id: I2b9609dd22bacbf26e669f70bf155613b0316eb3
2014-08-25 11:55:30 -07:00
Minghai Shang
d4a407c051 [spatial svc]Multiple frame context feature
We can use one frame context for each layer so that we don't have
to reset the probs every frame. But we can't use prev_mi since we
may drop enhancement layers. So we have to generate a non vp9
compatible bitstream and modify it in the player.
1. We need to code all frames as invisible frame to let prev_mi
   not to be used. But in the bitstream we need to code the
   show_frame flag to 1 so that the publisher will know it's
   supposed to be a visible frame.
2. In the player we need to change the show_frame flag to 0 for
   all frames. Then add an one byte frame into the super frame
   to tell the decoder which layer we want to show.
Change-Id: I75b7304cf31f0ab952f043e33c034495e88f01f3
2014-08-25 10:02:45 -07:00
Jim Bankoski
8a896fa54d Merge "vp9_calc_ssim: remove unused parm to resolve warning" 2014-08-25 06:39:49 -07:00
Jim Bankoski
10d3afb44f Merge "vp9_denoiser_update_frame_stats: unused parm fixed" 2014-08-25 06:39:23 -07:00
Dmitry Kovalev
80fd1419f5 Removing source field from VP9_COMP.
Using local variables instead.

Change-Id: I68737f7e392b81492ffd3ef2c2ff9afbf55fb097
2014-08-22 16:57:58 -07:00
Dmitry Kovalev
a459e582cb Replacing int_mv with MV inside the first pass code.
Change-Id: Ia3be6b5a18e1ff6cc5c5f4d37e4a5d0972388308
2014-08-22 16:20:18 -07:00
Dmitry Kovalev
4b60d4a3e8 Removing local set_speed_features() function.
The function was called in two places. In the first case it is replaced
with vp9_set_speed_features() call. In the second case the body of set_speed_features() is inlined.

Change-Id: If3fdf1b4168eee97677c224f69c245fe46c7f606
2014-08-22 15:59:13 -07:00
Jingning Han
310f5a769c Merge "Move mv cost table to VP9_COMP" 2014-08-22 14:41:17 -07:00
Dmitry Kovalev
3c810ef79c Merge "Removing last_source field from VP9_COMP." 2014-08-22 14:19:49 -07:00
Jim Bankoski
3c463ab056 vp9_calc_ssim: remove unused parm to resolve warning
Change-Id: I2b4f4e929495837817010eae12aa6225899afaff
2014-08-22 13:41:38 -07:00
Jim Bankoski
eec110a25b vp9_denoiser_update_frame_stats: unused parm fixed
Change-Id: Ic39cc0deafb3ed509434d3d9953b99713de7394a
2014-08-22 13:41:16 -07:00
Dmitry Kovalev
f9fb3b8e0e Replacing 'struct vpx_fixed_buf' with 'vpx_fixed_buf_t’.
Change-Id: Ibbbc5b39429d4b753f0a966b9d84d1d7bf823650
2014-08-22 11:56:31 -07:00
Jingning Han
2b1c6eacb9 Move mv cost table to VP9_COMP
The mv cost table set is maintained at frame level, hence moved to
VP9_COMP.

Change-Id: Icb3d0185d47443590bd11357de729aa4ba5c5e5e
2014-08-22 09:38:07 -07:00
Dmitry Kovalev
10da24a494 Removing last_source field from VP9_COMP.
Change-Id: I5d7cb0151d8495e5ecd073a98b73da65cc6e7274
2014-08-21 17:49:40 -07:00
Dmitry Kovalev
98c8eb85e6 Adding is_keyframe temp var.
Change-Id: I5fec955c8b8f5a9b5027a0f92afb22d22770d84a
2014-08-21 17:41:03 -07:00
Dmitry Kovalev
13eb51b83b Removing clear_system_state() call from update_coef_probs().
clear_system_state() is already called before write_compressed_header().

Change-Id: Ia9fb0d0672f939ba7d92a69a2cd6f5c62088c79d
2014-08-21 17:21:07 -07:00