Remove unused parameters from ext rc callback
Bug: b/356424505 Change-Id: I1c684e7f4cc9bb7b916354d391abd1ae168af39f
This commit is contained in:
@@ -5725,11 +5725,8 @@ static void encode_frame_to_data_rate(
|
||||
|
||||
if (cpi->ext_ratectrl.ready &&
|
||||
cpi->ext_ratectrl.funcs.update_encodeframe_result != NULL) {
|
||||
const RefCntBuffer *coded_frame_buf =
|
||||
get_ref_cnt_buffer(cm, cm->new_fb_idx);
|
||||
vpx_codec_err_t codec_status = vp9_extrc_update_encodeframe_result(
|
||||
&cpi->ext_ratectrl, (*size) << 3, cpi->Source, &coded_frame_buf->buf,
|
||||
cm->bit_depth, cpi->oxcf.input_bit_depth, cm->base_qindex);
|
||||
&cpi->ext_ratectrl, (*size) << 3, cm->base_qindex);
|
||||
if (codec_status != VPX_CODEC_OK) {
|
||||
vpx_internal_error(&cm->error, codec_status,
|
||||
"vp9_extrc_update_encodeframe_result() failed");
|
||||
|
||||
@@ -183,30 +183,15 @@ vpx_codec_err_t vp9_extrc_get_encodeframe_decision(
|
||||
|
||||
vpx_codec_err_t vp9_extrc_update_encodeframe_result(
|
||||
EXT_RATECTRL *ext_ratectrl, int64_t bit_count,
|
||||
const YV12_BUFFER_CONFIG *source_frame,
|
||||
const YV12_BUFFER_CONFIG *coded_frame, uint32_t bit_depth,
|
||||
uint32_t input_bit_depth, const int actual_encoding_qindex) {
|
||||
const int actual_encoding_qindex) {
|
||||
if (ext_ratectrl == NULL) {
|
||||
return VPX_CODEC_INVALID_PARAM;
|
||||
}
|
||||
if (ext_ratectrl->ready) {
|
||||
PSNR_STATS psnr;
|
||||
vpx_rc_status_t rc_status;
|
||||
vpx_rc_encodeframe_result_t encode_frame_result;
|
||||
encode_frame_result.bit_count = bit_count;
|
||||
encode_frame_result.pixel_count =
|
||||
source_frame->y_crop_width * source_frame->y_crop_height +
|
||||
2 * source_frame->uv_crop_width * source_frame->uv_crop_height;
|
||||
encode_frame_result.actual_encoding_qindex = actual_encoding_qindex;
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
vpx_calc_highbd_psnr(source_frame, coded_frame, &psnr, bit_depth,
|
||||
input_bit_depth);
|
||||
#else
|
||||
(void)bit_depth;
|
||||
(void)input_bit_depth;
|
||||
vpx_calc_psnr(source_frame, coded_frame, &psnr);
|
||||
#endif
|
||||
encode_frame_result.sse = psnr.sse[0];
|
||||
rc_status = ext_ratectrl->funcs.update_encodeframe_result(
|
||||
ext_ratectrl->model, &encode_frame_result);
|
||||
if (rc_status == VPX_RC_ERROR) {
|
||||
|
||||
@@ -43,11 +43,9 @@ vpx_codec_err_t vp9_extrc_get_encodeframe_decision(
|
||||
EXT_RATECTRL *ext_ratectrl, int gop_index,
|
||||
vpx_rc_encodeframe_decision_t *encode_frame_decision);
|
||||
|
||||
vpx_codec_err_t vp9_extrc_update_encodeframe_result(
|
||||
EXT_RATECTRL *ext_ratectrl, int64_t bit_count,
|
||||
const YV12_BUFFER_CONFIG *source_frame,
|
||||
const YV12_BUFFER_CONFIG *coded_frame, uint32_t bit_depth,
|
||||
uint32_t input_bit_depth, const int actual_encoding_qindex);
|
||||
vpx_codec_err_t vp9_extrc_update_encodeframe_result(EXT_RATECTRL *ext_ratectrl,
|
||||
int64_t bit_count,
|
||||
int actual_encoding_qindex);
|
||||
|
||||
vpx_codec_err_t vp9_extrc_get_key_frame_decision(
|
||||
EXT_RATECTRL *ext_ratectrl,
|
||||
|
||||
@@ -186,9 +186,7 @@ typedef struct vpx_rc_encodeframe_info {
|
||||
* vpx_rc_funcs_t::update_encodeframe_result().
|
||||
*/
|
||||
typedef struct vpx_rc_encodeframe_result {
|
||||
int64_t sse; /**< sum of squared error of the reconstructed frame */
|
||||
int64_t bit_count; /**< number of bits spent on coding the frame*/
|
||||
int64_t pixel_count; /**< number of pixels in YUV planes of the frame*/
|
||||
int64_t bit_count; /**< number of bits spent on coding the frame*/
|
||||
int actual_encoding_qindex; /**< the actual qindex used to encode the frame*/
|
||||
} vpx_rc_encodeframe_result_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user