[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c, 1.113, 1.114 mp_image.h, 1.28, 1.29

Michael Niedermayer CVS michael at mplayerhq.hu
Mon Dec 22 18:26:21 CET 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/tmp/cvs-serv13781

Modified Files:
	vd_ffmpeg.c mp_image.h 
Log Message:
set top_field first for lavc decoding and add MP_IMGFIELD_INTERLACED


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- vd_ffmpeg.c	30 Nov 2003 14:45:42 -0000	1.113
+++ vd_ffmpeg.c	22 Dec 2003 17:26:19 -0000	1.114
@@ -253,6 +253,8 @@
     if(   sh->format == mmioFOURCC('R', 'V', '1', '0')
        || sh->format == mmioFOURCC('R', 'V', '1', '3')
        || sh->format == mmioFOURCC('R', 'V', '2', '0')
+       || sh->format == mmioFOURCC('R', 'V', '3', '0')
+       || sh->format == mmioFOURCC('R', 'V', '4', '0')
        ){
         avctx->extradata_size= 8;
         avctx->extradata = malloc(avctx->extradata_size);
@@ -680,7 +682,9 @@
 //    if(sh->ds->demuxer->type == DEMUXER_TYPE_REAL){
     if(   sh->format == mmioFOURCC('R', 'V', '1', '0')
        || sh->format == mmioFOURCC('R', 'V', '1', '3')
-       || sh->format == mmioFOURCC('R', 'V', '2', '0'))
+       || sh->format == mmioFOURCC('R', 'V', '2', '0')
+       || sh->format == mmioFOURCC('R', 'V', '3', '0')
+       || sh->format == mmioFOURCC('R', 'V', '4', '0'))
     if(sh->bih->biSize==sizeof(*sh->bih)+8){
         int i;
         dp_hdr_t *hdr= (dp_hdr_t*)data;
@@ -700,7 +704,6 @@
     ret = avcodec_decode_video(avctx, pic,
 	     &got_picture, data, len);
     dr1= ctx->do_dr1;
-
     if(ret<0) mp_msg(MSGT_DECVIDEO,MSGL_WARN, "Error while decoding frame!\n");
 //printf("repeat: %d\n", pic->repeat_pict);
 //-- vstats generation
@@ -819,6 +822,11 @@
 #if LIBAVCODEC_BUILD >= 4664
     mpi->qscale_type= pic->qscale_type;
 #endif
+#if LIBAVCODEC_BUILD >= 4697
+    mpi->fields = MP_IMGFIELD_ORDERED;
+    if(pic->interlaced_frame) mpi->fields |= MP_IMGFIELD_INTERLACED;
+    if(pic->top_field_first ) mpi->fields |= MP_IMGFIELD_TOP_FIRST;    
+#endif
     
     return mpi;
 }

Index: mp_image.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/mp_image.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- mp_image.h	4 Nov 2003 19:58:37 -0000	1.28
+++ mp_image.h	22 Dec 2003 17:26:19 -0000	1.29
@@ -69,6 +69,7 @@
 #define MP_IMGFIELD_REPEAT_FIRST 0x04
 #define MP_IMGFIELD_TOP 0x08
 #define MP_IMGFIELD_BOTTOM 0x10
+#define MP_IMGFIELD_INTERLACED 0x20
 
 typedef struct mp_image_s {
     unsigned short flags;




More information about the MPlayer-cvslog mailing list