diff options
author | Christian König <[email protected]> | 2013-10-17 06:21:40 -0600 |
---|---|---|
committer | Christian König <[email protected]> | 2014-02-13 11:11:24 +0100 |
commit | 9ff0cf903dc4ed806961d1e099d1308322092892 (patch) | |
tree | 59cff4466766af7c363d261a6eae3d040fc62211 /src/gallium/drivers/radeonsi | |
parent | cbdd052577e798e0cd7b39eb75cfebee406f8410 (diff) |
radeon/vce: initial VCE support v8
v2 (chk): revert feedback buffer hack
v3 (slava): fixed bitstream size calculation
v4 (chk): always create buffers in the right domain
v5 (chk): flush async
v6 (chk): rework fw interface add version check
v7 (leo): implement cropping support
v8 (chk): add hw checks
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Leo Liu <[email protected]>
Signed-off-by: Slava Grigorev <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_uvd.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c index 241288f08bd..9f25cd6b09a 100644 --- a/src/gallium/drivers/radeonsi/si_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -34,6 +34,7 @@ #include "si_pipe.h" #include "radeon/radeon_video.h" #include "radeon/radeon_uvd.h" +#include "radeon/radeon_vce.h" /** * creates an video buffer with an UVD compatible memory layout @@ -130,11 +131,30 @@ static struct radeon_winsys_cs_handle* si_uvd_set_dtb(struct ruvd_msg *msg, stru return luma->resource.cs_buf; } +/* get the radeon resources for VCE */ +static void si_vce_get_buffer(struct pipe_resource *resource, + struct radeon_winsys_cs_handle **handle, + struct radeon_surface **surface) +{ + struct r600_texture *res = (struct r600_texture *)resource; + + if (handle) + *handle = res->resource.cs_buf; + + if (surface) + *surface = &res->surface; +} + /** * creates an UVD compatible decoder */ struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context, const struct pipe_video_codec *templ) { + struct si_context *ctx = (struct si_context *)context; + + if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) + return rvce_create_encoder(context, templ, ctx->b.ws, si_vce_get_buffer); + return ruvd_create_decoder(context, templ, si_uvd_set_dtb); } |