forked from marfrit/libva-v4l2-request-fourier
tree: Rename the header and defines
The sunxi_cedrus.h header contains a bunch of defines prefixed with SUNXI_CEDRUS. As part as the ongoing migration to a more generic name, change that prefix for V4L2_REQUEST, and the header file to request.h Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ backend_c = sunxi_cedrus.c object_heap.c config.c surface.c context.c buffer.c \
|
||||
|
||||
backend_s = tiled_yuv.S
|
||||
|
||||
backend_h = sunxi_cedrus.h object_heap.h config.h surface.h context.h buffer.h \
|
||||
backend_h = request.h object_heap.h config.h surface.h context.h buffer.h \
|
||||
mpeg2.h picture.h subpicture.h image.h v4l2.h video.h media.h utils.h \
|
||||
tiled_yuv.h h264.h
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "buffer.h"
|
||||
#include "context.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
#include <va/va_backend.h>
|
||||
|
||||
#include "object_heap.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
|
||||
#define BUFFER(data, id) \
|
||||
((struct object_buffer *)object_heap_lookup(&(data)->buffer_heap, id))
|
||||
|
||||
+5
-5
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
@@ -63,8 +63,8 @@ VAStatus RequestCreateConfig(VADriverContextP context, VAProfile profile,
|
||||
return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
|
||||
}
|
||||
|
||||
if (attributes_count > SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES)
|
||||
attributes_count = SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES;
|
||||
if (attributes_count > V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES)
|
||||
attributes_count = V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES;
|
||||
|
||||
id = object_heap_allocate(&driver_data->config_heap);
|
||||
config_object = CONFIG(driver_data, id);
|
||||
@@ -116,7 +116,7 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context,
|
||||
found = v4l2_find_format(driver_data->video_fd,
|
||||
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||
V4L2_PIX_FMT_MPEG2_SLICE);
|
||||
if (found && index < (SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES - 2)) {
|
||||
if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 2)) {
|
||||
profiles[index++] = VAProfileMPEG2Simple;
|
||||
profiles[index++] = VAProfileMPEG2Main;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context,
|
||||
found = v4l2_find_format(driver_data->video_fd,
|
||||
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
|
||||
V4L2_PIX_FMT_H264_SLICE);
|
||||
if (found && index < (SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES - 5)) {
|
||||
if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 5)) {
|
||||
profiles[index++] = VAProfileH264Main;
|
||||
profiles[index++] = VAProfileH264High;
|
||||
profiles[index++] = VAProfileH264ConstrainedBaseline;
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
#include <va/va_backend.h>
|
||||
|
||||
#include "object_heap.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
|
||||
#define CONFIG(data, id) \
|
||||
((struct object_config *)object_heap_lookup(&(data)->config_heap, id))
|
||||
@@ -40,7 +40,7 @@ struct object_config {
|
||||
|
||||
VAProfile profile;
|
||||
VAEntrypoint entrypoint;
|
||||
VAConfigAttrib attributes[SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES];
|
||||
VAConfigAttrib attributes[V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES];
|
||||
int attributes_count;
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "context.h"
|
||||
#include "config.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
#include "surface.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
#include "surface.h"
|
||||
#include "v4l2.h"
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "image.h"
|
||||
#include "buffer.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
#include "surface.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "mpeg2.h"
|
||||
#include "context.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
#include "surface.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
#include "buffer.h"
|
||||
#include "config.h"
|
||||
#include "context.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
#include "surface.h"
|
||||
|
||||
#include "h264.h"
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUNXI_CEDRUS_H_
|
||||
#define _SUNXI_CEDRUS_H_
|
||||
#ifndef _V4L2_REQUEST_H_
|
||||
#define _V4L2_REQUEST_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#define SUNXI_CEDRUS_STR_VENDOR "Sunxi-Cedrus"
|
||||
#define V4L2_REQUEST_STR_VENDOR "Sunxi-Cedrus"
|
||||
|
||||
#define SUNXI_CEDRUS_MAX_PROFILES 11
|
||||
#define SUNXI_CEDRUS_MAX_ENTRYPOINTS 5
|
||||
#define SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES 10
|
||||
#define SUNXI_CEDRUS_MAX_IMAGE_FORMATS 10
|
||||
#define SUNXI_CEDRUS_MAX_SUBPIC_FORMATS 4
|
||||
#define SUNXI_CEDRUS_MAX_DISPLAY_ATTRIBUTES 4
|
||||
#define V4L2_REQUEST_MAX_PROFILES 11
|
||||
#define V4L2_REQUEST_MAX_ENTRYPOINTS 5
|
||||
#define V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES 10
|
||||
#define V4L2_REQUEST_MAX_IMAGE_FORMATS 10
|
||||
#define V4L2_REQUEST_MAX_SUBPIC_FORMATS 4
|
||||
#define V4L2_REQUEST_MAX_DISPLAY_ATTRIBUTES 4
|
||||
|
||||
struct cedrus_data {
|
||||
struct object_heap config_heap;
|
||||
+1
-1
@@ -23,8 +23,8 @@
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "request.h"
|
||||
#include "subpicture.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
|
||||
VAStatus RequestCreateSubpicture(VADriverContextP context, VAImageID image_id,
|
||||
VASubpictureID *subpicture_id)
|
||||
|
||||
+8
-8
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <va/va_backend.h>
|
||||
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <assert.h>
|
||||
@@ -69,13 +69,13 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context)
|
||||
|
||||
context->version_major = VA_MAJOR_VERSION;
|
||||
context->version_minor = VA_MINOR_VERSION;
|
||||
context->max_profiles = SUNXI_CEDRUS_MAX_PROFILES;
|
||||
context->max_entrypoints = SUNXI_CEDRUS_MAX_ENTRYPOINTS;
|
||||
context->max_attributes = SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES;
|
||||
context->max_image_formats = SUNXI_CEDRUS_MAX_IMAGE_FORMATS;
|
||||
context->max_subpic_formats = SUNXI_CEDRUS_MAX_SUBPIC_FORMATS;
|
||||
context->max_display_attributes = SUNXI_CEDRUS_MAX_DISPLAY_ATTRIBUTES;
|
||||
context->str_vendor = SUNXI_CEDRUS_STR_VENDOR;
|
||||
context->max_profiles = V4L2_REQUEST_MAX_PROFILES;
|
||||
context->max_entrypoints = V4L2_REQUEST_MAX_ENTRYPOINTS;
|
||||
context->max_attributes = V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES;
|
||||
context->max_image_formats = V4L2_REQUEST_MAX_IMAGE_FORMATS;
|
||||
context->max_subpic_formats = V4L2_REQUEST_MAX_SUBPIC_FORMATS;
|
||||
context->max_display_attributes = V4L2_REQUEST_MAX_DISPLAY_ATTRIBUTES;
|
||||
context->str_vendor = V4L2_REQUEST_STR_VENDOR;
|
||||
|
||||
vtable->vaTerminate = RequestTerminate;
|
||||
vtable->vaQueryConfigEntrypoints = RequestQueryConfigEntrypoints;
|
||||
|
||||
+1
-1
@@ -23,8 +23,8 @@
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "request.h"
|
||||
#include "surface.h"
|
||||
#include "sunxi_cedrus.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
|
||||
+2
-2
@@ -27,14 +27,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "request.h"
|
||||
#include "utils.h"
|
||||
|
||||
void request_log(const char *format, ...)
|
||||
{
|
||||
va_list arguments;
|
||||
|
||||
fprintf(stderr, "%s: ", SUNXI_CEDRUS_STR_VENDOR);
|
||||
fprintf(stderr, "%s: ", V4L2_REQUEST_STR_VENDOR);
|
||||
|
||||
va_start(arguments, format);
|
||||
vfprintf(stderr, format, arguments);
|
||||
|
||||
Reference in New Issue
Block a user