Mercurial > mplayer.hg
changeset 11669:bcf9862f61b2
set top_field first for lavc decoding and add MP_IMGFIELD_INTERLACED
author | michael |
---|---|
date | Mon, 22 Dec 2003 17:26:19 +0000 |
parents | 18326298f607 |
children | ffca211f32f9 |
files | libmpcodecs/mp_image.h libmpcodecs/vd_ffmpeg.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/mp_image.h Mon Dec 22 15:23:16 2003 +0000 +++ b/libmpcodecs/mp_image.h Mon Dec 22 17:26:19 2003 +0000 @@ -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;
--- a/libmpcodecs/vd_ffmpeg.c Mon Dec 22 15:23:16 2003 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Mon Dec 22 17:26:19 2003 +0000 @@ -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; }