mirror of https://git.ffmpeg.org/ffmpeg.git
Set default qmax for VC-3/DNxHD to 1024 (maximum allowed by VC-3 spec).
Also increase the global limit on qmax. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bf5c0308f2
commit
950930b461
|
@ -32,6 +32,7 @@
|
||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
#include "mpegvideo_common.h"
|
#include "mpegvideo_common.h"
|
||||||
#include "dnxhdenc.h"
|
#include "dnxhdenc.h"
|
||||||
|
#include "internal.h"
|
||||||
|
|
||||||
#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 DNX10BIT_QMAT_SHIFT 18 // The largest value that will not lead to overflow for 10bit samples.
|
#define DNX10BIT_QMAT_SHIFT 18 // The largest value that will not lead to overflow for 10bit samples.
|
||||||
|
@ -990,6 +991,11 @@ static int dnxhd_encode_end(AVCodecContext *avctx)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const AVCodecDefault dnxhd_defaults[] = {
|
||||||
|
{ "qmax", "1024" }, /* Maximum quantization scale factor allowed for VC-3 */
|
||||||
|
{ NULL },
|
||||||
|
};
|
||||||
|
|
||||||
AVCodec ff_dnxhd_encoder = {
|
AVCodec ff_dnxhd_encoder = {
|
||||||
.name = "dnxhd",
|
.name = "dnxhd",
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
|
@ -1002,4 +1008,5 @@ AVCodec ff_dnxhd_encoder = {
|
||||||
.pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_YUV422P10, PIX_FMT_NONE},
|
.pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_YUV422P10, PIX_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
|
.long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
|
||||||
.priv_class = &class,
|
.priv_class = &class,
|
||||||
|
.defaults = dnxhd_defaults,
|
||||||
};
|
};
|
||||||
|
|
|
@ -133,7 +133,7 @@ static const AVOption options[]={
|
||||||
{"qcomp", "video quantizer scale compression (VBR)", OFFSET(qcompress), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -FLT_MAX, FLT_MAX, V|E},
|
{"qcomp", "video quantizer scale compression (VBR)", OFFSET(qcompress), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -FLT_MAX, FLT_MAX, V|E},
|
||||||
{"qblur", "video quantizer scale blur (VBR)", OFFSET(qblur), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -1, FLT_MAX, V|E},
|
{"qblur", "video quantizer scale blur (VBR)", OFFSET(qblur), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -1, FLT_MAX, V|E},
|
||||||
{"qmin", "min video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.dbl = 2 }, -1, 69, V|E},
|
{"qmin", "min video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.dbl = 2 }, -1, 69, V|E},
|
||||||
{"qmax", "max video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.dbl = 31 }, -1, 69, V|E},
|
{"qmax", "max video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.dbl = 31 }, -1, 1024, V|E},
|
||||||
{"qdiff", "max difference between the quantizer scale (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.dbl = 3 }, INT_MIN, INT_MAX, V|E},
|
{"qdiff", "max difference between the quantizer scale (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.dbl = 3 }, INT_MIN, INT_MAX, V|E},
|
||||||
{"bf", "use 'frames' B frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, -1, FF_MAX_B_FRAMES, V|E},
|
{"bf", "use 'frames' B frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, -1, FF_MAX_B_FRAMES, V|E},
|
||||||
{"b_qfactor", "qp factor between p and b frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
|
{"b_qfactor", "qp factor between p and b frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
|
||||||
|
|
Loading…
Reference in New Issue