Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
37d7cb60
Commit
37d7cb60
authored
Feb 05, 2014
by
Adrian Grange
Browse files
Remove unnecessary local variables.
Change-Id: I1cdcd847f258967534ef30ba15894b486f1519a8
parent
6adaec4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/vp9_cx_iface.c
View file @
37d7cb60
...
...
@@ -888,10 +888,9 @@ static const vpx_codec_cx_pkt_t *vp9e_get_cxdata(vpx_codec_alg_priv_t *ctx,
static
vpx_codec_err_t
vp9e_set_reference
(
vpx_codec_alg_priv_t
*
ctx
,
int
ctr_id
,
va_list
args
)
{
vpx_ref_frame_t
*
data
=
va_arg
(
args
,
vpx_ref_frame_t
*
);
vpx_ref_frame_t
*
frame
=
va_arg
(
args
,
vpx_ref_frame_t
*
);
if
(
data
)
{
vpx_ref_frame_t
*
frame
=
(
vpx_ref_frame_t
*
)
data
;
if
(
frame
!=
NULL
)
{
YV12_BUFFER_CONFIG
sd
;
image2yuvconfig
(
&
frame
->
img
,
&
sd
);
...
...
@@ -906,10 +905,9 @@ static vpx_codec_err_t vp9e_set_reference(vpx_codec_alg_priv_t *ctx,
static
vpx_codec_err_t
vp9e_copy_reference
(
vpx_codec_alg_priv_t
*
ctx
,
int
ctr_id
,
va_list
args
)
{
vpx_ref_frame_t
*
data
=
va_arg
(
args
,
vpx_ref_frame_t
*
);
vpx_ref_frame_t
*
frame
=
va_arg
(
args
,
vpx_ref_frame_t
*
);
if
(
data
)
{
vpx_ref_frame_t
*
frame
=
(
vpx_ref_frame_t
*
)
data
;
if
(
frame
!=
NULL
)
{
YV12_BUFFER_CONFIG
sd
;
image2yuvconfig
(
&
frame
->
img
,
&
sd
);
...
...
@@ -924,13 +922,13 @@ static vpx_codec_err_t vp9e_copy_reference(vpx_codec_alg_priv_t *ctx,
static
vpx_codec_err_t
get_reference
(
vpx_codec_alg_priv_t
*
ctx
,
int
ctr_id
,
va_list
args
)
{
vp9_ref_frame_t
*
data
=
va_arg
(
args
,
vp9_ref_frame_t
*
);
vp9_ref_frame_t
*
frame
=
va_arg
(
args
,
vp9_ref_frame_t
*
);
if
(
data
)
{
if
(
frame
!=
NULL
)
{
YV12_BUFFER_CONFIG
*
fb
;
vp9_get_reference_enc
(
ctx
->
cpi
,
data
->
idx
,
&
fb
);
yuvconfig2image
(
&
data
->
img
,
fb
,
NULL
);
vp9_get_reference_enc
(
ctx
->
cpi
,
frame
->
idx
,
&
fb
);
yuvconfig2image
(
&
frame
->
img
,
fb
,
NULL
);
return
VPX_CODEC_OK
;
}
else
{
return
VPX_CODEC_INVALID_PARAM
;
...
...
@@ -941,11 +939,11 @@ static vpx_codec_err_t vp9e_set_previewpp(vpx_codec_alg_priv_t *ctx,
int
ctr_id
,
va_list
args
)
{
#if CONFIG_VP9_POSTPROC
vp8_postproc_cfg_t
*
data
=
va_arg
(
args
,
vp8_postproc_cfg_t
*
);
vp8_postproc_cfg_t
*
config
=
va_arg
(
args
,
vp8_postproc_cfg_t
*
);
(
void
)
ctr_id
;
if
(
data
)
{
ctx
->
preview_ppcfg
=
*
((
vp8_postproc_cfg_t
*
)
data
)
;
if
(
config
!=
NULL
)
{
ctx
->
preview_ppcfg
=
*
config
;
return
VPX_CODEC_OK
;
}
else
{
return
VPX_CODEC_INVALID_PARAM
;
...
...
@@ -1019,14 +1017,13 @@ static vpx_codec_err_t vp9e_set_activemap(vpx_codec_alg_priv_t *ctx,
static
vpx_codec_err_t
vp9e_set_scalemode
(
vpx_codec_alg_priv_t
*
ctx
,
int
ctr_id
,
va_list
args
)
{
vpx_scaling_mode_t
*
data
=
va_arg
(
args
,
vpx_scaling_mode_t
*
);
vpx_scaling_mode_t
*
scalemode
=
va_arg
(
args
,
vpx_scaling_mode_t
*
);
if
(
data
)
{
if
(
scalemode
!=
NULL
)
{
int
res
;
vpx_scaling_mode_t
scalemode
=
*
(
vpx_scaling_mode_t
*
)
data
;
res
=
vp9_set_internal_size
(
ctx
->
cpi
,
(
VPX_SCALING
)
scalemode
.
h_scaling_mode
,
(
VPX_SCALING
)
scalemode
.
v_scaling_mode
);
(
VPX_SCALING
)
scalemode
->
h_scaling_mode
,
(
VPX_SCALING
)
scalemode
->
v_scaling_mode
);
if
(
!
res
)
{
return
VPX_CODEC_OK
;
...
...
@@ -1073,29 +1070,23 @@ static vpx_codec_err_t vp9e_set_svc_layer_id(vpx_codec_alg_priv_t *ctx,
static
vpx_codec_err_t
vp9e_set_svc_parameters
(
vpx_codec_alg_priv_t
*
ctx
,
int
ctr_id
,
va_list
args
)
{
vpx_svc_parameters_t
*
data
=
va_arg
(
args
,
vpx_svc_parameters_t
*
);
VP9_COMP
*
cpi
=
(
VP9_COMP
*
)
ctx
->
cpi
;
vpx_svc_parameters_t
params
;
vpx_svc_parameters_t
*
params
=
va_arg
(
args
,
vpx_svc_parameters_t
*
)
;
if
(
data
==
NULL
)
{
return
VPX_CODEC_INVALID_PARAM
;
}
if
(
params
==
NULL
)
return
VPX_CODEC_INVALID_PARAM
;
params
=
*
(
vpx_svc_parameters_t
*
)
data
;
cpi
->
svc
.
spatial_layer_id
=
params
->
spatial_layer
;
cpi
->
svc
.
temporal_layer_id
=
params
->
temporal_layer
;
cpi
->
svc
.
spatial_layer_id
=
params
.
spatial_layer
;
cpi
->
svc
.
temporal_layer_id
=
params
.
temporal_layer
;
cpi
->
lst_fb_idx
=
params
->
lst_fb_idx
;
cpi
->
gld_fb_idx
=
params
->
gld_fb_idx
;
cpi
->
alt_fb_idx
=
params
->
alt_fb_idx
;
cpi
->
lst_fb_idx
=
params
.
lst_fb_idx
;
cpi
->
gld_fb_idx
=
params
.
gld_fb_idx
;
cpi
->
alt_fb_idx
=
params
.
alt_fb_idx
;
if
(
vp9_set_size_literal
(
ctx
->
cpi
,
params
.
width
,
params
.
height
)
!=
0
)
{
if
(
vp9_set_size_literal
(
ctx
->
cpi
,
params
->
width
,
params
->
height
)
!=
0
)
return
VPX_CODEC_INVALID_PARAM
;
}
ctx
->
cfg
.
rc_max_quantizer
=
params
.
max_quantizer
;
ctx
->
cfg
.
rc_min_quantizer
=
params
.
min_quantizer
;
ctx
->
cfg
.
rc_max_quantizer
=
params
->
max_quantizer
;
ctx
->
cfg
.
rc_min_quantizer
=
params
->
min_quantizer
;
set_vp9e_config
(
&
ctx
->
oxcf
,
ctx
->
cfg
,
ctx
->
vp8_cfg
);
vp9_change_config
(
ctx
->
cpi
,
&
ctx
->
oxcf
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment