forked from marfrit/libva-v4l2-request-fourier
context: Use object context structure directly instead of abstract type
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ VAStatus sunxi_cedrus_CreateBuffer(VADriverContextP ctx, VAContextID context,
|
||||
obj_buffer->map_size = 0;
|
||||
|
||||
if(obj_buffer->type == VASliceDataBufferType) {
|
||||
object_context_p obj_context;
|
||||
struct object_context *obj_context;
|
||||
|
||||
obj_context = CONTEXT(context);
|
||||
assert(obj_context);
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ VAStatus sunxi_cedrus_CreateContext(VADriverContextP ctx, VAConfigID config_id,
|
||||
}
|
||||
|
||||
int contextID = object_heap_allocate(&driver_data->context_heap);
|
||||
object_context_p obj_context = CONTEXT(contextID);
|
||||
struct object_context *obj_context = CONTEXT(contextID);
|
||||
if (NULL == obj_context)
|
||||
{
|
||||
vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
@@ -154,7 +154,7 @@ VAStatus sunxi_cedrus_CreateContext(VADriverContextP ctx, VAConfigID config_id,
|
||||
VAStatus sunxi_cedrus_DestroyContext(VADriverContextP ctx, VAContextID context)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
object_context_p obj_context = CONTEXT(context);
|
||||
struct object_context *obj_context = CONTEXT(context);
|
||||
assert(obj_context);
|
||||
enum v4l2_buf_type type;
|
||||
|
||||
|
||||
+1
-3
@@ -36,7 +36,7 @@
|
||||
#define INPUT_BUFFER_MAX_SIZE 131072
|
||||
#define INPUT_BUFFERS_NB 6
|
||||
|
||||
#define CONTEXT(id) ((object_context_p) object_heap_lookup(&driver_data->context_heap, id))
|
||||
#define CONTEXT(id) ((struct object_context *) object_heap_lookup(&driver_data->context_heap, id))
|
||||
#define CONTEXT_ID_OFFSET 0x02000000
|
||||
|
||||
struct object_context {
|
||||
@@ -55,8 +55,6 @@ struct object_context {
|
||||
struct v4l2_ctrl_mpeg4_frame_hdr mpeg4_frame_hdr;
|
||||
};
|
||||
|
||||
typedef struct object_context *object_context_p;
|
||||
|
||||
VAStatus sunxi_cedrus_CreateContext(VADriverContextP ctx, VAConfigID config_id,
|
||||
int picture_width, int picture_height, int flag,
|
||||
VASurfaceID *render_targets, int num_render_targets,
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg2_slice_data(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
@@ -53,7 +53,7 @@ VAStatus sunxi_cedrus_render_mpeg2_slice_data(VADriverContextP ctx,
|
||||
}
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg2_picture_parameter(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
|
||||
+2
-2
@@ -34,11 +34,11 @@
|
||||
#include "surface.h"
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg2_slice_data(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer);
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg2_picture_parameter(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer);
|
||||
|
||||
#endif /* _MPEG2_H_ */
|
||||
|
||||
+3
-3
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg4_slice_data(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
@@ -71,7 +71,7 @@ VAStatus sunxi_cedrus_render_mpeg4_slice_data(VADriverContextP ctx,
|
||||
}
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg4_picture_parameter(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
@@ -122,7 +122,7 @@ VAStatus sunxi_cedrus_render_mpeg4_picture_parameter(VADriverContextP ctx,
|
||||
}
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg4_slice_parameter(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer)
|
||||
{
|
||||
VASliceParameterBufferMPEG4 *slice_param = (VASliceParameterBufferMPEG4 *)obj_buffer->buffer_data;
|
||||
|
||||
+3
-3
@@ -34,15 +34,15 @@
|
||||
#include "surface.h"
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg4_slice_data(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer);
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg4_picture_parameter(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer);
|
||||
|
||||
VAStatus sunxi_cedrus_render_mpeg4_slice_parameter(VADriverContextP ctx,
|
||||
object_context_p obj_context, object_surface_p obj_surface,
|
||||
struct object_context *obj_context, object_surface_p obj_surface,
|
||||
struct object_buffer *obj_buffer);
|
||||
|
||||
#endif /* _MPEG4_H_ */
|
||||
|
||||
+3
-3
@@ -55,7 +55,7 @@ VAStatus sunxi_cedrus_BeginPicture(VADriverContextP ctx, VAContextID context,
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
object_context_p obj_context;
|
||||
struct object_context *obj_context;
|
||||
object_surface_p obj_surface;
|
||||
|
||||
obj_context = CONTEXT(context);
|
||||
@@ -85,7 +85,7 @@ VAStatus sunxi_cedrus_RenderPicture(VADriverContextP ctx, VAContextID context,
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
object_context_p obj_context;
|
||||
struct object_context *obj_context;
|
||||
object_surface_p obj_surface;
|
||||
object_config_p obj_config;
|
||||
int i;
|
||||
@@ -144,7 +144,7 @@ VAStatus sunxi_cedrus_EndPicture(VADriverContextP ctx, VAContextID context)
|
||||
{
|
||||
INIT_DRIVER_DATA
|
||||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
object_context_p obj_context;
|
||||
struct object_context *obj_context;
|
||||
object_surface_p obj_surface;
|
||||
struct v4l2_buffer out_buf, cap_buf;
|
||||
struct v4l2_plane plane[1];
|
||||
|
||||
Reference in New Issue
Block a user