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:
Maxime Ripard
2018-07-17 16:17:12 +02:00
parent 913e1e642c
commit 4ad990e087
15 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -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_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 \ mpeg2.h picture.h subpicture.h image.h v4l2.h video.h media.h utils.h \
tiled_yuv.h h264.h tiled_yuv.h h264.h
+1 -1
View File
@@ -25,7 +25,7 @@
#include "buffer.h" #include "buffer.h"
#include "context.h" #include "context.h"
#include "sunxi_cedrus.h" #include "request.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
+1 -1
View File
@@ -29,7 +29,7 @@
#include <va/va_backend.h> #include <va/va_backend.h>
#include "object_heap.h" #include "object_heap.h"
#include "sunxi_cedrus.h" #include "request.h"
#define BUFFER(data, id) \ #define BUFFER(data, id) \
((struct object_buffer *)object_heap_lookup(&(data)->buffer_heap, id)) ((struct object_buffer *)object_heap_lookup(&(data)->buffer_heap, id))
+5 -5
View File
@@ -24,7 +24,7 @@
*/ */
#include "config.h" #include "config.h"
#include "sunxi_cedrus.h" #include "request.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@@ -63,8 +63,8 @@ VAStatus RequestCreateConfig(VADriverContextP context, VAProfile profile,
return VA_STATUS_ERROR_UNSUPPORTED_PROFILE; return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} }
if (attributes_count > SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES) if (attributes_count > V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES)
attributes_count = SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES; attributes_count = V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES;
id = object_heap_allocate(&driver_data->config_heap); id = object_heap_allocate(&driver_data->config_heap);
config_object = CONFIG(driver_data, id); config_object = CONFIG(driver_data, id);
@@ -116,7 +116,7 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context,
found = v4l2_find_format(driver_data->video_fd, found = v4l2_find_format(driver_data->video_fd,
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_PIX_FMT_MPEG2_SLICE); 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++] = VAProfileMPEG2Simple;
profiles[index++] = VAProfileMPEG2Main; profiles[index++] = VAProfileMPEG2Main;
} }
@@ -124,7 +124,7 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context,
found = v4l2_find_format(driver_data->video_fd, found = v4l2_find_format(driver_data->video_fd,
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_PIX_FMT_H264_SLICE); 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++] = VAProfileH264Main;
profiles[index++] = VAProfileH264High; profiles[index++] = VAProfileH264High;
profiles[index++] = VAProfileH264ConstrainedBaseline; profiles[index++] = VAProfileH264ConstrainedBaseline;
+2 -2
View File
@@ -29,7 +29,7 @@
#include <va/va_backend.h> #include <va/va_backend.h>
#include "object_heap.h" #include "object_heap.h"
#include "sunxi_cedrus.h" #include "request.h"
#define CONFIG(data, id) \ #define CONFIG(data, id) \
((struct object_config *)object_heap_lookup(&(data)->config_heap, id)) ((struct object_config *)object_heap_lookup(&(data)->config_heap, id))
@@ -40,7 +40,7 @@ struct object_config {
VAProfile profile; VAProfile profile;
VAEntrypoint entrypoint; VAEntrypoint entrypoint;
VAConfigAttrib attributes[SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES]; VAConfigAttrib attributes[V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES];
int attributes_count; int attributes_count;
}; };
+1 -1
View File
@@ -25,7 +25,7 @@
#include "context.h" #include "context.h"
#include "config.h" #include "config.h"
#include "sunxi_cedrus.h" #include "request.h"
#include "surface.h" #include "surface.h"
#include <stdlib.h> #include <stdlib.h>
+1 -1
View File
@@ -33,7 +33,7 @@
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include "sunxi_cedrus.h" #include "request.h"
#include "surface.h" #include "surface.h"
#include "v4l2.h" #include "v4l2.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#include "image.h" #include "image.h"
#include "buffer.h" #include "buffer.h"
#include "sunxi_cedrus.h" #include "request.h"
#include "surface.h" #include "surface.h"
#include <assert.h> #include <assert.h>
+1 -1
View File
@@ -25,7 +25,7 @@
#include "mpeg2.h" #include "mpeg2.h"
#include "context.h" #include "context.h"
#include "sunxi_cedrus.h" #include "request.h"
#include "surface.h" #include "surface.h"
#include <assert.h> #include <assert.h>
+1 -1
View File
@@ -27,7 +27,7 @@
#include "buffer.h" #include "buffer.h"
#include "config.h" #include "config.h"
#include "context.h" #include "context.h"
#include "sunxi_cedrus.h" #include "request.h"
#include "surface.h" #include "surface.h"
#include "h264.h" #include "h264.h"
+9 -9
View File
@@ -23,8 +23,8 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#ifndef _SUNXI_CEDRUS_H_ #ifndef _V4L2_REQUEST_H_
#define _SUNXI_CEDRUS_H_ #define _V4L2_REQUEST_H_
#include <stdbool.h> #include <stdbool.h>
@@ -34,14 +34,14 @@
#include <linux/videodev2.h> #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 V4L2_REQUEST_MAX_PROFILES 11
#define SUNXI_CEDRUS_MAX_ENTRYPOINTS 5 #define V4L2_REQUEST_MAX_ENTRYPOINTS 5
#define SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES 10 #define V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES 10
#define SUNXI_CEDRUS_MAX_IMAGE_FORMATS 10 #define V4L2_REQUEST_MAX_IMAGE_FORMATS 10
#define SUNXI_CEDRUS_MAX_SUBPIC_FORMATS 4 #define V4L2_REQUEST_MAX_SUBPIC_FORMATS 4
#define SUNXI_CEDRUS_MAX_DISPLAY_ATTRIBUTES 4 #define V4L2_REQUEST_MAX_DISPLAY_ATTRIBUTES 4
struct cedrus_data { struct cedrus_data {
struct object_heap config_heap; struct object_heap config_heap;
+1 -1
View File
@@ -23,8 +23,8 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "request.h"
#include "subpicture.h" #include "subpicture.h"
#include "sunxi_cedrus.h"
VAStatus RequestCreateSubpicture(VADriverContextP context, VAImageID image_id, VAStatus RequestCreateSubpicture(VADriverContextP context, VAImageID image_id,
VASubpictureID *subpicture_id) VASubpictureID *subpicture_id)
+8 -8
View File
@@ -35,7 +35,7 @@
#include <va/va_backend.h> #include <va/va_backend.h>
#include "sunxi_cedrus.h" #include "request.h"
#include "utils.h" #include "utils.h"
#include <assert.h> #include <assert.h>
@@ -69,13 +69,13 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context)
context->version_major = VA_MAJOR_VERSION; context->version_major = VA_MAJOR_VERSION;
context->version_minor = VA_MINOR_VERSION; context->version_minor = VA_MINOR_VERSION;
context->max_profiles = SUNXI_CEDRUS_MAX_PROFILES; context->max_profiles = V4L2_REQUEST_MAX_PROFILES;
context->max_entrypoints = SUNXI_CEDRUS_MAX_ENTRYPOINTS; context->max_entrypoints = V4L2_REQUEST_MAX_ENTRYPOINTS;
context->max_attributes = SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES; context->max_attributes = V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES;
context->max_image_formats = SUNXI_CEDRUS_MAX_IMAGE_FORMATS; context->max_image_formats = V4L2_REQUEST_MAX_IMAGE_FORMATS;
context->max_subpic_formats = SUNXI_CEDRUS_MAX_SUBPIC_FORMATS; context->max_subpic_formats = V4L2_REQUEST_MAX_SUBPIC_FORMATS;
context->max_display_attributes = SUNXI_CEDRUS_MAX_DISPLAY_ATTRIBUTES; context->max_display_attributes = V4L2_REQUEST_MAX_DISPLAY_ATTRIBUTES;
context->str_vendor = SUNXI_CEDRUS_STR_VENDOR; context->str_vendor = V4L2_REQUEST_STR_VENDOR;
vtable->vaTerminate = RequestTerminate; vtable->vaTerminate = RequestTerminate;
vtable->vaQueryConfigEntrypoints = RequestQueryConfigEntrypoints; vtable->vaQueryConfigEntrypoints = RequestQueryConfigEntrypoints;
+1 -1
View File
@@ -23,8 +23,8 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "request.h"
#include "surface.h" #include "surface.h"
#include "sunxi_cedrus.h"
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
+2 -2
View File
@@ -27,14 +27,14 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "sunxi_cedrus.h" #include "request.h"
#include "utils.h" #include "utils.h"
void request_log(const char *format, ...) void request_log(const char *format, ...)
{ {
va_list arguments; va_list arguments;
fprintf(stderr, "%s: ", SUNXI_CEDRUS_STR_VENDOR); fprintf(stderr, "%s: ", V4L2_REQUEST_STR_VENDOR);
va_start(arguments, format); va_start(arguments, format);
vfprintf(stderr, format, arguments); vfprintf(stderr, format, arguments);