Bug: webm:1716
Unified · Split
| @@ -94,9 +94,13 @@ static void gen_rc_firstpass_stats(const FIRSTPASS_STATS *stats, · 93 unmodified lines | |||
| 94 | rc_frame_stats->count = stats->count; | 94 | rc_frame_stats->count = stats->count; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | void vp9_extrc_send_firstpass_stats(EXT_RATECTRL *ext_ratectrl, | 97 | vpx_codec_err_t vp9_extrc_send_firstpass_stats( |
| 98 | const FIRST_PASS_INFO *first_pass_info) { | 98 | EXT_RATECTRL *ext_ratectrl, const FIRST_PASS_INFO *first_pass_info) { |
| 99 | if (ext_ratectrl == NULL) { | ||
| 100 | return VPX_CODEC_ERROR; | ||
| 101 | } | ||
| 99 | if (ext_ratectrl->ready) { | 102 | if (ext_ratectrl->ready) { |
| 103 | vpx_rc_status_t rc_status; | ||
| 100 | vpx_rc_firstpass_stats_t *rc_firstpass_stats = | 104 | vpx_rc_firstpass_stats_t *rc_firstpass_stats = |
| 101 | &ext_ratectrl->rc_firstpass_stats; | 105 | &ext_ratectrl->rc_firstpass_stats; |
| 102 | int i; | 106 | int i; |
| @@ -105,9 +109,13 @@ void vp9_extrc_send_firstpass_stats(EXT_RATECTRL *ext_ratectrl, · 2 unmodified lines | |||
| 105 | gen_rc_firstpass_stats(&first_pass_info->stats[i], | 109 | gen_rc_firstpass_stats(&first_pass_info->stats[i], |
| 106 | &rc_firstpass_stats->frame_stats[i]); | 110 | &rc_firstpass_stats->frame_stats[i]); |
| 107 | } | 111 | } |
| 108 | ext_ratectrl->funcs.send_firstpass_stats(ext_ratectrl->model, | 112 | rc_status = ext_ratectrl->funcs.send_firstpass_stats(ext_ratectrl->model, |
| 109 | rc_firstpass_stats); | 113 | rc_firstpass_stats); |
| 114 | if (rc_status == VPX_RC_ERROR) { | ||
| 115 | return VPX_CODEC_ERROR; | ||
| 116 | } | ||
| 110 | } | 117 | } |
| 118 | return VPX_CODEC_OK; | ||
| 111 | } | 119 | } |
| 112 | 120 | ||
| 113 | static int extrc_get_frame_type(FRAME_UPDATE_TYPE update_type) { | 121 | static int extrc_get_frame_type(FRAME_UPDATE_TYPE update_type) { |
| @@ -30,8 +30,8 @@ vpx_codec_err_t vp9_extrc_create(vpx_rc_funcs_t funcs, · 29 unmodified lines | |||
| 30 | 30 | ||
| 31 | vpx_codec_err_t vp9_extrc_delete(EXT_RATECTRL *ext_ratectrl); | 31 | vpx_codec_err_t vp9_extrc_delete(EXT_RATECTRL *ext_ratectrl); |
| 32 | 32 | ||
| 33 | void vp9_extrc_send_firstpass_stats(EXT_RATECTRL *ext_ratectrl, | 33 | vpx_codec_err_t vp9_extrc_send_firstpass_stats( |
| 34 | const FIRST_PASS_INFO *first_pass_info); | 34 | EXT_RATECTRL *ext_ratectrl, const FIRST_PASS_INFO *first_pass_info); |
| 35 | 35 | ||
| 36 | void vp9_extrc_get_encodeframe_decision( | 36 | void vp9_extrc_get_encodeframe_decision( |
| 37 | EXT_RATECTRL *ext_ratectrl, int show_index, int coding_index, int gop_index, | 37 | EXT_RATECTRL *ext_ratectrl, int show_index, int coding_index, int gop_index, |