-
- Downloads
Rockchip: Do not reset rate control if no parameters changed
Current code always resets rate control algorithm whenever rk_vp8_encoder_setconfig() is called. However the function can be also used to request a keyframe. In addition, it might be possible to call this function with the same parameters as already set, which would cause rate control to be reset unnecessarily. To fix the problem, this patch modifies the code to perform the reset only if bit rate or frame rate actually changed. To achieve this the internal API is slightly modified to avoid accessing private parameters (outRateDenom, outRateNum and encStatus of internal vp8Instance_s struct) from external code (e.g. rk_vpu8_encoder_setconfig()) and explicitly convey the dependence of VP8EncSetRateCtrl() on these private parameters, which are now explicitly given to this function. BUG=chrome-os-partner:37204 TEST=video_encode_accelerator_unittest (after 4fc28962e2da8b3f278b952c55fefe10487db952);apprtc Change-Id: Iff4787f6ac55a0324e63b80d272dfd04aadd084c Reviewed-on: https://chromium-review.googlesource.com/253252 Reviewed-by:Wu-cheng Li <wuchengli@chromium.org> Commit-Queue: Tomasz Figa <tfiga@chromium.org> Tested-by:
Tomasz Figa <tfiga@chromium.org>
Showing
- libv4l-rockchip/libvpu/vp8_enc/rk_vp8encapi.c 23 additions, 17 deletionslibv4l-rockchip/libvpu/vp8_enc/rk_vp8encapi.c
- libv4l-rockchip/libvpu/vp8_enc/vp8encapi.c 7 additions, 1 deletionlibv4l-rockchip/libvpu/vp8_enc/vp8encapi.c
- libv4l-rockchip/libvpu/vp8_enc/vp8encapi.h 3 additions, 0 deletionslibv4l-rockchip/libvpu/vp8_enc/vp8encapi.h
Loading
Please register or sign in to comment