summaryrefslogtreecommitdiff
path: root/vp9/vp9_cx_iface.c
AgeCommit message (Collapse)Author
2015-07-14Fixes part of merge regression from adding arf parameters.Debargha Mukherjee
From Change Ibf0c30b72074b3f71918ab278ccccc02a95a70a0 There is still an issue relating to one animated test clip with repeat patterns where this change effectively increase the default maximum arf interval by +1. This can be examined seperately. Change-Id: Idd01d5480fc45202d8a059a0c3afc0997cc5bdd1
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-06-03Remove ABI check for 1 pass CBR SVC.Marco
Remove the ABI check for the controls needed for SVC 1 pass CBR mode. Bump up the ABI version. Change-Id: I35b79ee010e14af83c6d1e801d574deaaa2fc7eb
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-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-20vp[89]_cx_iface.c: remove obsolete ABI checksJames Zern
Change-Id: I49a7017e8adc18ff03d748cb328814a8a3e1bcf6
2015-03-19put spatial svc behind an ABI checkJames Zern
this removes the CONFIG_* checks from public headers, but means '--enable-experimental --enable-spatial-svc' builds will fail without a local change to the ABI in vpx_encoder.h. this should be all right for testing this experiment. Change-Id: Ief55e7b9d1e8332cfce990275e04c29b30af0c4a
2015-03-16Fix external resize memory issues.Alex Converse
These were uncovered by the chromoting perftest. Change-Id: Ia5a90fd1718ff757c1484decf3861295260e6722
2015-03-13Provide information on codec controlsYaowu Xu
The commit updates the comments in vp8cx.h to make it clear which codec support each of codec control functions. Change-Id: Ibf876e289d4325bbb61ce19311da60d384624c2f
2015-03-12Rename a vp9 only control with vp9e prefixYaowu Xu
Also updated comments and doc to make it clear that the control is supported in VP9 only. Change-Id: I6f120b65135fc1185695e9e3dc29fbe0d430824b
2015-03-09Merge "Reduce default overshoot/undershoot params to 25"Deb Mukherjee
2015-03-05Reduce default overshoot/undershoot params to 25Deb Mukherjee
Reducing these values from 100 makes rate control tighter by default. Change-Id: I979409c93e6f19e128898f08ad581bf67eb0f824
2015-03-03Use 8 threads by default for VP9 encodesFrank Galligan
BUG=https://code.google.com/p/webm/issues/detail?id=964 Change-Id: I70679d0f139b8e0962f7e19eb56b34060953e9b0
2015-03-03VP9: turn on tile-columns and frame-parallel-mode by defaultFrank Galligan
Most of the current decoders use tile-based multithreading. Also most of the current decoders need frame_parallel_decoding_mode turned on to enable multithreaded decoding. tile-columns is limited by resolution, so setting to max (6) is fine. BUG=https://code.google.com/p/webm/issues/detail?id=963 Change-Id: I6e7ac3485d96bf0c69e06706cbb326dd38be0020
2015-02-26Fix the encoder to support profile changeYaowu Xu
Change-Id: Iefb928ad1174e274409facfb44f80265ff0f7683
2015-02-23Account for rate error in GF group Q calculation.paulwilkins
When GF group adaptive maxQ is enabled this patch accounts somewhat for accumulated error in the rate control. This improves accuracy quite a bit on many clips especially when there is overshoot. Examples when the overshoot and undershoot command line parameters are set to 100: Hall @ 1200 overshoot is reduced from 67-24%. Akiyo @ 400 undershoot is reduced from 28%-15%. Setting a lower value for undershoot or overshoot still reduces the error further. Impact on metrics is mixed with some gains in average psnr but generally a little lower (e.g. 0.5%) on overall and ssim. The GF group adaptation is still off by default in this patch. Compared to with the head, enabling this mode now gives big average psnr gains on the YT sets (e.g. YT_HD >11.2%), a drop in overall PSNR (YT-HD 3.9%) and a smaller drop or neutral for SSIM. Change-Id: If4b32cd0740d3fb941317b374f9c2951954eee90
2015-02-03Add mutex initialization in encoderYaowu Xu
This resolves the encoder crashes on windows. Change-Id: I159d79014cf9279751e403936ce1f84482ae82da
2015-02-02Merge "Allow larger encoder configurations."Alex Converse
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-29Allow larger encoder configurations.Alex Converse
Allow changing colorspace in the encoder and increasing frame size. Change-Id: I8e7c3b891af29ce420a15beb4f6f9c250245b2bb
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-21Allow external resize via vpx_codec_enc_config_setAlex Converse
Change-Id: I3d324e2baa4de2d266c5f7ca7b635b62372e90a7
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-09Added plumbing for setting color spaceYaowu Xu
Change-Id: If64052cc6e404abc8a64a889f42930d14fad21d3
2015-01-09Fix comments and color formatYaowu Xu
Replaced "color space" with "color format" in comments where color sampling format is concerned, so to differentiate from the concept defined in COLOR_SPACE. Change-Id: I8c935034c166b24307a99352dab1686531276bb8
2014-12-18Merge "make vp9 encoder static initializers thread safe"James Zern
2014-12-18make vp9 encoder static initializers thread safeJim Bankoski
Change-Id: If2d0888d13ebe52bc7c3b16f16319408a86ab6de
2014-12-17Corrected value range of --cpu-used for vp9Yaowu Xu
This commit removes undefined value options of cpu-used for VP9 and changed vpxenc prompt to reflect the usable range of [-8,8] Change-Id: Ib80fef3dbb6ec9aabac45ed13e8ab6fbaf94f55e
2014-12-04vp9_ethread: the tile-based multi-threaded encoderYunqing Wang
Currently, VP9 supports column-tile encoding, which allows a frame to be encoded in multiple column tiles independently. The number of column tiles are set by encoder option "--tile-columns". This provides a way to encode a frame in parallel. Based on previous set of patches, this patch implemented the tile- based multi-threaded encoder. Each thread processes one or more tiles. Usage: For HD clips: --tile-columns=2 --threads=1/2/3/4 While using 4 threads, tests showed that the encoder achieved 2.3X - 2.5X speedup at good-quality speed 3, and 2X speedup at realtime speed 5. Change-Id: Ied987f8f2618b1283a8643ad255e88341733c9d4
2014-11-13Prepare for dynamic frame resizing in the recode loopAdrian Grange
Prepare for the introduction of frame-size change logic into the recode loop. Separated the speed dependent features into separate static and dynamic parts, the latter being those features that are dependent on the frame size. Change-Id: Ia693e28c5cf069a1a7bf12e49ecf83e440e1d313
2014-11-10Vidyo: Support for one-pass rc-enabled SVC encoderDeb Mukherjee
Adds support for one-pass rc-enabled SVC encoder with callbacks for getting per-layer packets. - the callback function registration is implemented as an encoder control function. - if the callback function is not registered, the old way of aggregating packets with superframe will take effect. - one more control function “VP9E_GET_SVC_LAYER_ID” has been implemented to get the temporal/spatial id from the encoder within the callback. This can be used to get the ids to put on RTP packet. Change-Id: I1a90e00135dde65da128b758e6c00b57299a111a
2014-10-27Add a new control of golden frame boost in CBR modeYaowu Xu
0 means that golden boost is off, and uses average frame target rate, a non-zero number means the percentage of boost over average frame bitrate is given initially to golden frames in CBR mode. Change-Id: If4334fe2cc424b65ae0cce27f71b5561bf1e577d
2014-10-24Add a new control of max bitrate for inter frameYaowu Xu
Change-Id: I205de3611622cff7f751ea8baf9f82784581730a
2014-10-20Extend --auto-alt-ref so it can enable multi-alt ref.Paul Wilkins
Extend --auto-alt-ref from parameter so we can use it to turn multi-arf on and off from the command line. For now the range is 0-off, 1-on, 2-multi-arf on. Rename play_alternate to enable_auto_arf Change-Id: Id7b64407cfbe76ba0090a83b588a03e22a240386
2014-10-16[spatial svc]Another workaround to avoid using prev_miMinghai Shang
We encode a empty invisible frame in front of the base layer frame to avoid using prev_mi. Since there's a restriction for reference frame scaling factor, we have to make it smaller and smaller gradually until its size is 16x16. Change remerged. Change-Id: I9efab38bba7da86e056fbe8f663e711c5df38449
2014-10-16Revert "[spatial svc]Another workaround to avoid using prev_mi"Paul Wilkins
This reverts commit c113457af9880b8e15a36cdaabfd414d1c245693. Temporary revert to allow clean revert of another commit. Change-Id: Ia9b7b755e6c48e1b6e383329f121fef175a24b27
2014-10-14[spatial svc]Another workaround to avoid using prev_miMinghai Shang
We encode a empty invisible frame in front of the base layer frame to avoid using prev_mi. Since there's a restriction for reference frame scaling factor, we have to make it smaller and smaller gradually until its size is 16x16. Change-Id: I60b680314e33a60b4093cafc296465ee18169c19
2014-10-02Adds some missing I440 checksDeb Mukherjee
Change-Id: I034b73bb27e8023733aae63e6f8565f0a64c7267
2014-09-30Misc. high-bit-depth fixesDeb Mukherjee
Change-Id: Ie9fb6a4078eb6a3fb7c4ff1453831ab9afe23121
2014-09-22Merge "[spatial svc] Remove vpx_svc_parameters_t and the loop that sets it ↵Minghai Shang
for each layer"
2014-09-18[spatial svc] Remove vpx_svc_parameters_t and the loop that sets it for each ↵Minghai Shang
layer vpx_svc_parameters_t contains id, resolution and min/max qp for each spatial layer. In this change we will use extra config to send min/max qp and scaling factors, then calculate layer resolution inside encoder. Change-Id: Ib673303266605fe803c3b067284aae5f7a25514a
2014-09-18[spatial svc] Use same golden frame for all temporal layersMinghai Shang
Overhead goes down from 8% to 3% for 1080 60p Change-Id: Idf3e5ca8712402a914a8cb79df17d3cdab63b163
2014-09-12Change the control function of VP9 denoiser.JackyChen
Change from VP8E_SET_NOISE_SENSITIVITY to VP9E_SET_NOISE_SENSITIVITY Change-Id: Ia210a7029b26924e30973f0f9798a338e0412407
2014-09-12Merge "[spatial svc] Output psnr for all layers in one packet."Minghai Shang
2014-09-11Adds high bitdepth transform functions and testsDeb Mukherjee
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[spatial svc] Output psnr for all layers in one packet.Minghai Shang
Change-Id: I97d0cf095e9cfefdfa0f65eb5e96d6848cc9ffca
2014-09-05Merge "Adding temp cpi var."Dmitry Kovalev
2014-09-04Adding temp cpi var.Dmitry Kovalev
Change-Id: Ifa3c1cc2317c1bc21d1042b9662b35056d1e9ed0
2014-09-04Removing sz member from vpx_codec_priv. Dmitry Kovalev
Change-Id: I811526a9ee9f237604f72abe7fc677e39e0f457f