summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-02 03:52:58 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-02 03:52:58 +0000
commit77ea0d4bdd4dcd9507fd611e7a5631ad98bd6408 (patch)
tree7b679847f75af6c8f477f2eb218909a3e9656ae0 /ffmpeg.c
parent95ba2c8f433550de45f6897ee1a92b2315f3f7cd (diff)
quantizer noise shaping
Originally committed as revision 2742 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 77a4be04d1..fb2acde6ef 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -125,6 +125,7 @@ static int use_umv = 0;
static int use_alt_scan = 0;
static int use_trell = 0;
static int use_scan_offset = 0;
+static int qns = 0;
static int closed_gop = 0;
static int do_deinterlace = 0;
static int do_interlace_dct = 0;
@@ -659,7 +660,6 @@ static void do_video_out(AVFormatContext *s,
big_picture.quality = ist->st->quality;
}else
big_picture.quality = ost->st->quality;
-
ret = avcodec_encode_video(enc,
video_buffer, VIDEO_BUFFER_SIZE,
&big_picture);
@@ -1987,6 +1987,11 @@ static void opt_noise_reduction(const char *arg)
noise_reduction= atoi(arg);
}
+static void opt_qns(const char *arg)
+{
+ qns= atoi(arg);
+}
+
static void opt_sc_threshold(const char *arg)
{
sc_threshold= atoi(arg);
@@ -2400,6 +2405,7 @@ static void opt_output_file(const char *filename)
video_enc->ildct_cmp = ildct_cmp;
video_enc->me_sub_cmp = sub_cmp;
video_enc->me_cmp = cmp;
+ video_enc->quantizer_noise_shaping= qns;
if (use_umv) {
video_enc->flags |= CODEC_FLAG_H263P_UMV;
@@ -3080,6 +3086,7 @@ const OptionDef options[] = {
{ "inter_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_inter_matrix}, "specify inter matrix coeffs", "matrix" },
{ "top", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_top_field_first}, "top=1/bottom=0/auto=-1 field first", "" },
{ "nr", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_noise_reduction}, "noise reduction", "" },
+ { "qns", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qns}, "quantization noise shaping", "" },
{ "sc_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_sc_threshold}, "scene change threshold", "threshold" },
/* audio options */