[g3dvl] rename map/unmap to begin/end frame
authorChristian König <deathsimple@vodafone.de>
Sun, 5 Jun 2011 15:53:48 +0000 (17:53 +0200)
committerChristian König <deathsimple@vodafone.de>
Sun, 5 Jun 2011 15:53:48 +0000 (17:53 +0200)
mapping and unmapping of buffers is just an implementation detail.
begining and ending an frame is much more descriptive

src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
src/gallium/include/pipe/p_video_context.h
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/xorg/xvmc/surface.c

index 201f3abab1341343c590bc52780181e8c3b56126..bdca9dbe3162c702d01203d0fd04be84b24a0281 100644 (file)
@@ -261,7 +261,7 @@ vl_mpeg12_buffer_destroy(struct pipe_video_decode_buffer *buffer)
 }
 
 static void
-vl_mpeg12_buffer_map(struct pipe_video_decode_buffer *buffer)
+vl_mpeg12_buffer_begin_frame(struct pipe_video_decode_buffer *buffer)
 {
    struct vl_mpeg12_buffer *buf = (struct vl_mpeg12_buffer*)buffer;
    struct vl_mpeg12_decoder *dec;
@@ -399,7 +399,7 @@ vl_mpeg12_buffer_decode_bitstream(struct pipe_video_decode_buffer *buffer,
 }
 
 static void
-vl_mpeg12_buffer_unmap(struct pipe_video_decode_buffer *buffer)
+vl_mpeg12_buffer_end_frame(struct pipe_video_decode_buffer *buffer)
 {
    struct vl_mpeg12_buffer *buf = (struct vl_mpeg12_buffer*)buffer;
    struct vl_mpeg12_decoder *dec;
@@ -472,13 +472,13 @@ vl_mpeg12_create_buffer(struct pipe_video_decoder *decoder)
 
    buffer->base.decoder = decoder;
    buffer->base.destroy = vl_mpeg12_buffer_destroy;
-   buffer->base.map = vl_mpeg12_buffer_map;
+   buffer->base.begin_frame = vl_mpeg12_buffer_begin_frame;
    buffer->base.get_ycbcr_stream = vl_mpeg12_buffer_get_ycbcr_stream;
    buffer->base.get_ycbcr_buffer = vl_mpeg12_buffer_get_ycbcr_buffer;
    buffer->base.get_mv_stream_stride = vl_mpeg12_buffer_get_mv_stream_stride;
    buffer->base.get_mv_stream = vl_mpeg12_buffer_get_mv_stream;
    buffer->base.decode_bitstream = vl_mpeg12_buffer_decode_bitstream;
-   buffer->base.unmap = vl_mpeg12_buffer_unmap;
+   buffer->base.end_frame = vl_mpeg12_buffer_end_frame;
 
    if (!vl_vb_init(&buffer->vertex_stream, dec->pipe,
                    dec->base.width / MACROBLOCK_WIDTH,
index 512b5b22d7797f4d71c56fa2e15bf06471957851..374fa511054934202295ee91f9030beab09f6fc3 100644 (file)
@@ -177,7 +177,7 @@ struct pipe_video_decode_buffer
    /**
     * map the input buffer into memory before starting decoding
     */
-   void (*map)(struct pipe_video_decode_buffer *decbuf);
+   void (*begin_frame)(struct pipe_video_decode_buffer *decbuf);
 
    /**
     * get the pointer where to put the ycbcr blocks of a component
@@ -210,7 +210,7 @@ struct pipe_video_decode_buffer
    /**
     * unmap decoder buffer before flushing
     */
-   void (*unmap)(struct pipe_video_decode_buffer *decbuf);
+   void (*end_frame)(struct pipe_video_decode_buffer *decbuf);
 };
 
 /**
index de6f96babcb487272e779130e3c73a669b9f7de9..5c6d04679243d86eceb59bacdcc47feeaedd2c54 100644 (file)
@@ -200,13 +200,13 @@ vlVdpDecoderRenderMpeg2(struct pipe_video_decoder *decoder,
    picture.intra_quantizer_matrix = picture_info->intra_quantizer_matrix;
    picture.non_intra_quantizer_matrix = picture_info->non_intra_quantizer_matrix;
 
-   buffer->map(buffer);
+   buffer->begin_frame(buffer);
 
    for (i = 0; i < bitstream_buffer_count; ++i)
       buffer->decode_bitstream(buffer, bitstream_buffers[i].bitstream_bytes,
                                bitstream_buffers[i].bitstream, &picture, num_ycbcr_blocks);
 
-   buffer->unmap(buffer);
+   buffer->end_frame(buffer);
 
    decoder->flush_buffer(buffer, num_ycbcr_blocks, ref_frames, target);
 
index da41a182164be9552f6c5b2d28c53df50a3937f8..4d6c58ebc76fd8c04ef075dc0f0772e60210cbd0 100644 (file)
@@ -277,7 +277,7 @@ unmap_and_flush_surface(XvMCSurfacePrivate *surface)
    }
 
    if (surface->mapped) {
-      surface->decode_buffer->unmap(surface->decode_buffer);
+      surface->decode_buffer->end_frame(surface->decode_buffer);
       for (i = 0; i < 3; ++i)
          num_ycbcr_blocks[i] = surface->ycbcr[i].num_blocks_added;
       context_priv->decoder->flush_buffer(surface->decode_buffer,
@@ -415,7 +415,7 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext *context, unsigned int pictur
    }
 
    if (!target_surface_priv->mapped) {
-      t_buffer->map(t_buffer);
+      t_buffer->begin_frame(t_buffer);
 
       for (i = 0; i < 3; ++i) {
          target_surface_priv->ycbcr[i].num_blocks_added = 0;