Commit Graph

6275 Commits

Author SHA1 Message Date
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
Dmitry Kovalev
0a4403992a Merge "Removing 'frames' field from VP9_COMP." 2014-09-02 10:01:20 -07:00
Dmitry Kovalev
4c7a783e8c Merge "Adding get_frame_pkt_flags() function." 2014-09-02 10:00:51 -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
James Zern
0e361fb895 Merge "vp9: sync workers at the start of decode_tiles_mt()" 2014-08-29 14:07:37 -07:00
James Zern
8700c61610 Merge "vp9: fix m/t loop filter invalid free" 2014-08-29 14:07: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
James Zern
fec40f9269 vp9: fix m/t loop filter invalid free
store the number of allocated rows in VP9LfSync, the calculated values
can not be relied on when dealing with corrupt material.

Change-Id: I13b8bcec9738c299a71df726772ab7ac05511e5b
2014-08-29 11:04:45 -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
James Zern
c29cc89c78 Merge "vp9: fix crash in inline loopfilter w/corrupt file" 2014-08-28 18:37:30 -07:00
James Zern
458d0114f9 Merge "vp9: fix crash in mt loopfilter w/corrupt file" 2014-08-28 18:36:31 -07:00
James Zern
dbdff12b81 vp9: sync workers at the start of decode_tiles_mt()
prevents any problems resuming decode after decoding a corrupt frame

Change-Id: Ib7eb1b5c062aebe71074fef1ece32a32822c16be
2014-08-28 17:50:38 -07:00
Dmitry Kovalev
8e78a0d365 Merge "Implementing 4x4 variance calculation with SSE2." 2014-08-28 17:25:46 -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
73edeb03ea Removing alg_priv from vpx_codec_priv struct.
In order to understand memory layout consider the declaration of the
following structs. The first one is a part of our API:

struct vpx_codec_ctx {
  // ...
  struct vpx_codec_priv *priv;
};

The second one is defined in vpx_codec_internal.h:

struct vpx_codec_priv {
  // ...
};

The following struct is defined 4 times for encoder/decoder VP8/VP9:

struct vpx_codec_alg_priv {
  struct vpx_codec_priv base;
  // ... 
};

Private data allocation for the given ctx:

struct vpx_codec_ctx *ctx = <get>
struct vpx_codec_alg_priv *alg_priv = <allocate>
ctx->priv = (struct vpx_codec_priv *)alg_priv;

The cast works because vpx_codec_alg_priv has a
vpx_codec_priv instance as a first member 'base'.

Change-Id: I10d1afc8c9a7dfda50baade8c7b0296678bdb0d0
2014-08-28 13:51:37 -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
James Zern
cde790c36d vp9: fix crash in inline loopfilter w/corrupt file
attempting to decode a frame after the previous frame failed has the
potential of interrupting an earlier loop filter task

Change-Id: I6f2b1ddcdf5b89c3e2ee8caf5289dada2a087d66
2014-08-27 16:55:31 -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
James Zern
4f27202df7 vp9: fix crash in mt loopfilter w/corrupt file
if the first frame was corrupt and loop filter not called, the next call
would assume the necessary allocations had been done and segfault when
accessing a NULL pointer

Change-Id: Ib6ef505e5c594e6f0fe65ab0700172bcf06b92a6
2014-08-27 14:21:14 -07:00
Yaowu Xu
bcfb1ffb9d Merge "add a new interp filter search strategy." 2014-08-26 17:30:42 -07:00
Dmitry Kovalev
bc9204a90e Adding get_frame_pkt_flags() function.
Change-Id: Icfacc695a711ec325b1d8f2b5d927a720e2bd6b4
2014-08-26 14:32:51 -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