Commit ea4d036d authored by michaelni's avatar michaelni

extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1622 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 49d1c67b
......@@ -123,6 +123,11 @@ static int same_quality = 0;
static int b_frames = 0;
static int use_hq = 0;
static int use_4mv = 0;
/* Fx */
static int use_aic = 0;
static int use_umv = 0;
/* /Fx */
static int use_h263p_extra = 0;
static int do_deinterlace = 0;
static int workaround_bugs = FF_BUG_AUTODETECT;
static int error_resilience = 2;
......@@ -2230,7 +2235,14 @@ static void opt_output_file(const char *filename)
if (use_hq) {
video_enc->flags |= CODEC_FLAG_HQ;
}
/* Fx */
if (use_umv) {
video_enc->flags |= CODEC_FLAG_H263P_UMV;
}
if (use_aic) {
video_enc->flags |= CODEC_FLAG_H263P_AIC;
}
/* /Fx */
if (use_4mv) {
video_enc->flags |= CODEC_FLAG_HQ;
video_enc->flags |= CODEC_FLAG_4MV;
......@@ -2769,6 +2781,10 @@ const OptionDef options[] = {
{ "vstats", OPT_BOOL | OPT_EXPERT, {(void*)&do_vstats}, "dump video coding statistics to file" },
{ "bitexact", OPT_EXPERT, {(void*)opt_bitexact}, "only use bit exact algorithms (for codec testing)" },
{ "vhook", HAS_ARG | OPT_EXPERT, {(void*)add_frame_hooker}, "insert video processing module", "module name and parameters" },
/* Fx */
{ "aic", OPT_BOOL | OPT_EXPERT, {(void*)&use_aic}, "enable Advanced intra coding (h263+)" },
{ "umv", OPT_BOOL | OPT_EXPERT, {(void*)&use_umv}, "enable Unlimited Motion Vector (h263+)" },
/* /Fx */
{ NULL, },
};
......
......@@ -160,7 +160,19 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG,
#define CODEC_FLAG_TRELLIS_QUANT 0x00200000 /* use trellis quantization */
#define CODEC_FLAG_GLOBAL_HEADER 0x00400000 /* place global headers in extradata instead of every keyframe */
#define CODEC_FLAG_BITEXACT 0x00800000 /* use only bitexact stuff (except (i)dct) */
/* Fx : Flag for h263+ extra options */
#define CODEC_FLAG_H263P_AIC 0x01000000 /* Advanced intra coding */
#define CODEC_FLAG_H263P_UMV 0x02000000 /* Unlimited motion vector */
/* For advanced prediction mode, we reuse the 4MV flag */
/* Unsupported options :
* Syntax Arithmetic coding (SAC)
* Deblocking filter internal loop
* Slice structured
* Reference Picture Selection
* Independant Segment Decoding
* Alternative Inter * VLC
* Modified Quantization */
/* /Fx */
/* codec capabilities */
#define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 /* decoder can use draw_horiz_band callback */
......
......@@ -581,9 +581,10 @@ int MPV_encode_init(AVCodecContext *avctx)
case CODEC_ID_H263P:
s->out_format = FMT_H263;
s->h263_plus = 1;
s->unrestricted_mv = 1;
s->h263_aic = 1;
/* Fx */
s->unrestricted_mv=(avctx->flags & CODEC_FLAG_H263P_UMV) ? 1:0;
s->h263_aic= (avctx->flags & CODEC_FLAG_H263P_AIC) ? 1:0;
/* /Fx */
/* These are just to be sure */
s->umvplus = 1;
avctx->delay=0;
......
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