[MPlayer-cvslog] r28583 - in trunk: libmpcodecs/vd_ffmpeg.c libvo/vo_xvmc.c

iive subversion at mplayerhq.hu
Sun Feb 15 09:46:19 CET 2009


Author: iive
Date: Sun Feb 15 09:46:18 2009
New Revision: 28583

Log:
Reflect the change of xvmc struct name.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c
   trunk/libvo/vo_xvmc.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Sun Feb 15 09:12:12 2009	(r28582)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sun Feb 15 09:46:18 2009	(r28583)
@@ -876,7 +876,7 @@ static int mc_get_buffer(AVCodecContext 
     sh_video_t *sh = avctx->opaque;
     vd_ffmpeg_ctx *ctx = sh->context;
     mp_image_t *mpi=NULL;
-    struct xvmc_render_state *render;
+    struct xvmc_pixfmt_render *render;
     int flags= MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE|
                MP_IMGFLAG_DRAW_CALLBACK;
 
@@ -955,7 +955,7 @@ static int mc_get_buffer(AVCodecContext 
 
     pic->type= FF_BUFFER_TYPE_USER;
 
-    render=(struct xvmc_render_state *)mpi->priv;//same as data[2]
+    render=(struct xvmc_pixfmt_render *)mpi->priv;//same as data[2]
     if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
         mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_get_buffer (render=%p)\n", render);
     assert(render != 0);
@@ -969,7 +969,7 @@ static void mc_release_buffer(AVCodecCon
     mp_image_t *mpi= pic->opaque;
     sh_video_t *sh = avctx->opaque;
     vd_ffmpeg_ctx *ctx = sh->context;
-    struct xvmc_render_state *render;
+    struct xvmc_pixfmt_render *render;
     int i;
 
 
@@ -982,7 +982,7 @@ static void mc_release_buffer(AVCodecCon
 
 //printf("R%X %X\n", pic->linesize[0], pic->data[0]);
 //mark the surface as not requared for prediction
-    render=(struct xvmc_render_state *)pic->data[2];//same as mpi->priv
+    render=(struct xvmc_pixfmt_render *)pic->data[2];//same as mpi->priv
     if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
         mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_release_buffer (render=%p)\n", render);
     assert(render!=NULL);

Modified: trunk/libvo/vo_xvmc.c
==============================================================================
--- trunk/libvo/vo_xvmc.c	Sun Feb 15 09:12:12 2009	(r28582)
+++ trunk/libvo/vo_xvmc.c	Sun Feb 15 09:46:18 2009	(r28583)
@@ -101,13 +101,13 @@ static XvMCMacroBlockArray mv_blocks;
 #define MAX_SURFACES 8
 static int number_of_surfaces=0;
 static XvMCSurface surface_array[MAX_SURFACES];
-static struct xvmc_render_state * surface_render;
+static struct xvmc_pixfmt_render * surface_render;
 
-static struct xvmc_render_state * p_render_surface_to_show=NULL;
-static struct xvmc_render_state * p_render_surface_visible=NULL;
+static struct xvmc_pixfmt_render * p_render_surface_to_show=NULL;
+static struct xvmc_pixfmt_render * p_render_surface_visible=NULL;
 
 //display queue, kinda render ahead
-static struct xvmc_render_state * show_queue[MAX_SURFACES];
+static struct xvmc_pixfmt_render * show_queue[MAX_SURFACES];
 static int free_element;
 
 
@@ -135,7 +135,7 @@ static const struct{
 static void xvmc_free(void);
 static void xvmc_clean_surfaces(void);
 static int count_free_surfaces(void);
-static struct xvmc_render_state * find_free_surface(void);
+static struct xvmc_pixfmt_render * find_free_surface(void);
 
 static const vo_info_t info = {
   "XVideo Motion Compensation",
@@ -363,13 +363,13 @@ surface_found:
 }
 
 static uint32_t xvmc_draw_image(mp_image_t *mpi){
-   struct xvmc_render_state * rndr;
+   struct xvmc_pixfmt_render * rndr;
 
    assert(mpi!=NULL);
    assert(mpi->flags &MP_IMGFLAG_DIRECT);
 //   assert(mpi->flags &MP_IMGFLAGS_DRAWBACK);
 
-   rndr = (struct xvmc_render_state*)mpi->priv;//there is copy in plane[2]
+   rndr = (struct xvmc_pixfmt_render*)mpi->priv;//there is copy in plane[2]
    assert( rndr != NULL );
    assert( rndr->magic_id == AV_XVMC_RENDER_MAGIC );
    if( mp_msg_test(MSGT_VO,MSGL_DBG4) )
@@ -521,8 +521,8 @@ int vm = flags & VOFLAG_MODESWITCHING;
    printf("vo_xvmc: mv_blocks allocated\n");
 
    if(surface_render==NULL)
-      surface_render=malloc(MAX_SURFACES*sizeof(struct xvmc_render_state));//easy mem debug
-   memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_render_state));
+      surface_render=malloc(MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));//easy mem debug
+   memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));
 
    for(i=0; i<MAX_SURFACES; i++){
       rez=XvMCCreateSurface(mDisplay,&ctx,&surface_array[i]);
@@ -843,7 +843,7 @@ int rez;
 }
 
 static void draw_osd(void){
-struct xvmc_render_state * osd_rndr;
+struct xvmc_pixfmt_render * osd_rndr;
 int osd_has_changed;
 int have_osd_to_draw;
 int rez;
@@ -937,7 +937,7 @@ int status,rez;
    XvMCSyncSurface(mDisplay, srf);
 }
 
-static void put_xvmc_image(struct xvmc_render_state * p_render_surface,
+static void put_xvmc_image(struct xvmc_pixfmt_render * p_render_surface,
 			   int draw_ck){
 int rez;
 struct vo_rect src_rect, dst_rect;
@@ -1058,7 +1058,7 @@ int i;
                     surface_render[i].state); 
       }
 
-      memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_render_state));//for debuging
+      memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));//for debuging
       free(surface_render);surface_render=NULL;
 
       XvMCDestroyContext(mDisplay,&ctx);
@@ -1114,13 +1114,13 @@ int mode_id;
 
 static int draw_slice(uint8_t *image[], int stride[],
 			   int w, int h, int x, int y){
-struct xvmc_render_state * rndr;
+struct xvmc_pixfmt_render * rndr;
 int rez;
 
    if( mp_msg_test(MSGT_VO,MSGL_DBG4) )
       printf("vo_xvmc: draw_slice y=%d\n",y);
 
-   rndr = (struct xvmc_render_state*)image[2];//this is copy of priv-ate
+   rndr = (struct xvmc_pixfmt_render*)image[2];//this is copy of priv-ate
    assert( rndr != NULL );
    assert( rndr->magic_id == AV_XVMC_RENDER_MAGIC );
 
@@ -1174,8 +1174,8 @@ int rez;
 
 //XvMCHide hides the surface on next retrace, so
 //check if the surface is not still displaying
-static void check_osd_source(struct xvmc_render_state * src_rndr){
-struct xvmc_render_state * osd_rndr;
+static void check_osd_source(struct xvmc_pixfmt_render * src_rndr){
+struct xvmc_pixfmt_render * osd_rndr;
 int stat;
       //If this is source surface, check does the OSD rendering is compleate
       if(src_rndr->state & AV_XVMC_STATE_OSD_SOURCE){
@@ -1198,10 +1198,10 @@ int i,num;
    return num;
 }
 
-static struct xvmc_render_state * find_free_surface(void) {
+static struct xvmc_pixfmt_render * find_free_surface(void) {
 int i,t;
 int stat;
-struct xvmc_render_state * visible_rndr;
+struct xvmc_pixfmt_render * visible_rndr;
 
    visible_rndr = NULL;
    for(i=0; i<number_of_surfaces; i++){
@@ -1251,7 +1251,7 @@ int i;
 }
 
 static uint32_t get_image(mp_image_t *mpi){
-   struct xvmc_render_state * rndr;
+   struct xvmc_pixfmt_render * rndr;
 
    rndr = find_free_surface();
 



More information about the MPlayer-cvslog mailing list