#include "vl/vl_mpeg12_decoder.h"
#include "r600_pipe.h"
-#include "radeon/radeon_video.h"
-#include "radeon/radeon_uvd.h"
-#include "radeon/radeon_vce.h"
+#include "radeon_video.h"
+#include "radeon_uvd.h"
+#include "radeon_vce.h"
#include "r600d.h"
#define R600_UVD_ENABLE_TILING 0
struct r600_texture *resources[VL_NUM_COMPONENTS] = {};
struct radeon_surf* surfaces[VL_NUM_COMPONENTS] = {};
struct pb_buffer **pbs[VL_NUM_COMPONENTS] = {};
- const enum pipe_format *resource_formats;
+ enum pipe_format resource_formats[3];
struct pipe_video_buffer template;
struct pipe_resource templ;
unsigned i, array_size;
assert(pipe);
/* first create the needed resources as "normal" textures */
- resource_formats = vl_video_buffer_formats(pipe->screen, tmpl->buffer_format);
- if (!resource_formats)
- return NULL;
+ vl_get_video_buffer_formats(pipe->screen, tmpl->buffer_format, resource_formats);
array_size = tmpl->interlaced ? 2 : 1;
template = *tmpl;
surfaces[i] = &resources[i]->surface;
}
- rvid_join_surfaces(ctx->b.ws, templ.bind, pbs, surfaces);
+ rvid_join_surfaces(&ctx->b, pbs, surfaces);
for (i = 0; i < VL_NUM_COMPONENTS; ++i) {
if (!resources[i])
error:
for (i = 0; i < VL_NUM_COMPONENTS; ++i)
- pipe_resource_reference((struct pipe_resource **)&resources[i], NULL);
+ r600_texture_reference(&resources[i], NULL);
return NULL;
}