comparison libmpcodecs/dec_video.c @ 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 213b5c14bba7
children 1b1761cbba3b
comparison
equal deleted inserted replaced
22085:d776650e0821 22086:8bf15e2ca61e
36 36
37 extern double video_time_usage; 37 extern double video_time_usage;
38 extern double vout_time_usage; 38 extern double vout_time_usage;
39 39
40 #include "cpudetect.h" 40 #include "cpudetect.h"
41
42 int field_dominance=-1;
41 43
42 int divx_quality=0; 44 int divx_quality=0;
43 45
44 vd_functions_t* mpvdec=NULL; 46 vd_functions_t* mpvdec=NULL;
45 47
380 tt = t*0.000001f; 382 tt = t*0.000001f;
381 video_time_usage+=tt; 383 video_time_usage+=tt;
382 384
383 if(!mpi || drop_frame) return NULL; // error / skipped frame 385 if(!mpi || drop_frame) return NULL; // error / skipped frame
384 386
387 if (field_dominance == 0)
388 mpi->fields |= MP_IMGFIELD_TOP_FIRST;
389 else if (field_dominance == 1)
390 mpi->fields &= ~MP_IMGFIELD_TOP_FIRST;
391
385 if (correct_pts) { 392 if (correct_pts) {
386 sh_video->num_buffered_pts--; 393 sh_video->num_buffered_pts--;
387 sh_video->pts = sh_video->buffered_pts[sh_video->num_buffered_pts]; 394 sh_video->pts = sh_video->buffered_pts[sh_video->num_buffered_pts];
388 } 395 }
389 return mpi; 396 return mpi;