summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encoder.h
AgeCommit message (Collapse)Author
2015-11-06Use accurate bit cost for uv_mode in UV intra mode RD selectionhui su
On derflr, +0.1% for VP10; however, -0.03% on VP9. Change-Id: I09c724232ede74254043d61d3cadc506256af0af
2015-11-02Move noise level estimate outside denoiser.Marco
Source noise level estimate is also useful for setting variance encoder parameters (variance thresholds, qp-delta, mode selection, etc), so allow it to be used also if denoising is not on. Change-Id: I4fe23d47607b4e17a35287057f489c29114beed1
2015-10-16Add a new enum type vpx_color_range_tYaowu Xu
to make meaning of color_range obvious. Change-Id: I303582e448b82b3203b497e27b22601cc718dfff
2015-09-25vp9/10: improve support for render_width/height.Ronald S. Bultje
In the decoder, map this to the output variable vpx_image_t.r_w/h. This is intended as an improved version of VP9D_GET_DISPLAY_SIZE, which doesn't work with parallel frame decoding. In the encoder, map this to a codec control func (VP9E_SET_RENDER_SIZE) that takes a w/h pair argument in a int[2] (identical to VP9D_GET_DISPLAY_SIZE). Also add render_size to the encoder_param_get_to_decoder unit test. See issue 1030. Change-Id: I12124c13602d832bf4c44090db08c1009c94c7e8
2015-09-16Add support for color-range.Ronald S. Bultje
In decoder, export (eventually) into vpx_image_t.range field. In encoder, use oxcf->color_range to set it (same way as for color_space). See issue 1059. Change-Id: Ieabbb2a785fa58cc4044bd54eee66f328f3906ce
2015-09-14For 1 pass: always use the normative filter in vp9_scale_if_required()Marco
The normative (convolve8) filter is optimized/faster than the nonnormative one. Pass usage of scaler (normative/nonomorative) to vp9_scale_if_required(), and always use normative one for 1 pass. Change-Id: I2b71d9ff18b3c7499b058d1325a9554de993dd52
2015-08-28vp9_encoder: make vp9_alloc_compressor_data privateJames Zern
Change-Id: I38b4de692f4f7e880766316783981cbd1134bed9
2015-08-20Update to dynamic resize for 1 pass CBR: source scaling.Marco
Switch to use the normative (convolve8) filter for source scaling, only for 1/2x1/2 scaling for now. This is faster and has better quality than either the vpx_scale_frame or the nonnormative scaler. Remove the vp9_scale_if_required_fast, which is now not used. Change-Id: I2f7d73950589d19baafb1fa650eac987d531bcc8
2015-08-06Move VP9 SSIM metrics to vpx_dsp.Alex Converse
Change-Id: I20c7b42631b579fade6cf7ebf6d4c69b2fcb5e5e
2015-07-27Remove tx_select_threshesYunqing Wang
Removed unused tx_select_threshes and tx_select_diff. Change-Id: I5e9e7ad170056efe14b5f071e94d0c5a36e4a34c
2015-07-20vpx_dsp/bitreader.h: vp9_->vpx_Yaowu Xu
Replace vp9_ in names to vpx_ as they are not codec specific. Change-Id: I2e583aa63dee769353ada4b42417aa15c4074ebb
2015-07-10Dynamic resize for real-time: source scalingMarco
Use faster scaling on source. Change-Id: I968df97239a86834c96126b86832d3d6d0875a53
2015-07-07Move sub pixel variance to vpx_dspJohann
Change-Id: I66bf6720c396c89aa2d1fd26d5d52bf5d5e3dff1
2015-07-06Expose params min-gf-interval/max-gf-intervalDebargha Mukherjee
Adds two new vp9 parameters --min-gf-interval and --max-gf-interval to enable testing based on frequency of alt-ref frames. Also adds a unit-test to test enforcement of min-gf-interval. For both these parameters the default value is 0, which indicates they are picked by the encoder, based on resolution and framerate considerations. If they are greater than zero, the specified parameter is honored. (Additional note by paulwilkins) Note that there is a slight oddity in that key frames are also GFs and considered part of GF only group. However they are treated as not being part of an arf group because for arf groups the previous GF is assumed to be the terminal or overlay frame for the previous group. (end note) Change-Id: Ibf0c30b72074b3f71918ab278ccccc02a95a70a0
2015-07-02Rename vpx_thread to vpx_utilJingning Han
Change the dir name to include more util tools. Change-Id: Id5b16062803ce5eed872fe2edb36d7e56b32eed8
2015-07-02Merge "Use vpx prefix for codec independent threading functions"Jingning Han
2015-07-02Merge "Move multi-threading module functions into vpx_thread folder"Jingning Han
2015-07-02Use vpx prefix for codec independent threading functionsJingning Han
Replace vp9_ prefix with vpx_ for common multi-threading functions. Change-Id: I941a5ead9bfe8213fdad345511d2061b07797b55
2015-07-01Move multi-threading module functions into vpx_thread folderJingning Han
This commit moves the primitive multi-threading files from vp9 folder to vpx_thread, which will be accessible by all vpx codec. Change-Id: Ib51e66e9c69801c10631fab56d35a0c0aaed5883
2015-06-29VP9: Move ref_mvs[][] and mode_context[] from MB_MODE_INFOScott LaVarnway
to MB_MODE_INFO_EXT. This saves 36 bytes per 8x8 area for both the decoder and encoder. (encoder has two MODE_INFO buffers) Change-Id: If006abb2224acaf326df3c2be09e77e967662107
2015-06-18Add dynamic resize logic for 1 pass CBR.Marco
Decision to scale down/up is based on buffer state and average QP over previous time window. Limit the total amount of down-scaling to be at most one scale down for now. Reset certain quantities after resize (buffer level, cyclic refresh, rate correction factor). Feature is enable via the setting rc_resize_allowed = 1. Change-Id: I9b1a53024e1e1e953fb8a1e1f75d21d160280dc7
2015-06-11Allocate tile data adaptively to accommodate the frame size increaseYunqing Wang
If the frame size increases, the tile data buffer needs to be re-allocated according to the number of tiles existing in current frame. This patch makes the multi-tile encoding work in spatial SVC usage case, and partially solved WebM issue 1018. Change-Id: I1ad6f33058cf5ce6f60ed5024455a709ca80c5ad
2015-06-02Vidyo patch: Rate control for SVC, 1 pass CBR mode.Marco
-Make Rate control work for SVC 1 pass CBR mode. -Added temporal layering mode. -Fixed bug in non-rd variance partition. -Modified/updated the sample encoders (vp9_spatial_svc_encoder, vpx_temporal_svc_encoder). -Added datarate unittest(s) for 1 pass CBR SVC. Change-Id: Ie94b1b68a56ea1267b5087c625e5df04def2ee48
2015-04-22Adds worst frame metrics for a bunch of metrics.Jim Bankoski
Change-Id: Ieaccc36ed1bee024bb644a9cfaafdaaa65d31772
2015-04-21Adds a new temporal consistency metric to libvpx.Jim Bankoski
Change-Id: Id61699ebf57ae4f8af96a468740c852b2f45f8e1
2015-04-17Merge "Adds a blockiness metric to internal stats."Jim Bankoski
2015-04-17Merge "adds psnrhvs to internal stats."Jim Bankoski
2015-04-17Merge "Adds a fastssim metric to VPX internal stats."Jim Bankoski
2015-04-17Adds a blockiness metric to internal stats.Jim Bankoski
Change-Id: Iedceeb020492050063acf3fd2326f96c29db9ae5
2015-04-17adds psnrhvs to internal stats.Jim Bankoski
PSNR HVS is a human visual system weighted version of SNR that's gained some popularity from academia and apparently better matches MOS testing. This code is borrowed from the Daala Project but uses our FDCT code. Change-Id: Idd10fbc93129f7f4734946f6009f87d0f44cd2d7
2015-04-17Adds a fastssim metric to VPX internal stats.Jim Bankoski
This code appeared in the Daala project first and was originally committed by Nathan Egge. Change-Id: Iadce416a091929c51b46637ebdec984cddcaf18c
2015-04-16Revert "Revert "Force_split on 16x16 blocks in variance partition.""Marco Paniconi
This reverts commit 004b9d83e37d355f590a6976a27b7b845d19a869 Change-Id: I2f2d0bdb9368c2c07f1d29a69cd461267a3a8743
2015-04-14Revert "Force_split on 16x16 blocks in variance partition."Yunqing Wang
This reverts commit eb8c667570aa83134c7db0690de9dbdde4d90291. The patch caused mismatch while using multi-threads. Change-Id: Icd646340af25b5d91e32f03ed3ea212e00e3e0be
2015-04-13Force_split on 16x16 blocks in variance partition.Marco
Force split on 16x16 block (to 8x8) based on the minmax over the 8x8 sub-blocks. Also increase variance threshold for 32x32, and add exit condiiton in choose_partition (with very safe threshold) based on sad used to select reference frame. Some visual improvement near moving boundaries. Average gain in psnr/ssim: ~0.6%, some clips go up ~1 or 2%. Encoding time increase (due to more 8x8 blocks) from ~1-4%, depending on clip. Change-Id: I4759bb181251ac41517cd45e326ce2997dadb577
2015-04-02Set vbp thresholds for aq3 boosted blocksYunqing Wang
The vbp thresholds are set seperately for boosted/non-boosted superblocks according to their segment_id. This way we don't have to force the boosted blocks to split to 32x32. Speed 6 RTC set borg test result showed some quality gains. Overall PSNR: +0.199%; Avg PSNR: +0.245%; SSIM: +0.802%. No speed change was observed. Change-Id: I37c6643a3e2da59c4b7dc10ebe05abc8abf4026a
2015-03-31Merge "Rename vbp thresholds"Yunqing Wang
2015-03-31Rename vbp thresholdsYunqing Wang
Code refactoring Change-Id: I410fcce1bc6d95c62c474445f4c97ea8469f1e79
2015-03-24VP9E_GET_ACTIVE_MAP API function.Alex Converse
This is useful when aq mode 3 (cyclic refresh) reactivates segments for refresh. Change-Id: I3ad1d9410b899ede393d82bb8db14e2da4d84eca
2015-03-12Reconcile active_map and cyclic refreshAlex Converse
Change-Id: Id7f8654aeeb20caa402bc822521b1d72c658f4f9
2015-03-04Make encoder buffer allocation dynamicAdrian Grange
Frame buffers are now allocated dynamically on-demand. Entries in the reference frame map, cm->ref_frame_map, may now be set to -1 (INVALID_IDX) to indicate that there is not a valid reference buffer in that "slot". All slots in the reference frame map are now initialized to the empty state (-1) and each buffer is initialized to have a reference count of 0. Change-Id: Id1afe98de98db4ae8b2dfefed7889c3b28c68582
2015-02-20Move dequant table from VP9_COMMON to VP9_COMP as decoderHangyu Kuang
does not need it any more. This reduces VP9_COMMON size from 25776 bytes to 17584 bytes(~31%). Change-Id: Ic5daea732ccefb6d512b048af7983f0efe08589b
2015-02-10Move computation up to frame levelYaowu Xu
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-10Auto-adaptive encoder frame resizing logicAdrian Grange
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-06Rename loopfilter_thread files to thread_common filesYunqing Wang
Renames the files to allow more common thread code to be moved to vp9/common. Change-Id: I7386e64e221086e3cdc087e79812f993c423413b
2015-01-30Try again to merge branch 'frame-parallel' into master branch.hkuang
In frame parallel decode, libvpx decoder decodes several frames on all cpus in parallel fashion. If not being flushed, it will only return frame when all the cpus are busy. If getting flushed, it will return all the frames in the decoder. Compare with current serial decode mode in which libvpx decoder is idle between decode calls, libvpx decoder is busy between decode calls. Current frame parallel decode will only speed up the decoding for frame parallel encoded videos. For non frame parallel encoded videos, frame parallel decode is slower than serial decode due to lack of loopfilter worker thread. There are still some known issues that need to be addressed. For example: decode frame parallel videos with segmentation enabled is not right sometimes. * frame-parallel: Add error handling for frame parallel decode and unit test for that. Fix a bug in frame parallel decode and add a unit test for that. Add two test vectors to test frame parallel decode. Add key frame seeking to webmdec and webm_video_source. Implement frame parallel decode for VP9. Increase the thread test range to cover 5, 6, 7, 8 threads. Fix a bug in adding frame parallel unit test. Add VP9 frame-parallel unit test. Manually pick "Make the api behavior conform to api spec." from master branch. Move vp9_dec_build_inter_predictors_* to decoder folder. Add segmentation map array for current and last frame segmentation. Include the right header for VP9 worker thread. Move vp9_thread.* to common. ctrl_get_reference does not need user_priv. Seperate the frame buffers from VP9 encoder/decoder structure. Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:""" Conflicts: test/codec_factory.h test/decode_test_driver.cc test/decode_test_driver.h test/invalid_file_test.cc test/test-data.sha1 test/test.mk test/test_vectors.cc vp8/vp8_dx_iface.c vp9/common/vp9_alloccommon.c vp9/common/vp9_entropymode.c vp9/common/vp9_loopfilter_thread.c vp9/common/vp9_loopfilter_thread.h vp9/common/vp9_mvref_common.c vp9/common/vp9_onyxc_int.h vp9/common/vp9_reconinter.c vp9/decoder/vp9_decodeframe.c vp9/decoder/vp9_decodeframe.h vp9/decoder/vp9_decodemv.c vp9/decoder/vp9_decoder.c vp9/decoder/vp9_decoder.h vp9/encoder/vp9_encoder.c vp9/encoder/vp9_pickmode.c vp9/encoder/vp9_rdopt.c vp9/vp9_cx_iface.c vp9/vp9_dx_iface.c This reverts commit a18da9760a74d9ce6fb9f875706dc639c95402f5. Change-Id: I361442ffec1586d036ea2e0ee97ce4f077585f02
2015-01-23Revert "Merge branch 'frame-parallel' to enable frame parallel decode in ↵Johann
master branch." This reverts commit bde04ce5039cbcf86c8b34bdb4127e18d7e1d0c7 Change-Id: I053dae04c761b04a36dc239558503905a14d2470
2015-01-22Merge branch 'frame-parallel' to enable frame parallel decode in master branch.hkuang
In frame parallel decode, libvpx decoder decodes several frames on all cpus in parallel fashion. If not being flushed, it will only return frame when all the cpus are busy. If getting flushed, it will return all the frames in the decoder. Compare with current serial decode mode in which libvpx decoder is idle between decode calls, libvpx decoder is busy between decode calls. VP9 frame parallel decode is >30% faster than serial decode with tile parallel threading which will makes devices play 1080P VP9 videos more easily. * frame-parallel: Add error handling for frame parallel decode and unit test for that. Fix a bug in frame parallel decode and add a unit test for that. Add two test vectors to test frame parallel decode. Add key frame seeking to webmdec and webm_video_source. Implement frame parallel decode for VP9. Increase the thread test range to cover 5, 6, 7, 8 threads. Fix a bug in adding frame parallel unit test. Add VP9 frame-parallel unit test. Manually pick "Make the api behavior conform to api spec." from master branch. Move vp9_dec_build_inter_predictors_* to decoder folder. Add segmentation map array for current and last frame segmentation. Include the right header for VP9 worker thread. Move vp9_thread.* to common. ctrl_get_reference does not need user_priv. Seperate the frame buffers from VP9 encoder/decoder structure. Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:""" Conflicts: test/codec_factory.h test/decode_test_driver.cc test/decode_test_driver.h test/invalid_file_test.cc test/test-data.sha1 test/test.mk test/test_vectors.cc vp8/vp8_dx_iface.c vp9/common/vp9_alloccommon.c vp9/common/vp9_entropymode.c vp9/common/vp9_loopfilter_thread.c vp9/common/vp9_loopfilter_thread.h vp9/common/vp9_mvref_common.c vp9/common/vp9_onyxc_int.h vp9/common/vp9_reconinter.c vp9/decoder/vp9_decodeframe.c vp9/decoder/vp9_decodeframe.h vp9/decoder/vp9_decodemv.c vp9/decoder/vp9_decoder.c vp9/decoder/vp9_decoder.h vp9/encoder/vp9_encoder.c vp9/encoder/vp9_pickmode.c vp9/encoder/vp9_rdopt.c vp9/vp9_cx_iface.c vp9/vp9_dx_iface.c Change-Id: Ib92eb35851c172d0624970e312ed515054e5ca64
2015-01-16vp9_ethread: add parallel loopfilterYunqing Wang
1. Added row-based loopfilter in encoder; 2. Moved common multi-threaded loopfilter functions from decoder to common; 3. Merged multi-threaded loopfilter code, and made encoder/ decoder call same function to reduce code duplication. Encoder tests showed that 1% - 2% speedup was seen for good-quality 2-pass mode(at speed 3); 1% - 3% speedup using 2 threads and 4% - 6% speedup using 4 threads were seen for real-time mode(at speed 7). Change-Id: I8a4ac51c2ad9bab9fa7b864e90743931c53ec1c4
2015-01-14Add encoder control for setting color spaceYaowu Xu
This commit adds encoder side control for vp9 to set color space info in the output compressed bitstream. It also amends the "vp9_encoder_params_get_to_decoder" test to verify the correct color space information is passed from the encoder end to decoder end. Change-Id: Ibf5fba2edcb2a8dc37557f6fae5c7816efa52650
2015-01-13Merge "Added plumbing for setting color space"Yaowu Xu