Commit 3a466c5e authored by michael's avatar michael

support reusing mb types and field select values of the source file, but use...

support reusing mb types and field select values of the source file, but use motion vectors just as additional predictors
minor cleanup
segfault fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3060 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a1c912eb
...@@ -161,6 +161,7 @@ static int sc_threshold = 0; ...@@ -161,6 +161,7 @@ static int sc_threshold = 0;
static int debug = 0; static int debug = 0;
static int debug_mv = 0; static int debug_mv = 0;
static int me_threshold = 0; static int me_threshold = 0;
static int mb_threshold = 0;
extern int loop_input; /* currently a hack */ extern int loop_input; /* currently a hack */
static int gop_size = 12; static int gop_size = 12;
...@@ -1866,6 +1867,10 @@ static void opt_me_threshold(const char *arg) ...@@ -1866,6 +1867,10 @@ static void opt_me_threshold(const char *arg)
me_threshold = atoi(arg); me_threshold = atoi(arg);
} }
static void opt_mb_threshold(const char *arg)
{
mb_threshold = atoi(arg);
}
static void opt_error_resilience(const char *arg) static void opt_error_resilience(const char *arg)
{ {
...@@ -2873,6 +2878,7 @@ static void opt_output_file(const char *filename) ...@@ -2873,6 +2878,7 @@ static void opt_output_file(const char *filename)
video_enc->dct_algo = dct_algo; video_enc->dct_algo = dct_algo;
video_enc->idct_algo = idct_algo; video_enc->idct_algo = idct_algo;
video_enc->me_threshold= me_threshold; video_enc->me_threshold= me_threshold;
video_enc->mb_threshold= mb_threshold;
video_enc->strict_std_compliance = strict; video_enc->strict_std_compliance = strict;
video_enc->error_rate = error_rate; video_enc->error_rate = error_rate;
video_enc->noise_reduction= noise_reduction; video_enc->noise_reduction= noise_reduction;
...@@ -3494,6 +3500,7 @@ const OptionDef options[] = { ...@@ -3494,6 +3500,7 @@ const OptionDef options[] = {
{ "dct_algo", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_dct_algo}, "set dct algo", "algo" }, { "dct_algo", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_dct_algo}, "set dct algo", "algo" },
{ "idct_algo", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_idct_algo}, "set idct algo", "algo" }, { "idct_algo", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_idct_algo}, "set idct algo", "algo" },
{ "me_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_me_threshold}, "motion estimaton threshold", "" }, { "me_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_me_threshold}, "motion estimaton threshold", "" },
{ "mb_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_threshold}, "macroblock threshold", "" },
{ "er", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_error_resilience}, "set error resilience", "n" }, { "er", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_error_resilience}, "set error resilience", "n" },
{ "ec", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_error_concealment}, "set error concealment", "bit_mask" }, { "ec", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_error_concealment}, "set error concealment", "bit_mask" },
{ "bf", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_b_frames}, "use 'frames' B frames", "frames" }, { "bf", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_b_frames}, "use 'frames' B frames", "frames" },
......
...@@ -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 4709 #define LIBAVCODEC_BUILD 4710
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION #define LIBAVCODEC_VERSION FFMPEG_VERSION
...@@ -1570,12 +1570,20 @@ typedef struct AVCodecContext { ...@@ -1570,12 +1570,20 @@ typedef struct AVCodecContext {
void *thread_opaque; void *thread_opaque;
/** /**
* Motion estimation threshold. * Motion estimation threshold. under which no motion estimation is
* performed, but instead the user specified motion vectors are used
* *
* - encoding: set by user * - encoding: set by user
* - decoding: set by user * - decoding: unused
*/ */
int me_threshold; int me_threshold;
/**
* Macroblock threshold. under which the user specified macroblock types will be used
* - encoding: set by user
* - decoding: unused
*/
int mb_threshold;
} AVCodecContext; } AVCodecContext;
......
This diff is collapsed.
...@@ -229,7 +229,6 @@ typedef struct MotionEstContext{ ...@@ -229,7 +229,6 @@ typedef struct MotionEstContext{
/* cmp, chroma_cmp;*/ /* cmp, chroma_cmp;*/
op_pixels_func (*hpel_put)[4]; op_pixels_func (*hpel_put)[4];
op_pixels_func (*hpel_avg)[4]; op_pixels_func (*hpel_avg)[4];
op_pixels_func (*chroma_hpel_put)[4];
qpel_mc_func (*qpel_put)[16]; qpel_mc_func (*qpel_put)[16];
qpel_mc_func (*qpel_avg)[16]; qpel_mc_func (*qpel_avg)[16];
uint8_t (*mv_penalty)[MAX_MV*2+1]; ///< amount of bits needed to encode a MV uint8_t (*mv_penalty)[MAX_MV*2+1]; ///< amount of bits needed to encode a MV
......
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