Commit Graph

4268 Commits

Author SHA1 Message Date
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
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
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