mirror of https://git.ffmpeg.org/ffmpeg.git
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
Originally committed as revision 1622 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
3b4f73dc76
commit
21e59552d6
18
ffmpeg.c
18
ffmpeg.c
|
@ -123,6 +123,11 @@ static int same_quality = 0;
|
||||||
static int b_frames = 0;
|
static int b_frames = 0;
|
||||||
static int use_hq = 0;
|
static int use_hq = 0;
|
||||||
static int use_4mv = 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 do_deinterlace = 0;
|
||||||
static int workaround_bugs = FF_BUG_AUTODETECT;
|
static int workaround_bugs = FF_BUG_AUTODETECT;
|
||||||
static int error_resilience = 2;
|
static int error_resilience = 2;
|
||||||
|
@ -2230,7 +2235,14 @@ static void opt_output_file(const char *filename)
|
||||||
if (use_hq) {
|
if (use_hq) {
|
||||||
video_enc->flags |= CODEC_FLAG_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) {
|
if (use_4mv) {
|
||||||
video_enc->flags |= CODEC_FLAG_HQ;
|
video_enc->flags |= CODEC_FLAG_HQ;
|
||||||
video_enc->flags |= CODEC_FLAG_4MV;
|
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" },
|
{ "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)" },
|
{ "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" },
|
{ "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, },
|
{ 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_TRELLIS_QUANT 0x00200000 /* use trellis quantization */
|
||||||
#define CODEC_FLAG_GLOBAL_HEADER 0x00400000 /* place global headers in extradata instead of every keyframe */
|
#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) */
|
#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 */
|
/* codec capabilities */
|
||||||
|
|
||||||
#define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 /* decoder can use draw_horiz_band callback */
|
#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:
|
case CODEC_ID_H263P:
|
||||||
s->out_format = FMT_H263;
|
s->out_format = FMT_H263;
|
||||||
s->h263_plus = 1;
|
s->h263_plus = 1;
|
||||||
s->unrestricted_mv = 1;
|
/* Fx */
|
||||||
s->h263_aic = 1;
|
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 */
|
/* These are just to be sure */
|
||||||
s->umvplus = 1;
|
s->umvplus = 1;
|
||||||
avctx->delay=0;
|
avctx->delay=0;
|
||||||
|
|
Loading…
Reference in New Issue