Mercurial > mplayer.hg
changeset 4453:71d05615a378
Providing new tune info
author | nick |
---|---|
date | Fri, 01 Feb 2002 08:50:45 +0000 |
parents | bef7b760bc80 |
children | c58106c9e2af |
files | dec_video.c dec_video.h mencoder.c mplayer.c |
diffstat | 4 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/dec_video.c Fri Feb 01 05:59:50 2002 +0000 +++ b/dec_video.c Fri Feb 01 08:50:45 2002 +0000 @@ -413,8 +413,10 @@ sh_video->inited=0; } -int init_video(sh_video_t *sh_video){ +int init_video(sh_video_t *sh_video,int *pitches) +{ unsigned int out_fmt=sh_video->codec->outfmt[sh_video->outfmtidx]; +pitches[0] = pitches[1] =pitches[2] = 0; /* fake unknown */ sh_video->our_out_buffer=NULL; @@ -581,6 +583,9 @@ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoLAVCsupport); return 0; #else + /* Just because we know that */ + pitches[0] = 16; + pitches[1] = pitches[2] = 8; mp_msg(MSGT_DECVIDEO,MSGL_V,"FFmpeg's libavcodec video codec\n"); if(!avcodec_inited){ avcodec_init(); @@ -620,6 +625,9 @@ #else if(divx_quality) mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_MpegPPhint); #endif + /* Just because we know that */ + pitches[0] = 16; + pitches[1] = pitches[2] = 8; // send seq header to the decoder: mpeg2_decode_data(NULL,videobuffer,videobuffer+videobuf_len,0); mpeg2_allocate_image_buffers (picture);
--- a/dec_video.h Fri Feb 01 05:59:50 2002 +0000 +++ b/dec_video.h Fri Feb 01 08:50:45 2002 +0000 @@ -2,7 +2,7 @@ // dec_video.c: extern int video_read_properties(sh_video_t *sh_video); -extern int init_video(sh_video_t *sh_video); +extern int init_video(sh_video_t *sh_video, int *pitches); void uninit_video(sh_video_t *sh_video); #ifdef USE_LIBVO2
--- a/mencoder.c Fri Feb 01 05:59:50 2002 +0000 +++ b/mencoder.c Fri Feb 01 08:50:45 2002 +0000 @@ -323,7 +323,7 @@ sh_audio_t *sh_audio=NULL; sh_video_t *sh_video=NULL; int file_format=DEMUXER_TYPE_UNKNOWN; -int i; +int i,pitches[3]; unsigned int out_fmt; aviwrite_t* muxer=NULL; @@ -569,7 +569,7 @@ if (IMGFMT_IS_RGB(out_fmt)) vo_image_ptr = vo_image = malloc(vo_w*vo_h*IMGFMT_RGB_DEPTH(out_fmt)/8); -if(!init_video(sh_video)){ +if(!init_video(sh_video,pitches)){ mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec); exit(1); }
--- a/mplayer.c Fri Feb 01 05:59:50 2002 +0000 +++ b/mplayer.c Fri Feb 01 08:50:45 2002 +0000 @@ -477,10 +477,12 @@ int gui_no_filename=0; +vo_tune_info_t vtune; + mp_msg_init(MSGL_STATUS); mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s",banner_text); - + memset(&vtune,0,sizeof(vo_tune_info_t)); /* Test for cpu capabilities (and corresponding OS support) for optimizing */ #ifdef ARCH_X86 GetCpuCaps(&gCpuCaps); @@ -1239,7 +1241,7 @@ mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug1: out_fmt=%s\n",vo_format_name(out_fmt)); -if(!init_video(sh_video)){ +if(!init_video(sh_video,&vtune.pitch[0])){ mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec); goto goto_next_file; // exit_player(MSGTR_Exit_error); } @@ -1349,7 +1351,7 @@ if(video_out->config(sh_video->disp_w,sh_video->disp_h, screen_size_x,screen_size_y, fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), - title,out_fmt,NULL)){ + title,out_fmt,&vtune)){ #endif mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO); goto goto_next_file; // exit_player(MSGTR_Exit_error);