mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-12-18 03:04:06 +00:00
Add --vps-period parameter.
This commit is contained in:
parent
8aea1a0fa9
commit
b6776a8cee
|
@ -25,6 +25,11 @@ http://github.com/ultravideo/kvazaar/wiki/List-of-suggested-topics for a list of
|
||||||
0: only first picture is intra
|
0: only first picture is intra
|
||||||
1: all pictures are intra
|
1: all pictures are intra
|
||||||
2-N: every Nth picture is intra
|
2-N: every Nth picture is intra
|
||||||
|
--vps-period <integer> : Specify how often the video parameter set is
|
||||||
|
re-sent. [0]
|
||||||
|
0: only send VPS with the first frame
|
||||||
|
1: send VPS with every intra frame
|
||||||
|
N: send VPS with every Nth intra frame
|
||||||
-r, --ref <integer> : Reference frames, range 1..15 [3]
|
-r, --ref <integer> : Reference frames, range 1..15 [3]
|
||||||
--no-deblock : Disable deblocking filter
|
--no-deblock : Disable deblocking filter
|
||||||
--deblock <beta:tc> : Deblocking filter parameters
|
--deblock <beta:tc> : Deblocking filter parameters
|
||||||
|
|
|
@ -60,6 +60,7 @@ int config_init(config *cfg)
|
||||||
cfg->height = 0;
|
cfg->height = 0;
|
||||||
cfg->qp = 32;
|
cfg->qp = 32;
|
||||||
cfg->intra_period = 0;
|
cfg->intra_period = 0;
|
||||||
|
cfg->vps_period = 0;
|
||||||
cfg->deblock_enable = 1;
|
cfg->deblock_enable = 1;
|
||||||
cfg->deblock_beta = 0;
|
cfg->deblock_beta = 0;
|
||||||
cfg->deblock_tc = 0;
|
cfg->deblock_tc = 0;
|
||||||
|
@ -340,6 +341,8 @@ static int config_parse(config *cfg, const char *name, const char *value)
|
||||||
cfg->qp = atoi(value);
|
cfg->qp = atoi(value);
|
||||||
else if OPT("period")
|
else if OPT("period")
|
||||||
cfg->intra_period = atoi(value);
|
cfg->intra_period = atoi(value);
|
||||||
|
else if OPT("vps-period")
|
||||||
|
cfg->vps_period = atoi(value);
|
||||||
else if OPT("ref") {
|
else if OPT("ref") {
|
||||||
cfg->ref_frames = atoi(value);
|
cfg->ref_frames = atoi(value);
|
||||||
if (cfg->ref_frames < 1 || cfg->ref_frames >= MAX_REF_PIC_COUNT) {
|
if (cfg->ref_frames < 1 || cfg->ref_frames >= MAX_REF_PIC_COUNT) {
|
||||||
|
@ -522,6 +525,7 @@ int config_read(config *cfg,int argc, char *argv[])
|
||||||
{ "qp", required_argument, NULL, 'q' },
|
{ "qp", required_argument, NULL, 'q' },
|
||||||
{ "period", required_argument, NULL, 'p' },
|
{ "period", required_argument, NULL, 'p' },
|
||||||
{ "ref", required_argument, NULL, 'r' },
|
{ "ref", required_argument, NULL, 'r' },
|
||||||
|
{ "vps-period", required_argument, NULL, 0 },
|
||||||
{ "input-res", required_argument, NULL, 0 },
|
{ "input-res", required_argument, NULL, 0 },
|
||||||
{ "no-deblock", no_argument, NULL, 0 },
|
{ "no-deblock", no_argument, NULL, 0 },
|
||||||
{ "deblock", required_argument, NULL, 0 },
|
{ "deblock", required_argument, NULL, 0 },
|
||||||
|
|
|
@ -38,6 +38,7 @@ typedef struct
|
||||||
char *debug; /*!< \brief Pointer to debug output */
|
char *debug; /*!< \brief Pointer to debug output */
|
||||||
int32_t qp; /*!< \brief Quantization parameter */
|
int32_t qp; /*!< \brief Quantization parameter */
|
||||||
int32_t intra_period; /*!< \brief the period of intra frames in stream */
|
int32_t intra_period; /*!< \brief the period of intra frames in stream */
|
||||||
|
int32_t vps_period; /*!< \brief how often the vps is re-sent */
|
||||||
int32_t frames; /*!< \brief Number of frames to decode */
|
int32_t frames; /*!< \brief Number of frames to decode */
|
||||||
int32_t width; /*!< \brief frame width */
|
int32_t width; /*!< \brief frame width */
|
||||||
int32_t height; /*!< \brief frame height */
|
int32_t height; /*!< \brief frame height */
|
||||||
|
|
|
@ -103,6 +103,11 @@ int main(int argc, char *argv[])
|
||||||
" 0: only first picture is intra\n"
|
" 0: only first picture is intra\n"
|
||||||
" 1: all pictures are intra\n"
|
" 1: all pictures are intra\n"
|
||||||
" 2-N: every Nth picture is intra\n"
|
" 2-N: every Nth picture is intra\n"
|
||||||
|
" --vps-period <integer> : Specify how often the video parameter set is\n"
|
||||||
|
" re-sent. [0]\n"
|
||||||
|
" 0: only send VPS with the first frame\n"
|
||||||
|
" 1: send VPS with every intra frame\n"
|
||||||
|
" N: send VPS with every Nth intra frame\n"
|
||||||
" -r, --ref <integer> : Reference frames, range 1..15 [3]\n"
|
" -r, --ref <integer> : Reference frames, range 1..15 [3]\n"
|
||||||
" --no-deblock : Disable deblocking filter\n"
|
" --no-deblock : Disable deblocking filter\n"
|
||||||
" --deblock <beta:tc> : Deblocking filter parameters\n"
|
" --deblock <beta:tc> : Deblocking filter parameters\n"
|
||||||
|
@ -298,8 +303,7 @@ int main(int argc, char *argv[])
|
||||||
// AUD
|
// AUD
|
||||||
encoder.aud_enable = (int8_t)encoder.cfg->aud_enable;
|
encoder.aud_enable = (int8_t)encoder.cfg->aud_enable;
|
||||||
|
|
||||||
// TODO: Add config option for vps_period.
|
encoder.vps_period = encoder.cfg->vps_period * encoder.cfg->intra_period;
|
||||||
encoder.vps_period = (encoder.cfg->rdo == 0 ? encoder.cfg->intra_period : 0);
|
|
||||||
|
|
||||||
encoder.in.file = input;
|
encoder.in.file = input;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue