[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[32] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2009-12-07 19:04:44
|
Revision: 32 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=32&view=rev Author: nickols_k Date: 2009-12-07 19:04:38 +0000 (Mon, 07 Dec 2009) Log Message: ----------- minor fixes Modified Paths: -------------- mplayerxp/libmpcodecs/dec_video.c mplayerxp/libmpcodecs/vd.c mplayerxp/libmpdemux/test.c mplayerxp/mp_msg.c mplayerxp/mp_msg.h mplayerxp/postproc/pp_msg.h mplayerxp/postproc/vf.c mplayerxp/postproc/vf_scale.c Modified: mplayerxp/libmpcodecs/dec_video.c =================================================================== --- mplayerxp/libmpcodecs/dec_video.c 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/libmpcodecs/dec_video.c 2009-12-07 19:04:38 UTC (rev 32) @@ -25,8 +25,7 @@ #include "vd.h" #include "dec_video.h" -#define MSGT_CLASS MSGT_DECVIDEO -#include "../__mp_msg.h" +#include "vd_msg.h" // =================================================================== Modified: mplayerxp/libmpcodecs/vd.c =================================================================== --- mplayerxp/libmpcodecs/vd.c 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/libmpcodecs/vd.c 2009-12-07 19:04:38 UTC (rev 32) @@ -16,7 +16,6 @@ #include "stream.h" #include "demuxer.h" #include "stheader.h" - #include "vd.h" #include "../postproc/vf.h" #include "vd_msg.h" @@ -110,16 +109,17 @@ out_fmt=sh->codec->outfmt[i]; if(out_fmt==(signed int)0xFFFFFFFF) continue; flags=vf_query_format(vf,out_fmt,w,h); - MSG_DBG2("vo_debug[step i=%d]: query(%s %ix%i) returned 0x%X for:\n",i,vo_format_name(out_fmt),w,h,vo_flags); + MSG_DBG2("vo_debug[step i=%d]: query(%s %ix%i) returned 0x%X for:\n",i,vo_format_name(out_fmt),w,h,flags); if(verbose>1) if(verbose) vf_showlist(vf); if((flags&VFCAP_CSP_SUPPORTED_BY_HW) || ((flags&VFCAP_CSP_SUPPORTED) && j<0)){ // check (query) if codec really support this outfmt... sh->outfmtidx=j; // pass index to the control() function this way if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE) { - MSG_DBG2("vo_debug: codec query_format(%s) returned FALSE\n",vo_format_name(out_fmt)); + MSG_DBG2("vo_debug: codec[%s] query_format(%s) returned FALSE\n",mpvdec->info->driver_name,vo_format_name(out_fmt)); continue; } - j=i; vo_flags=flags; if(flags&VFCAP_CSP_SUPPORTED_BY_HW) break; + j=i; vo_flags=flags; + if(flags&VFCAP_CSP_SUPPORTED_BY_HW) break; } else if(!palette && !(vo_flags&3) && (out_fmt==IMGFMT_RGB8||out_fmt==IMGFMT_BGR8)){ sh->outfmtidx=j; // pass index to the control() function this way @@ -130,7 +130,13 @@ if(j<0){ // TODO: no match - we should use conversion... if(strcmp(vf->info->name,"fmtcvt") && palette!=1){ - MSG_INFO("Can't find colorspace! Trying -vf fmtcvt\n"); + int ind; + MSG_WARN("Can't find colorspace for: "); + for(ind=0;ind<CODECS_MAX_OUTFMT;ind++) { + if(sh->codec->outfmt[ind]==(signed int)0xFFFFFFFF) break; + MSG_WARN("'%s' ",vo_format_name(sh->codec->outfmt[ind])); + } + MSG_WARN("Trying -vf fmtcvt\n"); sc=vf=vf_open_filter(vf,sh,"fmtcvt",NULL); goto csp_again; } else Modified: mplayerxp/libmpdemux/test.c =================================================================== --- mplayerxp/libmpdemux/test.c 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/libmpdemux/test.c 2009-12-07 19:04:38 UTC (rev 32) @@ -3,7 +3,7 @@ #include <stdlib.h> #include <string.h> -#include "mp_config.h" +#include "../mp_config.h" #include "demux_msg.h" #include "stream.h" Modified: mplayerxp/mp_msg.c =================================================================== --- mplayerxp/mp_msg.c 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/mp_msg.c 2009-12-07 19:04:38 UTC (rev 32) @@ -80,10 +80,12 @@ if(verbose>1 && was_eol) { unsigned mod_name; + const char *smod=NULL; mod_name = 0; while((mod&0x1)==0) { mod_name++; mod>>=1; } if(mod_name < sizeof(msg_prefix)/sizeof(msg_prefix[0])) - fprintf(stderr,"%s.%s(%u): ",msg_prefix[mod_name],srcfile,linenum); + smod = msg_prefix[mod_name]; + fprintf(stderr,"%s.%s(%u): ",smod?smod:"UNKNOWN",srcfile,linenum); } ssize=vsprintf(sbuf,format, va); if(strcmp(nls_get_screen_cp(),"UTF-8")!=0) { Modified: mplayerxp/mp_msg.h =================================================================== --- mplayerxp/mp_msg.h 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/mp_msg.h 2009-12-07 19:04:38 UTC (rev 32) @@ -56,7 +56,7 @@ #ifdef __GNUC__ static inline void mp_msg_dummy(void) {} -#define mp_msg(mod,lev, file, args... ) (lev<verbose+MSGL_V?(mp_msg_c(((lev&0xF)<<28)|(mod&0x0FFFFFFF),file,## args)):(mp_msg_dummy())) +#define mp_msg(mod,lev, file, args... ) ((lev<(verbose+MSGL_V))?(mp_msg_c(((lev&0xF)<<28)|(mod&0x0FFFFFFF),file,## args)):(mp_msg_dummy())) #else #define mp_msg(mod,lev, file, ... ) mp_msg_c(((lev&0xF)<<28)|(mod&0x0FFFFFFF),file,__VA_ARGS__) #endif Modified: mplayerxp/postproc/pp_msg.h =================================================================== --- mplayerxp/postproc/pp_msg.h 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/postproc/pp_msg.h 2009-12-07 19:04:38 UTC (rev 32) @@ -1,5 +1,5 @@ -#ifndef AO_MSG_H -#define AO_MSG_H +#ifndef PP_MSG_H +#define PP_MSG_H #include "../mp_msg.h" #undef MSG_INFO @@ -8,9 +8,9 @@ #undef MSG_ERR #undef MSG_V #undef MSG_OK +#undef MSG_HINT #undef MSG_DBG2 #undef MSG_DBG3 -#undef MSG_HINT #define MSG_INFO(args...) mp_msg(MSGT_PP,MSGL_INFO,__FILE__,__LINE__, ##args ) #define MSG_FATAL(args...) mp_msg(MSGT_PP,MSGL_FATAL,__FILE__,__LINE__, ##args ) #define MSG_WARN(args...) mp_msg(MSGT_PP,MSGL_WARN,__FILE__,__LINE__, ##args ) Modified: mplayerxp/postproc/vf.c =================================================================== --- mplayerxp/postproc/vf.c 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/postproc/vf.c 2009-12-07 19:04:38 UTC (rev 32) @@ -7,7 +7,6 @@ #include <malloc.h> #endif #include "../mplayer.h" -#include "pp_msg.h" #include "../help_mp.h" #include "../libvo/img_format.h" @@ -17,6 +16,7 @@ #include "../libvo/fastmemcpy.h" #include "codec-cfg.h" +#include "pp_msg.h" extern const vf_info_t vf_info_1bpp; extern const vf_info_t vf_info_2xsai; Modified: mplayerxp/postproc/vf_scale.c =================================================================== --- mplayerxp/postproc/vf_scale.c 2009-12-07 19:02:11 UTC (rev 31) +++ mplayerxp/postproc/vf_scale.c 2009-12-07 19:04:38 UTC (rev 32) @@ -4,7 +4,6 @@ #include <inttypes.h> #include "../mp_config.h" -#include "pp_msg.h" #include "../cpudetect.h" #include "../libvo/img_format.h" @@ -14,6 +13,7 @@ #include "../libvo/fastmemcpy.h" #include "swscale.h" #include "vf_scale.h" +#include "pp_msg.h" struct vf_priv_s { int w,h,ofmt; @@ -99,7 +99,7 @@ if(ret&VFCAP_CSP_SUPPORTED_BY_HW){ best=format; // no conversion -> bingo! break; - } + } if(ret&VFCAP_CSP_SUPPORTED && !best) best=format; // best with conversion } @@ -394,7 +394,7 @@ default: break; } - + return vf_next_control(vf,request,data); } @@ -403,7 +403,7 @@ // supported Input formats: YV12, I420, IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8, Y800 static int __FASTCALL__ query_format(struct vf_instance_s* vf, unsigned int fmt,unsigned w,unsigned h){ - MSG_DBG3("vf_scale: query_format(%p, %X, %u, %u\n",vf,fmt,w,h); + MSG_DBG3("vf_scale: query_format(%p, %X(%s), %u, %u\n",vf,fmt,vo_format_name(fmt),w,h); switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: @@ -416,13 +416,13 @@ case IMGFMT_BGR15: case IMGFMT_RGB32: case IMGFMT_RGB24: - case IMGFMT_Y800: - case IMGFMT_Y8: - case IMGFMT_YVU9: - case IMGFMT_IF09: - case IMGFMT_444P: - case IMGFMT_422P: - case IMGFMT_411P: + case IMGFMT_Y800: + case IMGFMT_Y8: + case IMGFMT_YVU9: + case IMGFMT_IF09: + case IMGFMT_444P: + case IMGFMT_422P: + case IMGFMT_411P: { unsigned int best=find_best_out(vf,w,h); int flags; @@ -435,9 +435,11 @@ MSG_DBG2("[sw_scale] Can't find HW support for %s on %s\n",vo_format_name(best),vf->next->info->name); return 0; // huh? } + MSG_DBG3("[sw_scale] %s supported on %s like %u\n",vo_format_name(best),vf->next->info->name,flags); if(fmt!=best) flags&=~VFCAP_CSP_SUPPORTED_BY_HW; // do not allow scaling, if we are before the PP fliter! if(!(flags&VFCAP_POSTPROC)) flags|=VFCAP_SWSCALE; + MSG_DBG3("[sw_scale] returning: %u\n",flags); return flags; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |