diff --git a/README.md b/README.md index 5e9ca97b..a9e6d4a3 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..5 [5] + -r, --ref : Reference frames, range 1..16 [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 cd7e72ca..cc9a2d65 100644 --- a/src/config.c +++ b/src/config.c @@ -75,7 +75,7 @@ int config_init(config *cfg) cfg->vui.chroma_loc = 0; /* left center */ cfg->aud_enable = 0; cfg->cqmfile = NULL; - cfg->ref_frames = 5; + cfg->ref_frames = DEFAULT_REF_PIC_COUNT; return 1; } @@ -187,8 +187,8 @@ static int config_parse(config *cfg, const char *name, const char *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..5], set to 5\n"); - cfg->ref_frames = 5; + fprintf(stderr, "--ref out of range [1..16], set to 3\n"); + cfg->ref_frames = 3; } } OPT("deblock") { diff --git a/src/encmain.c b/src/encmain.c index 9bdfad68..7c6cd854 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..5 [5]\n" + " -r, --ref : Reference frames, range 1..16 [3]\n" " --no-deblock : Disable deblocking filter\n" " --deblock : Deblocking filter parameters\n" " beta and tc range is -6..6 [0:0]\n" diff --git a/src/global.h b/src/global.h index 526e19cd..c8246611 100644 --- a/src/global.h +++ b/src/global.h @@ -85,7 +85,8 @@ typedef int16_t coefficient; #define LCU_LUMA_SIZE (LCU_WIDTH * LCU_WIDTH) #define LCU_CHROMA_SIZE (LCU_WIDTH * LCU_WIDTH >> 2) -#define MAX_REF_PIC_COUNT 5 +#define MAX_REF_PIC_COUNT 16 +#define DEFAULT_REF_PIC_COUNT 3 #define AMVP_MAX_NUM_CANDS 2 #define AMVP_MAX_NUM_CANDS_MEM 3