From bb1ae0da62c1795609cfaaaf92e505f3ff8ac588 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Thu, 20 Feb 2014 11:02:51 +0200 Subject: [PATCH] Limited maximum number of reference frames to 15 This now complies with the specification (when using only L0 reference list) --- README.md | 2 +- src/config.c | 4 ++-- src/encmain.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a9e6d4a3..632a7ba2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ meant to be user configurable later. 0: only first picture is intra 1: all pictures are intra 2-N: every Nth picture is intra - -r, --ref : Reference frames, range 1..16 [3] + -r, --ref : Reference frames, range 1..15 [3] --no-deblock : Disable deblocking filter --deblock : Deblocking filter parameters beta and tc range is -6..6 [0:0] diff --git a/src/config.c b/src/config.c index cc9a2d65..eaf7b790 100644 --- a/src/config.c +++ b/src/config.c @@ -186,8 +186,8 @@ static int config_parse(config *cfg, const char *name, const char *value) cfg->intra_period = atoi(value); OPT("ref") { cfg->ref_frames = atoi(value); - if (cfg->ref_frames < 1 || cfg->ref_frames > MAX_REF_PIC_COUNT) { - fprintf(stderr, "--ref out of range [1..16], set to 3\n"); + if (cfg->ref_frames < 1 || cfg->ref_frames >= MAX_REF_PIC_COUNT) { + fprintf(stderr, "--ref out of range [1..15], set to 3\n"); cfg->ref_frames = 3; } } diff --git a/src/encmain.c b/src/encmain.c index 7c6cd854..e9b31d95 100644 --- a/src/encmain.c +++ b/src/encmain.c @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) " 0: only first picture is intra\n" " 1: all pictures are intra\n" " 2-N: every Nth picture is intra\n" - " -r, --ref : Reference frames, range 1..16 [3]\n" + " -r, --ref : Reference frames, range 1..15 [3]\n" " --no-deblock : Disable deblocking filter\n" " --deblock : Deblocking filter parameters\n" " beta and tc range is -6..6 [0:0]\n"