[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[292] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-03 15:54:26
|
Revision: 292 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=292&view=rev Author: nickols_k Date: 2012-11-03 15:54:18 +0000 (Sat, 03 Nov 2012) Log Message: ----------- move mp_image and sig_hand into better place Modified Paths: -------------- mplayerxp/Makefile mplayerxp/dump.c mplayerxp/libmpcodecs/dec_video.c mplayerxp/libmpdemux/cache2.c mplayerxp/libmpdemux/stheader.h mplayerxp/libvo/video_out.h mplayerxp/libvo/vo_sdl.c mplayerxp/libvo/vo_x11.c mplayerxp/libvo/vo_xv.c mplayerxp/libvo/vosub_vidix.c mplayerxp/mplayer.c mplayerxp/postproc/libmenu/menu.c mplayerxp/postproc/libmenu/menu_cmdlist.c mplayerxp/postproc/libmenu/menu_console.c mplayerxp/postproc/libmenu/menu_filesel.c mplayerxp/postproc/libmenu/menu_list.c mplayerxp/postproc/libmenu/menu_param.c mplayerxp/postproc/libmenu/menu_pt.c mplayerxp/postproc/libmenu/menu_txt.c mplayerxp/postproc/vf.c mplayerxp/postproc/vf_1bpp.c mplayerxp/postproc/vf_2xsai.c mplayerxp/postproc/vf_aspect.c mplayerxp/postproc/vf_delogo.c mplayerxp/postproc/vf_denoise3d.c mplayerxp/postproc/vf_dint.c mplayerxp/postproc/vf_down3dright.c mplayerxp/postproc/vf_eq.c mplayerxp/postproc/vf_expand.c mplayerxp/postproc/vf_flip.c mplayerxp/postproc/vf_format.c mplayerxp/postproc/vf_framestep.c mplayerxp/postproc/vf_il.c mplayerxp/postproc/vf_menu.c mplayerxp/postproc/vf_mirror.c mplayerxp/postproc/vf_noise.c mplayerxp/postproc/vf_ow.c mplayerxp/postproc/vf_palette.c mplayerxp/postproc/vf_panscan.c mplayerxp/postproc/vf_perspective.c mplayerxp/postproc/vf_pp.c mplayerxp/postproc/vf_raw.c mplayerxp/postproc/vf_rectangle.c mplayerxp/postproc/vf_rgb2bgr.c mplayerxp/postproc/vf_rotate.c mplayerxp/postproc/vf_scale.c mplayerxp/postproc/vf_smartblur.c mplayerxp/postproc/vf_softpulldown.c mplayerxp/postproc/vf_swapuv.c mplayerxp/postproc/vf_test.c mplayerxp/postproc/vf_unsharp.c mplayerxp/postproc/vf_vo.c mplayerxp/postproc/vf_yuvcsp.c mplayerxp/postproc/vf_yuy2.c mplayerxp/postproc/vf_yvu9.c mplayerxp/xmpcore/Makefile Added Paths: ----------- mplayerxp/xmpcore/mp_image.c mplayerxp/xmpcore/mp_image.h mplayerxp/xmpcore/sig_hand.c mplayerxp/xmpcore/sig_hand.h Removed Paths: ------------- mplayerxp/mp_image.c mplayerxp/mp_image.h mplayerxp/sig_hand.c mplayerxp/sig_hand.h Modified: mplayerxp/Makefile =================================================================== --- mplayerxp/Makefile 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/Makefile 2012-11-03 15:54:18 UTC (rev 292) @@ -23,8 +23,8 @@ MANDIR = ${prefix}/man LDFLAGS += -Wl,-rpath,${CODECDIR}/codecs -SRCS_COMMON = mp_msg.c mp_image.c -SRCS_MPLAYER = mplayer.c fifo.c $(SRCS_COMMON) mixer.c mp-opt-reg.c sig_hand.c dump.c +SRCS_COMMON = mp_msg.c +SRCS_MPLAYER = mplayer.c fifo.c $(SRCS_COMMON) mixer.c mp-opt-reg.c dump.c OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o) Modified: mplayerxp/dump.c =================================================================== --- mplayerxp/dump.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/dump.c 2012-11-03 15:54:18 UTC (rev 292) @@ -10,7 +10,7 @@ #include "mp_config.h" #include "dump.h" -#include "sig_hand.h" +#include "xmpcore/sig_hand.h" #include "help_mp.h" #include "input/input.h" #include "mplayer.h" Modified: mplayerxp/libmpcodecs/dec_video.c =================================================================== --- mplayerxp/libmpcodecs/dec_video.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libmpcodecs/dec_video.c 2012-11-03 15:54:18 UTC (rev 292) @@ -18,7 +18,7 @@ #include "libmpdemux/demuxer.h" #include "libmpdemux/parse_es.h" #include "libmpdemux/stheader.h" -#include "sig_hand.h" +#include "xmpcore/sig_hand.h" #include "libmpconf/codec-cfg.h" Modified: mplayerxp/libmpdemux/cache2.c =================================================================== --- mplayerxp/libmpdemux/cache2.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libmpdemux/cache2.c 2012-11-03 15:54:18 UTC (rev 292) @@ -14,7 +14,7 @@ #include <pthread.h> #include "stream.h" -#include "sig_hand.h" +#include "xmpcore/sig_hand.h" #include "osdep/timer.h" #include "osdep/cpudetect.h" #include "osdep/bswap.h" Modified: mplayerxp/libmpdemux/stheader.h =================================================================== --- mplayerxp/libmpdemux/stheader.h 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libmpdemux/stheader.h 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "loader/wine/avifmt.h" #include "loader/wine/vfw.h" -#include "../mp_image.h" +#include "xmpcore/mp_image.h" typedef struct sh_audio_s { int aid; Modified: mplayerxp/libvo/video_out.h =================================================================== --- mplayerxp/libvo/video_out.h 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libvo/video_out.h 2012-11-03 15:54:18 UTC (rev 292) @@ -20,7 +20,7 @@ #include "sub.h" #include "libmpsub/subreader.h" #include "img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "xmpcore/xmp_enums.h" enum { Modified: mplayerxp/libvo/vo_sdl.c =================================================================== --- mplayerxp/libvo/vo_sdl.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libvo/vo_sdl.c 2012-11-03 15:54:18 UTC (rev 292) @@ -128,7 +128,7 @@ #include "osdep/keycodes.h" #include "dri_vo.h" #include "video_out_internal.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #ifdef CONFIG_VIDIX #include "vosub_vidix.h" #endif Modified: mplayerxp/libvo/vo_x11.c =================================================================== --- mplayerxp/libvo/vo_x11.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libvo/vo_x11.c 2012-11-03 15:54:18 UTC (rev 292) @@ -45,7 +45,7 @@ #include "postproc/swscale.h" /* for MODE_RGB(BGR) definitions */ #include "video_out_internal.h" #include "dri_vo.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vo_msg.h" LIBVO_EXTERN( x11 ) Modified: mplayerxp/libvo/vo_xv.c =================================================================== --- mplayerxp/libvo/vo_xv.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libvo/vo_xv.c 2012-11-03 15:54:18 UTC (rev 292) @@ -36,7 +36,7 @@ #include "sub.h" #include "aspect.h" #include "dri_vo.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include <X11/extensions/Xv.h> #include <X11/extensions/Xvlib.h> Modified: mplayerxp/libvo/vosub_vidix.c =================================================================== --- mplayerxp/libvo/vosub_vidix.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/libvo/vosub_vidix.c 2012-11-03 15:54:18 UTC (rev 292) @@ -33,7 +33,7 @@ #include "sub.h" #include "video_out.h" #include "dri_vo.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vo_msg.h" #ifndef min Deleted: mplayerxp/mp_image.c =================================================================== --- mplayerxp/mp_image.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/mp_image.c 2012-11-03 15:54:18 UTC (rev 292) @@ -1,221 +0,0 @@ -#include "mp_config.h" -#include "mplayer.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "osdep/mplib.h" -#include "libvo/img_format.h" -#include "mp_image.h" -#include "osdep/fastmemcpy.h" -#define MSGT_CLASS MSGT_CPLAYER -#include "mp_msg.h" - -void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ - mpi->flags&=~(MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV|MP_IMGFLAG_SWAPPED); - mpi->imgfmt=out_fmt; - if(out_fmt == IMGFMT_MPEGPES){ - mpi->bpp=0; - return; - } - if(out_fmt == IMGFMT_ZRMJPEGNI || - out_fmt == IMGFMT_ZRMJPEGIT || - out_fmt == IMGFMT_ZRMJPEGIB){ - mpi->bpp=0; - return; - } - if(IMGFMT_IS_XVMC(out_fmt)){ - mpi->bpp=0; - return; - } - mpi->num_planes=1; - if (IMGFMT_IS_RGB(out_fmt) || IMGFMT_IS_BGR(out_fmt)) { - mpi->bpp = rgbfmt_depth(out_fmt); - if(IMGFMT_IS_BGR(out_fmt)) mpi->flags|=MP_IMGFLAG_SWAPPED; - return; - } - mpi->flags|=MP_IMGFLAG_YUV; - mpi->num_planes=3; - switch(out_fmt){ - case IMGFMT_I420: - case IMGFMT_IYUV: - mpi->flags|=MP_IMGFLAG_SWAPPED; - case IMGFMT_YV12: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=12; - mpi->chroma_width=(mpi->width>>1); - mpi->chroma_height=(mpi->height>>1); - mpi->chroma_x_shift=1; - mpi->chroma_y_shift=1; - return; - case IMGFMT_420A: - case IMGFMT_IF09: - mpi->num_planes=4; - case IMGFMT_YVU9: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=9; - mpi->chroma_width=(mpi->width>>2); - mpi->chroma_height=(mpi->height>>2); - mpi->chroma_x_shift=2; - mpi->chroma_y_shift=2; - return; - case IMGFMT_444P16_LE: - case IMGFMT_444P16_BE: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=48; - mpi->chroma_width=(mpi->width); - mpi->chroma_height=(mpi->height); - mpi->chroma_x_shift=0; - mpi->chroma_y_shift=0; - return; - case IMGFMT_444P: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=24; - mpi->chroma_width=(mpi->width); - mpi->chroma_height=(mpi->height); - mpi->chroma_x_shift=0; - mpi->chroma_y_shift=0; - return; - case IMGFMT_422P16_LE: - case IMGFMT_422P16_BE: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=32; - mpi->chroma_width=(mpi->width>>1); - mpi->chroma_height=(mpi->height); - mpi->chroma_x_shift=1; - mpi->chroma_y_shift=0; - return; - case IMGFMT_422P: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=16; - mpi->chroma_width=(mpi->width>>1); - mpi->chroma_height=(mpi->height); - mpi->chroma_x_shift=1; - mpi->chroma_y_shift=0; - return; - case IMGFMT_420P16_LE: - case IMGFMT_420P16_BE: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=24; - mpi->chroma_width=(mpi->width>>2); - mpi->chroma_height=(mpi->height); - mpi->chroma_x_shift=2; - mpi->chroma_y_shift=0; - return; - case IMGFMT_411P: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=12; - mpi->chroma_width=(mpi->width>>2); - mpi->chroma_height=(mpi->height); - mpi->chroma_x_shift=2; - mpi->chroma_y_shift=0; - return; - case IMGFMT_Y800: - case IMGFMT_Y8: - /* they're planar ones, but for easier handling use them as packed */ -// mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=8; - mpi->num_planes=1; - return; - case IMGFMT_UYVY: - mpi->flags|=MP_IMGFLAG_SWAPPED; - case IMGFMT_YUY2: - mpi->bpp=16; - mpi->num_planes=1; - return; - case IMGFMT_NV12: - mpi->flags|=MP_IMGFLAG_SWAPPED; - case IMGFMT_NV21: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=12; - mpi->num_planes=2; - mpi->chroma_width=(mpi->width>>0); - mpi->chroma_height=(mpi->height>>1); - mpi->chroma_x_shift=0; - mpi->chroma_y_shift=1; - return; - } - MSG_WARN("mp_image: Unknown out_fmt: 0x%X\n",out_fmt); - mpi->bpp=0; -} - -mp_image_t* new_mp_image(unsigned w,unsigned h,unsigned xp_idx){ - mp_image_t* mpi=(mp_image_t*)mp_mallocz(sizeof(mp_image_t)); - if(!mpi) return NULL; // error! - mpi->xp_idx = xp_idx; - mpi->width=mpi->w=w; - mpi->height=mpi->h=h; - return mpi; -} - -void free_mp_image(mp_image_t* mpi){ - if(!mpi) return; - if(mpi->flags&MP_IMGFLAG_ALLOCATED){ - /* becouse we allocate the whole image in once */ - if(mpi->planes[0]) mp_free(mpi->planes[0]); - } - mp_free(mpi); -} - -mp_image_t* alloc_mpi(unsigned w, unsigned h, unsigned int fmt,unsigned xp_idx) { - mp_image_t* mpi = new_mp_image(w,h,xp_idx); - - mp_image_setfmt(mpi,fmt); - mpi_alloc_planes(mpi); - return mpi; -} - -void mpi_alloc_planes(mp_image_t *mpi) { - // IF09 - allocate space for 4. plane delta info - unused - if (mpi->imgfmt == IMGFMT_IF09) - { - mpi->planes[0]=mp_memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8+ - mpi->chroma_width*mpi->chroma_height); - /* delta table, just for fun ;) */ - mpi->planes[3]=mpi->planes[0]+2*(mpi->chroma_width*mpi->chroma_height); - } - else - mpi->planes[0]=mp_memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8); - if(mpi->flags&MP_IMGFLAG_PLANAR){ - // YV12/I420/YVU9/IF09. feel mp_free to add other planar formats here... - if(!mpi->stride[0]) mpi->stride[0]=mpi->width; - if(!mpi->stride[1]) mpi->stride[1]=mpi->stride[2]=mpi->chroma_width; - if(mpi->flags&MP_IMGFLAG_SWAPPED){ - // I420/IYUV (Y,U,V) - mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height; - mpi->planes[2]=mpi->planes[1]+mpi->chroma_width*mpi->chroma_height; - } else { - // YV12,YVU9,IF09 (Y,V,U) - mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height; - mpi->planes[1]=mpi->planes[2]+mpi->chroma_width*mpi->chroma_height; - } - } else { - if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8; - } - mpi->flags|=MP_IMGFLAG_ALLOCATED; -} - -void copy_mpi(mp_image_t *dmpi,const mp_image_t *mpi) { - if(mpi->flags&MP_IMGFLAG_PLANAR){ - memcpy_pic(dmpi->planes[0],mpi->planes[0], mpi->w, mpi->h, - dmpi->stride[0],mpi->stride[0]); - memcpy_pic(dmpi->planes[1],mpi->planes[1], mpi->chroma_width, mpi->chroma_height, - dmpi->stride[1],mpi->stride[1]); - memcpy_pic(dmpi->planes[2], mpi->planes[2], mpi->chroma_width, mpi->chroma_height, - dmpi->stride[2],mpi->stride[2]); - } else { - memcpy_pic(dmpi->planes[0],mpi->planes[0], - mpi->w*(dmpi->bpp/8), mpi->h, - dmpi->stride[0],mpi->stride[0]); - } -} - -void mpi_fake_slice(mp_image_t *dmpi,const mp_image_t *mpi,unsigned y,unsigned h) -{ - *dmpi = *mpi; - dmpi->y = y; - dmpi->h = h; - dmpi->chroma_height = h >> mpi->chroma_y_shift; - dmpi->xp_idx = mpi->xp_idx; -} Deleted: mplayerxp/mp_image.h =================================================================== --- mplayerxp/mp_image.h 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/mp_image.h 2012-11-03 15:54:18 UTC (rev 292) @@ -1,100 +0,0 @@ -#ifndef __MP_IMAGE_H -#define __MP_IMAGE_H 1 - -#include "mp_config.h" - -//--------- codec's requirements (filled by the codec/vf) --------- - -//--- buffer content restrictions: -enum { - MP_IMGFLAG_PRESERVE=0x00001, // set if buffer content shouldn't be modified: - MP_IMGFLAG_READABLE=0x00002 // set if buffer content will be READ for next frame's MC: (I/P mpeg frames) -}; - -//--- buffer width/stride/plane restrictions: (used for direct rendering) -enum { -// stride _have_to_ be aligned to MB boundary: [for DR restrictions] - MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE =0x00004, /* no flag - should be neg value of MP_IMGFLAG_ACCEPT_STRIDE */ -// stride should be aligned to MB boundary: [for buffer allocation] - MP_IMGFLAG_PREFER_ALIGNED_STRIDE =0x00008, /* sould be no flag - everything prefer aligned strides */ - MP_IMGFLAG_ACCEPT_STRIDE =0x00010, // codec accept any stride (>=width): - MP_IMGFLAG_ACCEPT_WIDTH =0x00020, // codec accept any width (width*bpp=stride -> stride%bpp==0) (>=width): -//--- for planar formats only: -// uses only stride[0], and stride[1]=stride[2]=stride[0]>>mpi->chroma_x_shift - MP_IMGFLAG_COMMON_STRIDE =0x00040, /* UNUSED */ -// uses only planes[0], and calculates planes[1,2] from width,height,imgfmt - MP_IMGFLAG_COMMON_PLANE =0x00080, /* UNUSED */ - MP_IMGFLAGMASK_RESTRICTIONS =0x000FF, -//--------- color info (filled by mp_image_setfmt() ) ----------- - MP_IMGFLAG_PLANAR =0x00100, // set if number of planes > 1 - MP_IMGFLAG_YUV =0x00200, // set if it's YUV colorspace - MP_IMGFLAG_SWAPPED =0x00400, // set if it's swapped (BGR or YVU) plane/byteorder - MP_IMGFLAG_RGB_PALETTE =0x00800, // using palette for RGB data - MP_IMGFLAGMASK_COLORS =0x00F00, -// codec uses drawing/rendering callbacks (draw_slice()-like thing, DR method 2) -// [the codec will set this flag if it supports callbacks, and the vo _may_ -// clear it in get_image() if draw_slice() not implemented] - MP_IMGFLAG_DRAW_CALLBACK =0x01000, - MP_IMGFLAG_DIRECT =0x02000, // set if it's in video buffer/memory: [set by vo/vf's get_image() !!!] - MP_IMGFLAG_ALLOCATED =0x04000, // set if buffer is allocated (used in destination images): - MP_IMGFLAG_TYPE_DISPLAYED =0x08000, // buffer type was printed (do NOT set this flag - it's for INTERNAL USE!!!) - MP_IMGFLAG_FINAL =0x10000, // buffer is video memory - MP_IMGFLAG_RENDERED =0x20000, // final buffer was already painted - MP_IMGFLAG_FINALIZED =0x40000 // indicates final step of image processing from CPU side!!! -}; - -/* codec doesn't support any form of direct rendering - it has own buffer */ -enum { - MP_IMGTYPE_EXPORT =0, // allocation. so we just export its buffer pointers: - MP_IMGTYPE_STATIC =1, // codec requires a static WO buffer, but it does only partial updates later: - MP_IMGTYPE_TEMP =2, // codec just needs some WO memory, where it writes/copies the whole frame to: - MP_IMGTYPE_IP =3, // I+P type, requires 2+ independent static R/W buffers - MP_IMGTYPE_IPB =4, // I+P+B type, requires 2+ independent static R/W and 1+ temp WO buffers - - MP_MAX_PLANES =4 -}; -enum { - MP_IMGFIELD_ORDERED =0x01, - MP_IMGFIELD_TOP_FIRST =0x02, - MP_IMGFIELD_REPEAT_FIRST =0x04, - MP_IMGFIELD_TOP =0x08, - MP_IMGFIELD_BOTTOM =0x10, - MP_IMGFIELD_INTERLACED =0x20 -}; -#include <stdlib.h> -#include <limits.h> - -enum { XP_IDX_INVALID=UINT_MAX }; -typedef struct mp_image_s { - unsigned xp_idx; /* index of xp_frame associated with this image */ - unsigned int flags; - unsigned char type; - unsigned char bpp; // bits/pixel. NOT depth! for RGB it will be n*8 - unsigned int imgfmt; - unsigned width,height; // stored dimensions - int x,y,w,h; // slice dimensions - unsigned num_planes; - unsigned char* planes[MP_MAX_PLANES]; - unsigned int stride[MP_MAX_PLANES]; - char * qscale; - unsigned qstride; - unsigned qscale_type; // 0->mpeg1/4/h263, 1->mpeg2 - unsigned pict_type; // 0->unknown, 1->I, 2->P, 3->B - unsigned fields; - /* these are only used by planar formats Y,U(Cb),V(Cr) */ - int chroma_width; - int chroma_height; - int chroma_x_shift; // horizontal - int chroma_y_shift; // vertical - any_t* priv; /* for private use by filter or vo driver (to store buffer id or dmpi) */ -} mp_image_t; - -extern void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt); -extern mp_image_t* new_mp_image(unsigned w,unsigned h,unsigned xp_idx); -extern void free_mp_image(mp_image_t* mpi); -extern mp_image_t* alloc_mpi(unsigned w, unsigned h, unsigned int fmt,unsigned xp_idx); -extern void mpi_alloc_planes(mp_image_t *mpi); -extern void copy_mpi(mp_image_t *dmpi,const mp_image_t *mpi); -extern void mpi_fake_slice(mp_image_t *dmpi,const mp_image_t *mpi,unsigned y,unsigned height); - -#endif Modified: mplayerxp/mplayer.c =================================================================== --- mplayerxp/mplayer.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/mplayer.c 2012-11-03 15:54:18 UTC (rev 292) @@ -23,7 +23,7 @@ #include "version.h" #include "mp_config.h" -#include "sig_hand.h" +#include "xmpcore/sig_hand.h" #include "mplayer.h" #include "osdep/mplib.h" #include "postproc/swscale.h" Modified: mplayerxp/postproc/libmenu/menu.c =================================================================== --- mplayerxp/postproc/libmenu/menu.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu.c 2012-11-03 15:54:18 UTC (rev 292) @@ -17,7 +17,7 @@ #include "libvo/img_format.h" #include "libvo/video_out.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "libmpconf/m_option.h" #include "libmpconf/m_struct.h" #include "menu.h" Modified: mplayerxp/postproc/libmenu/menu_cmdlist.c =================================================================== --- mplayerxp/postproc/libmenu/menu_cmdlist.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu_cmdlist.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include <string.h> #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "libmpconf/m_option.h" #include "libmpconf/m_struct.h" Modified: mplayerxp/postproc/libmenu/menu_console.c =================================================================== --- mplayerxp/postproc/libmenu/menu_console.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu_console.c 2012-11-03 15:54:18 UTC (rev 292) @@ -14,7 +14,7 @@ #include <errno.h> #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "libmpdemux/stream.h" #include "libmpconf/cfgparser.h" Modified: mplayerxp/postproc/libmenu/menu_filesel.c =================================================================== --- mplayerxp/postproc/libmenu/menu_filesel.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu_filesel.c 2012-11-03 15:54:18 UTC (rev 292) @@ -19,7 +19,7 @@ #include "libmpconf/cfgparser.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "menu.h" #include "menu_list.h" Modified: mplayerxp/postproc/libmenu/menu_list.c =================================================================== --- mplayerxp/postproc/libmenu/menu_list.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu_list.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "libvo/img_format.h" #include "libvo/sub.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "libmpconf/m_struct.h" #include "menu.h" Modified: mplayerxp/postproc/libmenu/menu_param.c =================================================================== --- mplayerxp/postproc/libmenu/menu_param.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu_param.c 2012-11-03 15:54:18 UTC (rev 292) @@ -19,7 +19,7 @@ #include "libplaytree/asxparser.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "menu.h" #include "menu_list.h" Modified: mplayerxp/postproc/libmenu/menu_pt.c =================================================================== --- mplayerxp/postproc/libmenu/menu_pt.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu_pt.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "help_mp.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "libmpconf/m_struct.h" #include "libmpconf/m_option.h" Modified: mplayerxp/postproc/libmenu/menu_txt.c =================================================================== --- mplayerxp/postproc/libmenu/menu_txt.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/libmenu/menu_txt.c 2012-11-03 15:54:18 UTC (rev 292) @@ -8,7 +8,7 @@ #include "libvo/img_format.h" #include "libvo/sub.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "libmpdemux/stream.h" #include "libmpconf/cfgparser.h" Modified: mplayerxp/postproc/vf.c =================================================================== --- mplayerxp/postproc/vf.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf.c 2012-11-03 15:54:18 UTC (rev 292) @@ -9,7 +9,7 @@ #include "libvo/img_format.h" #include "libvo/video_out.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_1bpp.c =================================================================== --- mplayerxp/postproc/vf_1bpp.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_1bpp.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "postproc/swscale.h" Modified: mplayerxp/postproc/vf_2xsai.c =================================================================== --- mplayerxp/postproc/vf_2xsai.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_2xsai.c 2012-11-03 15:54:18 UTC (rev 292) @@ -5,8 +5,8 @@ #include "mp_config.h" -#include "../libvo/img_format.h" -#include "../mp_image.h" +#include "libvo/img_format.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "pp_msg.h" Modified: mplayerxp/postproc/vf_aspect.c =================================================================== --- mplayerxp/postproc/vf_aspect.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_aspect.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "libvo/img_format.h" #include "osdep/mplib.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "pp_msg.h" Modified: mplayerxp/postproc/vf_delogo.c =================================================================== --- mplayerxp/postproc/vf_delogo.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_delogo.c 2012-11-03 15:54:18 UTC (rev 292) @@ -28,7 +28,7 @@ #include "osdep/cpudetect.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_denoise3d.c =================================================================== --- mplayerxp/postproc/vf_denoise3d.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_denoise3d.c 2012-11-03 15:54:18 UTC (rev 292) @@ -25,7 +25,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_dint.c =================================================================== --- mplayerxp/postproc/vf_dint.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_dint.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "osdep/fastmemcpy.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "libvo/img_format.h" #include "osdep/mplib.h" #include "vf.h" Modified: mplayerxp/postproc/vf_down3dright.c =================================================================== --- mplayerxp/postproc/vf_down3dright.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_down3dright.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "osdep/cpudetect.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_eq.c =================================================================== --- mplayerxp/postproc/vf_eq.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_eq.c 2012-11-03 15:54:18 UTC (rev 292) @@ -20,7 +20,7 @@ #include "libvo/img_format.h" #include "libvo/video_out.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_expand.c =================================================================== --- mplayerxp/postproc/vf_expand.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_expand.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_flip.c =================================================================== --- mplayerxp/postproc/vf_flip.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_flip.c 2012-11-03 15:54:18 UTC (rev 292) @@ -23,7 +23,7 @@ #include "config.h" #include "pp_msg.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "libvo/video_out.h" Modified: mplayerxp/postproc/vf_format.c =================================================================== --- mplayerxp/postproc/vf_format.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_format.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "pp_msg.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_framestep.c =================================================================== --- mplayerxp/postproc/vf_framestep.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_framestep.c 2012-11-03 15:54:18 UTC (rev 292) @@ -56,7 +56,7 @@ #include "osdep/cpudetect.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "osdep/mplib.h" #include "vf.h" #include "pp_msg.h" Modified: mplayerxp/postproc/vf_il.c =================================================================== --- mplayerxp/postproc/vf_il.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_il.c 2012-11-03 15:54:18 UTC (rev 292) @@ -25,7 +25,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_menu.c =================================================================== --- mplayerxp/postproc/vf_menu.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_menu.c 2012-11-03 15:54:18 UTC (rev 292) @@ -9,7 +9,7 @@ #include "mplayer.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_mirror.c =================================================================== --- mplayerxp/postproc/vf_mirror.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_mirror.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_noise.c =================================================================== --- mplayerxp/postproc/vf_noise.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_noise.c 2012-11-03 15:54:18 UTC (rev 292) @@ -26,7 +26,7 @@ #include "osdep/cpudetect.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_ow.c =================================================================== --- mplayerxp/postproc/vf_ow.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_ow.c 2012-11-03 15:54:18 UTC (rev 292) @@ -34,7 +34,7 @@ #include "libvo/img_format.h" #include "osdep/mplib.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "pp_msg.h" Modified: mplayerxp/postproc/vf_palette.c =================================================================== --- mplayerxp/postproc/vf_palette.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_palette.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "postproc/swscale.h" Modified: mplayerxp/postproc/vf_panscan.c =================================================================== --- mplayerxp/postproc/vf_panscan.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_panscan.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_perspective.c =================================================================== --- mplayerxp/postproc/vf_perspective.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_perspective.c 2012-11-03 15:54:18 UTC (rev 292) @@ -26,7 +26,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_pp.c =================================================================== --- mplayerxp/postproc/vf_pp.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_pp.c 2012-11-03 15:54:18 UTC (rev 292) @@ -9,7 +9,7 @@ #include "osdep/mplib.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "postprocess.h" Modified: mplayerxp/postproc/vf_raw.c =================================================================== --- mplayerxp/postproc/vf_raw.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_raw.c 2012-11-03 15:54:18 UTC (rev 292) @@ -10,7 +10,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_rectangle.c =================================================================== --- mplayerxp/postproc/vf_rectangle.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_rectangle.c 2012-11-03 15:54:18 UTC (rev 292) @@ -1,7 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_rgb2bgr.c =================================================================== --- mplayerxp/postproc/vf_rgb2bgr.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_rgb2bgr.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_rotate.c =================================================================== --- mplayerxp/postproc/vf_rotate.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_rotate.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_scale.c =================================================================== --- mplayerxp/postproc/vf_scale.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_scale.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "osdep/cpudetect.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "libvo/video_out.h" Modified: mplayerxp/postproc/vf_smartblur.c =================================================================== --- mplayerxp/postproc/vf_smartblur.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_smartblur.c 2012-11-03 15:54:18 UTC (rev 292) @@ -29,7 +29,7 @@ #endif #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_softpulldown.c =================================================================== --- mplayerxp/postproc/vf_softpulldown.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_softpulldown.c 2012-11-03 15:54:18 UTC (rev 292) @@ -5,7 +5,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_swapuv.c =================================================================== --- mplayerxp/postproc/vf_swapuv.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_swapuv.c 2012-11-03 15:54:18 UTC (rev 292) @@ -25,7 +25,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_test.c =================================================================== --- mplayerxp/postproc/vf_test.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_test.c 2012-11-03 15:54:18 UTC (rev 292) @@ -24,7 +24,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "swscale.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_unsharp.c =================================================================== --- mplayerxp/postproc/vf_unsharp.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_unsharp.c 2012-11-03 15:54:18 UTC (rev 292) @@ -31,7 +31,7 @@ #endif #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" #include "osdep/mplib.h" Modified: mplayerxp/postproc/vf_vo.c =================================================================== --- mplayerxp/postproc/vf_vo.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_vo.c 2012-11-03 15:54:18 UTC (rev 292) @@ -4,7 +4,7 @@ #include "mp_config.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "vfcap.h" #include "libvo/video_out.h" Modified: mplayerxp/postproc/vf_yuvcsp.c =================================================================== --- mplayerxp/postproc/vf_yuvcsp.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_yuvcsp.c 2012-11-03 15:54:18 UTC (rev 292) @@ -7,7 +7,7 @@ #include "libvo/img_format.h" #include "osdep/mplib.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "pp_msg.h" Modified: mplayerxp/postproc/vf_yuy2.c =================================================================== --- mplayerxp/postproc/vf_yuy2.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_yuy2.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Modified: mplayerxp/postproc/vf_yvu9.c =================================================================== --- mplayerxp/postproc/vf_yvu9.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/postproc/vf_yvu9.c 2012-11-03 15:54:18 UTC (rev 292) @@ -6,7 +6,7 @@ #include "mp_config.h" #include "libvo/img_format.h" -#include "mp_image.h" +#include "xmpcore/mp_image.h" #include "vf.h" #include "osdep/fastmemcpy.h" Deleted: mplayerxp/sig_hand.c =================================================================== --- mplayerxp/sig_hand.c 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/sig_hand.c 2012-11-03 15:54:18 UTC (rev 292) @@ -1,102 +0,0 @@ -/* - MplayerXP's Signal handling -*/ -#include "mp_config.h" -#include "mplayer.h" -#ifndef _GNU_SOURCE -#define _GNU_SOURCE /* to get definition of strsignal */ -#endif -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include <signal.h> -#include <sys/resource.h> -#include "sig_hand.h" -#include <sys/types.h> -#include <unistd.h> -#include <stdlib.h> -#include "xmpcore/xmp_core.h" -#include "mp_msg.h" -#include "osdep/mplib.h" -#define MSGT_CLASS MSGT_CPLAYER -#include "mp_msg.h" - -#ifdef HAVE_BACKTRACE -#include <execinfo.h> -/* Obtain a backtrace and print it to stdout. */ -static void print_trace (void) -{ - any_t*array[10]; - size_t size; - char **strings; - size_t i; - - size = backtrace (array, 10); - strings = backtrace_symbols (array, size); - - MSG_ERR ("Obtained %zd stack frames.\n", size); - - for (i = 0; i < size; i++) - MSG_ERR ("%s\n", strings[i]); - - mp_free (strings); -} - -/* A dummy function to make the backtrace more interesting. */ -static void dump_trace (void) -{ - print_trace (); -} -#endif -static void my_callback(int signo) -{ - int i; - pthread_t _self = pthread_self(); - for(i=0; i < xp_core->num_threads && !pthread_equal(xp_core->mpxp_threads[i]->pth_id, _self); i++); - if(i >= xp_core->num_threads || - !pthread_equal(xp_core->mpxp_threads[i]->pth_id, _self)) i = 0; /* Use 0 as default handler */ - - mp_msg(MSGT_CPLAYER,MSGL_FATAL,__FILE__,__LINE__,"catching signal: %s in thread: %s (%i) in module: %s\n" - ,strsignal(signo) - ,xp_core->mpxp_threads[i]->name - ,i - ,xp_core->mpxp_threads[i]->unit); -#ifdef HAVE_BACKTRACE - dump_trace(); -#endif - xp_core->mpxp_threads[i]->sigfunc(); - - signal(signo,SIG_DFL); /* try coredump*/ - - return; -} - -void init_signal_handling( void ) -{ -#ifdef MP_DEBUG - /*========= Catch terminate signals: ================*/ - /* terminate requests:*/ - signal(SIGTERM,my_callback); /* kill*/ - signal(SIGHUP,my_callback); /* kill -HUP / xterm closed*/ - - signal(SIGINT,my_callback); /* Interrupt from keyboard */ - - signal(SIGQUIT,my_callback); /* Quit from keyboard */ - /* fatal errors: */ - signal(SIGBUS,my_callback); /* bus error */ - signal(SIGSEGV,my_callback); /* segfault */ - signal(SIGILL,my_callback); /* illegal instruction */ - signal(SIGFPE,my_callback); /* floating point exc. */ - signal(SIGABRT,my_callback); /* abort() */ -#endif -#ifdef RLIMIT_CORE - { - /* on many systems default coresize is 0. - Enable any coresize here. */ - struct rlimit rl; - getrlimit(RLIMIT_CORE,&rl); - rl.rlim_cur = rl.rlim_max; - setrlimit(RLIMIT_CORE,&rl); - } -#endif -} Deleted: mplayerxp/sig_hand.h =================================================================== --- mplayerxp/sig_hand.h 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/sig_hand.h 2012-11-03 15:54:18 UTC (rev 292) @@ -1,18 +0,0 @@ -/* - MplayerXP's Signal handling -*/ -#ifndef __SIG_HAND_H -#define __SIG_HAND_H 1 - -#include <sys/types.h> -#include "xmpcore/xmp_core.h" - -static inline void __MP_UNIT(unsigned id,const char *name) { xp_core->mpxp_threads[id]->unit=name; } -static inline void MP_UNIT(const char *name) { xp_core->mpxp_threads[main_id]->unit=name; } - -extern void init_signal_handling( void ); -extern void uninit_signal_handling( int xp_id ); - -#endif - - Modified: mplayerxp/xmpcore/Makefile =================================================================== --- mplayerxp/xmpcore/Makefile 2012-11-03 15:35:56 UTC (rev 291) +++ mplayerxp/xmpcore/Makefile 2012-11-03 15:54:18 UTC (rev 292) @@ -3,6 +3,7 @@ LIBNAME = libxmpcore.a SRCS=xmp_core.c xmp_aplayer.c xmp_vplayer.c xmp_vdecoder.c xmp_adecoder.c +SRCS+=mp_image.c sig_hand.c OBJS=$(SRCS:.c=.o) CFLAGS = $(OPTFLAGS) -I. -I.. -Wall Copied: mplayerxp/xmpcore/mp_image.c (from rev 286, mplayerxp/mp_image.c) =================================================================== --- mplayerxp/xmpcore/mp_image.c (rev 0) +++ mplayerxp/xmpcore/mp_image.c 2012-11-03 15:54:18 UTC (rev 292) @@ -0,0 +1,221 @@ +#include "mp_config.h" +#include "mplayer.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "osdep/mplib.h" +#include "libvo/img_format.h" +#include "mp_image.h" +#include "osdep/fastmemcpy.h" +#define MSGT_CLASS MSGT_CPLAYER +#include "mp_msg.h" + +void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ + mpi->flags&=~(MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV|MP_IMGFLAG_SWAPPED); + mpi->imgfmt=out_fmt; + if(out_fmt == IMGFMT_MPEGPES){ + mpi->bpp=0; + return; + } + if(out_fmt == IMGFMT_ZRMJPEGNI || + out_fmt == IMGFMT_ZRMJPEGIT || + out_fmt == IMGFMT_ZRMJPEGIB){ + mpi->bpp=0; + return; + } + if(IMGFMT_IS_XVMC(out_fmt)){ + mpi->bpp=0; + return; + } + mpi->num_planes=1; + if (IMGFMT_IS_RGB(out_fmt) || IMGFMT_IS_BGR(out_fmt)) { + mpi->bpp = rgbfmt_depth(out_fmt); + if(IMGFMT_IS_BGR(out_fmt)) mpi->flags|=MP_IMGFLAG_SWAPPED; + return; + } + mpi->flags|=MP_IMGFLAG_YUV; + mpi->num_planes=3; + switch(out_fmt){ + case IMGFMT_I420: + case IMGFMT_IYUV: + mpi->flags|=MP_IMGFLAG_SWAPPED; + case IMGFMT_YV12: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=12; + mpi->chroma_width=(mpi->width>>1); + mpi->chroma_height=(mpi->height>>1); + mpi->chroma_x_shift=1; + mpi->chroma_y_shift=1; + return; + case IMGFMT_420A: + case IMGFMT_IF09: + mpi->num_planes=4; + case IMGFMT_YVU9: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=9; + mpi->chroma_width=(mpi->width>>2); + mpi->chroma_height=(mpi->height>>2); + mpi->chroma_x_shift=2; + mpi->chroma_y_shift=2; + return; + case IMGFMT_444P16_LE: + case IMGFMT_444P16_BE: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=48; + mpi->chroma_width=(mpi->width); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=0; + mpi->chroma_y_shift=0; + return; + case IMGFMT_444P: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=24; + mpi->chroma_width=(mpi->width); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=0; + mpi->chroma_y_shift=0; + return; + case IMGFMT_422P16_LE: + case IMGFMT_422P16_BE: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=32; + mpi->chroma_width=(mpi->width>>1); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=1; + mpi->chroma_y_shift=0; + return; + case IMGFMT_422P: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=16; + mpi->chroma_width=(mpi->width>>1); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=1; + mpi->chroma_y_shift=0; + return; + case IMGFMT_420P16_LE: + case IMGFMT_420P16_BE: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=24; + mpi->chroma_width=(mpi->width>>2); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=2; + mpi->chroma_y_shift=0; + return; + case IMGFMT_411P: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=12; + mpi->chroma_width=(mpi->width>>2); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=2; + mpi->chroma_y_shift=0; + return; + case IMGFMT_Y800: + case IMGFMT_Y8: + /* they're planar ones, but for easier handling use them as packed */ +// mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=8; + mpi->num_planes=1; + return; + case IMGFMT_UYVY: + mpi->flags|=MP_IMGFLAG_SWAPPED; + case IMGFMT_YUY2: + mpi->bpp=16; + mpi->num_planes=1; + return; + case IMGFMT_NV12: + mpi->flags|=MP_IMGFLAG_SWAPPED; + case IMGFMT_NV21: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=12; + mpi->num_planes=2; + mpi->chroma_width=(mpi->width>>0); + mpi->chroma_height=(mpi->height>>1); + mpi->chroma_x_shift=0; + mpi->chroma_y_shift=1; + return; + } + MSG_WARN("mp_image: Unknown out_fmt: 0x%X\n",out_fmt); + mpi->bpp=0; +} + +mp_image_t* new_mp_image(unsigned w,unsigned h,unsigned xp_idx){ + mp_image_t* mpi=(mp_image_t*)mp_mallocz(sizeof(mp_image_t)); + if(!mpi) return NULL; // error! + mpi->xp_idx = xp_idx; + mpi->width=mpi->w=w; + mpi->height=mpi->h=h; + return mpi; +} + +void free_mp_image(mp_image_t* mpi){ + if(!mpi) return; + if(mpi->flags&MP_IMGFLAG_ALLOCATED){ + /* becouse we allocate the whole image in once */ + if(mpi->planes[0]) mp_free(mpi->planes[0]); + } + mp_free(mpi); +} + +mp_image_t* alloc_mpi(unsigned w, unsigned h, unsigned int fmt,unsigned xp_idx) { + mp_image_t* mpi = new_mp_image(w,h,xp_idx); + + mp_image_setfmt(mpi,fmt); + mpi_alloc_planes(mpi); + return mpi; +} + +void mpi_alloc_planes(mp_image_t *mpi) { + // IF09 - allocate space for 4. plane delta info - unused + if (mpi->imgfmt == IMGFMT_IF09) + { + mpi->planes[0]=mp_memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8+ + mpi->chroma_width*mpi->chroma_height); + /* delta table, just for fun ;) */ + mpi->planes[3]=mpi->planes[0]+2*(mpi->chroma_width*mpi->chroma_height); + } + else + mpi->planes[0]=mp_memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8); + if(mpi->flags&MP_IMGFLAG_PLANAR){ + // YV12/I420/YVU9/IF09. feel mp_free to add other planar formats here... + if(!mpi->stride[0]) mpi->stride[0]=mpi->width; + if(!mpi->stride[1]) mpi->stride[1]=mpi->stride[2]=mpi->chroma_width; + if(mpi->flags&MP_IMGFLAG_SWAPPED){ + // I420/IYUV (Y,U,V) + mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height; + mpi->planes[2]=mpi->planes[1]+mpi->chroma_width*mpi->chroma_height; + } else { + // YV12,YVU9,IF09 (Y,V,U) + mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height; + mpi->planes[1]=mpi->planes[2]+mpi->chroma_width*mpi->chroma_height; + } + } else { + if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8; + } + mpi->flags|=MP_IMGFLAG_ALLOCATED; +} + +void copy_mpi(mp_image_t *dmpi,const mp_image_t *mpi) { + if(mpi->flags&MP_IMGFLAG_PLANAR){ + memcpy_pic(dmpi->planes[0],mpi->planes[0], mpi->w, mpi->h, + dmpi->stride[0],mpi->stride[0]); + memcpy_pic(dmpi->planes[1],mpi->planes[1], mpi->chroma_width, mpi->chroma_height, + dmpi->stride[1],mpi->stride[1]); + memcpy_pic(dmpi->planes[2], mpi->planes[2], mpi->chroma_width, mpi->chroma_height, + dmpi->stride[2],mpi->stride[2]); + } else { + memcpy_pic(dmpi->planes[0],mpi->planes[0], + mpi->w*(dmpi->bpp/8), mpi->h, + dmpi->stride[0],mpi->stride[0]); + } +} + +void mpi_fake_slice(mp_image_t *dmpi,const mp_image_t *mpi,unsigned y,unsigned h) +{ + *dmpi = *mpi; + dmpi->y = y; + dmpi->h = h; + dmpi->chroma_height = h >> mpi->chroma_y_shift; + dmpi->xp_idx = mpi->xp_idx; +} Copied: mplayerxp/xmpcore/mp_image.h (from rev 286, mplayerxp/mp_image.h) =================================================================== --- mplayerxp/xmpcore/mp_image.h (rev 0) +++ mplayerxp/xmpcore/mp_image.h 2012-11-03 15:54:18 UTC (rev 292) @@ -0,0 +1,100 @@ +#ifndef __MP_IMAGE_H +#define __MP_IMAGE_H 1 + +#include "mp_config.h" + +//--------- codec's requirements (filled by the codec/vf) --------- + +//--- buffer content restrictions: +enum { + MP_IMGFLAG_PRESERVE=0x00001, // set if buffer content shouldn't be modified: + MP_IMGFLAG_READABLE=0x00002 // set if buffer content will be READ for next frame's MC: (I/P mpeg frames) +}; + +//--- buffer width/stride/plane restrictions: (used for direct rendering) +enum { +// stride _have_to_ be aligned to MB boundary: [for DR restrictions] + MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE =0x00004, /* no flag - should be neg value of MP_IMGFLAG_ACCEPT_STRIDE */ +// stride should be aligned to MB boundary: [for buffer allocation] + MP_IMGFLAG_PREFER_ALIGNED_STRIDE =0x00008, /* sould be no flag - everything prefer aligned strides */ + MP_IMGFLAG_ACCEPT_STRIDE =0x00010, // codec accept any stride (>=width): + MP_IMGFLAG_ACCEPT_WIDTH =0x00020, // codec accept any width (width*bpp=stride -> stride%bpp==0) (>=width): +//--- for planar formats only: +// uses only stride[0], and stride[1]=stride[2]=stride[0]>>mpi->chroma_x_shift + MP_IMGFLAG_COMMON_STRIDE =0x00040, /* UNUSED */ +// uses only planes[0], and calculates planes[1,2] from width,height,imgfmt + MP_IMGFLAG_COMMON_PLANE =0x00080, /* UNUSED */ + MP_IMGFLAGMASK_RESTRICTIONS =0x000FF, +//--------- color info (filled by mp_image_setfmt() ) ----------- + MP_IMGFLAG_PLANAR =0x00100, // set if number of planes > 1 + MP_IMGFLAG_YUV =0x00200, // set if it's YUV colorspace + MP_IMGFLAG_SWAPPED =0x00400, // set if it's swapped (BGR or YVU) plane/byteorder + MP_IMGFLAG_RGB_PALETTE =0x00800, // using palette for RGB data + MP_IMGFLAGMASK_COLORS =0x00F00, +// codec uses drawing/rendering callbacks (draw_slice()-like thing, DR method 2) +// [the codec will set this flag if it supports callbacks, and the vo _may_ +// clear it in get_image() if draw_slice() not implemented] + MP_IMGFLAG_DRAW_CALLBACK =0x01000, + MP_IMGFLAG_DIRECT =0x02000, // set if it's in video buffer/memory: [set by vo/vf's get_image() !!!] + MP_IMGFLAG_ALLOCATED =0x04000, // set if buffer is allocated (used in destination images): + MP_IMGFLAG_TYPE_DISPLAYED =0x08000, // buffer type was printed (do NOT set this flag - it's for INTERNAL USE!!!) + MP_IMGFLAG_FINAL =0x10000, // buffer is video memory + MP_IMGFLAG_RENDERED =0x20000, // final buffer was already painted + MP_IMGFLAG_FINALIZED =0x40000 // indicates final step of image processing from CPU side!!! +}; + +/* codec doesn't support any form of direct rendering - it has own buffer */ +enum { + MP_IMGTYPE_EXPORT =0, // allocation. so we just export its buffer pointers: + MP_IMGTYPE_STATIC =1, // codec requires a static WO buffer, but it does only partial updates later: + MP_IMGTYPE_TEMP =2, // codec just needs some WO memory, where it writes/copies the whole frame to: + MP_IMGTYPE_IP =3, // I+P type, requires 2+ independent static R/W buffers + MP_IMGTYPE_IPB =4, // I+P+B type, requires 2+ independent static R/W and 1+ temp WO buffers + + MP_MAX_PLANES =4 +}; +enum { + MP_IMGFIELD_ORDERED =0x01, + MP_IMGFIELD_TOP_FIRST =0x02, + MP_IMGFIELD_REPEAT_FIRST =0x04, + MP_IMGFIELD_TOP =0x08, + MP_IMGFIELD_BOTTOM =0x10, + MP_IMGFIELD_INTERLACED =0x20 +}; +#include <stdlib.h> +#include <limits.h> + +enum { XP_IDX_INVALID=UINT_MAX }; +typedef struct mp_image_s { + unsigned xp_idx; /* index of xp_frame associated with this image */ + unsigned int flags; + unsigned char type; + unsigned char bpp; // bits/pixel. NOT depth! for RGB it will be n*8 + unsigned int imgfmt; + unsigned width,height; // stored dimensions + int x,y,w,h; // slice dimensions + unsigned num_planes; + unsigned char* planes[MP_MAX_PLANES]; + unsigned int stride[MP_MAX_PLANES]; + char * qscale; + unsigned qstride; + unsigned qscale_type; // 0->mpeg1/4/h263, 1->mpeg2 + unsigned pict_type; // 0->unknown, 1->I, 2->P, 3->B + unsigned fields; + /* these are only used by planar formats Y,U(Cb),V(Cr) */ + int chroma_width; + int chroma_height; + int chroma_x_shift; // horizontal + int chroma_y_shift; // vertical + any_t* priv; /* for private use by filter or vo driver (to store buffer id or dmpi) */ +} mp_image_t; + +extern void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt); +extern mp_image_t* new_mp_image(unsigned w,unsigned h,unsigned xp_idx); +extern void free_mp_image(mp_image_t* mpi); +extern mp_image_t* alloc_mpi(unsigned w, unsigned h, unsigned int fmt,unsigned xp_idx); +extern void mpi_alloc_planes(mp_image_t *mpi); +extern void copy_mpi(mp_image_t *dmpi,const mp_image_t *mpi); +extern void mpi_fake_slice(mp_image_t *dmpi,const mp_image_t *mpi,unsigned y,unsigned height); + +#endif Copied: mplayerxp/xmpcore/sig_hand.c (from rev 286, mplayerxp/sig_hand.c) =================================================================== --- mplayerxp/xmpcore/sig_hand.c (rev 0) +++ mplayerxp/xmpcore/sig_hand.c 2012-11-03 15:54:18 UTC (rev 292) @@ -0,0 +1,102 @@ +/* + MplayerXP's Signal handling +*/ +#include "mp_config.h" +#include "mplayer.h" +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* to get definition of strsignal */ +#endif +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <signal.h> +#include <sys/resource.h> +#include "sig_hand.h" +#include <sys/types.h> +#include <unistd.h> +#include <stdlib.h> +#include "xmpcore/xmp_core.h" +#include "mp_msg.h" +#include "osdep/mplib.h" +#define MSGT_CLASS MSGT_CPLAYER +#include "mp_msg.h" + +#ifdef HAVE_BACKTRACE +#include <execinfo.h> +/* Obtain a backtrace and print it to stdout. */ +static void print_trace (void) +{ + any_t*array[10]; + size_t size; + char **strings; + size_t i; + + size = backtrace (array, 10); + strings = backtrace_symbols (array, size); + + MSG_ERR ("Obtained %zd stack frames.\n", size); + + for (i = 0; i < size; i++) + MSG_ERR ("%s\n", strings[i]); + + mp_free (strings); +} + +/* A dummy function to make the backtrace more interesting. */ +static void dump_trace (void) +{ + print_trace (); +} +#endif +static void my_callback(int signo) +{ + int i; + pthread_t _self = pthread_self(); + for(i=0; i < xp_core->num_threads && !pthread_equal(xp_core->mpxp_threads[i]->pth_id, _self); i++); + if(i >= xp_core->num_threads || + !pthread_equal(xp_core->mpxp_threads[i]->pth_id, _self)) i = 0; /* Use 0 as default handler */ + + mp_msg(MSGT_CPLAYER,MSGL_FATAL,__FILE__,__LINE__,"catching signal: %s in thread: %s (%i) in module: %s\n" + ,strsignal(signo) + ,xp_core->mpxp_threads[i]->name + ,i + ,xp_core->mpxp_threads[i]->unit); +#ifdef HAVE_BACKTRACE + dump_trace(); +#endif + xp_core->mpxp_threads[i]->sigfunc(); + + signal(signo,SIG_DFL); /* try coredump*/ + + return; +} + +void init_signal_handling( void ) +{ +#ifdef MP_DEBUG + /*========= Catch terminate signals: ================*/ + /* terminate requests:*/ + signal(SIGTERM,my_callback); /* kill*/ + signal(SIGHUP,my_callback); /* kill -HUP / xterm closed*/ + + signal(SIGINT,my_callback); /* Interrupt from keyboard */ + + signal(SIGQUIT,my_callback); /* Quit from keyboard */ + /* fatal errors: */ + signal(SIGBUS,my_callback); /* bus error */ + signal(SIGSEGV,my_callback); /* segfault */ + signal(SIGILL,my_callback); /* illegal instruction */ + signal(SIGFPE,my_callback); /* floating point exc. */ + signal(SIGABRT,my_callback); /* abort() */ +#endif +#ifdef RLIMIT_CORE + { + /* on many systems default coresize is 0. + Enable any coresize here. */ + struct rlimit rl; + getrlimit(RLIMIT_CORE,&rl); + rl.rlim_cur = rl.rlim_max; + setrlimit(RLIMIT_CORE,&rl); + } +#endif +} Copied: mplayerxp/xmpcore/sig_hand.h (from rev 286, mplayerxp/sig_hand.h) =================================================================== --- mplayerxp/xmpcore/sig_hand.h (rev 0) +++ mplayerxp/xmpcore/sig_hand.h 2012-11-03 15:54:18 UTC (rev 292) @@ -0,0 +1,18 @@ +/* + MplayerXP's Signal handling +*/ +#ifndef __SIG_HAND_H +#define __SIG_HAND_H 1 + +#include <sys/types.h> +#include "xmpcore/xmp_core.h" + +static inline void __MP_UNIT(unsigned id,const char *name) { xp_core->mpxp_threads[id]->unit=name; } +static inline void MP_UNIT(const char *name) { xp_core->mpxp_threads[main_id]->unit=name; } + +extern void init_signal_handling( void ); +extern void uninit_signal_handling( int xp_id ); + +#endif + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |