[MPlayer-cvslog] r22104 - in trunk: DOCS/man/en/mplayer.1 cfg-common.h libmpcodecs/dec_video.c
reimar
subversion at mplayerhq.hu
Fri Feb 2 19:32:09 CET 2007
Author: reimar
Date: Fri Feb 2 19:32:07 2007
New Revision: 22104
Modified:
trunk/cfg-common.h
trunk/libmpcodecs/dec_video.c
Changes in other areas also in this revision:
Modified:
trunk/DOCS/man/en/mplayer.1
Log:
Add global field dominance flag instead of duplicating this "everywhere"
Patch by Carl Eugen Hoyos (cehoyos (at) ag or at)
Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h (original)
+++ trunk/cfg-common.h Fri Feb 2 19:32:07 2007
@@ -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;
Modified: trunk/libmpcodecs/dec_video.c
==============================================================================
--- trunk/libmpcodecs/dec_video.c (original)
+++ trunk/libmpcodecs/dec_video.c Fri Feb 2 19:32:07 2007
@@ -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];
More information about the MPlayer-cvslog
mailing list