summaryrefslogtreecommitdiff
path: root/vpx
AgeCommit message (Collapse)Author
2023-06-07Fix more typos (2/n)Jerome Jiang
kernal -> kernel e.g -> e.g. paritioning -> partitioning partioning -> partitioning coefficents -> coefficients i.e, -> i.e., equivalend -> equivalent recive -> receive resoultions -> resolutions Bug: webm:1803 Change-Id: I1d6176202ee5daee7a64bf59114e8b304aeb4db7
2023-05-23Add IO for TPL statsJerome Jiang
Overload TempOutFile constructor to allow IO mode. Bug: b/281563704 Change-Id: I1f4f5b29db0e331941b6795e478eeeab51f625ad
2023-05-17Add new vpx_tpl.h API fileJerome Jiang
New file (vpx_tpl.c) in the following CLs will add new APIs dealing with TPL stats from VP9 encoder. Change-Id: I5102ef64214cba1ca6ecea9582a19049666c6ca4
2023-05-08Add VpxTplGopStatsJerome Jiang
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
2023-05-08Unify implementation of CHECK_MEM_ERRORJerome Jiang
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
2023-05-04Overwrite cm->error->detail before freeingWan-Teh Chang
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
2023-05-04Have vpx_codec_error take const vpx_codec_ctx_t *Wan-Teh Chang
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
2023-05-04Add comments about vpx_codec_enc_init_ver failureWan-Teh Chang
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
2023-05-04Add num_blocks to VpxTplFrameStatsJerome Jiang
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
2023-05-04Add Vpx* prefix to Tpl{Block,Frame}StatsJerome Jiang
This is to avoid symbols redifinition when integrating with other libraries. Bug: b/273736974 Change-Id: I891af78b1907504d5bb9f735164aea18c2aba944
2023-05-03Add codec control to export TPL statsJerome Jiang
new codec control: VP9E_GET_TPL_STATS with unit test Bug: b/273736974 Change-Id: I27343bd3f6dffafc86925234537bcdb557bc4079
2023-05-01Move TplFrameStats to public headerJerome Jiang
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
2023-03-23Fix comment typos (likely copy-and-paste errors)Wan-Teh Chang
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
2023-03-22Revert "Add codec control to get tpl stats"Jerome Jiang
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
2023-03-20Add codec control to get tpl statsJerome Jiang
Add command line flag to vpxenc to export tpl stats Bug: b/273736974 Change-Id: I6980096531b0c12fbf7a307fdef4c562d0c29e32
2023-02-09Remove onyx_int.h from vp8 rc headerJerome Jiang
Also move the FRAME_TYPE declaration to common.h Bug: webm:1766 Change-Id: Ic3016bd16548a5d2e0ae828a7fd7ad8adda8b8f6
2023-01-19Add codec control to set per frame QPJerome Jiang
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
2022-12-07L2E: Add a new interface to control rdmultCheng Chen
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
2022-08-26L2E: Add gop size and ARF existence to frame infoCheng Chen
Pass the encode frame info to external ml model, with the information of gop size and whether alt ref is used. Change-Id: I55be2d3de83d7182c1a1a174e44ead7e19045c9d
2022-08-25vpx_encoder.h: note VPX_ERROR_RESILIENT_PARTITIONS is VP8-onlyJames Zern
Change-Id: If71b2ec766f9f41253ce5a34987ffd208f9c8381
2022-08-16vpx_encoder.h: make flag constants unsignedJames Zern
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
2022-07-14L2E: Update the description of allow_alt_refCheng Chen
It is fixed per each encoding and can not be changed per GOP. Change-Id: I5905b712437142f2274bfa674ceef6093495457f
2022-06-27L2E: Distinguish fixed and active gf_intervalCheng Chen
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
2022-06-13Restore backward compatibilityJerome Jiang
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
2022-06-07L2E: Use libvpx's default q in case of invalid external valueCheng Chen
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
2022-06-06L2E: rename 'gop_index' to 'gop_global_index'Cheng Chen
'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
2022-06-06L2E: Use bit mask to represent control typeCheng Chen
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
2022-06-01L2E: Return error when GOP model is not setCheng Chen
- Return error instead of OK when GOP model is not set. - Update descriptions for a few variables. Change-Id: I213f6b7085c487507c3935e7ce615e807f4474cc
2022-05-27L2E: Add vp9 GOP decision helper functionCheng Chen
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
2022-05-27L2E: Add control type for the external rate control APICheng Chen
Two control types are defined: QP and GOP control. Now the API only supports the QP model. Change-Id: Ib3a712964b9d2282c93993ee56e0558e4795fb46
2022-05-06vp8[cd]x.h: document vpx_codec_vp[89]_[cd]x*James Zern
+ mark the _algo variables as deprecated. this quiets some doxygen warnings Bug: webm:1752 Change-Id: I53b9b796c3d8fef5c713ee4278641198f95b5864
2022-03-02vp9-svc: Remove VP9E_SET_TEMPORAL_LAYERING_MODEMarco Paniconi
The control was never implemented, no need to keep this. temporal_layering_mode is set in the config. Bug: webm:1753 Change-Id: I9a6eb50e82344605ab62775911783af82ac2d401
2022-01-28vpx/vp8[cd]x.h,cosmetics: normalize ctrls to enum orderJames Zern
Change-Id: I49bbd956b3a64008d1abe54de87d7831bc3eede6
2022-01-27Merge changes I2db20130,I4e643c83 into mainJames Zern
* changes: vp8dx.h,cosmetics: normalize #define/type order vp8dx.h: add missing define for VP9_SET_BYTE_ALIGNMENT
2022-01-26vp8dx.h,cosmetics: normalize #define/type orderJames Zern
Change-Id: I2db20130cc366bead5e576b375479917f9aee024
2022-01-26vp8dx.h: add missing define for VP9_SET_BYTE_ALIGNMENTJames Zern
Change-Id: I4e643c837bb010bd58f4fc8179045f8df18f8ae1
2022-01-26fix some include guardsJames Zern
Change-Id: I0233d352c134bdda3ca160d41b4671d1c45ab01c
2022-01-11Revert "Set unused reference frames to first ref"Jerome Jiang
This reverts commit e7f33a53cf404bbb3688af9b13375b5c090daae4. Change-Id: I54e807220885cb78af6f3c6e48b3eb2c9f1e70b4
2021-12-11Set unused reference frames to first refJianhui Dai
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
2021-12-02clear -Wextra-semi/-Wextra-semi-stmt warningsJames Zern
Bug: chromium:1257449 Change-Id: Ia9aafccc09b611521d4a7aedfe3723393a840c62
2021-11-02vpx_codec_internal.h: add LIBVPX_FORMAT_PRINTFJames Zern
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
2021-10-01vpx_roi_map: add delta range infoJames Zern
Change-Id: If2ef4400562075b4e7abadc01638a46c0c7f1859
2021-09-10Add vp8 support to rc libJerome Jiang
For 1 layer CBR only. Support for temporal layers comes later. Rename the library to libvpxrc Bug: b/188853141 Change-Id: Ib7f977b64c05b1a0596870cb7f8e6768cb483850
2021-09-02Add codec control for vp8 external rcJerome Jiang
disable cyclic refresh Change-Id: I7905602919d5780831fad840577e97730ce0afc2
2021-07-22Add control to get QP for all spatial layersJerome Jiang
Change-Id: I77a9884351e71649c8f8632293d9515c60f6adbc
2021-07-13Add codec control for rtc external ratectrl libJerome Jiang
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
2021-07-09Check for addition overflows in vpx_img_set_rect()Wan-Teh Chang
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
2021-07-09Document vpx_img_set_rect() more preciselyWan-Teh Chang
Document the side effects and return value of vpx_img_set_rect() more precisely. Change-Id: Id1120bc478ff090a70b4ddd23c4798026bbefe10
2021-07-02Add codec control to get loopfilter levelJerome Jiang
Change-Id: I70d417da900082160e7ba53315af98eceede257c
2021-06-11Update some comments for rc_target_bitrateJames Zern
this mirrors the change from libaom: 5b150b150 Update some comments for rc_target_bitrate Change-Id: Iaabee5924e0320609a29dc8ab71327923fb4c5d2