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
Xiph.Org
aom-rav1e
Commits
b0027b96
Commit
b0027b96
authored
Nov 20, 2015
by
Marco
Browse files
vp9-svc: Fix to allow setting qp-max/min per spatial and temporal layer.
Change-Id: Ic0ec32c1d7f7c08c9f956592dccbfd9060b1f624
parent
16eba81f
Changes
3
Show whitespace changes
Inline
Side-by-side
test/datarate_test.cc
View file @
b0027b96
...
@@ -770,7 +770,7 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
...
@@ -770,7 +770,7 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
::
libvpx_test
::
Encoder
*
encoder
)
{
::
libvpx_test
::
Encoder
*
encoder
)
{
if
(
video
->
frame
()
==
0
)
{
if
(
video
->
frame
()
==
0
)
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
2
;
++
i
)
{
for
(
i
=
0
;
i
<
VPX_MAX_LAYERS
;
++
i
)
{
svc_params_
.
max_quantizers
[
i
]
=
63
;
svc_params_
.
max_quantizers
[
i
]
=
63
;
svc_params_
.
min_quantizers
[
i
]
=
0
;
svc_params_
.
min_quantizers
[
i
]
=
0
;
}
}
...
...
vp9/vp9_cx_iface.c
View file @
b0027b96
...
@@ -1393,8 +1393,8 @@ static vpx_codec_err_t ctrl_set_svc_parameters(vpx_codec_alg_priv_t *ctx,
...
@@ -1393,8 +1393,8 @@ static vpx_codec_err_t ctrl_set_svc_parameters(vpx_codec_alg_priv_t *ctx,
LAYER_IDS_TO_IDX
(
sl
,
tl
,
cpi
->
svc
.
number_temporal_layers
);
LAYER_IDS_TO_IDX
(
sl
,
tl
,
cpi
->
svc
.
number_temporal_layers
);
LAYER_CONTEXT
*
lc
=
LAYER_CONTEXT
*
lc
=
&
cpi
->
svc
.
layer_context
[
layer
];
&
cpi
->
svc
.
layer_context
[
layer
];
lc
->
max_q
=
params
->
max_quantizers
[
s
l
];
lc
->
max_q
=
params
->
max_quantizers
[
l
ayer
];
lc
->
min_q
=
params
->
min_quantizers
[
s
l
];
lc
->
min_q
=
params
->
min_quantizers
[
l
ayer
];
lc
->
scaling_factor_num
=
params
->
scaling_factor_num
[
sl
];
lc
->
scaling_factor_num
=
params
->
scaling_factor_num
[
sl
];
lc
->
scaling_factor_den
=
params
->
scaling_factor_den
[
sl
];
lc
->
scaling_factor_den
=
params
->
scaling_factor_den
[
sl
];
}
}
...
...
vpx/src/svc_encodeframe.c
View file @
b0027b96
...
@@ -385,7 +385,7 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
...
@@ -385,7 +385,7 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
vpx_codec_iface_t
*
iface
,
vpx_codec_iface_t
*
iface
,
vpx_codec_enc_cfg_t
*
enc_cfg
)
{
vpx_codec_enc_cfg_t
*
enc_cfg
)
{
vpx_codec_err_t
res
;
vpx_codec_err_t
res
;
int
i
;
int
i
,
sl
,
tl
;
SvcInternal_t
*
const
si
=
get_svc_internal
(
svc_ctx
);
SvcInternal_t
*
const
si
=
get_svc_internal
(
svc_ctx
);
if
(
svc_ctx
==
NULL
||
codec_ctx
==
NULL
||
iface
==
NULL
||
if
(
svc_ctx
==
NULL
||
codec_ctx
==
NULL
||
iface
==
NULL
||
enc_cfg
==
NULL
)
{
enc_cfg
==
NULL
)
{
...
@@ -423,11 +423,14 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
...
@@ -423,11 +423,14 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
svc_ctx
->
temporal_layers
=
2
;
svc_ctx
->
temporal_layers
=
2
;
}
}
for
(
i
=
0
;
i
<
VPX_SS_MAX_LAYERS
;
++
i
)
{
for
(
tl
=
0
;
tl
<
svc_ctx
->
temporal_layers
;
++
tl
)
{
for
(
sl
=
0
;
sl
<
svc_ctx
->
spatial_layers
;
++
sl
)
{
i
=
sl
*
svc_ctx
->
temporal_layers
+
tl
;
si
->
svc_params
.
max_quantizers
[
i
]
=
MAX_QUANTIZER
;
si
->
svc_params
.
max_quantizers
[
i
]
=
MAX_QUANTIZER
;
si
->
svc_params
.
min_quantizers
[
i
]
=
0
;
si
->
svc_params
.
min_quantizers
[
i
]
=
0
;
si
->
svc_params
.
scaling_factor_num
[
i
]
=
DEFAULT_SCALE_FACTORS_NUM
[
i
];
si
->
svc_params
.
scaling_factor_num
[
sl
]
=
DEFAULT_SCALE_FACTORS_NUM
[
sl
];
si
->
svc_params
.
scaling_factor_den
[
i
]
=
DEFAULT_SCALE_FACTORS_DEN
[
i
];
si
->
svc_params
.
scaling_factor_den
[
sl
]
=
DEFAULT_SCALE_FACTORS_DEN
[
sl
];
}
}
}
// Parse aggregate command line options. Options must start with
// Parse aggregate command line options. Options must start with
...
...
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