summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-01 08:50:45 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-01 08:50:45 +0000
commitaec5dcc8347c29d4a27f5741e8b84222b19795b3 (patch)
tree0ff1c1310f2855b98da98d130e512670d0fcad6a
parent61ceb9cf6d8b656193198b7ead0df128858b615a (diff)
downloadmpv-aec5dcc8347c29d4a27f5741e8b84222b19795b3.tar.bz2
mpv-aec5dcc8347c29d4a27f5741e8b84222b19795b3.tar.xz
Providing new tune info
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4454 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--dec_video.c10
-rw-r--r--dec_video.h2
-rw-r--r--mencoder.c4
-rw-r--r--mplayer.c8
4 files changed, 17 insertions, 7 deletions
diff --git a/dec_video.c b/dec_video.c
index a866f5896c..4ce807f43c 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -413,8 +413,10 @@ void uninit_video(sh_video_t *sh_video){
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 @@ switch(sh_video->codec->driver){
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 @@ switch(sh_video->codec->driver){
#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);
diff --git a/dec_video.h b/dec_video.h
index d1c6049903..0aaf5a70f7 100644
--- a/dec_video.h
+++ b/dec_video.h
@@ -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
diff --git a/mencoder.c b/mencoder.c
index 16ae1bf8b7..4741232c0b 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -323,7 +323,7 @@ demux_stream_t *d_dvdsub=NULL;
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_BGR(out_fmt))
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);
}
diff --git a/mplayer.c b/mplayer.c
index 85fdd4b0a4..7a5fabf31a 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -477,10 +477,12 @@ int use_stdin=0; //int f; // filedes
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 @@ if(flip==-1){
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 @@ current_module="init_libvo";
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);