mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-30 12:44:07 +00:00
Added deblock beta/tc checking and allowed range to usage, closes issue #13
This commit is contained in:
parent
4184818322
commit
4704a6adf4
|
@ -14,14 +14,15 @@ meant to be user configurable later.
|
|||
Usage:
|
||||
hevc_encoder -i <input> -w <width> -h <height> -o <output>
|
||||
Optional parameters:
|
||||
-n, --frames <integer> : number of frames to decode
|
||||
-q, --qp <integer> : Quantization Parameter, default 32
|
||||
-p, --period <integer> : Period of intra pictures, default 0
|
||||
-n, --frames <integer> : number of frames to code [all]
|
||||
-q, --qp <integer> : Quantization Parameter [32]
|
||||
-p, --period <integer> : Period of intra pictures [0]
|
||||
0: only first picture is intra
|
||||
1: all pictures are intra
|
||||
2-N: every Nth picture is intra
|
||||
--no-deblock : Disable deblocking filter
|
||||
--deblock <beta:tc> : Deblocking filter parameters
|
||||
beta and tc range is -6..6 [0:0]
|
||||
--no-sao : Disable sample adaptive offset
|
||||
|
||||
Example:
|
||||
|
|
|
@ -159,6 +159,15 @@ static int config_parse(config *cfg, const char *name, const char *value)
|
|||
cfg->deblock_tc = cfg->deblock_beta;
|
||||
} else
|
||||
cfg->deblock_enable = atobool(value);
|
||||
|
||||
if (cfg->deblock_beta < -6 || cfg->deblock_beta > 6) {
|
||||
fprintf(stderr, "--deblock beta parameter out of range [-6..6], set to 0\n");
|
||||
cfg->deblock_beta = 0;
|
||||
}
|
||||
if (cfg->deblock_tc < -6 || cfg->deblock_tc > 6) {
|
||||
fprintf(stderr, "--deblock tc parameter out of range [-6..6], set to 0\n");
|
||||
cfg->deblock_tc = 0;
|
||||
}
|
||||
}
|
||||
OPT("sao")
|
||||
cfg->sao_enable = atobool(value);
|
||||
|
|
|
@ -90,14 +90,15 @@ int main(int argc, char *argv[])
|
|||
"Usage:\n"
|
||||
"hevc_encoder -i <input> -w <width> -h <height> -o <output>\n"
|
||||
"Optional parameters:\n"
|
||||
" -n, --frames <integer> : number of frames to decode\n"
|
||||
" -q, --qp <integer> : Quantization Parameter, default 32\n"
|
||||
" -p, --period <integer> : Period of intra pictures, default 0\n"
|
||||
" -n, --frames <integer> : number of frames to code [all]\n"
|
||||
" -q, --qp <integer> : Quantization Parameter [32]\n"
|
||||
" -p, --period <integer> : Period of intra pictures [0]\n"
|
||||
" 0: only first picture is intra\n"
|
||||
" 1: all pictures are intra\n"
|
||||
" 2-N: every Nth picture is intra\n"
|
||||
" --no-deblock : Disable deblocking filter\n"
|
||||
" --deblock <beta:tc> : Deblocking filter parameters\n"
|
||||
" beta and tc range is -6..6 [0:0]\n"
|
||||
" --no-sao : Disable sample adaptive offset\n");
|
||||
|
||||
if (cfg)
|
||||
|
|
Loading…
Reference in a new issue