Commit Graph

12979 Commits

Author SHA1 Message Date
Yunqing Wang
81fc5bf81c Improve skip_txfm thresholds in the non-rd mode selection
Modified the thresholds of deciding whether or not to skip
the transforms in model_rd_for_sb_y(). Used zbin[] instead
of dequant[] to be more precise. Also, modified the checking
coditions.

Rtc set borg test results (at speed 6) showed:
average PSNR gain: 0.138%, overall PSNR gain: 0.158%,
and SSIM gain: 0.177%.

The data rate test was modified slightly as suggested by
Marco.

Change-Id: Ieaf633ab77f4838cb3c45cf69065b29d55f8ae6c
2015-02-19 14:30:46 -08:00
Jingning Han
ed2dc59c1b Integral projection based motion estimation
This commit introduces a new block match motion estimation
using integral projection measurement. The 2-D block and the nearby
region is projected onto the horizontal and vertical 1-D vectors,
respectively. It then runs vector match, instead of block match,
over the two separate 1-D vectors to locate the motion compensated
reference block.

This process is run per 64x64 block to align the reference before
choosing partitioning in speed 6. The overall CPU cycle cost due
to this additional 64x64 block match (SSE2 version) takes around 2%
at low bit-rate rtc speed 6. When strong motion activities exist in
the video sequence, it substantially improves the partition
selection accuracy, thereby achieving better compression performance
and lower CPU cycles.

The experiments were tested in RTC speed -6 setting:
cloud 1080p 500 kbps
17006 b/f, 37.086 dB, 5386 ms ->
16669 b/f, 37.970 dB, 5085 ms (>0.9dB gain and 6% faster)

pedestrian_area 1080p 500 kbps
53537 b/f, 36.771 dB, 18706 ms ->
51897 b/f, 36.792 dB, 18585 ms (4% bit-rate savings)

blue_sky 1080p 500 kbps
70214 b/f, 33.600 dB, 13979 ms ->
53885 b/f, 33.645 dB, 10878 ms (30% bit-rate savings, 25% faster)

jimred 400 kbps
13380 b/f, 36.014 dB, 5723 ms ->
13377 b/f, 36.087 dB, 5831 ms  (2% bit-rate savings, 2% slower)

Change-Id: Iffdb6ea5b16b77016bfa3dd3904d284168ae649c
2015-02-19 13:47:19 -08:00
Jingning Han
83559e7357 Fix a check condition in nonrd_pick_partition
Change-Id: Ic92fb4b16948f745c218351b24fdafecf9abce3a
2015-02-19 09:54:55 -08:00
hkuang
02bd4edc2a Merge "Fix the frame parallel invalid file test failure on ARM." 2015-02-18 14:09:28 -08:00
James Zern
d93fe856b9 Merge "test_vector_test: fix build with --disable-(vp8|vp9)" 2015-02-17 14:05:32 -08:00
hkuang
2fa9e9e227 Fix the frame parallel invalid file test failure on ARM.
There is a corner case that when a frame is corrupted, the following
inter frame decode worker will miss the previous failure. To solve
this problem, a need_resync flag needs to be added to master thread
to keep control of that.

Change-Id: Iea9309b2562e7b59a83dd6b720607410286c90a6
2015-02-17 09:43:34 -08:00
James Zern
0dd591bedd loop_filter_rows_mt: remove dependency on 'last_height'
using this to control reallocation would miss a change if the function
were not called for every frame.
fixes potential memory corruption by the subsequent memset

Change-Id: I4c6bb6ab68803104fc824c7e27cc2f9b2cf53e33
2015-02-13 19:11:23 -08:00
James Zern
5b9dacd297 test_vector_test: fix build with --disable-(vp8|vp9)
use VP[89]_INSTANTIATE_TEST_CASE case when possible to disable the tests if
the codec is unavailable.
broken since:
be6aead Try again to merge branch 'frame-parallel' into master branch.

Change-Id: I8d81c5ba3b951f82be94bfaed6be194e4289baec
2015-02-13 18:52:25 -08:00
Yaowu Xu
c5718a7aa3 Merge "Fix an encoder/decode mismatch bug" 2015-02-13 16:40:41 -08:00
Yaowu Xu
4bc7f4828f Fix an encoder/decode mismatch bug
This commit prevent the encoder to update last_frame_type when a frame
is dropped in the encoder. Prior to this fix, if there is a dropped
frame immediatedly after a key frame, decoder would have the value of
last_frame_type as key frame, different from encoder as the dropped
frame in encoder would have updated the value to an inter frame. This
leads to different probability update in encoder and decoder, thereby
encoder/decoder mismatch.

This fixes issue #941

Change-Id: I27115224b138bec43ae3916c016574f5740822b0
2015-02-13 15:45:47 -08:00
Marco
d4761cff36 Merge "Replace some operations with shift in encoder_breakout." 2015-02-13 15:28:49 -08:00
Adrian Grange
4a03baa2f6 Merge "Improve readability: move return statements" 2015-02-13 15:28:01 -08:00
Adrian Grange
d240180022 Remove redundant test
Change-Id: I11e4fd8dcd44b0475f3bff0545a035feb223ce55
2015-02-13 14:57:14 -08:00
Marco
b1940bf5fe Replace some operations with shift in encoder_breakout.
Replaced a divide by 9 with 8, so some very small difference,
but otherwise no change in behavior.

Change-Id: I1079ae3c41e0789ff0bc6fa9940a238b6bca0f5b
2015-02-13 10:45:19 -08:00
Adrian Grange
1cfbc86e38 Merge "Add VP9 decoder control to get frame size" 2015-02-13 10:20:14 -08:00
Adrian Grange
e31516a08f Improve readability: move return statements
Change-Id: I18428d0a93084f78ec136d9019f10466326c67e5
2015-02-13 09:46:13 -08:00
Adrian Grange
cf54b88043 Add VP9 decoder control to get frame size
Adds a control function that allows the caller to get
the size of the current frame.

Change-Id: Iddfdedc0f3aa9aa46119f87d294681c82f275c9f
2015-02-13 09:09:49 -08:00
Marco
48fd2e41cd Merge "vpx_temporal_svc_encoder: Adjust default qp-max setting for vp9." 2015-02-13 08:11:31 -08:00
Jingning Han
e69c79e19a Merge "Fix ioc issue in block_rd_txfm" 2015-02-12 15:07:41 -08:00
Jingning Han
5041aa0fbe Fix ioc issue in block_rd_txfm
Force 64-bit precision in the intermediate steps.

Change-Id: I666113d9adcef8975da201d5aa1a13b783d09594
2015-02-12 12:51:39 -08:00
Marco
87a6175d6e vpx_temporal_svc_encoder: Adjust default qp-max setting for vp9.
Change-Id: Iada495f05193a1f645a5405ad792931f4d9113ab
2015-02-12 12:40:02 -08:00
Adrian Grange
04412d68bd Merge "Add missing initializer to VP8 codec interface" 2015-02-12 12:40:02 -08:00
hkuang
aa5c8b757d Merge "Remove unnecessary border extension when frame size change." 2015-02-12 12:00:32 -08:00
Marco
cc7d981de1 Merge "Add skin detection." 2015-02-12 11:12:27 -08:00
Adrian Grange
f29961dbd7 Add missing initializer to VP8 codec interface
Change-Id: Ia164ba03fb732e9c9e520e4aa2d75b7eadff6165
2015-02-12 09:53:52 -08:00
Jingning Han
f4c29ae9ea Merge "Update partition rate cost in rtc speed 5" 2015-02-12 09:14:49 -08:00
Jingning Han
ee83243daa Merge "Add mode cost to sub8x8 block mode decision in rtc coding" 2015-02-12 09:14:29 -08:00
Adrian Grange
24a6dbd853 Merge "Add cast to convert double to int" 2015-02-12 07:02:54 -08:00
Marco
56435bb7b6 Add skin detection.
Simple skin detection, from vp8; works reasonable on most of the
RTC clips, but could miss sometimes.

Added debug flag to write out skin map over source input.

Change-Id: I2caea7592f1c459047aac46627eeb24a94946464
2015-02-11 17:47:17 -08:00
Yunqing Wang
238707ab4c Merge "Make vp9_print_modes_and_motion_vectors() work" 2015-02-11 16:58:52 -08:00
James Zern
d8ed558c99 Merge "vp9_thread: prefer pthread.h if available" 2015-02-11 16:50:07 -08:00
James Zern
a139f3f6fc Merge "vp9_highbd_tm_predictor_16x16: fix win64" 2015-02-11 16:49:53 -08:00
Adrian Grange
053625e4cd Add cast to convert double to int
Change-Id: I7f63c2940256a5dadf9a29a853809290dd9e98ed
2015-02-11 15:59:48 -08:00
Jingning Han
e665c8f2c9 Add mode cost to sub8x8 block mode decision in rtc coding
This commit allows the encoder to properly account for the mode
cost in sub8x8 non-RD mode decision.

Change-Id: I2951960d20e37ed08e372ee0c7044935b2b9b899
2015-02-11 14:43:02 -08:00
Jingning Han
c9725813db Merge "Account for inter prediction filter rate cost in rtc mode selection" 2015-02-11 14:42:44 -08:00
Jingning Han
532cb435f8 Merge "Add ref frame rate cost to non-RD mode decision" 2015-02-11 14:36:48 -08:00
Jingning Han
7a4e0b2265 Update partition rate cost in rtc speed 5
The block partition rate cost should be updated when recursive
partition search is needed.

Change-Id: I7bc5ad1fc2cbd3577dee7f7e8da111a2742bdeb9
2015-02-11 12:48:29 -08:00
Jingning Han
41b7f76db1 Account for inter prediction filter rate cost in rtc mode selection
Add the rate cost on inter prediction filter type to the overall
rate-distortion cost in vp9_pick_mode_inter.

Change-Id: I72c34017adf5220cadb3962694ee5404469fc673
2015-02-11 12:17:29 -08:00
Jingning Han
4ce70e8847 Add ref frame rate cost to non-RD mode decision
This commit adds a heuristic rate cost of reference frame to the
non-RD mode decision. It improves the compression performance of
speed -6 by 0.31% and speed -5 by 0.69%.

Change-Id: If7f3b45519d49b2cb640bcb7316a254efc8be446
2015-02-11 11:08:10 -08:00
James Zern
923cc0bf51 vp9_highbd_tm_predictor_16x16: fix win64
by saving xmm8; cglobal's xmm reg arg is 0-based

Change-Id: Ic8426ec9ac59ab4478716aa812452a6406794dcb
2015-02-10 19:34:12 -08:00
Yaowu Xu
fc99636f1b Add --color-space to vpxenc
This enbale the encoder to set color space information for the input
video, so it is then coded in the output bitstream.

Change-Id: Ife03deab3c762425ccd27c4c190902c4d94a76f4
2015-02-10 16:37:21 -08:00
Yunqing Wang
f37788eaf6 Make vp9_print_modes_and_motion_vectors() work
MODE_INFO struct was modified, and vp9_print_modes_and_motion_vectors()
didn't work anymore. This patch modified vp9_debugmodes.c so that
this function works again for debug usage.

Change-Id: I293fae0295235deb2529a460a274caf7c045ac1a
2015-02-10 16:37:02 -08:00
Yaowu Xu
ee5d79995e Move computation up to frame level
This is to avoid redo the same calculation repeatly, and also allow
easier adjustments for further experiments.

This commit shall have no effect on quality/compression.

Change-Id: I4460acf5c808ff5518da18d21e002c5da58af857
2015-02-10 15:41:52 -08:00
hkuang
bf3cb25019 Remove unnecessary border extension when frame size change.
This border extension is not needed with on-demond border extension.

Change-Id: I8501b37f5f756dc7e874cef4c1cfdbfa9a16112a
2015-02-10 14:55:27 -08:00
James Zern
d167a1aeee vp9_thread: prefer pthread.h if available
this avoids conflicts with recent versions of mingw-w64 (tested g++
4.8.2) and the unit tests

Change-Id: Ic41ea31eebe0e3e712ed5e657f37d8cad6712088
2015-02-10 12:47:14 -08:00
Adrian Grange
2d924161c7 Merge "Auto-adaptive encoder frame resizing logic" 2015-02-10 12:16:55 -08:00
Jingning Han
f0eea5be2a Merge "Fix block partition size in fill_mode_info_sb" 2015-02-10 10:49:03 -08:00
Adrian Grange
23ebacdb81 Auto-adaptive encoder frame resizing logic
Note: This feature is still in development.

Add an option for the encoder to decide the resolution
at which to encode each frame.

Each KF/GF/ARF goup is tested to see if it would be
better encoded at a lower resolution. At present, each
KF/GF/ARF is coded first at full-size and if the coded
size exceeds a threshold (twice target data rate) at
the maximum active Q then the entire group is encoded
at lower resolution.

This feature is enabled in vpxenc by setting:
  --resize-allowed=1

In addition, if the vpxenc command line also specifies
valid frame dimensions using:
  --resize-width=XXXX & --resize_height=YYYY
then *all* frames will be encoded at this resolution.

Change-Id: I13f341e0a82512f9e84e144e0f3b5aed8a65402b
2015-02-10 09:59:32 -08:00
Yunqing Wang
84b813aa42 Merge "Make encoder and decoder share common thread function" 2015-02-10 09:06:41 -08:00
Yunqing Wang
d3a37731c2 Merge "Rename loopfilter_thread files to thread_common files" 2015-02-10 09:06:23 -08:00