vl: rename pipe_video_decoder to pipe_video_codec
authorChristian König <christian.koenig@amd.com>
Mon, 15 Jul 2013 09:48:04 +0000 (03:48 -0600)
committerChristian König <christian.koenig@amd.com>
Mon, 19 Aug 2013 08:21:15 +0000 (10:21 +0200)
Signed-off-by: Christian König <christian.koenig@amd.com>
41 files changed:
src/gallium/auxiliary/vl/vl_compositor.h
src/gallium/auxiliary/vl/vl_decoder.c
src/gallium/auxiliary/vl/vl_decoder.h
src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h
src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
src/gallium/auxiliary/vl/vl_mpeg12_decoder.h
src/gallium/auxiliary/vl/vl_video_buffer.c
src/gallium/auxiliary/vl/vl_video_buffer.h
src/gallium/drivers/ilo/ilo_video.c
src/gallium/drivers/nouveau/nouveau_video.c
src/gallium/drivers/nouveau/nouveau_video.h
src/gallium/drivers/nouveau/nouveau_vp3_video.c
src/gallium/drivers/nouveau/nouveau_vp3_video.h
src/gallium/drivers/nv50/nv50_context.c
src/gallium/drivers/nv50/nv50_context.h
src/gallium/drivers/nv50/nv84_video.c
src/gallium/drivers/nv50/nv84_video.h
src/gallium/drivers/nv50/nv98_video.c
src/gallium/drivers/nvc0/nvc0_context.c
src/gallium/drivers/nvc0/nvc0_context.h
src/gallium/drivers/nvc0/nvc0_video.c
src/gallium/drivers/r300/r300_context.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_uvd.c
src/gallium/drivers/radeon/radeon_uvd.c
src/gallium/drivers/radeon/radeon_uvd.h
src/gallium/drivers/radeonsi/radeonsi_pipe.c
src/gallium/drivers/radeonsi/radeonsi_pipe.h
src/gallium/drivers/radeonsi/radeonsi_uvd.c
src/gallium/drivers/softpipe/sp_context.c
src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_video_codec.h [new file with mode: 0644]
src/gallium/include/pipe/p_video_decoder.h [deleted file]
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/vdpau/vdpau_private.h
src/gallium/state_trackers/xvmc/context.c
src/gallium/state_trackers/xvmc/subpicture.c
src/gallium/state_trackers/xvmc/surface.c
src/gallium/state_trackers/xvmc/xvmc_private.h

index 2a1f66cfb163fd91752227ee9222263fd6a05b8c..8e01901765af3eb424686bc87ab78849d3c41fff 100644 (file)
@@ -29,7 +29,7 @@
 #define vl_compositor_h
 
 #include "pipe/p_state.h"
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 #include "pipe/p_video_state.h"
 
 #include "util/u_rect.h"
index 60e0ce995e6b8be179680ff2c5ded6930c77c0b7..f19834fb3d522e9108c22596fc0e59c5377638a6 100644 (file)
@@ -25,7 +25,7 @@
  *
  **************************************************************************/
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 #include "util/u_video.h"
 
@@ -59,12 +59,12 @@ vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile)
    }
 }
 
-struct pipe_video_decoder *
+struct pipe_video_codec *
 vl_create_decoder(struct pipe_context *pipe,
-                  const struct pipe_video_decoder *templat)
+                  const struct pipe_video_codec *templat)
 {
    unsigned width = templat->width, height = templat->height;
-   struct pipe_video_decoder temp;
+   struct pipe_video_codec temp;
    bool pot_buffers;
 
    assert(pipe);
index 64a1b14df6fce41be5c95b0f2567502e761e4bd4..124315f073f2f1e64dd6b6994387dbd6a0d2fa75 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef vl_decoder_h
 #define vl_decoder_h
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 /**
  * check if a given profile is supported with shader based decoding
@@ -44,10 +44,10 @@ int
 vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile);
 
 /**
- * standard implementation of pipe->create_video_decoder
+ * standard implementation of pipe->create_video_codec
  */
-struct pipe_video_decoder *
+struct pipe_video_codec *
 vl_create_decoder(struct pipe_context *pipe,
-                  const struct pipe_video_decoder *templat);
+                  const struct pipe_video_codec *templat);
 
 #endif /* vl_decoder_h */
index d8c53117db43f0d118e3afe0336c4583b50d56c8..cfa5eab94d61de2faa467fda3257dd37d4226016 100644 (file)
@@ -26,7 +26,7 @@
  *
  **************************************************************************/
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 #include "util/u_memory.h"
 
 #include "vl_vlc.h"
@@ -965,7 +965,7 @@ decode_slice(struct vl_mpg12_bs *bs, struct pipe_video_buffer *target)
 }
 
 void
-vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_decoder *decoder)
+vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_codec *decoder)
 {
    static bool tables_initialized = false;
 
index 0a34814f61c29e3461786f48f128eca21ea1d8bb..ffbe11f10b712c031c4c7a21d770de57dbfb75e8 100644 (file)
@@ -33,7 +33,7 @@
 
 struct vl_mpg12_bs
 {
-   struct pipe_video_decoder *decoder;
+   struct pipe_video_codec *decoder;
 
    struct pipe_mpeg12_picture_desc *desc;
    struct dct_coeff *intra_dct_tbl;
@@ -43,7 +43,7 @@ struct vl_mpg12_bs
 };
 
 void
-vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_decoder *decoder);
+vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_codec *decoder);
 
 void
 vl_mpg12_bs_decode(struct vl_mpg12_bs *bs,
index 9349b5e171c1c753986f9ccfc03029e31ef4e483..b60b22fc265e16f5d6266a95c6546351007b3386 100644 (file)
@@ -399,7 +399,7 @@ vl_mpeg12_destroy_buffer(void *buffer)
 }
 
 static void
-vl_mpeg12_destroy(struct pipe_video_decoder *decoder)
+vl_mpeg12_destroy(struct pipe_video_codec *decoder)
 {
    struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder*)decoder;
    unsigned i;
@@ -503,7 +503,7 @@ error_vertex_buffer:
 }
 
 static void
-vl_mpeg12_begin_frame(struct pipe_video_decoder *decoder,
+vl_mpeg12_begin_frame(struct pipe_video_codec *decoder,
                       struct pipe_video_buffer *target,
                       struct pipe_picture_desc *picture)
 {
@@ -568,7 +568,7 @@ vl_mpeg12_begin_frame(struct pipe_video_decoder *decoder,
 }
 
 static void
-vl_mpeg12_decode_macroblock(struct pipe_video_decoder *decoder,
+vl_mpeg12_decode_macroblock(struct pipe_video_codec *decoder,
                             struct pipe_video_buffer *target,
                             struct pipe_picture_desc *picture,
                             const struct pipe_macroblock *macroblocks,
@@ -638,7 +638,7 @@ vl_mpeg12_decode_macroblock(struct pipe_video_decoder *decoder,
 }
 
 static void
-vl_mpeg12_decode_bitstream(struct pipe_video_decoder *decoder,
+vl_mpeg12_decode_bitstream(struct pipe_video_codec *decoder,
                            struct pipe_video_buffer *target,
                            struct pipe_picture_desc *picture,
                            unsigned num_buffers,
@@ -664,7 +664,7 @@ vl_mpeg12_decode_bitstream(struct pipe_video_decoder *decoder,
 }
 
 static void
-vl_mpeg12_end_frame(struct pipe_video_decoder *decoder,
+vl_mpeg12_end_frame(struct pipe_video_codec *decoder,
                     struct pipe_video_buffer *target,
                     struct pipe_picture_desc *picture)
 {
@@ -757,7 +757,7 @@ vl_mpeg12_end_frame(struct pipe_video_decoder *decoder,
 }
 
 static void
-vl_mpeg12_flush(struct pipe_video_decoder *decoder)
+vl_mpeg12_flush(struct pipe_video_codec *decoder)
 {
    assert(decoder);
 
@@ -1016,9 +1016,9 @@ mc_frag_shader_callback(void *priv, struct vl_mc *mc,
    }
 }
 
-struct pipe_video_decoder *
+struct pipe_video_codec *
 vl_create_mpeg12_decoder(struct pipe_context *context,
-                         const struct pipe_video_decoder *templat)
+                         const struct pipe_video_codec *templat)
 {
    const unsigned block_size_pixels = VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT;
    const struct format_config *format_config;
index dd284ee65314f1574e9cbe375f69bd27ec3754da..c7fe5e6b5d32df08b19f119e5e48a3dc8e80a10a 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef vl_mpeg12_decoder_h
 #define vl_mpeg12_decoder_h
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 #include "vl_mpeg12_bitstream.h"
 #include "vl_zscan.h"
@@ -43,7 +43,7 @@ struct pipe_context;
 
 struct vl_mpeg12_decoder
 {
-   struct pipe_video_decoder base;
+   struct pipe_video_codec base;
 
    unsigned chroma_width, chroma_height;
 
@@ -102,8 +102,8 @@ struct vl_mpeg12_buffer
 /**
  * creates a shader based mpeg12 decoder
  */
-struct pipe_video_decoder *
+struct pipe_video_codec *
 vl_create_mpeg12_decoder(struct pipe_context *pipe,
-                         const struct pipe_video_decoder *templat);
+                         const struct pipe_video_codec *templat);
 
 #endif /* vl_mpeg12_decoder_h */
index 6ef95e44be7eb845feeaeba1cdc22b03e0e97c01..16c7649388bf37a83a60bc4f8c461812fb61384b 100644 (file)
@@ -186,11 +186,11 @@ vl_video_buffer_max_size(struct pipe_screen *screen)
 
 void
 vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
-                                    struct pipe_video_decoder *vdec,
+                                    struct pipe_video_codec *vcodec,
                                     void *associated_data,
                                     void (*destroy_associated_data)(void *))
 {
-   vbuf->decoder = vdec;
+   vbuf->codec = vcodec;
 
    if (vbuf->associated_data == associated_data)
       return;
@@ -204,9 +204,9 @@ vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
 
 void *
 vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf,
-                                    struct pipe_video_decoder *vdec)
+                                    struct pipe_video_codec *vcodec)
 {
-   if (vbuf->decoder == vdec)
+   if (vbuf->codec == vcodec)
       return vbuf->associated_data;
    else
       return NULL;
index 178f429830ea0973fa7e53679f2652c8a8622b30..e92e270311611f03d1390677dd4e5b35e76af988 100644 (file)
@@ -29,7 +29,7 @@
 #define vl_video_buffer_h
 
 #include "pipe/p_context.h"
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 #include "vl_defines.h"
 
@@ -80,7 +80,7 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen,
  */
 void
 vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
-                                    struct pipe_video_decoder *vdec,
+                                    struct pipe_video_codec *vcodec,
                                     void *associated_data,
                                     void (*destroy_associated_data)(void *));
 
@@ -89,7 +89,7 @@ vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
  */
 void *
 vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf,
-                                    struct pipe_video_decoder *vdec);
+                                    struct pipe_video_codec *vcodec);
 
 /**
  * fill a resource template for the given plane
index 95305db37b15ff6ed574a151f5532b3157b9a881..04be1da81a219ec1aaff2434e99f0c699bb86669 100644 (file)
@@ -35,9 +35,9 @@
  * Nothing here.  We could make use of the video codec engine someday.
  */
 
-static struct pipe_video_decoder *
+static struct pipe_video_codec *
 ilo_create_video_decoder(struct pipe_context *pipe,
-                         const struct pipe_video_decoder *templ)
+                         const struct pipe_video_codec *templ)
 {
    return vl_create_decoder(pipe, templ);
 }
@@ -55,6 +55,6 @@ ilo_create_video_buffer(struct pipe_context *pipe,
 void
 ilo_init_video_functions(struct ilo_context *ilo)
 {
-   ilo->base.create_video_decoder = ilo_create_video_decoder;
+   ilo->base.create_video_codec = ilo_create_video_decoder;
    ilo->base.create_video_buffer = ilo_create_video_buffer;
 }
index 9cf5e349bd7016d2d945cf3b780b4a086e6701a4..67b67392bbce63e2caa580adf71ea9ca50d7b2b8 100644 (file)
@@ -403,14 +403,14 @@ nouveau_decoder_surface_index(struct nouveau_decoder *dec,
 }
 
 static void
-nouveau_decoder_begin_frame(struct pipe_video_decoder *decoder,
+nouveau_decoder_begin_frame(struct pipe_video_codec *decoder,
                             struct pipe_video_buffer *target,
                             struct pipe_picture_desc *picture)
 {
 }
 
 static void
-nouveau_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
+nouveau_decoder_decode_macroblock(struct pipe_video_codec *decoder,
                                   struct pipe_video_buffer *target,
                                   struct pipe_picture_desc *picture,
                                   const struct pipe_macroblock *pipe_mb,
@@ -457,14 +457,14 @@ nouveau_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
 }
 
 static void
-nouveau_decoder_end_frame(struct pipe_video_decoder *decoder,
+nouveau_decoder_end_frame(struct pipe_video_codec *decoder,
                           struct pipe_video_buffer *target,
                           struct pipe_picture_desc *picture)
 {
 }
 
 static void
-nouveau_decoder_flush(struct pipe_video_decoder *decoder)
+nouveau_decoder_flush(struct pipe_video_codec *decoder)
 {
    struct nouveau_decoder *dec = (struct nouveau_decoder *)decoder;
    if (dec->ofs)
@@ -472,7 +472,7 @@ nouveau_decoder_flush(struct pipe_video_decoder *decoder)
 }
 
 static void
-nouveau_decoder_destroy(struct pipe_video_decoder *decoder)
+nouveau_decoder_destroy(struct pipe_video_codec *decoder)
 {
    struct nouveau_decoder *dec = (struct nouveau_decoder*)decoder;
 
@@ -497,9 +497,9 @@ nouveau_decoder_destroy(struct pipe_video_decoder *decoder)
    FREE(dec);
 }
 
-static struct pipe_video_decoder *
+static struct pipe_video_codec *
 nouveau_create_decoder(struct pipe_context *context,
-                       const struct pipe_video_decoder *templ,
+                       const struct pipe_video_codec *templ,
                        struct nouveau_screen *screen)
 {
    struct nv04_fifo nv04_data = { .vram = 0xbeef0201, .gart = 0xbeef0202 };
@@ -867,9 +867,9 @@ nouveau_screen_init_vdec(struct nouveau_screen *screen)
    screen->base.is_video_format_supported = vl_video_buffer_is_format_supported;
 }
 
-static struct pipe_video_decoder *
+static struct pipe_video_codec *
 nouveau_context_create_decoder(struct pipe_context *context,
-                               const struct pipe_video_decoder *templ)
+                               const struct pipe_video_codec *templ)
 {
    struct nouveau_screen *screen = nouveau_context(context)->screen;
    return nouveau_create_decoder(context, templ, screen);
@@ -886,6 +886,6 @@ nouveau_context_video_buffer_create(struct pipe_context *pipe,
 void
 nouveau_context_init_vdec(struct nouveau_context *nv)
 {
-   nv->pipe.create_video_decoder = nouveau_context_create_decoder;
+   nv->pipe.create_video_codec = nouveau_context_create_decoder;
    nv->pipe.create_video_buffer = nouveau_context_video_buffer_create;
 }
index be537582eac29fd3059c8868bbe6ec33aa03039d..08d48b371fda0338c1d62e831ee1d2d9fd759a09 100644 (file)
@@ -17,7 +17,7 @@ struct nouveau_video_buffer {
 };
 
 struct nouveau_decoder {
-   struct pipe_video_decoder base;
+   struct pipe_video_codec base;
    struct nouveau_screen *screen;
    struct nouveau_pushbuf *push;
    struct nouveau_object *chan;
index 611b455a46abff0b0c9c0b45e04c75bdebc012f3..be0e6b3fafd6b3233a6c70ed22898948900405ff 100644 (file)
@@ -169,26 +169,26 @@ error:
 }
 
 static void
-nouveau_vp3_decoder_flush(struct pipe_video_decoder *decoder)
+nouveau_vp3_decoder_flush(struct pipe_video_codec *decoder)
 {
 }
 
 static void
-nouveau_vp3_decoder_begin_frame(struct pipe_video_decoder *decoder,
+nouveau_vp3_decoder_begin_frame(struct pipe_video_codec *decoder,
                                 struct pipe_video_buffer *target,
                                 struct pipe_picture_desc *picture)
 {
 }
 
 static void
-nouveau_vp3_decoder_end_frame(struct pipe_video_decoder *decoder,
+nouveau_vp3_decoder_end_frame(struct pipe_video_codec *decoder,
                               struct pipe_video_buffer *target,
                               struct pipe_picture_desc *picture)
 {
 }
 
 static void
-nouveau_vp3_decoder_destroy(struct pipe_video_decoder *decoder)
+nouveau_vp3_decoder_destroy(struct pipe_video_codec *decoder)
 {
    struct nouveau_vp3_decoder *dec = (struct nouveau_vp3_decoder *)decoder;
    int i;
@@ -223,7 +223,7 @@ nouveau_vp3_decoder_destroy(struct pipe_video_decoder *decoder)
 }
 
 void
-nouveau_vp3_decoder_init_common(struct pipe_video_decoder *dec)
+nouveau_vp3_decoder_init_common(struct pipe_video_codec *dec)
 {
    dec->destroy = nouveau_vp3_decoder_destroy;
    dec->flush = nouveau_vp3_decoder_flush;
index 9af29cddaedb55e74ea1c9ab6e3224438a535dd9..177f0a851d0c5c1e9b14ac257b626e3ff90589ee 100644 (file)
@@ -60,7 +60,7 @@ union pipe_desc {
 };
 
 struct nouveau_vp3_decoder {
-   struct pipe_video_decoder base;
+   struct pipe_video_codec base;
    struct nouveau_client *client;
    struct nouveau_object *channel[3], *bsp, *vp, *ppp;
    struct nouveau_pushbuf *pushbuf[3];
@@ -198,7 +198,7 @@ nouveau_vp3_video_buffer_create(struct pipe_context *pipe,
                                 int flags);
 
 void
-nouveau_vp3_decoder_init_common(struct pipe_video_decoder *decoder);
+nouveau_vp3_decoder_init_common(struct pipe_video_codec *decoder);
 
 int
 nouveau_vp3_load_firmware(struct nouveau_vp3_decoder *dec,
index 0ed9d8f1839f7d905759b7fb8dc7240d8df528d3..d9de443b1e58be95a8b0599550f257ba9e8d28dc 100644 (file)
@@ -265,11 +265,11 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
    } else if (screen->base.device->chipset < 0x98 ||
               screen->base.device->chipset == 0xa0) {
       /* VP2 */
-      pipe->create_video_decoder = nv84_create_decoder;
+      pipe->create_video_codec = nv84_create_decoder;
       pipe->create_video_buffer = nv84_video_buffer_create;
    } else {
       /* VP3/4 */
-      pipe->create_video_decoder = nv98_create_decoder;
+      pipe->create_video_codec = nv98_create_decoder;
       pipe->create_video_buffer = nv98_video_buffer_create;
    }
 
index 3c24546beefd1d190deab7731361e1230434fe7d..f89a55110cf643053975a6a7c6612c549cf830da 100644 (file)
@@ -290,9 +290,9 @@ void nv50_vertex_arrays_validate(struct nv50_context *nv50);
 void nv50_push_vbo(struct nv50_context *, const struct pipe_draw_info *);
 
 /* nv84_video.c */
-struct pipe_video_decoder *
+struct pipe_video_codec *
 nv84_create_decoder(struct pipe_context *context,
-                    const struct pipe_video_decoder *templ);
+                    const struct pipe_video_codec *templ);
 
 struct pipe_video_buffer *
 nv84_video_buffer_create(struct pipe_context *pipe,
@@ -309,9 +309,9 @@ nv84_screen_video_supported(struct pipe_screen *screen,
                             enum pipe_video_profile profile);
 
 /* nv98_video.c */
-struct pipe_video_decoder *
+struct pipe_video_codec *
 nv98_create_decoder(struct pipe_context *context,
-                    const struct pipe_video_decoder *templ);
+                    const struct pipe_video_codec *templ);
 
 struct pipe_video_buffer *
 nv98_video_buffer_create(struct pipe_context *pipe,
index 7c81d2d402559e80883bd33391bb99afcee4ee2b..7759979b499cd6d51eb4ca67ffe631aecf0c4743 100644 (file)
@@ -121,7 +121,7 @@ nv84_load_vp_firmware_mpeg(struct nouveau_device *dev, struct nv84_decoder *dec)
 }
 
 static void
-nv84_decoder_decode_bitstream_h264(struct pipe_video_decoder *decoder,
+nv84_decoder_decode_bitstream_h264(struct pipe_video_codec *decoder,
                                    struct pipe_video_buffer *video_target,
                                    struct pipe_picture_desc *picture,
                                    unsigned num_buffers,
@@ -140,26 +140,26 @@ nv84_decoder_decode_bitstream_h264(struct pipe_video_decoder *decoder,
 }
 
 static void
-nv84_decoder_flush(struct pipe_video_decoder *decoder)
+nv84_decoder_flush(struct pipe_video_codec *decoder)
 {
 }
 
 static void
-nv84_decoder_begin_frame_h264(struct pipe_video_decoder *decoder,
+nv84_decoder_begin_frame_h264(struct pipe_video_codec *decoder,
                               struct pipe_video_buffer *target,
                               struct pipe_picture_desc *picture)
 {
 }
 
 static void
-nv84_decoder_end_frame_h264(struct pipe_video_decoder *decoder,
+nv84_decoder_end_frame_h264(struct pipe_video_codec *decoder,
                             struct pipe_video_buffer *target,
                             struct pipe_picture_desc *picture)
 {
 }
 
 static void
-nv84_decoder_decode_bitstream_mpeg12(struct pipe_video_decoder *decoder,
+nv84_decoder_decode_bitstream_mpeg12(struct pipe_video_codec *decoder,
                                      struct pipe_video_buffer *video_target,
                                      struct pipe_picture_desc *picture,
                                      unsigned num_buffers,
@@ -179,7 +179,7 @@ nv84_decoder_decode_bitstream_mpeg12(struct pipe_video_decoder *decoder,
 }
 
 static void
-nv84_decoder_begin_frame_mpeg12(struct pipe_video_decoder *decoder,
+nv84_decoder_begin_frame_mpeg12(struct pipe_video_codec *decoder,
                               struct pipe_video_buffer *target,
                               struct pipe_picture_desc *picture)
 {
@@ -202,7 +202,7 @@ nv84_decoder_begin_frame_mpeg12(struct pipe_video_decoder *decoder,
 }
 
 static void
-nv84_decoder_end_frame_mpeg12(struct pipe_video_decoder *decoder,
+nv84_decoder_end_frame_mpeg12(struct pipe_video_codec *decoder,
                               struct pipe_video_buffer *target,
                               struct pipe_picture_desc *picture)
 {
@@ -213,7 +213,7 @@ nv84_decoder_end_frame_mpeg12(struct pipe_video_decoder *decoder,
 }
 
 static void
-nv84_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
+nv84_decoder_decode_macroblock(struct pipe_video_codec *decoder,
                                struct pipe_video_buffer *target,
                                struct pipe_picture_desc *picture,
                                const struct pipe_macroblock *macroblocks,
@@ -229,7 +229,7 @@ nv84_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
 }
 
 static void
-nv84_decoder_destroy(struct pipe_video_decoder *decoder)
+nv84_decoder_destroy(struct pipe_video_codec *decoder)
 {
    struct nv84_decoder *dec = (struct nv84_decoder *)decoder;
 
@@ -261,9 +261,9 @@ nv84_decoder_destroy(struct pipe_video_decoder *decoder)
    FREE(dec);
 }
 
-struct pipe_video_decoder *
+struct pipe_video_codec *
 nv84_create_decoder(struct pipe_context *context,
-                    const struct pipe_video_decoder *templ)
+                    const struct pipe_video_codec *templ)
 {
    struct nv50_context *nv50 = (struct nv50_context *)context;
    struct nouveau_screen *screen = &nv50->screen->base;
index 4240cef6564c77dd1e4a5276738cb87380b2ded1..b43fe9685d23dd1db42a2b4af7f1221b48f0d26b 100644 (file)
@@ -58,7 +58,7 @@ struct nv84_video_buffer {
 };
 
 struct nv84_decoder {
-   struct pipe_video_decoder base;
+   struct pipe_video_codec base;
    struct nouveau_client *client;
    struct nouveau_object *bsp_channel, *vp_channel, *bsp, *vp;
    struct nouveau_pushbuf *bsp_pushbuf, *vp_pushbuf;
index 541cd729352c64216aca9e6579f1c24fc7399ef9..0fa3a626d9c4d7e307e22927a2667b7ae6fa9b9c 100644 (file)
@@ -26,7 +26,7 @@
 #include "util/u_format.h"
 
 static void
-nv98_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
+nv98_decoder_decode_bitstream(struct pipe_video_codec *decoder,
                               struct pipe_video_buffer *video_target,
                               struct pipe_picture_desc *picture,
                               unsigned num_buffers,
@@ -56,9 +56,9 @@ nv98_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
    nv98_decoder_ppp(dec, desc, target, comm_seq);
 }
 
-struct pipe_video_decoder *
+struct pipe_video_codec *
 nv98_create_decoder(struct pipe_context *context,
-                    const struct pipe_video_decoder *templ)
+                    const struct pipe_video_codec *templ)
 {
    struct nouveau_screen *screen = &((struct nv50_context *)context)->screen->base;
    struct nouveau_vp3_decoder *dec;
index 5da491f14e9697c0b3ada88bb42543a0a3a4f00f..bf0c204e197397f3a82e8407899f94aac7e3b87e 100644 (file)
@@ -286,7 +286,7 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
    draw_set_rasterize_stage(nvc0->draw, nvc0_draw_render_stage(nvc0));
 #endif
 
-   pipe->create_video_decoder = nvc0_create_decoder;
+   pipe->create_video_codec = nvc0_create_decoder;
    pipe->create_video_buffer = nvc0_video_buffer_create;
 
    /* shader builtin library is per-screen, but we need a context for m2mf */
index d976de6fd910d70292731fd66d242e69b6690100..2c84cdf44c6cc0de71604a22661c060093c88075 100644 (file)
@@ -333,9 +333,9 @@ void nvc0_vertex_arrays_validate(struct nvc0_context *);
 void nvc0_idxbuf_validate(struct nvc0_context *);
 
 /* nvc0_video.c */
-struct pipe_video_decoder *
+struct pipe_video_codec *
 nvc0_create_decoder(struct pipe_context *context,
-                    const struct pipe_video_decoder *templ);
+                    const struct pipe_video_codec *templ);
 
 struct pipe_video_buffer *
 nvc0_video_buffer_create(struct pipe_context *pipe,
index e913126df4c5e2b0d111a3d2b74443ed2afafb2e..f3a301eeea8ff23ae4b1472f89a94862feed3c86 100644 (file)
@@ -26,7 +26,7 @@
 #include "util/u_format.h"
 
 static void
-nvc0_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
+nvc0_decoder_decode_bitstream(struct pipe_video_codec *decoder,
                               struct pipe_video_buffer *video_target,
                               struct pipe_picture_desc *picture,
                               unsigned num_buffers,
@@ -56,9 +56,9 @@ nvc0_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
    nvc0_decoder_ppp(dec, desc, target, comm_seq);
 }
 
-struct pipe_video_decoder *
+struct pipe_video_codec *
 nvc0_create_decoder(struct pipe_context *context,
-                    const struct pipe_video_decoder *templ)
+                    const struct pipe_video_codec *templ)
 {
    struct nouveau_screen *screen = &((struct nvc0_context *)context)->screen->base;
    struct nouveau_vp3_decoder *dec;
index a808eb98d407157026216371f6feff6ac02af729..5627aafec593415463807fd7551cd52f3e3fabcb 100644 (file)
@@ -409,7 +409,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
     r300_init_render_functions(r300);
     r300_init_states(&r300->context);
 
-    r300->context.create_video_decoder = vl_create_decoder;
+    r300->context.create_video_codec = vl_create_decoder;
     r300->context.create_video_buffer = vl_video_buffer_create;
 
     r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4,
index e5aa55e46a9e2a5f6171ee0a364e31f85f0a25cf..c8fb547a30a8f2f5295756a3195af61c81cbfbb9 100644 (file)
@@ -400,10 +400,10 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
        r600_init_surface_functions(rctx);
 
        if (rscreen->info.has_uvd) {
-               rctx->context.create_video_decoder = r600_uvd_create_decoder;
+               rctx->context.create_video_codec = r600_uvd_create_decoder;
                rctx->context.create_video_buffer = r600_video_buffer_create;
        } else {
-               rctx->context.create_video_decoder = vl_create_decoder;
+               rctx->context.create_video_codec = vl_create_decoder;
                rctx->context.create_video_buffer = vl_video_buffer_create;
        }
 
index eaef920b156e1e9c8029519f9d2702be43826f06..743f9abf6ab23fb34b881c93f4663a5e3e2aa3b2 100644 (file)
@@ -890,8 +890,8 @@ unsigned r600_tex_compare(unsigned compare);
 bool sampler_state_needs_border_color(const struct pipe_sampler_state *state);
 
 /* r600_uvd.c */
-struct pipe_video_decoder *r600_uvd_create_decoder(struct pipe_context *context,
-                                                  const struct pipe_video_decoder *decoder);
+struct pipe_video_codec *r600_uvd_create_decoder(struct pipe_context *context,
+                                                  const struct pipe_video_codec *decoder);
 
 struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe,
                                                   const struct pipe_video_buffer *tmpl);
index 288790591ce4ca5a194e30147ccb4d4a9816ea16..8fb58614ad21f9f37b8492ce6361069fa23e509a 100644 (file)
@@ -36,7 +36,7 @@
 #include <errno.h>
 #include <unistd.h>
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 #include "util/u_memory.h"
 #include "util/u_video.h"
@@ -164,8 +164,8 @@ static struct radeon_winsys_cs_handle* r600_uvd_set_dtb(struct ruvd_msg *msg, st
 }
 
 /* create decoder */
-struct pipe_video_decoder *r600_uvd_create_decoder(struct pipe_context *context,
-                                                  const struct pipe_video_decoder *templat)
+struct pipe_video_codec *r600_uvd_create_decoder(struct pipe_context *context,
+                                                  const struct pipe_video_codec *templat)
 {
        struct r600_context *ctx = (struct r600_context *)context;
 
index fd6bc4c20cfa9e6899a851220d055b0c62ef36b2..ed4e4fc8f3d6e2da3029ceeb1cb511a244ffa947 100644 (file)
@@ -37,7 +37,7 @@
 #include <unistd.h>
 #include <stdio.h>
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 #include "util/u_memory.h"
 #include "util/u_video.h"
@@ -65,7 +65,7 @@ struct ruvd_buffer
 
 /* UVD decoder representation */
 struct ruvd_decoder {
-       struct pipe_video_decoder       base;
+       struct pipe_video_codec         base;
 
        ruvd_set_dtb                    set_dtb;
 
@@ -262,7 +262,7 @@ static uint32_t profile2stream_type(enum pipe_video_profile profile)
 }
 
 /* calculate size of reference picture buffer */
-static unsigned calc_dpb_size(const struct pipe_video_decoder *templ)
+static unsigned calc_dpb_size(const struct pipe_video_codec *templ)
 {
        unsigned width_in_mb, height_in_mb, image_size, dpb_size;
 
@@ -613,7 +613,7 @@ static struct ruvd_mpeg4 get_mpeg4_msg(struct ruvd_decoder *dec,
 /**
  * destroy this video decoder
  */
-static void ruvd_destroy(struct pipe_video_decoder *decoder)
+static void ruvd_destroy(struct pipe_video_codec *decoder)
 {
        struct ruvd_decoder *dec = (struct ruvd_decoder*)decoder;
        struct ruvd_msg msg;
@@ -650,7 +650,7 @@ static void ruvd_destroy_associated_data(void *data)
 /**
  * start decoding of a new frame
  */
-static void ruvd_begin_frame(struct pipe_video_decoder *decoder,
+static void ruvd_begin_frame(struct pipe_video_codec *decoder,
                             struct pipe_video_buffer *target,
                             struct pipe_picture_desc *picture)
 {
@@ -672,7 +672,7 @@ static void ruvd_begin_frame(struct pipe_video_decoder *decoder,
 /**
  * decode a macroblock
  */
-static void ruvd_decode_macroblock(struct pipe_video_decoder *decoder,
+static void ruvd_decode_macroblock(struct pipe_video_codec *decoder,
                                   struct pipe_video_buffer *target,
                                   struct pipe_picture_desc *picture,
                                   const struct pipe_macroblock *macroblocks,
@@ -685,7 +685,7 @@ static void ruvd_decode_macroblock(struct pipe_video_decoder *decoder,
 /**
  * decode a bitstream
  */
-static void ruvd_decode_bitstream(struct pipe_video_decoder *decoder,
+static void ruvd_decode_bitstream(struct pipe_video_codec *decoder,
                                  struct pipe_video_buffer *target,
                                  struct pipe_picture_desc *picture,
                                  unsigned num_buffers,
@@ -728,7 +728,7 @@ static void ruvd_decode_bitstream(struct pipe_video_decoder *decoder,
 /**
  * end decoding of the current frame
  */
-static void ruvd_end_frame(struct pipe_video_decoder *decoder,
+static void ruvd_end_frame(struct pipe_video_codec *decoder,
                           struct pipe_video_buffer *target,
                           struct pipe_picture_desc *picture)
 {
@@ -809,17 +809,17 @@ static void ruvd_end_frame(struct pipe_video_decoder *decoder,
 /**
  * flush any outstanding command buffers to the hardware
  */
-static void ruvd_flush(struct pipe_video_decoder *decoder)
+static void ruvd_flush(struct pipe_video_codec *decoder)
 {
 }
 
 /**
  * create and UVD decoder
  */
-struct pipe_video_decoder *ruvd_create_decoder(struct pipe_context *context,
-                                              const struct pipe_video_decoder *templ,
-                                              struct radeon_winsys* ws,
-                                              ruvd_set_dtb set_dtb)
+struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
+                                            const struct pipe_video_codec *templ,
+                                            struct radeon_winsys* ws,
+                                            ruvd_set_dtb set_dtb)
 {
        unsigned dpb_size = calc_dpb_size(templ);
        unsigned width = templ->width, height = templ->height;
index 82fbda4d1ee55b06b3be10300921f9b1bfe242da..89a10c8fe9189a7a7e8136bd5d56bb7280d77d28 100644 (file)
@@ -345,10 +345,10 @@ typedef struct radeon_winsys_cs_handle* (*ruvd_set_dtb)
 (struct ruvd_msg* msg, struct vl_video_buffer *vb);
 
 /* create an UVD decode */
-struct pipe_video_decoder *ruvd_create_decoder(struct pipe_context *context,
-                                              const struct pipe_video_decoder *templat,
-                                              struct radeon_winsys* ws,
-                                              ruvd_set_dtb set_dtb);
+struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
+                                            const struct pipe_video_codec *templat,
+                                            struct radeon_winsys* ws,
+                                            ruvd_set_dtb set_dtb);
 
 /* join surfaces into the same buffer with identical tiling params
    sumup their sizes and replace the backend buffers with a single bo */
index 7de9a4eb720c4f67f5b86565901854e33aad88db..b491672e128232dcae75958c95bca668a81436a0 100644 (file)
@@ -230,10 +230,10 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
        si_init_compute_functions(rctx);
 
        if (rscreen->info.has_uvd) {
-               rctx->context.create_video_decoder = radeonsi_uvd_create_decoder;
+               rctx->context.create_video_codec = radeonsi_uvd_create_decoder;
                rctx->context.create_video_buffer = radeonsi_video_buffer_create;
        } else {
-               rctx->context.create_video_decoder = vl_create_decoder;
+               rctx->context.create_video_codec = vl_create_decoder;
                rctx->context.create_video_buffer = vl_video_buffer_create;
        }
 
index cbfd7dae4be208063a35169a91ac999608b07374..f9e49996e2cd13c66f4eaf81d6134d463bcf366f 100644 (file)
@@ -277,8 +277,8 @@ void r600_trace_emit(struct r600_context *rctx);
 void si_init_compute_functions(struct r600_context *rctx);
 
 /* radeonsi_uvd.c */
-struct pipe_video_decoder *radeonsi_uvd_create_decoder(struct pipe_context *context,
-                                                       const struct pipe_video_decoder *templ);
+struct pipe_video_codec *radeonsi_uvd_create_decoder(struct pipe_context *context,
+                                                     const struct pipe_video_codec *templ);
 
 struct pipe_video_buffer *radeonsi_video_buffer_create(struct pipe_context *pipe,
                                                       const struct pipe_video_buffer *tmpl);
index d19bf3382a0329546158a51cef5afe936eaa4892..4d48b4e6f9c89cdc54017e5f92815e1c266c6c1c 100644 (file)
@@ -36,7 +36,7 @@
 #include <errno.h>
 #include <unistd.h>
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 #include "util/u_memory.h"
 #include "util/u_video.h"
@@ -146,8 +146,8 @@ static struct radeon_winsys_cs_handle* radeonsi_uvd_set_dtb(struct ruvd_msg *msg
 /**
  * creates an UVD compatible decoder
  */
-struct pipe_video_decoder *radeonsi_uvd_create_decoder(struct pipe_context *context,
-                                                      const struct pipe_video_decoder *templ)
+struct pipe_video_codec *radeonsi_uvd_create_decoder(struct pipe_context *context,
+                                                    const struct pipe_video_codec *templ)
 {
        struct r600_context *ctx = (struct r600_context *)context;
 
index 14cfdc8c23bfffd172c65a2d5fe3678ff7e4d593..6796ad29c17f07c9f45b7c3bc389960fecc8fbc7 100644 (file)
@@ -228,7 +228,7 @@ softpipe_create_context( struct pipe_screen *screen,
 
    softpipe->pipe.render_condition = softpipe_render_condition;
    
-   softpipe->pipe.create_video_decoder = vl_create_decoder;
+   softpipe->pipe.create_video_codec = vl_create_decoder;
    softpipe->pipe.create_video_buffer = vl_video_buffer_create;
 
    /*
index 0ca57f41f5cab1e1bab0e2603af1c67360d90259..69352f7260f0470aae4611a7f262c25097994783 100644 (file)
@@ -65,7 +65,7 @@ struct pipe_transfer;
 struct pipe_vertex_buffer;
 struct pipe_vertex_element;
 struct pipe_video_buffer;
-struct pipe_video_decoder;
+struct pipe_video_codec;
 struct pipe_viewport_state;
 struct pipe_compute_state;
 union pipe_color_union;
@@ -430,10 +430,10 @@ struct pipe_context {
    void (*texture_barrier)(struct pipe_context *);
    
    /**
-    * Creates a video decoder for a specific video codec/profile
+    * Creates a video codec for a specific video format/profile
     */
-   struct pipe_video_decoder *(*create_video_decoder)( struct pipe_context *context,
-                                                       const struct pipe_video_decoder *templat );
+   struct pipe_video_codec *(*create_video_codec)( struct pipe_context *context,
+                                                   const struct pipe_video_codec *templat );
 
    /**
     * Creates a video buffer as decoding target
diff --git a/src/gallium/include/pipe/p_video_codec.h b/src/gallium/include/pipe/p_video_codec.h
new file mode 100644 (file)
index 0000000..17f6804
--- /dev/null
@@ -0,0 +1,156 @@
+/**************************************************************************
+ *
+ * Copyright 2009 Younes Manton.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef PIPE_VIDEO_CONTEXT_H
+#define PIPE_VIDEO_CONTEXT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pipe/p_video_state.h"
+
+struct pipe_screen;
+struct pipe_surface;
+struct pipe_macroblock;
+struct pipe_picture_desc;
+struct pipe_fence_handle;
+
+/**
+ * Gallium video codec for a specific format/profile
+ */
+struct pipe_video_codec
+{
+   struct pipe_context *context;
+
+   enum pipe_video_profile profile;
+   enum pipe_video_entrypoint entrypoint;
+   enum pipe_video_chroma_format chroma_format;
+   unsigned width;
+   unsigned height;
+   unsigned max_references;
+   bool expect_chunked_decode;
+
+   /**
+    * destroy this video decoder
+    */
+   void (*destroy)(struct pipe_video_codec *codec);
+
+   /**
+    * start decoding of a new frame
+    */
+   void (*begin_frame)(struct pipe_video_codec *codec,
+                       struct pipe_video_buffer *target,
+                       struct pipe_picture_desc *picture);
+
+   /**
+    * decode a macroblock
+    */
+   void (*decode_macroblock)(struct pipe_video_codec *codec,
+                             struct pipe_video_buffer *target,
+                             struct pipe_picture_desc *picture,
+                             const struct pipe_macroblock *macroblocks,
+                             unsigned num_macroblocks);
+
+   /**
+    * decode a bitstream
+    */
+   void (*decode_bitstream)(struct pipe_video_codec *codec,
+                            struct pipe_video_buffer *target,
+                            struct pipe_picture_desc *picture,
+                            unsigned num_buffers,
+                            const void * const *buffers,
+                            const unsigned *sizes);
+
+   /**
+    * end decoding of the current frame
+    */
+   void (*end_frame)(struct pipe_video_codec *codec,
+                     struct pipe_video_buffer *target,
+                     struct pipe_picture_desc *picture);
+
+   /**
+    * flush any outstanding command buffers to the hardware
+    * should be called before a video_buffer is acessed by the state tracker again
+    */
+   void (*flush)(struct pipe_video_codec *codec);
+};
+
+/**
+ * output for decoding / input for displaying
+ */
+struct pipe_video_buffer
+{
+   struct pipe_context *context;
+
+   enum pipe_format buffer_format;
+   enum pipe_video_chroma_format chroma_format;
+   unsigned width;
+   unsigned height;
+   bool interlaced;
+
+   /**
+    * destroy this video buffer
+    */
+   void (*destroy)(struct pipe_video_buffer *buffer);
+
+   /**
+    * get a individual sampler view for each plane
+    */
+   struct pipe_sampler_view **(*get_sampler_view_planes)(struct pipe_video_buffer *buffer);
+
+   /**
+    * get a individual sampler view for each component
+    */
+   struct pipe_sampler_view **(*get_sampler_view_components)(struct pipe_video_buffer *buffer);
+
+   /**
+    * get a individual surfaces for each plane
+    */
+   struct pipe_surface **(*get_surfaces)(struct pipe_video_buffer *buffer);
+
+   /*
+    * auxiliary associated data
+    */
+   void *associated_data;
+
+   /*
+    * codec where the associated data came from
+    */
+   struct pipe_video_codec *codec;
+
+   /*
+    * destroy the associated data
+    */
+   void (*destroy_associated_data)(void *associated_data);
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PIPE_VIDEO_CONTEXT_H */
diff --git a/src/gallium/include/pipe/p_video_decoder.h b/src/gallium/include/pipe/p_video_decoder.h
deleted file mode 100644 (file)
index 6c9a748..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2009 Younes Manton.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-#ifndef PIPE_VIDEO_CONTEXT_H
-#define PIPE_VIDEO_CONTEXT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "pipe/p_video_state.h"
-
-struct pipe_screen;
-struct pipe_surface;
-struct pipe_macroblock;
-struct pipe_picture_desc;
-struct pipe_fence_handle;
-
-/**
- * Gallium video decoder for a specific codec/profile
- */
-struct pipe_video_decoder
-{
-   struct pipe_context *context;
-
-   enum pipe_video_profile profile;
-   enum pipe_video_entrypoint entrypoint;
-   enum pipe_video_chroma_format chroma_format;
-   unsigned width;
-   unsigned height;
-   unsigned max_references;
-   bool expect_chunked_decode;
-
-   /**
-    * destroy this video decoder
-    */
-   void (*destroy)(struct pipe_video_decoder *decoder);
-
-   /**
-    * start decoding of a new frame
-    */
-   void (*begin_frame)(struct pipe_video_decoder *decoder,
-                       struct pipe_video_buffer *target,
-                       struct pipe_picture_desc *picture);
-
-   /**
-    * decode a macroblock
-    */
-   void (*decode_macroblock)(struct pipe_video_decoder *decoder,
-                             struct pipe_video_buffer *target,
-                             struct pipe_picture_desc *picture,
-                             const struct pipe_macroblock *macroblocks,
-                             unsigned num_macroblocks);
-
-   /**
-    * decode a bitstream
-    */
-   void (*decode_bitstream)(struct pipe_video_decoder *decoder,
-                            struct pipe_video_buffer *target,
-                            struct pipe_picture_desc *picture,
-                            unsigned num_buffers,
-                            const void * const *buffers,
-                            const unsigned *sizes);
-
-   /**
-    * end decoding of the current frame
-    */
-   void (*end_frame)(struct pipe_video_decoder *decoder,
-                     struct pipe_video_buffer *target,
-                     struct pipe_picture_desc *picture);
-
-   /**
-    * flush any outstanding command buffers to the hardware
-    * should be called before a video_buffer is acessed by the state tracker again
-    */
-   void (*flush)(struct pipe_video_decoder *decoder);
-};
-
-/**
- * output for decoding / input for displaying
- */
-struct pipe_video_buffer
-{
-   struct pipe_context *context;
-
-   enum pipe_format buffer_format;
-   enum pipe_video_chroma_format chroma_format;
-   unsigned width;
-   unsigned height;
-   bool interlaced;
-
-   /**
-    * destroy this video buffer
-    */
-   void (*destroy)(struct pipe_video_buffer *buffer);
-
-   /**
-    * get a individual sampler view for each plane
-    */
-   struct pipe_sampler_view **(*get_sampler_view_planes)(struct pipe_video_buffer *buffer);
-
-   /**
-    * get a individual sampler view for each component
-    */
-   struct pipe_sampler_view **(*get_sampler_view_components)(struct pipe_video_buffer *buffer);
-
-   /**
-    * get a individual surfaces for each plane
-    */
-   struct pipe_surface **(*get_surfaces)(struct pipe_video_buffer *buffer);
-
-   /*
-    * auxiliary associated data
-    */
-   void *associated_data;
-
-   /*
-    * decoder where the associated data came from
-    */
-   struct pipe_video_decoder *decoder;
-
-   /*
-    * destroy the associated data
-    */
-   void (*destroy_associated_data)(void *associated_data);
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PIPE_VIDEO_CONTEXT_H */
index e254c50c1f79e67b20ffd0681ce56b9370460419..09927c564e857c84f8a5255c893f82bc23fd9ad5 100644 (file)
@@ -44,7 +44,7 @@ vlVdpDecoderCreate(VdpDevice device,
                    uint32_t max_references,
                    VdpDecoder *decoder)
 {
-   struct pipe_video_decoder templat = {};
+   struct pipe_video_codec templat = {};
    struct pipe_context *pipe;
    struct pipe_screen *screen;
    vlVdpDevice *dev;
@@ -97,7 +97,7 @@ vlVdpDecoderCreate(VdpDevice device,
    templat.height = height;
    templat.max_references = max_references;
 
-   vldecoder->decoder = pipe->create_video_decoder(pipe, &templat);
+   vldecoder->decoder = pipe->create_video_codec(pipe, &templat);
 
    if (!vldecoder->decoder) {
       ret = VDP_STATUS_ERROR;
@@ -426,7 +426,7 @@ vlVdpDecoderRender(VdpDecoder decoder,
    vlVdpSurface *vlsurf;
    VdpStatus ret;
    struct pipe_screen *screen;
-   struct pipe_video_decoder *dec;
+   struct pipe_video_codec *dec;
    bool buffer_support[2];
    unsigned i;
    union {
index 716d2180a6e765afe9f5242616caa497941fda0b..54545fe764089ca6aa7dc751b65ecabfeeef5a78 100644 (file)
@@ -34,7 +34,7 @@
 #include <vdpau/vdpau_x11.h>
 
 #include "pipe/p_compiler.h"
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 
 #include "util/u_debug.h"
 #include "util/u_rect.h"
@@ -387,7 +387,7 @@ typedef struct
 typedef struct
 {
    vlVdpDevice *device;
-   struct pipe_video_decoder *decoder;
+   struct pipe_video_codec *decoder;
 } vlVdpDecoder;
 
 typedef uint32_t vlHandle;
index d6301335b4ba05b45acedc7381eb6e4dfbbe3a3c..fe12b5d0f6aa5731f4531d874502560286ff90a6 100644 (file)
@@ -31,7 +31,7 @@
 #include <X11/extensions/XvMClib.h>
 
 #include "pipe/p_screen.h"
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 #include "pipe/p_video_state.h"
 #include "pipe/p_state.h"
 
@@ -191,7 +191,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
    Status ret;
    struct vl_screen *vscreen;
    struct pipe_context *pipe;
-   struct pipe_video_decoder templat = {};
+   struct pipe_video_codec templat = {};
    XvMCContextPrivate *context_priv;
    vl_csc_matrix csc;
 
@@ -253,7 +253,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
    templat.max_references = 2;
    templat.expect_chunked_decode = true;
 
-   context_priv->decoder = pipe->create_video_decoder(pipe, &templat);
+   context_priv->decoder = pipe->create_video_codec(pipe, &templat);
 
    if (!context_priv->decoder) {
       XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL decoder.\n");
index 3e13aa60a8ffe315465a5715e40fee7e98638847..51fcf78e8f1702472fa3ecf6421b843c9da81df9 100644 (file)
@@ -31,7 +31,7 @@
 #include <X11/extensions/XvMClib.h>
 
 #include "pipe/p_screen.h"
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 #include "pipe/p_state.h"
 
 #include "util/u_memory.h"
index de90e54057d3166f52b44a9b4db494bdeb1f0ee6..db32142a7e65aee1d69cd8d616db48380ecac5f3 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <X11/Xlibint.h>
 
-#include "pipe/p_video_decoder.h"
+#include "pipe/p_video_codec.h"
 #include "pipe/p_video_state.h"
 #include "pipe/p_state.h"
 
@@ -215,7 +215,7 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext *context, unsigned int pictur
 )
 {
    struct pipe_mpeg12_macroblock mb[num_macroblocks];
-   struct pipe_video_decoder *decoder;
+   struct pipe_video_codec *decoder;
    struct pipe_mpeg12_picture_desc desc;
 
    XvMCContextPrivate *context_priv;
index 014d83f0516a62323e0fbe17b28374e3b4949d12..905d7bc6ed529e5a4a9f479b1e12d77f9bebe81c 100644 (file)
@@ -42,7 +42,7 @@
 #define BLOCK_SIZE_SAMPLES 64
 #define BLOCK_SIZE_BYTES (BLOCK_SIZE_SAMPLES * 2)
 
-struct pipe_video_decoder;
+struct pipe_video_codec;
 struct pipe_video_buffer;
 
 struct pipe_sampler_view;
@@ -52,7 +52,7 @@ typedef struct
 {
    struct vl_screen *vscreen;
    struct pipe_context *pipe;
-   struct pipe_video_decoder *decoder;
+   struct pipe_video_codec *decoder;
 
    enum VL_CSC_COLOR_STANDARD color_standard;
    struct vl_procamp procamp;