summaryrefslogtreecommitdiff
path: root/vpx/vpx_encoder.h
AgeCommit message (Collapse)Author
2018-03-26vp9-svc: Allow for setting frame drop thresholds per layer.Marco Paniconi
Add encoder control to set the frame drop thresholds per spatial layer, and add a frame drop mode: 0 = per-layer drop, and 1 = constrained drop mode (a drop on a given layer forces drops to all upper layers). Default is mode 0 (per-layer dropping). Implementation for mode 1 will come in subsequent change. If the control is not used, then the spatial layer frame drop thresholds (water mark) are all equal and set to the value given by the encoder config (oxcf->drop_frames_water_mark). Bump up the ABI version. Change-Id: Id038d4181b86fa98b3d44d026f96d5f344d81629
2018-03-20VP9 SVC: Add control to disable inter layer prediction.Jerome Jiang
Add VP9E_SET_SVC_INTER_LAYER_PRED to disable inter layer (spatial) prediction. 0: prediction on 1: prediction off for all frames 2: prediction off for non key frames Bump up ABI version. Change-Id: I5ab2a96b47e6bef202290fe726bed5f99bd4951f
2018-03-20vp9-svc: Improve frame dropper for spatial layers.Marco Paniconi
SVC frame dropper: modify the logic to allow for individual spatial layers to drop. This removes the constraint that all upper spatial layers must drop when a given spatial layer drops. Add a flag to the pkt to indicate whether a spatial layer is encoded or dropped. This is needed for applications that enable this feature (frame dropping for SVC). For a current spatial layer, if its previous spatial layer is dropped, then disable certain features for that layer: inter-layer prediction, base_mv, partition_reuse, copy partition. Also add the constraint to never drop a spatial layer if its base layer is a key frame. Updates to sample encoder (vp9_spatial_svc_encoder) and the SVC datarate unittests to properly handle frame dropping. Bump up ABI version. Change-Id: I7d14ccf67b8d014a7abfce5ba3989fc623e94067
2018-03-15vp9-svc: Frame dropper for SVC.Marco Paniconi
If a given spatial layer decides to drop, due to the buffer/overshoot conditions for that layer, then drop that current spatial layer and all spatial layers above. In the current implementation the svc frame counter (and hence the pattern for the non-flexible SVC case) are updated on frame drops. Also add last spatial layer encoded to the pkt. This is useful for RTC applications that enable frame dropping for SVC. Update to the SVC datarate tests: enabled frame dropper on all SVC datarate tests, and made a fix to properly set the temporal_layer_id, which works now even on frame drops. Change-Id: If828c193f3cb6b1839803fd52fe9fbbda5b5a039
2018-03-14remove spatial svc experimentJohann
Change-Id: Ifda11caaf992d10f2d93d6cd1d07b79b6047be05
2018-02-09Reland "Add ROI support for VP9."Jerome Jiang
Extended ROI struct suitable for VP9. ROI input from user is passed into internal struct and applied on every frame (except key frame). Enabled usage of all 4 VP9 segment features (delta_qp, delta_lf, skip, ref_frame) via the ROI map input. Made changes to nonrd_pickmode for the ref_frame feature. Only works for realtime speed >= 5. AQ_MODE needs to be turned off for ROI to take effect. Change example in the sample encoder: vpx_temporal_svc_encoder.c to be suitable for VP9. Add datarate test. Bump up ABI version. BUG=webm:1470 Change-Id: I663b8c89862328646f4cc6119752b66efc5dc9ac
2018-01-22Fix frame sizes in pkt to support spatial layers.Jerome Jiang
Add test for svc frame sizes in pkt. BUG=webm:1485 Change-Id: I983dc229e526d72d22360d7f3016d8358d6beae7
2018-01-11adopt some clang 5.0.0 formattingJohann
At least the changes that don't conflict with 4.0.1 Change-Id: I9b6a7c14dadc0738cd0f628a10ece90fc7ee89fd
2017-12-06Add frame width & height to frame pkt. Add test.Jerome Jiang
Used to return correct frame width and height when dynamic resizing happens. BUG=webm:1474 Change-Id: Ia2043f7e1635b3821848a67b9b134f47f14b0f3a
2017-11-30decouple spatial-svc from encoder abiJames Zern
this is only meant for testing. along with --enable-experimental --enable-spatial-svc require VPX_TEST_SPATIAL_SVC to be defined rather than bumping the encoder ABI. Change-Id: I7f34d9f60300fa31ccf22e1a4aa619392c391b2e
2017-11-13vp9 svc: Change conditions on VPX_ENCODER_ABI_VERSION.Jerome Jiang
VPX_ENCODER_ABI_VERSION was bumped up in 93e83f. Change-Id: Id5707f9f9db56fa96549bc8f54e1cfa04e7fa4cd
2017-11-08CVBR command line option.paulwilkins
Added command line control of Corpus VBR. The new corpus vbr mode is a variant of standard VBR (end-usage=0) where the complexity distribution mid point is passed in rather than calculated for a specific clip or chunk. The new variant is enabled by setting a new command line parameter --corpus-complexity to a zero value. Omitting this parameter or setting it to 0 will cause the codec to use standard vbr mode. The correct value for a given corpus needs to be derived experimentally using a training set such that the average rate for the corpus is close to the target value. For example our using our low res test set with upper and lower vbr limits of 50%-150% and a corpus complexity value of 650 gives a similar average data rate across the set to using standard vbr. However, with the corpus mode easier clips will be allocated fewer bits and harder clips more bits rather than having the same rate target for all. Change-Id: I03f0fc8c6fb0ee32dc03720fea6a3f1949118589
2017-02-28VPX_CODEC_CAP_HIGHBITDEPTH for decoder interfaceChris Cunningham
Moves the def from vpx_encoder.h -> vpx_codec.h. The defined value is changed as part of this move. Adds the value to decoder capabilities when CONFIG_VP9_HIGHBITDEPTH. Change-Id: I7d61fc821cda29f1e32bb9b2b9ffd3d83966e419
2016-07-25vp9 svc: Enable different speed setting for each spatial layer.jackychen
This change only affects 1 pass cbr svc mode. Change-Id: If0da87bb200f7e7762755340c40c8157cc7a16ca
2016-07-21vpx/: apply clang-formatclang-format
Change-Id: I95922a64568bf289863c1564212b6be5beec36df
2015-10-09vpx/*.h, cosmetics: fix some typosJames Zern
Change-Id: Ie9ead2c665c6c065a6b922ab66bae9be63483272
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-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-18vpx/vpx_encoder.h: bump ABI versionJames Zern
missed in updates for high bitdepth, others Change-Id: Id30076ce09beb361b5e1ff0ac99e3ae1ad4f987e
2015-03-13Fix comments for vpx_codec_enc_config_default()Yaowu Xu
This makes clear that for end-usage, only 0 is supported currently. Change-Id: I99795807c20df1d71b3c803e8d5f3b36583dcc85
2015-01-15Fix comments for doxygenYaowu Xu
Change-Id: Iaad3dc3cdd25275939b475706eb7d136a5a10174
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-15fix CONFIG_SPATIAL_SVC warningJames Zern
this change checks that CONFIG_SPATIAL_SVC is defined and adds a TODO to ensure this is changed in the future as the release headers can't depend on vpx_config.h. vpx/vpx_encoder.h:164:5: warning: "CONFIG_SPATIAL_SVC" is not defined [-Wundef] Change-Id: I797a0150e5f56caf048e7ee00b282fbc9c5ede19
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-11[spatial svc] Output psnr for all layers in one packet.Minghai Shang
Change-Id: I97d0cf095e9cfefdfa0f65eb5e96d6848cc9ffca
2014-09-02Adds config opt for highbitdepth + misc. vpxDeb Mukherjee
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles. Also includes most vpx level high bit-depth functions. However encode/decode in the highbitdepth profiles will not work until the rest of the code is in place. Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-08-25Passing const cfg pointer to vpx_codec_{dec,enc}_init_ver().Dmitry Kovalev
Change-Id: I3e319f581215ccb814afca247c1d911be231a4ac
2014-08-22Replacing 'struct vpx_fixed_buf' with 'vpx_fixed_buf_t’.Dmitry Kovalev
Change-Id: Ibbbc5b39429d4b753f0a966b9d84d1d7bf823650
2014-08-11Merge "remove remaining references to XMA"James Zern
2014-08-11remove remaining references to XMAJames Zern
the bulk of the functionality was removed in: a42b5c2 Removing legacy XMA features from libvpx. BUG=840 Change-Id: I8ca51d6aa76028f36d0eb1a15d2f2e3161e12ea4
2014-08-11[spatial svc]Remove CONFIG_SPATIAL_SVC for ss_enable_auto_alt_ref in ↵Minghai Shang
vpx_codec_enc_cfg to fix heap-overflow issue in asan config Change-Id: Icdf08501db5f416285f751d316941dfacd2c69ba
2014-07-22[spatial svc]Use #if instead of #ifdef on macro CONFIG_SPATIAL_SVCMinghai Shang
Change-Id: Ifc94377a0d05d66e3d21b007893a985b66db6082
2014-07-14Rewrite functions related to first pass block statsPengchong Jin
Change-Id: I28679f88e2911b06eef5cbc83ecb62b8c69e4c53
2014-07-14[spatial svc]Implement alt reference framesMinghai Shang
All changes are for spatial svc only. 1. Enable encoding hidden frames in each layer and use alt reference idex to reference the hidden frame in each layer 2. Use golden reference idx for spatial reference 3. For those layers that don't have hidden frames (caused by lack of frame buffers), reference a hidden frame in lower layers 4. Add "auto-alt-refs" in svc options Change-Id: Idf27d1fd2fb5f3ffd9e86d2119235e3dad36c178
2014-04-14Enable vpxenc to specify internal coded frame sizeAdrian Grange
Added command line flags "resize-width" & "resize-height" to allow the user to specify the frame size to encode at. These two flags are ignored if the "resize-allowed" switch is not set to 1. All frames in the clip are then encoded at this size, which must be smaller than the raw frame size. Change-Id: I3d64bd9303d5c0bd678461a866a1ea621700d744
2014-03-19[svc] Finalize spatial svc first pass rate controlMinghai Shang
1. Save stats for each spatial layer 2. Add frame buffer management for svc first pass rc 3. Set default spatial layer to 1 4. Flush encoder at the end of stream in test app This only supports spatial svc. Change-Id: Ia89cfa87bb6394e6c0405b921d86c426d0a0c9ae
2014-02-26[svc] Add target bitrate settings for each layers.Minghai Shang
Change-Id: Ia7677fb436667bc4f76db71f65e4784f433f7826
2014-02-06Layer based rate control for CBR mode.Marco Paniconi
This patch adds a buffer-based rate control for temporal layers, under CBR mode. Added vpx_temporal_scalable_patters.c encoder for testing temporal layers, for both vp9 and vp8 (replaces the old vp8_scalable_patterns). Updated datarate unittest with tests for temporal layer rate-targeting. Change-Id: I8900a854288b9354d9c697cfeb0243a9fd6790b1
2014-02-03Revert "Layer based rate control for CBR mode."Marco Paniconi
This reverts commit 6be2b750b8968a0b19180a6474864c0b6a41db13 Change-Id: Ic52acd98b37c3ba49d4999b463389eb564f49c4b
2014-02-02Layer based rate control for CBR mode.Marco Paniconi
This patch adds a buffer-based rate control for temporal layers, under CBR mode. Added vpx_temporal_scalable_patters.c encoder for testing temporal layers, for both vp9 and vp8 (replaces the old vp8_scalable_patterns). Updated datarate unittest with tests for temporal layer rate-targeting. Change-Id: I9cb6cce2494390ae6096ee17774af7fb9308bde7
2013-12-16vpx: normalize include guardsJames Zern
Change-Id: Iee670353cffa1f9e97976ac507ad9519e5dda7f7
2013-12-16Include files in the same directory directlyJohann
Change-Id: I56706a8326d9356a6735d13eb5e0832d04221c91
2013-10-29Resolved Doxygen warnings.Adrian Grange
Added comments to make the codebase build cleanly in Doxygen. Change-Id: I01e000ceac57dbafa04342858c8f1be250ba20d1
2013-09-09Merge "API extensions and sample app for spacial scalable encoder"Ivan Maltz
2013-09-09API extensions and sample app for spacial scalable encoderIvan Maltz
Sample app: vp9_spatial_scalable_encoder vpx_codec_control extensions: VP9E_SET_SVC VP9E_SET_WIDTH, VP9E_SET_HEIGHT, VP9E_SET_LAYER VP9E_SET_MIN_Q, VP9E_SET_MAX_Q expanded buffer size for vp9_convolve modified setting of initial width in vp9_onyx_if.c so that layer size can be set prior to initial encode Default number of layers set to 3 (VPX_SS_DEFAULT_LAYERS) Number of layers set explicitly in vpx_codec_enc_cfg.ss_number_layers Change-Id: I2c7a6fe6d665113671337032f7ad032430ac4197
2013-09-06Support a constant quality mode in VP9Deb Mukherjee
Adds a new end-usage option for constant quality encoding in vpx. This first version implemented for VP9, encodes all regular inter frames using the quality specified in the --cq-level= option, while encoding all key frames and golden/altref frames at a quality better than that. The current performance on derfraw300 is +0.910% up from bitrate control, but achieved without multiple recode loops per frame. The decision for qp for each altref/golden/key frame will be improved in subsequent patches based on better use of stats from the first pass. Further, the qp for regular inter frames may also be varied around the provided cq-level. Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
2012-11-06vpx: merge with masterJohn Koleszar
Change-Id: I44b3ad780cef6f448fa17ff8e28fea87ef9cd518
2012-07-17Restyle codeJohn Koleszar
Approximate the Google style guide[1] so that that there's a written document to follow and tools to check compliance[2]. [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml [2]: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py Change-Id: Idf40e3d8dddcc72150f6af127b13e5dab838685f
2012-06-28Add lossless compression mode.Hui Su
This commit adds lossless compression capability to the experimental branch. The lossless experiment can be enabled using --enable-lossless in configure. When the experiment is enabled, the encoder will use lossless compression mode by command line option --lossless, and the decoder automatically recognizes a losslessly encoded clip and decodes accordingly. To achieve the lossless coding, this commit has changed the following: 1. To encode at lossless mode, encoder forces the use of unit quantizer, i.e, Q 0, where effective quantization is 1. Encoder also disables the usage of 8x8 transform and allows only 4x4 transform; 2. At Q 0, the first order 4x4 DCT/IDCT have been switched over to a pair of forward and inverse Walsh-Hadamard Transform (http://goo.gl/EIsfy), with proper scaling applied to match the range of the original 4x4 DCT/IDCT pair; 3. At Q 0, the second order remains to use the previous walsh-hadamard transform pair. However, to maintain the reversibility in second order transform at Q 0, scaling down is applied to first order DC coefficients prior to forward transform, and scaling up is applied to the second order output prior to quantization. Symmetric upscaling and downscaling are added around inverse second order transform; 4. At lossless mode, encoder also disables a number of minor features to ensure no loss is introduced, these features includes: a. Trellis quantization optimization b. Loop filtering c. Aggressive zero-binning, rounding and zero-bin boosting d. Mode based zero-bin boosting Lossless coding test was performed on all clips within the derf set, to verify that the commit has achieved lossless compression for all clips. The average compression ratio is around 2.57 to 1. (http://goo.gl/dEShs) Change-Id: Ia3aba7dd09df40dd590f93b9aba134defbc64e34