summaryrefslogtreecommitdiff
path: root/vpx
Commit message (Collapse)AuthorAgeFilesLines
* Add VpxTplGopStatsJerome Jiang2023-05-081-0/+6
| | | | | | | | | | | Contains the size of GOP - also the size of the list of TPL stats for each frame in this GOP. VpxTplGopStats will be the unit for VP9E_GET_TPL_STATS control to return TPL stats from the encoder. Bug: b/273736974 Change-Id: I1682242fc6db4aafcd6314af023aa0d704976585
* Unify implementation of CHECK_MEM_ERRORJerome Jiang2023-05-081-0/+23
| | | | | | | | | | There were multiple implementations of CHECK_MEM_ERROR across the library that take different arguments and used in different places. This CL will unify them and have only one implementation that takes vpx_internal_error_info. Change-Id: I2c568639473815bc00b1fc2b72be56e5ccba1a35
* Overwrite cm->error->detail before freeingWan-Teh Chang2023-05-041-1/+3
| | | | | | | | | | | | Help detect use after free of the return value of vpx_codec_error_detail(). If vpx_codec_error_detail() is called after vpx_codec_encode() fails, the return value may be equal to cm->error->detail, which is freed when vpx_codec_destroy() is called. Document the lifetime of the string returned by vpx_codec_error_detail(). Change-Id: I8089e90a4499b4f3cc5b9cfdbb25d72368faa319
* Have vpx_codec_error take const vpx_codec_ctx_t *Wan-Teh Chang2023-05-042-5/+5
| | | | | | | Also have vpx_codec_error_detail take vpx_codec_ctx_t *. Both functions are getter functions that don't modify the codec context. Change-Id: I4689022425efbf7b1da5034255ac052fce5e5b4f
* Add comments about vpx_codec_enc_init_ver failureWan-Teh Chang2023-05-042-1/+8
| | | | | | | | | | Address the questions: 1. If vpx_codec_enc_init_ver() fails, should I still call vpx_codec_destroy() on the encoder context? 2. Is it safe to call vpx_codec_error_detail() when vpx_codec_enc_init_ver() failed? Change-Id: I1b0e090d11dd9f853fe203f4cbb6080c3c7b0506
* Add num_blocks to VpxTplFrameStatsJerome Jiang2023-05-041-1/+1
| | | | | | | | I realized the calculation of the size of the list of VpxTplBlockStats is non-trivial. So it's better to add the field for the size. Bug: b/273736974 Change-Id: Ic1b50597c1f89a8f866b5669ca676407be6dc9d8
* Add Vpx* prefix to Tpl{Block,Frame}StatsJerome Jiang2023-05-042-6/+6
| | | | | | | | This is to avoid symbols redifinition when integrating with other libraries. Bug: b/273736974 Change-Id: I891af78b1907504d5bb9f735164aea18c2aba944
* Add codec control to export TPL statsJerome Jiang2023-05-032-1/+15
| | | | | | | new codec control: VP9E_GET_TPL_STATS with unit test Bug: b/273736974 Change-Id: I27343bd3f6dffafc86925234537bcdb557bc4079
* Move TplFrameStats to public headerJerome Jiang2023-05-011-0/+19
| | | | | | | | | | | | | Get ready for changes to follow: - Custom reader/writer IO functions - Codec control to get TPL stats from the encoder Move the definition of TplFrameStats to public header so applications can use them directly. Bug: b/273736974 Change-Id: Ieb0db4560ddd966df1bc01f6a7e179cc97f9bac1
* Fix comment typos (likely copy-and-paste errors)Wan-Teh Chang2023-03-233-5/+7
| | | | | | | | | | Fix comment typos for vpx_codec_destroy() and vpx_codec_enc_init_ver(). Based on the change made in libaom: https://aomedia.googlesource.com/aom/+/365a968684 365a968684 Fix comment typos (likely copy-and-paste errors) Change-Id: I39edae835ed0752b569e8e7328d0709c59724ac2
* Revert "Add codec control to get tpl stats"Jerome Jiang2023-03-221-9/+0
| | | | | | | | | | | | | | | | | | | This reverts commit 9c15fb62b3dfe1c698dc28f9efedb022b0ef8eb8. Reason for revert: vpxenc should only use public interface Original change's description: > Add codec control to get tpl stats > > Add command line flag to vpxenc to export tpl stats > > Bug: b/273736974 > Change-Id: I6980096531b0c12fbf7a307fdef4c562d0c29e32 Bug: b/273736974 Change-Id: Ifa8951bb34e5936bbfc33086b22e9fc36d379bc9
* Add codec control to get tpl statsJerome Jiang2023-03-201-0/+9
| | | | | | | Add command line flag to vpxenc to export tpl stats Bug: b/273736974 Change-Id: I6980096531b0c12fbf7a307fdef4c562d0c29e32
* Remove onyx_int.h from vp8 rc headerJerome Jiang2023-02-091-0/+3
| | | | | | | | Also move the FRAME_TYPE declaration to common.h Bug: webm:1766 Change-Id: Ic3016bd16548a5d2e0ae828a7fd7ad8adda8b8f6
* Add codec control to set per frame QPJerome Jiang2023-01-191-0/+12
| | | | | | | | | Use case is for 1 pass encoding. Forces max_quantizer = min_quantizer and aq-mode = 0. Applicalble to spatial layers, where user may set the QP per spatial layer. Change-Id: Idfcb7daefde94c475ed1bc0eb8af47c9f309110b
* L2E: Add a new interface to control rdmultCheng Chen2022-12-071-2/+32
| | | | | | | | | | | | | | Allow external model to control frame rdmult. A function is called per frame to get the value of rdmult from the external model. The external rdmult will overwrite libvpx's default rdmult unless a reserved value is selected. A unit test is added to test when the default rdmult value is set. Change-Id: I2f17a036c188de66dc00709beef4bf2ed86a919a
* L2E: Add gop size and ARF existence to frame infoCheng Chen2022-08-261-0/+8
| | | | | | | Pass the encode frame info to external ml model, with the information of gop size and whether alt ref is used. Change-Id: I55be2d3de83d7182c1a1a174e44ead7e19045c9d
* vpx_encoder.h: note VPX_ERROR_RESILIENT_PARTITIONS is VP8-onlyJames Zern2022-08-251-1/+2
| | | | Change-Id: If71b2ec766f9f41253ce5a34987ffd208f9c8381
* vpx_encoder.h: make flag constants unsignedJames Zern2022-08-161-6/+6
| | | | | | | | | | | this matches the type for vpx_codec_frame_flags_t and vpx_codec_er_flags_t and quiets int sanitizer warnings of the form: implicit conversion from type 'int' of value -9 (32-bit, signed) to type 'unsigned int' changed the value to 4294967287 (32-bit, unsigned) Bug: b/229626362 Change-Id: Icfc5993250f37cedb300c7032cab28ce4bec1f86
* L2E: Update the description of allow_alt_refCheng Chen2022-07-141-1/+3
| | | | | | It is fixed per each encoding and can not be changed per GOP. Change-Id: I5905b712437142f2274bfa674ceef6093495457f
* L2E: Distinguish fixed and active gf_intervalCheng Chen2022-06-271-1/+15
| | | | | | | | | | min/max_gf_interval is fixed and can be passed from the command line. It must satisfy the level constraints. active_min/max_gf_interval might be changing based on min/max_gf_interval. It is determined per GOP. Change-Id: If456c691c97a8b4c946859c05cedd39ca7defa9c
* Restore backward compatibilityJerome Jiang2022-06-131-1/+1
| | | | | | | | | | | This CL breaks the backward compatibility: 1365e7e1a vp9-svc: Remove VP9E_SET_TEMPORAL_LAYERING_MODE Forcing the value of the next element Bug: webm:1752 Change-Id: I83c774b3aa6cca25f2f14995590fb20c0a1668d4
* L2E: Use libvpx's default q in case of invalid external valueCheng Chen2022-06-071-0/+9
| | | | | | | | | | | If the external model recommends an invalid q value, we use the default q selected by libvpx's rate control strategy. We update the test so that when the external model wants to control GOP decision, it could get per frame information and just recommend an invalid q. Change-Id: I69be4b0ee0800e7ab0706d305242bb87f001b1f7
* L2E: rename 'gop_index' to 'gop_global_index'Cheng Chen2022-06-061-2/+2
| | | | | | | | | | | 'gop_index' has already been used in vpx_rc_encodeframe_info_t, which represents the frame index inside the current group of picture (gop). We therefore use 'gop_global_index' to represent the index of the current gop to avoid duplicate names. Change-Id: I3eb8987dd878f650649b013e0036e23d0846b5f0
* L2E: Use bit mask to represent control typeCheng Chen2022-06-061-1/+7
| | | | | | | The bit mask allows us to easily add an additional control mode which both the QP and GOP are controlled by an external model. Change-Id: I49f676f622a6e70feb2a39dc97a4e5050b7f4760
* L2E: Return error when GOP model is not setCheng Chen2022-06-011-14/+50
| | | | | | | - Return error instead of OK when GOP model is not set. - Update descriptions for a few variables. Change-Id: I213f6b7085c487507c3935e7ce615e807f4474cc
* L2E: Add vp9 GOP decision helper functionCheng Chen2022-05-271-1/+44
| | | | | | | | | | | | | | | | | | | | | | | Add a helper function to call the external rate control model. The helper function is placed in the function where vp9 determines GOP decisions. The helper function passes frame information, including current frame show index, coding index, etc to the external rate control model, and then receives GOP decisions. The received GOP decisions overwrites the default GOP decision, only when the external rate control model is set to be active via the codec control. The decision should satisfy a few constraints, for example, larger than min_gf_interval; smaller than max_gf_interval. Otherwise, return error. Unit tests are added to test the new functionality. Change-Id: Id129b4e1a91c844ee5c356a7801c862b1130a3d8
* L2E: Add control type for the external rate control APICheng Chen2022-05-271-1/+13
| | | | | | | Two control types are defined: QP and GOP control. Now the API only supports the QP model. Change-Id: Ib3a712964b9d2282c93993ee56e0558e4795fb46
* vp8[cd]x.h: document vpx_codec_vp[89]_[cd]x*James Zern2022-05-062-0/+32
| | | | | | | | + mark the _algo variables as deprecated. this quiets some doxygen warnings Bug: webm:1752 Change-Id: I53b9b796c3d8fef5c713ee4278641198f95b5864
* vp9-svc: Remove VP9E_SET_TEMPORAL_LAYERING_MODEMarco Paniconi2022-03-021-15/+0
| | | | | | | | The control was never implemented, no need to keep this. temporal_layering_mode is set in the config. Bug: webm:1753 Change-Id: I9a6eb50e82344605ab62775911783af82ac2d401
* vpx/vp8[cd]x.h,cosmetics: normalize ctrls to enum orderJames Zern2022-01-282-86/+47
| | | | Change-Id: I49bbd956b3a64008d1abe54de87d7831bc3eede6
* Merge changes I2db20130,I4e643c83 into mainJames Zern2022-01-271-4/+6
|\ | | | | | | | | | | * changes: vp8dx.h,cosmetics: normalize #define/type order vp8dx.h: add missing define for VP9_SET_BYTE_ALIGNMENT
| * vp8dx.h,cosmetics: normalize #define/type orderJames Zern2022-01-261-4/+4
| | | | | | | | Change-Id: I2db20130cc366bead5e576b375479917f9aee024
| * vp8dx.h: add missing define for VP9_SET_BYTE_ALIGNMENTJames Zern2022-01-261-0/+2
| | | | | | | | Change-Id: I4e643c837bb010bd58f4fc8179045f8df18f8ae1
* | fix some include guardsJames Zern2022-01-261-3/+3
|/ | | | Change-Id: I0233d352c134bdda3ca160d41b4671d1c45ab01c
* Revert "Set unused reference frames to first ref"Jerome Jiang2022-01-111-10/+7
| | | | | | This reverts commit e7f33a53cf404bbb3688af9b13375b5c090daae4. Change-Id: I54e807220885cb78af6f3c6e48b3eb2c9f1e70b4
* Set unused reference frames to first refJianhui Dai2021-12-111-7/+10
| | | | | | | | | | | | | If a reference frame is not referenced, then set the index for that reference to the first one used/referenced instead of unused slot. Unused slot means key frame, as key frame resets all slots with itself. This CL extracts `get_first_ref_frame()` from `reset_fb_idx_unused()` with a typo fixing, and sets all unused reference frames to first ref in vp9 uncompressed header. Bug: webrtc:13442 Change-Id: I99523bc2ceedf27efe376d1113851ff342982181
* clear -Wextra-semi/-Wextra-semi-stmt warningsJames Zern2021-12-021-1/+1
| | | | | Bug: chromium:1257449 Change-Id: Ia9aafccc09b611521d4a7aedfe3723393a840c62
* vpx_codec_internal.h: add LIBVPX_FORMAT_PRINTFJames Zern2021-11-021-2/+14
| | | | | | | | | | and use it to set the format attribute for the printf like function vpx_internal_error(). this allows the main library to be built with -Wformat-nonliteral without producing warnings; the examples will be handled in a followup. Bug: webm:1744 Change-Id: Iebc322e24db35d902c5a2b1ed767d2e10e9c91b9
* vpx_roi_map: add delta range infoJames Zern2021-10-011-2/+2
| | | | Change-Id: If2ef4400562075b4e7abadc01638a46c0c7f1859
* Add vp8 support to rc libJerome Jiang2021-09-103-1/+64
| | | | | | | | | | | For 1 layer CBR only. Support for temporal layers comes later. Rename the library to libvpxrc Bug: b/188853141 Change-Id: Ib7f977b64c05b1a0596870cb7f8e6768cb483850
* Add codec control for vp8 external rcJerome Jiang2021-09-021-0/+14
| | | | | | disable cyclic refresh Change-Id: I7905602919d5780831fad840577e97730ce0afc2
* Add control to get QP for all spatial layersJerome Jiang2021-07-221-0/+13
| | | | Change-Id: I77a9884351e71649c8f8632293d9515c60f6adbc
* Add codec control for rtc external ratectrl libJerome Jiang2021-07-131-0/+17
| | | | | | | | | | | | This will do 3 things: Turn off low motion computation Turn off gf update constrain on key frame frequency turn off content mode for cyclic refresh Those are used to verify the external ratectrl lib works as expected. Change-Id: Ic6e61498de82d6b3973e58df246cf5e05f838680
* Check for addition overflows in vpx_img_set_rect()Wan-Teh Chang2021-07-091-4/+4
| | | | | | | | | Check for x + w and y + h overflows in vpx_img_set_rect(). Move the declaration of the local variable 'data' to the block it is used in. Change-Id: I6bda875e1853c03135ec6ce29015bcc78bb8b7ba
* Document vpx_img_set_rect() more preciselyWan-Teh Chang2021-07-091-2/+3
| | | | | | | Document the side effects and return value of vpx_img_set_rect() more precisely. Change-Id: Id1120bc478ff090a70b4ddd23c4798026bbefe10
* Add codec control to get loopfilter levelJerome Jiang2021-07-021-0/+9
| | | | Change-Id: I70d417da900082160e7ba53315af98eceede257c
* Update some comments for rc_target_bitrateJames Zern2021-06-111-1/+1
| | | | | | | this mirrors the change from libaom: 5b150b150 Update some comments for rc_target_bitrate Change-Id: Iaabee5924e0320609a29dc8ab71327923fb4c5d2
* Fixed redundant wording for decoder algorithm interfaceChunbo Hua2021-05-261-1/+1
| | | | Change-Id: Id56e03dc9cf6d4e70c4681896f29893a9b4c76f2
* img_alloc_helper: make align var unsignedJames Zern2021-05-071-1/+1
| | | | | | | | | quiets an integer sanitizer warning: vpx/src/vpx_image.c:101:25: runtime error: implicit conversion from type 'int' of value -2 (32-bit, signed) to type 'unsigned int' changed the value to 4294967294 (32-bit, unsigned) Change-Id: Ifeac31cc80811081c1ba10aadaa94dc36cd46efa
* Bump ABI versionCheng Chen2021-04-281-1/+1
| | | | | | | Due to recent changes to command line options for rate control parameters. Change-Id: I1de7cb4ff2850a3ed19ec216dd9d07f64a118e92