ref: 1a7b256f06c13aeedeb08796ab9dcebd5ba9a740
parent: edc9a4687699b372a0c27856020b42434ddc3014
author: Jerome Jiang <[email protected]>
date: Mon Feb 12 06:01:29 EST 2018
vp9_cx_iface: Remove else when returning from the other branch. Change-Id: I2fc15ec25cc5587cafc6621176d0a6d7c376fc7c
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -1341,9 +1341,8 @@
vp9_set_reference_enc(ctx->cpi, ref_frame_to_vp9_reframe(frame->frame_type),
&sd);
return VPX_CODEC_OK;
- } else {
- return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
}
static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx,
@@ -1357,9 +1356,8 @@
vp9_copy_reference_enc(ctx->cpi,
ref_frame_to_vp9_reframe(frame->frame_type), &sd);
return VPX_CODEC_OK;
- } else {
- return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
}
static vpx_codec_err_t ctrl_get_reference(vpx_codec_alg_priv_t *ctx,
@@ -1372,9 +1370,8 @@
yuvconfig2image(&frame->img, fb, NULL);
return VPX_CODEC_OK;
- } else {
- return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
}
static vpx_codec_err_t ctrl_set_previewpp(vpx_codec_alg_priv_t *ctx,
@@ -1384,9 +1381,8 @@
if (config != NULL) {
ctx->preview_ppcfg = *config;
return VPX_CODEC_OK;
- } else {
- return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
#else
(void)ctx;
(void)args;
@@ -1408,9 +1404,8 @@
if (vp9_get_preview_raw_frame(ctx->cpi, &sd, &flags) == 0) {
yuvconfig2image(&ctx->preview_img, &sd, NULL);
return &ctx->preview_img;
- } else {
- return NULL;
}
+ return NULL;
}
static vpx_codec_err_t ctrl_set_roi_map(vpx_codec_alg_priv_t *ctx,
@@ -1424,12 +1419,10 @@
roi->delta_q, roi->delta_lf, roi->skip,
roi->ref_frame)) {
return VPX_CODEC_OK;
- } else {
- return VPX_CODEC_INVALID_PARAM;
}
- } else {
return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
}
static vpx_codec_err_t ctrl_set_active_map(vpx_codec_alg_priv_t *ctx,
@@ -1440,11 +1433,10 @@
if (!vp9_set_active_map(ctx->cpi, map->active_map, (int)map->rows,
(int)map->cols))
return VPX_CODEC_OK;
- else
- return VPX_CODEC_INVALID_PARAM;
- } else {
+
return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
}
static vpx_codec_err_t ctrl_get_active_map(vpx_codec_alg_priv_t *ctx,
@@ -1455,11 +1447,10 @@
if (!vp9_get_active_map(ctx->cpi, map->active_map, (int)map->rows,
(int)map->cols))
return VPX_CODEC_OK;
- else
- return VPX_CODEC_INVALID_PARAM;
- } else {
+
return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
}
static vpx_codec_err_t ctrl_set_scale_mode(vpx_codec_alg_priv_t *ctx,
@@ -1471,9 +1462,8 @@
vp9_set_internal_size(ctx->cpi, (VPX_SCALING)mode->h_scaling_mode,
(VPX_SCALING)mode->v_scaling_mode);
return (res == 0) ? VPX_CODEC_OK : VPX_CODEC_INVALID_PARAM;
- } else {
- return VPX_CODEC_INVALID_PARAM;
}
+ return VPX_CODEC_INVALID_PARAM;
}
static vpx_codec_err_t ctrl_set_svc(vpx_codec_alg_priv_t *ctx, va_list args) {