libvpxenc: extend auto-alt-ref range
vp9 now supports [0, 6] Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: James Zern <jzern@google.com>
This commit is contained in:
		
							parent
							
								
									6d3890ee34
								
							
						
					
					
						commit
						55e021f39b
					
				@ -1641,6 +1641,7 @@ means unlimited.
 | 
				
			|||||||
@table @option
 | 
					@table @option
 | 
				
			||||||
@item auto-alt-ref
 | 
					@item auto-alt-ref
 | 
				
			||||||
Enable use of alternate reference frames (2-pass only).
 | 
					Enable use of alternate reference frames (2-pass only).
 | 
				
			||||||
 | 
					Values greater than 1 enable multi-layer alternate reference frames (VP9 only).
 | 
				
			||||||
@item arnr-max-frames
 | 
					@item arnr-max-frames
 | 
				
			||||||
Set altref noise reduction max frame count.
 | 
					Set altref noise reduction max frame count.
 | 
				
			||||||
@item arnr-type
 | 
					@item arnr-type
 | 
				
			||||||
 | 
				
			|||||||
@ -1075,8 +1075,6 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
 | 
				
			|||||||
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 | 
					#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define COMMON_OPTIONS \
 | 
					#define COMMON_OPTIONS \
 | 
				
			||||||
    { "auto-alt-ref",    "Enable use of alternate reference " \
 | 
					 | 
				
			||||||
                         "frames (2-pass only)",                   OFFSET(auto_alt_ref),    AV_OPT_TYPE_INT, {.i64 = -1},      -1,      2,       VE}, \
 | 
					 | 
				
			||||||
    { "lag-in-frames",   "Number of frames to look ahead for " \
 | 
					    { "lag-in-frames",   "Number of frames to look ahead for " \
 | 
				
			||||||
                         "alternate reference frame selection",    OFFSET(lag_in_frames),   AV_OPT_TYPE_INT, {.i64 = -1},      -1,      INT_MAX, VE}, \
 | 
					                         "alternate reference frame selection",    OFFSET(lag_in_frames),   AV_OPT_TYPE_INT, {.i64 = -1},      -1,      INT_MAX, VE}, \
 | 
				
			||||||
    { "arnr-maxframes",  "altref noise reduction max frame count", OFFSET(arnr_max_frames), AV_OPT_TYPE_INT, {.i64 = -1},      -1,      INT_MAX, VE}, \
 | 
					    { "arnr-maxframes",  "altref noise reduction max frame count", OFFSET(arnr_max_frames), AV_OPT_TYPE_INT, {.i64 = -1},      -1,      INT_MAX, VE}, \
 | 
				
			||||||
@ -1120,6 +1118,8 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
 | 
				
			|||||||
#if CONFIG_LIBVPX_VP8_ENCODER
 | 
					#if CONFIG_LIBVPX_VP8_ENCODER
 | 
				
			||||||
static const AVOption vp8_options[] = {
 | 
					static const AVOption vp8_options[] = {
 | 
				
			||||||
    COMMON_OPTIONS
 | 
					    COMMON_OPTIONS
 | 
				
			||||||
 | 
					    { "auto-alt-ref",    "Enable use of alternate reference "
 | 
				
			||||||
 | 
					                         "frames (2-pass only)",                        OFFSET(auto_alt_ref),    AV_OPT_TYPE_INT, {.i64 = -1}, -1,  2, VE},
 | 
				
			||||||
    { "cpu-used",        "Quality/Speed ratio modifier",                OFFSET(cpu_used),        AV_OPT_TYPE_INT, {.i64 = 1}, -16, 16, VE},
 | 
					    { "cpu-used",        "Quality/Speed ratio modifier",                OFFSET(cpu_used),        AV_OPT_TYPE_INT, {.i64 = 1}, -16, 16, VE},
 | 
				
			||||||
    LEGACY_OPTIONS
 | 
					    LEGACY_OPTIONS
 | 
				
			||||||
    { NULL }
 | 
					    { NULL }
 | 
				
			||||||
@ -1129,6 +1129,8 @@ static const AVOption vp8_options[] = {
 | 
				
			|||||||
#if CONFIG_LIBVPX_VP9_ENCODER
 | 
					#if CONFIG_LIBVPX_VP9_ENCODER
 | 
				
			||||||
static const AVOption vp9_options[] = {
 | 
					static const AVOption vp9_options[] = {
 | 
				
			||||||
    COMMON_OPTIONS
 | 
					    COMMON_OPTIONS
 | 
				
			||||||
 | 
					    { "auto-alt-ref",    "Enable use of alternate reference "
 | 
				
			||||||
 | 
					                         "frames (2-pass only)",                        OFFSET(auto_alt_ref),    AV_OPT_TYPE_INT, {.i64 = -1}, -1, 6, VE},
 | 
				
			||||||
    { "cpu-used",        "Quality/Speed ratio modifier",                OFFSET(cpu_used),        AV_OPT_TYPE_INT, {.i64 = 1},  -8, 8, VE},
 | 
					    { "cpu-used",        "Quality/Speed ratio modifier",                OFFSET(cpu_used),        AV_OPT_TYPE_INT, {.i64 = 1},  -8, 8, VE},
 | 
				
			||||||
    { "lossless",        "Lossless mode",                               OFFSET(lossless),        AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, VE},
 | 
					    { "lossless",        "Lossless mode",                               OFFSET(lossless),        AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, VE},
 | 
				
			||||||
    { "tile-columns",    "Number of tile columns to use, log2",         OFFSET(tile_columns),    AV_OPT_TYPE_INT, {.i64 = -1}, -1, 6, VE},
 | 
					    { "tile-columns",    "Number of tile columns to use, log2",         OFFSET(tile_columns),    AV_OPT_TYPE_INT, {.i64 = -1}, -1, 6, VE},
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user