mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
fix[mpp_enc]: Add encoder speed mode setup
The encoder speed mode is in range of 0 ~ 3. 0 - normal mode with all mode decision path enabled. 1 - fast mode 2 - faster mode 3 - fastest mode Signed-off-by: toby.zhang <toby.zhang@rock-chips.com> Change-Id: I0c607adbc1e4cea4025fa8a3816dc3a1ec1f13a1 Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
This commit is contained in:
@@ -652,6 +652,23 @@ RK_S32 mpi_enc_opt_bias_p(void *ctx, const char *next)
|
||||
return 0;
|
||||
}
|
||||
|
||||
RK_S32 mpi_enc_opt_speed(void *ctx, const char *next)
|
||||
{
|
||||
MpiEncTestArgs *cmd = (MpiEncTestArgs *)ctx;
|
||||
|
||||
if (next) {
|
||||
cmd->speed = atoi(next);
|
||||
if (cmd->speed > 3 || cmd->speed < 0) {
|
||||
cmd->speed = 0;
|
||||
mpp_err("invalid speed %d set to default 0\n", cmd->speed);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
mpp_err("invalid speed mode\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
RK_S32 mpi_enc_opt_kmpp(void *ctx, const char *next)
|
||||
{
|
||||
MpiEncTestArgs *cmd = (MpiEncTestArgs *)ctx;
|
||||
@@ -706,6 +723,7 @@ static MppOptInfo enc_opts[] = {
|
||||
{"bc", "bitrate container", "rc_container, 0:off 1:weak 2:strong", mpi_enc_opt_bc},
|
||||
{"ibias", "bias i", "bias_i", mpi_enc_opt_bias_i},
|
||||
{"pbias", "bias p", "bias_p", mpi_enc_opt_bias_p},
|
||||
{"speed", "enc speed", "speed", mpi_enc_opt_speed},
|
||||
{"kmpp", "kmpp path enable", "kmpp path enable", mpi_enc_opt_kmpp}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user