bayer: prefix orc functions with bayer_orc

Add bayer orc to the unit test
This commit is contained in:
Wim Taymans 2012-07-24 10:32:51 +02:00
parent 7a22ad109a
commit c31950d3e8
5 changed files with 107 additions and 101 deletions

View file

@ -352,10 +352,10 @@ gst_bayer2rgb_split_and_upsample_horiz (guint8 * dest0, guint8 * dest1,
dest1[1] = src[1];
#if defined(__i386__) || defined(__amd64__)
gst_bayer_horiz_upsample_unaligned (dest0 + 2, dest1 + 2, src + 1,
bayer_orc_horiz_upsample_unaligned (dest0 + 2, dest1 + 2, src + 1,
(n - 4) >> 1);
#else
gst_bayer_horiz_upsample (dest0 + 2, dest1 + 2, src + 2, (n - 4) >> 1);
bayer_orc_horiz_upsample (dest0 + 2, dest1 + 2, src + 2, (n - 4) >> 1);
#endif
for (i = n - 2; i < n; i++) {
@ -396,17 +396,17 @@ gst_bayer2rgb_process (GstBayer2RGB * bayer2rgb, uint8_t * dest,
}
if (r_off == 2 && g_off == 1 && b_off == 0) {
merge[0] = gst_bayer_merge_bg_bgra;
merge[1] = gst_bayer_merge_gr_bgra;
merge[0] = bayer_orc_merge_bg_bgra;
merge[1] = bayer_orc_merge_gr_bgra;
} else if (r_off == 3 && g_off == 2 && b_off == 1) {
merge[0] = gst_bayer_merge_bg_abgr;
merge[1] = gst_bayer_merge_gr_abgr;
merge[0] = bayer_orc_merge_bg_abgr;
merge[1] = bayer_orc_merge_gr_abgr;
} else if (r_off == 1 && g_off == 2 && b_off == 3) {
merge[0] = gst_bayer_merge_bg_argb;
merge[1] = gst_bayer_merge_gr_argb;
merge[0] = bayer_orc_merge_bg_argb;
merge[1] = bayer_orc_merge_gr_argb;
} else if (r_off == 0 && g_off == 1 && b_off == 2) {
merge[0] = gst_bayer_merge_bg_rgba;
merge[1] = gst_bayer_merge_gr_rgba;
merge[0] = bayer_orc_merge_bg_rgba;
merge[1] = bayer_orc_merge_gr_rgba;
}
if (bayer2rgb->format == GST_BAYER_2_RGB_FORMAT_GRBG ||
bayer2rgb->format == GST_BAYER_2_RGB_FORMAT_GBRG) {

View file

@ -82,39 +82,39 @@ typedef union
#ifndef DISABLE_ORC
#include <orc/orc.h>
#endif
void gst_bayer_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
void bayer_orc_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
void gst_bayer_horiz_upsample (guint8 * ORC_RESTRICT d1,
void bayer_orc_horiz_upsample (guint8 * ORC_RESTRICT d1,
guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
void gst_bayer_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_bg_argb (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_bg_argb (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_argb (guint8 * ORC_RESTRICT d1,
void bayer_orc_merge_gr_argb (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
@ -164,10 +164,10 @@ void gst_bayer_merge_gr_argb (guint8 * ORC_RESTRICT d1,
/* gst_bayer_horiz_upsample_unaligned */
/* bayer_orc_horiz_upsample_unaligned */
#ifdef DISABLE_ORC
void
gst_bayer_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
bayer_orc_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n)
{
int i;
@ -237,7 +237,7 @@ gst_bayer_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_horiz_upsample_unaligned (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_horiz_upsample_unaligned (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -306,7 +306,7 @@ _backup_gst_bayer_horiz_upsample_unaligned (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
bayer_orc_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
@ -320,9 +320,9 @@ gst_bayer_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_horiz_upsample_unaligned");
orc_program_set_name (p, "bayer_orc_horiz_upsample_unaligned");
orc_program_set_backup_function (p,
_backup_gst_bayer_horiz_upsample_unaligned);
_backup_bayer_orc_horiz_upsample_unaligned);
orc_program_add_destination (p, 2, "d1");
orc_program_add_destination (p, 2, "d2");
orc_program_add_source (p, 2, "s1");
@ -369,10 +369,10 @@ gst_bayer_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_horiz_upsample */
/* bayer_orc_horiz_upsample */
#ifdef DISABLE_ORC
void
gst_bayer_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2,
bayer_orc_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2,
const guint8 * ORC_RESTRICT s1, int n)
{
int i;
@ -454,7 +454,7 @@ gst_bayer_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2,
#else
static void
_backup_gst_bayer_horiz_upsample (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_horiz_upsample (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -535,7 +535,7 @@ _backup_gst_bayer_horiz_upsample (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2,
bayer_orc_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2,
const guint8 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
@ -549,8 +549,8 @@ gst_bayer_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_horiz_upsample");
orc_program_set_backup_function (p, _backup_gst_bayer_horiz_upsample);
orc_program_set_name (p, "bayer_orc_horiz_upsample");
orc_program_set_backup_function (p, _backup_bayer_orc_horiz_upsample);
orc_program_add_destination (p, 2, "d1");
orc_program_add_destination (p, 2, "d2");
orc_program_add_source (p, 2, "s1");
@ -604,10 +604,10 @@ gst_bayer_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2,
#endif
/* gst_bayer_merge_bg_bgra */
/* bayer_orc_merge_bg_bgra */
#ifdef DISABLE_ORC
void
gst_bayer_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -733,7 +733,7 @@ gst_bayer_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_bg_bgra (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_bg_bgra (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -856,7 +856,7 @@ _backup_gst_bayer_merge_bg_bgra (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -872,8 +872,8 @@ gst_bayer_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_bg_bgra");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_bg_bgra);
orc_program_set_name (p, "bayer_orc_merge_bg_bgra");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_bgra);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
@ -935,10 +935,10 @@ gst_bayer_merge_bg_bgra (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_merge_gr_bgra */
/* bayer_orc_merge_gr_bgra */
#ifdef DISABLE_ORC
void
gst_bayer_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -1064,7 +1064,7 @@ gst_bayer_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_gr_bgra (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_gr_bgra (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -1187,7 +1187,7 @@ _backup_gst_bayer_merge_gr_bgra (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -1203,8 +1203,8 @@ gst_bayer_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_gr_bgra");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_gr_bgra);
orc_program_set_name (p, "bayer_orc_merge_gr_bgra");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_bgra);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
@ -1266,10 +1266,10 @@ gst_bayer_merge_gr_bgra (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_merge_bg_abgr */
/* bayer_orc_merge_bg_abgr */
#ifdef DISABLE_ORC
void
gst_bayer_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -1395,7 +1395,7 @@ gst_bayer_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_bg_abgr (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_bg_abgr (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -1518,7 +1518,7 @@ _backup_gst_bayer_merge_bg_abgr (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -1534,8 +1534,8 @@ gst_bayer_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_bg_abgr");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_bg_abgr);
orc_program_set_name (p, "bayer_orc_merge_bg_abgr");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_abgr);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
@ -1597,10 +1597,10 @@ gst_bayer_merge_bg_abgr (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_merge_gr_abgr */
/* bayer_orc_merge_gr_abgr */
#ifdef DISABLE_ORC
void
gst_bayer_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -1726,7 +1726,7 @@ gst_bayer_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_gr_abgr (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_gr_abgr (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -1849,7 +1849,7 @@ _backup_gst_bayer_merge_gr_abgr (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -1865,8 +1865,8 @@ gst_bayer_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_gr_abgr");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_gr_abgr);
orc_program_set_name (p, "bayer_orc_merge_gr_abgr");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_abgr);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
@ -1928,10 +1928,10 @@ gst_bayer_merge_gr_abgr (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_merge_bg_rgba */
/* bayer_orc_merge_bg_rgba */
#ifdef DISABLE_ORC
void
gst_bayer_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -2057,7 +2057,7 @@ gst_bayer_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_bg_rgba (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_bg_rgba (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -2180,7 +2180,7 @@ _backup_gst_bayer_merge_bg_rgba (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -2196,8 +2196,8 @@ gst_bayer_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_bg_rgba");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_bg_rgba);
orc_program_set_name (p, "bayer_orc_merge_bg_rgba");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_rgba);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
@ -2259,10 +2259,10 @@ gst_bayer_merge_bg_rgba (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_merge_gr_rgba */
/* bayer_orc_merge_gr_rgba */
#ifdef DISABLE_ORC
void
gst_bayer_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -2388,7 +2388,7 @@ gst_bayer_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_gr_rgba (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_gr_rgba (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -2511,7 +2511,7 @@ _backup_gst_bayer_merge_gr_rgba (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -2527,8 +2527,8 @@ gst_bayer_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_gr_rgba");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_gr_rgba);
orc_program_set_name (p, "bayer_orc_merge_gr_rgba");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_rgba);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
@ -2590,10 +2590,10 @@ gst_bayer_merge_gr_rgba (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_merge_bg_argb */
/* bayer_orc_merge_bg_argb */
#ifdef DISABLE_ORC
void
gst_bayer_merge_bg_argb (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_argb (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -2719,7 +2719,7 @@ gst_bayer_merge_bg_argb (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_bg_argb (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_bg_argb (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -2842,7 +2842,7 @@ _backup_gst_bayer_merge_bg_argb (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_bg_argb (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_bg_argb (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -2858,8 +2858,8 @@ gst_bayer_merge_bg_argb (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_bg_argb");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_bg_argb);
orc_program_set_name (p, "bayer_orc_merge_bg_argb");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_bg_argb);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
@ -2921,10 +2921,10 @@ gst_bayer_merge_bg_argb (guint8 * ORC_RESTRICT d1,
#endif
/* gst_bayer_merge_gr_argb */
/* bayer_orc_merge_gr_argb */
#ifdef DISABLE_ORC
void
gst_bayer_merge_gr_argb (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_argb (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -3050,7 +3050,7 @@ gst_bayer_merge_gr_argb (guint8 * ORC_RESTRICT d1,
#else
static void
_backup_gst_bayer_merge_gr_argb (OrcExecutor * ORC_RESTRICT ex)
_backup_bayer_orc_merge_gr_argb (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@ -3173,7 +3173,7 @@ _backup_gst_bayer_merge_gr_argb (OrcExecutor * ORC_RESTRICT ex)
}
void
gst_bayer_merge_gr_argb (guint8 * ORC_RESTRICT d1,
bayer_orc_merge_gr_argb (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n)
@ -3189,8 +3189,8 @@ gst_bayer_merge_gr_argb (guint8 * ORC_RESTRICT d1,
OrcProgram *p;
p = orc_program_new ();
orc_program_set_name (p, "gst_bayer_merge_gr_argb");
orc_program_set_backup_function (p, _backup_gst_bayer_merge_gr_argb);
orc_program_set_name (p, "bayer_orc_merge_gr_argb");
orc_program_set_backup_function (p, _backup_bayer_orc_merge_gr_argb);
orc_program_add_destination (p, 8, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");

View file

@ -67,16 +67,16 @@ typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16
#define ORC_RESTRICT
#endif
#endif
void gst_bayer_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
void gst_bayer_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
void gst_bayer_merge_bg_bgra (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_bgra (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_bg_abgr (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_abgr (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_bg_rgba (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_rgba (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_bg_argb (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void gst_bayer_merge_gr_argb (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
void bayer_orc_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
void bayer_orc_merge_bg_bgra (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_bgra (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_bg_abgr (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_abgr (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_bg_rgba (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_rgba (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_bg_argb (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_argb (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
#ifdef __cplusplus
}

View file

@ -1,6 +1,6 @@
.function gst_bayer_horiz_upsample_unaligned
.function bayer_orc_horiz_upsample_unaligned
.dest 2 d0 guint8
.dest 2 d1 guint8
.source 2 s guint8
@ -19,7 +19,7 @@ avgub b, b, d
mergebw d1, b, d
.function gst_bayer_horiz_upsample
.function bayer_orc_horiz_upsample
.dest 2 d0 guint8
.dest 2 d1 guint8
.source 2 s guint8
@ -42,7 +42,7 @@ avgub b, b, d
mergebw d1, b, d
.function gst_bayer_merge_bg_bgra
.function bayer_orc_merge_bg_bgra
.dest 8 d guint8
.source 2 g0 guint8
.source 2 r0 guint8
@ -68,7 +68,7 @@ x2 mergebw ra, r, 255
x2 mergewl d, bg, ra
.function gst_bayer_merge_gr_bgra
.function bayer_orc_merge_gr_bgra
.dest 8 d guint8
.source 2 b0 guint8
.source 2 g0 guint8
@ -94,7 +94,7 @@ x2 mergebw ra, r1, 255
x2 mergewl d, bg, ra
.function gst_bayer_merge_bg_abgr
.function bayer_orc_merge_bg_abgr
.dest 8 d guint8
.source 2 g0 guint8
.source 2 r0 guint8
@ -120,7 +120,7 @@ x2 mergebw gr, g, r
x2 mergewl d, ab, gr
.function gst_bayer_merge_gr_abgr
.function bayer_orc_merge_gr_abgr
.dest 8 d guint8
.source 2 b0 guint8
.source 2 g0 guint8
@ -146,7 +146,7 @@ x2 mergebw gr, g, r1
x2 mergewl d, ab, gr
.function gst_bayer_merge_bg_rgba
.function bayer_orc_merge_bg_rgba
.dest 8 d guint8
.source 2 g0 guint8
.source 2 r0 guint8
@ -172,7 +172,7 @@ x2 mergebw ba, b1, 255
x2 mergewl d, rg, ba
.function gst_bayer_merge_gr_rgba
.function bayer_orc_merge_gr_rgba
.dest 8 d guint8
.source 2 b0 guint8
.source 2 g0 guint8
@ -198,7 +198,7 @@ x2 mergebw ba, b, 255
x2 mergewl d, rg, ba
.function gst_bayer_merge_bg_argb
.function bayer_orc_merge_bg_argb
.dest 8 d guint8
.source 2 g0 guint8
.source 2 r0 guint8
@ -224,7 +224,7 @@ x2 mergebw gb, g, b1
x2 mergewl d, ar, gb
.function gst_bayer_merge_gr_argb
.function bayer_orc_merge_gr_argb
.dest 8 d guint8
.source 2 b0 guint8
.source 2 g0 guint8

View file

@ -130,7 +130,7 @@ check_vp8=
endif
if HAVE_ORC
check_orc = orc/cog
check_orc = orc/cog orc/bayer
else
check_orc =
endif
@ -335,6 +335,8 @@ elements_mpegtsmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION
EXTRA_DIST = gst-plugins-bad.supp
orc_bayer_CFLAGS = $(ORC_CFLAGS)
orc_bayer_LDADD = $(ORC_LIBS) -lorc-test-0.4
orc_cog_CFLAGS = $(ORC_CFLAGS)
orc_cog_LDADD = $(ORC_LIBS) -lorc-test-0.4
@ -342,6 +344,10 @@ orc/cog.c: $(top_srcdir)/ext/cog/gstcogorc.orc
$(MKDIR_P) orc
$(ORCC) --test -o $@ $<
orc/bayer.c: $(top_srcdir)/gst/bayer/gstbayerorc.orc
$(MKDIR_P) orc
$(ORCC) --test -o $@ $<
clean-local-orc:
rm -rf orc