#include "video-format.h"
#include "video-orc.h"
+#ifndef restrict
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/* restrict should be available */
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define restrict __restrict__
+#elif defined(_MSC_VER) && _MSC_VER >= 1500
+#define restrict __restrict
+#else
+#define restrict /* no op */
+#endif
+#endif
+
/* Line conversion to AYUV */
#define GET_PLANE_STRIDE(plane) (stride(plane))
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
- const guint8 *sy = GET_Y_LINE (y);
- const guint8 *su = GET_U_LINE (uv);
- const guint8 *sv = GET_V_LINE (uv);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_Y_LINE (y);
+ const guint8 *restrict su = GET_U_LINE (uv);
+ const guint8 *restrict sv = GET_V_LINE (uv);
+ guint8 *restrict d = dest;
sy += x;
su += x >> 1;
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *s = GET_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest;
s += (x & ~1) << 1;
if (x & 1) {
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
g_return_if_fail (IS_ALIGNED (s, 8));
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
g_return_if_fail (IS_ALIGNED (s, 8));
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *s = GET_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest;
s += (x & ~1) << 1;
if (x & 1) {
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
g_return_if_fail (IS_ALIGNED (s, 8));
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest;
s += x * 3;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width; i++) {
d[i * 3 + 0] = s[i * 4 + 1];
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *s = GET_LINE (y);
+ const guint8 *restrict s = GET_LINE (y);
s += x * 4;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
+ guint8 *restrict d = GET_LINE (y);
memcpy (d, src, width * 4);
}
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint16 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
guint32 a0, a1, a2, a3;
guint16 y0, y1, y2, y3, y4, y5;
guint16 u0, u2, u4;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint16 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
guint32 a0, a1, a2, a3;
guint16 y0, y1, y2, y3, y4, y5;
guint16 u0, u1, u2;
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint16 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
s += (x & ~1) << 2;
if (x & 1) {
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint16 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
for (i = 0; i < width - 1; i += 2) {
GST_WRITE_UINT16_LE (d + i * 4 + 0, s[(i + 0) * 4 + 2]);
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *sy = GET_Y_LINE (y);
- const guint8 *su = GET_U_LINE (y);
- const guint8 *sv = GET_V_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_Y_LINE (y);
+ const guint8 *restrict su = GET_U_LINE (y);
+ const guint8 *restrict sv = GET_V_LINE (y);
+ guint8 *restrict d = dest;
sy += x;
su += x >> 2;
gint y, gint width)
{
int i;
- guint8 *dy = GET_Y_LINE (y);
- guint8 *du = GET_U_LINE (y);
- guint8 *dv = GET_V_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict dy = GET_Y_LINE (y);
+ guint8 *restrict du = GET_U_LINE (y);
+ guint8 *restrict dv = GET_V_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width - 3; i += 4) {
dy[i] = s[i * 4 + 1];
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *sy = GET_Y_LINE (y);
- const guint8 *su = GET_U_LINE (y);
- const guint8 *sv = GET_V_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_Y_LINE (y);
+ const guint8 *restrict su = GET_U_LINE (y);
+ const guint8 *restrict sv = GET_V_LINE (y);
+ guint8 *restrict d = dest;
sy += x;
su += x >> 1;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *dy = GET_Y_LINE (y);
- guint8 *du = GET_U_LINE (y);
- guint8 *dv = GET_V_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict dy = GET_Y_LINE (y);
+ guint8 *restrict du = GET_U_LINE (y);
+ guint8 *restrict dv = GET_V_LINE (y);
+ const guint8 *restrict s = src;
g_return_if_fail (IS_ALIGNED (s, 8));
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *sy = GET_Y_LINE (y);
- const guint8 *su = GET_U_LINE (y);
- const guint8 *sv = GET_V_LINE (y);
+ const guint8 *restrict sy = GET_Y_LINE (y);
+ const guint8 *restrict su = GET_U_LINE (y);
+ const guint8 *restrict sv = GET_V_LINE (y);
sy += x;
su += x;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *dy = GET_Y_LINE (y);
- guint8 *du = GET_U_LINE (y);
- guint8 *dv = GET_V_LINE (y);
+ guint8 *restrict dy = GET_Y_LINE (y);
+ guint8 *restrict du = GET_U_LINE (y);
+ guint8 *restrict dv = GET_V_LINE (y);
video_orc_pack_Y444 (dy, du, dv, src, width);
}
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *sr = GET_R_LINE (y);
- const guint8 *sg = GET_G_LINE (y);
- const guint8 *sb = GET_B_LINE (y);
+ const guint8 *restrict sr = GET_R_LINE (y);
+ const guint8 *restrict sg = GET_G_LINE (y);
+ const guint8 *restrict sb = GET_B_LINE (y);
sr += x * 4;
sg += x * 4;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *dr = GET_R_LINE (y);
- guint8 *dg = GET_G_LINE (y);
- guint8 *db = GET_B_LINE (y);
+ guint8 *restrict dr = GET_R_LINE (y);
+ guint8 *restrict dg = GET_G_LINE (y);
+ guint8 *restrict db = GET_B_LINE (y);
video_orc_pack_Y444 (dr, dg, db, src, width);
}
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *s = GET_LINE (y);
+ const guint8 *restrict s = GET_LINE (y);
s += x;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
+ guint8 *restrict d = GET_LINE (y);
video_orc_pack_GRAY8 (d, src, width);
}
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *s = GET_LINE (y);
- guint16 *d = dest;
+ const guint16 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
s += x;
gint y, gint width)
{
int i;
- guint16 *d = GET_LINE (y);
- const guint16 *s = src;
+ guint16 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
for (i = 0; i < width; i++) {
GST_WRITE_UINT16_BE (d + i, s[i * 4 + 1]);
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *s = GET_LINE (y);
- guint16 *d = dest;
+ const guint16 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
s += x;
gint y, gint width)
{
int i;
- guint16 *d = GET_LINE (y);
- const guint16 *s = src;
+ guint16 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
for (i = 0; i < width; i++) {
GST_WRITE_UINT16_LE (d + i, s[i * 4 + 1]);
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *s = GET_LINE (y);
- guint8 *d = dest, r, g, b;
+ const guint16 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest, r, g, b;
s += x;
gint y, gint width)
{
int i;
- guint16 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint16 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width; i++) {
d[i] = ((s[i * 4 + 1] >> 3) << 11) |
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *s = GET_LINE (y);
- guint8 *d = dest, r, g, b;
+ const guint16 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest, r, g, b;
s += x;
gint y, gint width)
{
int i;
- guint16 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint16 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width; i++) {
d[i] = ((s[i * 4 + 3] >> 3) << 11) |
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *s = GET_LINE (y);
- guint8 *d = dest, r, g, b;
+ const guint16 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest, r, g, b;
s += x;
gint y, gint width)
{
int i;
- guint16 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint16 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width; i++) {
d[i] = ((s[i * 4 + 1] >> 3) << 10) |
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *s = GET_LINE (y);
- guint8 *d = dest, r, g, b;
+ const guint16 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest, r, g, b;
s += x;
gint y, gint width)
{
int i;
- guint16 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint16 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width; i++) {
d[i] = ((s[i * 4 + 3] >> 3) << 10) |
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *s = GET_LINE (y);
+ const guint8 *restrict s = GET_LINE (y);
s += x * 4;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
+ guint8 *restrict d = GET_LINE (y);
video_orc_pack_BGRA (d, src, width);
}
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *s = GET_LINE (y);
+ const guint8 *restrict s = GET_LINE (y);
s += x * 4;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
+ guint8 *restrict d = GET_LINE (y);
video_orc_pack_ABGR (d, src, width);
}
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *s = GET_LINE (y);
+ const guint8 *restrict s = GET_LINE (y);
s += x * 4;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
+ guint8 *restrict d = GET_LINE (y);
video_orc_pack_RGBA (d, src, width);
}
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest;
s += x * 3;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width; i++) {
d[i * 3 + 0] = s[i * 4 + 1];
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest;
s += x * 3;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width; i++) {
d[i * 3 + 0] = s[i * 4 + 3];
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
- const guint8 *sy = GET_PLANE_LINE (0, y);
- const guint8 *suv = GET_PLANE_LINE (1, uv);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_PLANE_LINE (0, y);
+ const guint8 *restrict suv = GET_PLANE_LINE (1, uv);
+ guint8 *restrict d = dest;
sy += x;
suv += (x & ~1);
gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
- guint8 *dy = GET_PLANE_LINE (0, y);
- guint8 *duv = GET_PLANE_LINE (1, uv);
- const guint8 *s = src;
+ guint8 *restrict dy = GET_PLANE_LINE (0, y);
+ guint8 *restrict duv = GET_PLANE_LINE (1, uv);
+ const guint8 *restrict s = src;
if (IS_CHROMA_LINE_420 (y, flags)) {
g_return_if_fail (IS_ALIGNED (s, 8));
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
- const guint8 *sy = GET_PLANE_LINE (0, y);
- const guint8 *suv = GET_PLANE_LINE (1, uv);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_PLANE_LINE (0, y);
+ const guint8 *restrict suv = GET_PLANE_LINE (1, uv);
+ guint8 *restrict d = dest;
sy += x;
suv += (x & ~1);
gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
- guint8 *dy = GET_PLANE_LINE (0, y);
- guint8 *duv = GET_PLANE_LINE (1, uv);
- const guint8 *s = src;
+ guint8 *restrict dy = GET_PLANE_LINE (0, y);
+ guint8 *restrict duv = GET_PLANE_LINE (1, uv);
+ const guint8 *restrict s = src;
if (IS_CHROMA_LINE_420 (y, flags)) {
g_return_if_fail (IS_ALIGNED (s, 8));
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *sy = GET_PLANE_LINE (0, y);
- const guint8 *suv = GET_PLANE_LINE (1, y);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_PLANE_LINE (0, y);
+ const guint8 *restrict suv = GET_PLANE_LINE (1, y);
+ guint8 *restrict d = dest;
sy += x;
suv += (x & ~1);
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *dy = GET_PLANE_LINE (0, y);
- guint8 *duv = GET_PLANE_LINE (1, y);
- const guint8 *s = src;
+ guint8 *restrict dy = GET_PLANE_LINE (0, y);
+ guint8 *restrict duv = GET_PLANE_LINE (1, y);
+ const guint8 *restrict s = src;
g_return_if_fail (IS_ALIGNED (s, 8));
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- const guint8 *sy = GET_PLANE_LINE (0, y);
- const guint8 *suv = GET_PLANE_LINE (1, y);
+ const guint8 *restrict sy = GET_PLANE_LINE (0, y);
+ const guint8 *restrict suv = GET_PLANE_LINE (1, y);
sy += x;
suv += x << 1;
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *dy = GET_PLANE_LINE (0, y);
- guint8 *duv = GET_PLANE_LINE (1, y);
+ guint8 *restrict dy = GET_PLANE_LINE (0, y);
+ guint8 *restrict duv = GET_PLANE_LINE (1, y);
video_orc_pack_NV24 (dy, duv, src, width);
}
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint16 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
/* FIXME */
s += x << 1;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint16 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
for (i = 0; i < width; i += 2) {
guint16 y0, y1;
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
- const guint8 *sy = GET_Y_LINE (y);
- const guint8 *su = GET_U_LINE (uv);
- const guint8 *sv = GET_V_LINE (uv);
- const guint8 *sa = GET_A_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_Y_LINE (y);
+ const guint8 *restrict su = GET_U_LINE (uv);
+ const guint8 *restrict sv = GET_V_LINE (uv);
+ const guint8 *restrict sa = GET_A_LINE (y);
+ guint8 *restrict d = dest;
sy += x;
su += x >> 1;
gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
- guint8 *dy = GET_Y_LINE (y);
- guint8 *du = GET_U_LINE (uv);
- guint8 *dv = GET_V_LINE (uv);
- guint8 *da = GET_A_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict dy = GET_Y_LINE (y);
+ guint8 *restrict du = GET_U_LINE (uv);
+ guint8 *restrict dv = GET_V_LINE (uv);
+ guint8 *restrict da = GET_A_LINE (y);
+ const guint8 *restrict s = src;
if (IS_CHROMA_LINE_420 (y, flags)) {
g_return_if_fail (IS_ALIGNED (s, 8));
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- const guint32 *p = data[1];
- guint8 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ const guint32 *restrict p = data[1];
+ guint8 *restrict d = dest;
s += x;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
/* Use our poor man's palette, taken from ffmpegcolorspace too */
for (i = 0; i < width; i++) {
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_410 (y, flags);
- const guint8 *sy = GET_Y_LINE (y);
- const guint8 *su = GET_U_LINE (uv);
- const guint8 *sv = GET_V_LINE (uv);
- guint8 *d = dest;
+ const guint8 *restrict sy = GET_Y_LINE (y);
+ const guint8 *restrict su = GET_U_LINE (uv);
+ const guint8 *restrict sv = GET_V_LINE (uv);
+ guint8 *restrict d = dest;
sy += x;
su += x >> 2;
{
int i;
gint uv = GET_UV_410 (y, flags);
- guint8 *dy = GET_Y_LINE (y);
- guint8 *du = GET_U_LINE (uv);
- guint8 *dv = GET_V_LINE (uv);
- const guint8 *s = src;
+ guint8 *restrict dy = GET_Y_LINE (y);
+ guint8 *restrict du = GET_U_LINE (uv);
+ guint8 *restrict dv = GET_V_LINE (uv);
+ const guint8 *restrict s = src;
for (i = 0; i < width - 3; i += 4) {
dy[i] = s[i * 4 + 1];
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint8 *d = dest;
+ const guint8 *restrict s = GET_LINE (y);
+ guint8 *restrict d = dest;
guint8 y0, y1, y2, y3;
guint8 u0;
guint8 v0;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint8 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint8 *restrict s = src;
for (i = 0; i < width - 3; i += 4) {
d[(i >> 2) * 6 + 0] = s[i * 4 + 2];
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- guint8 *d = GET_LINE (y);
+ guint8 *restrict d = GET_LINE (y);
memcpy (d, src, width * 8);
}
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint8 *s = GET_LINE (y);
- guint16 *d = dest, R, G, B;
+ const guint8 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest, R, G, B;
s += x * 4;
gint y, gint width)
{
int i;
- guint8 *d = GET_LINE (y);
- const guint16 *s = src;
+ guint8 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
for (i = 0; i < width; i++) {
guint32 x = 0;
gint y, gint width)
{
int i;
- guint16 *dg = GET_G_LINE (y);
- guint16 *db = GET_B_LINE (y);
- guint16 *dr = GET_R_LINE (y);
+ guint16 *restrict dg = GET_G_LINE (y);
+ guint16 *restrict db = GET_B_LINE (y);
+ guint16 *restrict dr = GET_R_LINE (y);
guint16 G, B, R;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
for (i = 0; i < width; i++) {
G = (s[i * 4 + 2]) >> 6;
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *sg = GET_G_LINE (y);
- const guint16 *sb = GET_B_LINE (y);
- const guint16 *sr = GET_R_LINE (y);
- guint16 *d = dest, G, B, R;
+ const guint16 *restrict sg = GET_G_LINE (y);
+ const guint16 *restrict sb = GET_B_LINE (y);
+ const guint16 *restrict sr = GET_R_LINE (y);
+ guint16 *restrict d = dest, G, B, R;
sg += x;
sb += x;
gint y, gint width)
{
int i;
- guint16 *dg = GET_G_LINE (y);
- guint16 *db = GET_B_LINE (y);
- guint16 *dr = GET_R_LINE (y);
+ guint16 *restrict dg = GET_G_LINE (y);
+ guint16 *restrict db = GET_B_LINE (y);
+ guint16 *restrict dr = GET_R_LINE (y);
guint16 G, B, R;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
for (i = 0; i < width; i++) {
G = s[i * 4 + 2] >> 6;
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- guint16 *sy = GET_Y_LINE (y);
- guint16 *su = GET_U_LINE (y);
- guint16 *sv = GET_V_LINE (y);
- guint16 *d = dest, Y, U, V;
+ guint16 *restrict sy = GET_Y_LINE (y);
+ guint16 *restrict su = GET_U_LINE (y);
+ guint16 *restrict sv = GET_V_LINE (y);
+ guint16 *restrict d = dest, Y, U, V;
sy += x;
su += x;
gint y, gint width)
{
int i;
- guint16 *dy = GET_Y_LINE (y);
- guint16 *du = GET_U_LINE (y);
- guint16 *dv = GET_V_LINE (y);
+ guint16 *restrict dy = GET_Y_LINE (y);
+ guint16 *restrict du = GET_U_LINE (y);
+ guint16 *restrict dv = GET_V_LINE (y);
guint16 Y, U, V;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
for (i = 0; i < width; i++) {
Y = (s[i * 4 + 1]) >> 6;
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *sy = GET_Y_LINE (y);
- const guint16 *su = GET_U_LINE (y);
- const guint16 *sv = GET_V_LINE (y);
- guint16 *d = dest, Y, U, V;
+ const guint16 *restrict sy = GET_Y_LINE (y);
+ const guint16 *restrict su = GET_U_LINE (y);
+ const guint16 *restrict sv = GET_V_LINE (y);
+ guint16 *restrict d = dest, Y, U, V;
sy += x;
su += x;
gint y, gint width)
{
int i;
- guint16 *dy = GET_Y_LINE (y);
- guint16 *du = GET_U_LINE (y);
- guint16 *dv = GET_V_LINE (y);
+ guint16 *restrict dy = GET_Y_LINE (y);
+ guint16 *restrict du = GET_U_LINE (y);
+ guint16 *restrict dv = GET_V_LINE (y);
guint16 Y, U, V;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
for (i = 0; i < width; i++) {
Y = s[i * 4 + 1] >> 6;
{
int i;
gint uv = GET_UV_420 (y, flags);
- const guint16 *sy = GET_Y_LINE (y);
- const guint16 *su = GET_U_LINE (uv);
- const guint16 *sv = GET_V_LINE (uv);
- guint16 *d = dest, Y, U, V;
+ const guint16 *restrict sy = GET_Y_LINE (y);
+ const guint16 *restrict su = GET_U_LINE (uv);
+ const guint16 *restrict sv = GET_V_LINE (uv);
+ guint16 *restrict d = dest, Y, U, V;
sy += x;
su += x >> 1;
{
int i;
gint uv = GET_UV_420 (y, flags);
- guint16 *dy = GET_Y_LINE (y);
- guint16 *du = GET_U_LINE (uv);
- guint16 *dv = GET_V_LINE (uv);
+ guint16 *restrict dy = GET_Y_LINE (y);
+ guint16 *restrict du = GET_U_LINE (uv);
+ guint16 *restrict dv = GET_V_LINE (uv);
guint16 Y0, Y1, U, V;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
if (IS_CHROMA_LINE_420 (y, flags)) {
for (i = 0; i < width - 1; i += 2) {
{
int i;
gint uv = GET_UV_420 (y, flags);
- const guint16 *sy = GET_Y_LINE (y);
- const guint16 *su = GET_U_LINE (uv);
- const guint16 *sv = GET_V_LINE (uv);
- guint16 *d = dest, Y, U, V;
+ const guint16 *restrict sy = GET_Y_LINE (y);
+ const guint16 *restrict su = GET_U_LINE (uv);
+ const guint16 *restrict sv = GET_V_LINE (uv);
+ guint16 *restrict d = dest, Y, U, V;
sy += x;
su += x >> 1;
{
int i;
gint uv = GET_UV_420 (y, flags);
- guint16 *dy = GET_Y_LINE (y);
- guint16 *du = GET_U_LINE (uv);
- guint16 *dv = GET_V_LINE (uv);
+ guint16 *restrict dy = GET_Y_LINE (y);
+ guint16 *restrict du = GET_U_LINE (uv);
+ guint16 *restrict dv = GET_V_LINE (uv);
guint16 Y0, Y1, U, V;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
if (IS_CHROMA_LINE_420 (y, flags)) {
for (i = 0; i < width - 1; i += 2) {
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *sy = GET_Y_LINE (y);
- const guint16 *su = GET_U_LINE (y);
- const guint16 *sv = GET_V_LINE (y);
- guint16 *d = dest, Y, U, V;
+ const guint16 *restrict sy = GET_Y_LINE (y);
+ const guint16 *restrict su = GET_U_LINE (y);
+ const guint16 *restrict sv = GET_V_LINE (y);
+ guint16 *restrict d = dest, Y, U, V;
sy += x;
su += x >> 1;
gint y, gint width)
{
int i;
- guint16 *dy = GET_Y_LINE (y);
- guint16 *du = GET_U_LINE (y);
- guint16 *dv = GET_V_LINE (y);
+ guint16 *restrict dy = GET_Y_LINE (y);
+ guint16 *restrict du = GET_U_LINE (y);
+ guint16 *restrict dv = GET_V_LINE (y);
guint16 Y0, Y1, U, V;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
for (i = 0; i < width - 1; i += 2) {
Y0 = s[i * 4 + 1] >> 6;
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
int i;
- const guint16 *sy = GET_Y_LINE (y);
- const guint16 *su = GET_U_LINE (y);
- const guint16 *sv = GET_V_LINE (y);
- guint16 *d = dest, Y, U, V;
+ const guint16 *restrict sy = GET_Y_LINE (y);
+ const guint16 *restrict su = GET_U_LINE (y);
+ const guint16 *restrict sv = GET_V_LINE (y);
+ guint16 *restrict d = dest, Y, U, V;
sy += x;
su += x >> 1;
gint y, gint width)
{
int i;
- guint16 *dy = GET_Y_LINE (y);
- guint16 *du = GET_U_LINE (y);
- guint16 *dv = GET_V_LINE (y);
+ guint16 *restrict dy = GET_Y_LINE (y);
+ guint16 *restrict du = GET_U_LINE (y);
+ guint16 *restrict dv = GET_V_LINE (y);
guint16 Y0, Y1, U, V;
- const guint16 *s = src;
+ const guint16 *restrict s = src;
for (i = 0; i < width - 1; i += 2) {
Y0 = s[i * 4 + 1] >> 6;