Skip to content
Snippets Groups Projects
Commit dc26eb53 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Hugo Beauzée-Luyssen
Browse files

orient: move typedefs to header file

parent e99b7019
No related branches found
No related tags found
1 merge request!1436orient: refactor for SIMD
Pipeline #193420 passed with stage
in 20 minutes and 39 seconds
......@@ -40,7 +40,7 @@ libyuy2_i422_plugin_la_SOURCES = video_chroma/yuy2_i422.c
libyuvp_plugin_la_SOURCES = video_chroma/yuvp.c
liborient_plugin_la_SOURCES = video_chroma/orient.c
liborient_plugin_la_SOURCES = video_chroma/orient.c video_chroma/orient.h
chroma_LTLIBRARIES = \
libi420_rgb_plugin.la \
......
......@@ -34,6 +34,8 @@
#include <vlc_mouse.h>
#include <vlc_picture.h>
#include "orient.h"
#define TRANSFORMS(bits) \
static void hflip_##bits(void *restrict dst, ptrdiff_t dst_stride, \
const void *restrict src, ptrdiff_t src_stride, \
......@@ -78,15 +80,7 @@ TRANSFORMS(16)
TRANSFORMS(32)
TRANSFORMS(64)
typedef void (*plane_transform_cb)(void *, ptrdiff_t, const void *, ptrdiff_t,
int, int);
#define MAX_ORDER 3
static const struct {
plane_transform_cb hflip[MAX_ORDER + 1];
plane_transform_cb transpose[MAX_ORDER + 1];
} transforms = {
static const struct plane_transforms transforms = {
{ hflip_8, hflip_16, hflip_32, hflip_64, },
{ transpose_8, transpose_16, transpose_32, transpose_64, },
};
......
/*****************************************************************************
* orient.h: image reorientation video conversion
*****************************************************************************
* Copyright (C) 2010 Laurent Aimar
* Copyright (C) 2012 Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <stdint.h>
typedef void (*plane_transform_cb)(void *, ptrdiff_t, const void *, ptrdiff_t,
int, int);
#define PLANE_TRANSFORM_MAX_ORDER 3
struct plane_transforms {
plane_transform_cb hflip[PLANE_TRANSFORM_MAX_ORDER + 1];
plane_transform_cb transpose[PLANE_TRANSFORM_MAX_ORDER + 1];
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment