Mercurial > mplayer.hg
changeset 22086:8bf15e2ca61e
Add global field dominance flag instead of duplicating this "everywhere"
Patch by Carl Eugen Hoyos (cehoyos (at) ag or at)
author | reimar |
---|---|
date | Fri, 02 Feb 2007 18:32:07 +0000 |
parents | d776650e0821 |
children | ecd08be90726 |
files | DOCS/man/en/mplayer.1 cfg-common.h libmpcodecs/dec_video.c |
diffstat | 3 files changed, 33 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1 Thu Feb 01 22:00:30 2007 +0000 +++ b/DOCS/man/en/mplayer.1 Fri Feb 02 18:32:07 2007 +0000 @@ -3983,6 +3983,20 @@ Disable automatic movie aspect ratio compensation. . .TP +.B "\-field-dominance <-1\-1> +Set first field for interlaced content. Useful for deinterlacers that double the framerate: \-vf tfields=1, \-vf yadif=1 and \-vo xvmc:bobdeint. +.PD 0 +.RSs +.IPs -1 +auto (default) If the decoder doesn't export the appropriate information, it falls back to 0 (top field first). +.IPs 0 +top field first +.IPs 1 +bottom field first +.RE +.PD 1 +. +.TP .B "\-flip \ " Flip image upside-down. . @@ -6280,7 +6294,7 @@ 2: Translate fields by 1/4 pixel with linear interpolation (no jump). .br 4: Translate fields by 1/4 pixel with 4tap filter (higher quality) (default). -.IPs <field_dominance> +.IPs <field_dominance>\ (DEPRECATED) -1: auto (default) Only works if the decoder exports the appropriate information and no other filters which discard that information come before tfields @@ -6289,6 +6303,9 @@ 0: top field first .br 1: bottom field first +.br +.I NOTE: +This option will possibly be removed in a future version. Use \-field-dominance instead. .RE .PD 1 . @@ -6305,8 +6322,11 @@ 2: Like 0 but skips spatial interlacing check. .br 3: Like 1 but skips spatial interlacing check. -.IPs <field_dominance> +.IPs <field_dominance>\ (DEPRECATED) Operates like tfields. +.br +.I NOTE: +This option will possibly be removed in a future version. Use \-field-dominance instead. .RE .PD 1 .
--- a/cfg-common.h Thu Feb 01 22:00:30 2007 +0000 +++ b/cfg-common.h Fri Feb 02 18:32:07 2007 +0000 @@ -241,6 +241,7 @@ // draw by slices or whole frame (useful with libmpeg2/libavcodec) {"slices", &vd_use_slices, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL}, + {"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL}, #ifdef USE_LIBAVCODEC {"lavdopts", lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, @@ -350,6 +351,9 @@ /* defined in codec-cfg.c */ extern char * codecs_file; +/* defined in dec_video.c */ +extern int field_dominance; + /* from dec_audio, currently used for ac3surround decoder only */ extern int audio_output_channels;
--- a/libmpcodecs/dec_video.c Thu Feb 01 22:00:30 2007 +0000 +++ b/libmpcodecs/dec_video.c Fri Feb 02 18:32:07 2007 +0000 @@ -39,6 +39,8 @@ #include "cpudetect.h" +int field_dominance=-1; + int divx_quality=0; vd_functions_t* mpvdec=NULL; @@ -382,6 +384,11 @@ if(!mpi || drop_frame) return NULL; // error / skipped frame + if (field_dominance == 0) + mpi->fields |= MP_IMGFIELD_TOP_FIRST; + else if (field_dominance == 1) + mpi->fields &= ~MP_IMGFIELD_TOP_FIRST; + if (correct_pts) { sh_video->num_buffered_pts--; sh_video->pts = sh_video->buffered_pts[sh_video->num_buffered_pts];