Commit cd4d5f53 authored by michael's avatar michael

quantizer noise shaping


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2742 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a2758419
...@@ -125,6 +125,7 @@ static int use_umv = 0; ...@@ -125,6 +125,7 @@ static int use_umv = 0;
static int use_alt_scan = 0; static int use_alt_scan = 0;
static int use_trell = 0; static int use_trell = 0;
static int use_scan_offset = 0; static int use_scan_offset = 0;
static int qns = 0;
static int closed_gop = 0; static int closed_gop = 0;
static int do_deinterlace = 0; static int do_deinterlace = 0;
static int do_interlace_dct = 0; static int do_interlace_dct = 0;
...@@ -659,7 +660,6 @@ static void do_video_out(AVFormatContext *s, ...@@ -659,7 +660,6 @@ static void do_video_out(AVFormatContext *s,
big_picture.quality = ist->st->quality; big_picture.quality = ist->st->quality;
}else }else
big_picture.quality = ost->st->quality; big_picture.quality = ost->st->quality;
ret = avcodec_encode_video(enc, ret = avcodec_encode_video(enc,
video_buffer, VIDEO_BUFFER_SIZE, video_buffer, VIDEO_BUFFER_SIZE,
&big_picture); &big_picture);
...@@ -1987,6 +1987,11 @@ static void opt_noise_reduction(const char *arg) ...@@ -1987,6 +1987,11 @@ static void opt_noise_reduction(const char *arg)
noise_reduction= atoi(arg); noise_reduction= atoi(arg);
} }
static void opt_qns(const char *arg)
{
qns= atoi(arg);
}
static void opt_sc_threshold(const char *arg) static void opt_sc_threshold(const char *arg)
{ {
sc_threshold= atoi(arg); sc_threshold= atoi(arg);
...@@ -2400,6 +2405,7 @@ static void opt_output_file(const char *filename) ...@@ -2400,6 +2405,7 @@ static void opt_output_file(const char *filename)
video_enc->ildct_cmp = ildct_cmp; video_enc->ildct_cmp = ildct_cmp;
video_enc->me_sub_cmp = sub_cmp; video_enc->me_sub_cmp = sub_cmp;
video_enc->me_cmp = cmp; video_enc->me_cmp = cmp;
video_enc->quantizer_noise_shaping= qns;
if (use_umv) { if (use_umv) {
video_enc->flags |= CODEC_FLAG_H263P_UMV; video_enc->flags |= CODEC_FLAG_H263P_UMV;
...@@ -3080,6 +3086,7 @@ const OptionDef options[] = { ...@@ -3080,6 +3086,7 @@ const OptionDef options[] = {
{ "inter_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_inter_matrix}, "specify inter matrix coeffs", "matrix" }, { "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", "" }, { "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", "" }, { "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" }, { "sc_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_sc_threshold}, "scene change threshold", "threshold" },
/* audio options */ /* audio options */
......
...@@ -17,7 +17,7 @@ extern "C" { ...@@ -17,7 +17,7 @@ extern "C" {
#define FFMPEG_VERSION_INT 0x000408 #define FFMPEG_VERSION_INT 0x000408
#define FFMPEG_VERSION "0.4.8" #define FFMPEG_VERSION "0.4.8"
#define LIBAVCODEC_BUILD 4699 #define LIBAVCODEC_BUILD 4700
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION #define LIBAVCODEC_VERSION FFMPEG_VERSION
...@@ -1504,6 +1504,12 @@ typedef struct AVCodecContext { ...@@ -1504,6 +1504,12 @@ typedef struct AVCodecContext {
#define FF_AA_FASTINT 1 //not implemented yet #define FF_AA_FASTINT 1 //not implemented yet
#define FF_AA_INT 2 #define FF_AA_INT 2
#define FF_AA_FLOAT 3 #define FF_AA_FLOAT 3
/**
* Quantizer noise shaping.
* - encoding: set by user
* - decoding: unused
*/
int quantizer_noise_shaping;
} AVCodecContext; } AVCodecContext;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment