From 860dfa93c99b7ab446d1fcaebd15ea634ba79278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 6 Nov 2014 15:01:27 +0100 Subject: [PATCH] video: Update disted orc files --- gst-libs/gst/video/video-orc-dist.c | 5364 +++++++++++++++++++-------- gst-libs/gst/video/video-orc-dist.h | 46 +- 2 files changed, 3766 insertions(+), 1644 deletions(-) diff --git a/gst-libs/gst/video/video-orc-dist.c b/gst-libs/gst/video/video-orc-dist.c index 1358f75381..510c731c14 100644 --- a/gst-libs/gst/video/video-orc-dist.c +++ b/gst-libs/gst/video/video-orc-dist.c @@ -104,6 +104,8 @@ void video_orc_unpack_I420 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s3, int n); void video_orc_pack_I420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, const guint8 * ORC_RESTRICT s1, int n); +void video_orc_pack_Y (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, + int n); void video_orc_unpack_YUY2 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n); void video_orc_pack_YUY2 (guint8 * ORC_RESTRICT d1, @@ -163,6 +165,8 @@ void video_orc_unpack_A420 (guint8 * ORC_RESTRICT d1, void video_orc_pack_A420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, int n); +void video_orc_pack_AY (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, + const guint8 * ORC_RESTRICT s1, int n); void video_orc_resample_bilinear_u32 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int p1, int p2, int n); void video_orc_merge_linear_u8 (orc_uint8 * ORC_RESTRICT d1, @@ -282,51 +286,72 @@ void video_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, void video_orc_matrix8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, orc_int64 p1, orc_int64 p2, orc_int64 p3, int n); -void video_orc_resample_h_near_8888_lq (guint32 * ORC_RESTRICT d1, +void video_orc_resample_h_near_u32_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n); -void video_orc_resample_h_2tap_8888_lq (guint32 * ORC_RESTRICT d1, +void video_orc_resample_h_2tap_4u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n); -void video_orc_resample_v_2tap_8_lq (guint32 * ORC_RESTRICT d1, +void video_orc_resample_v_2tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); -void video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, +void video_orc_resample_v_2tap_u16 (guint64 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, const guint64 * ORC_RESTRICT s2, int p1, + int n); +void video_orc_resample_v_2tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); -void video_orc_resample_v_4tap_8_lq (guint32 * ORC_RESTRICT d1, +void video_orc_resample_v_4tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n); -void video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, +void video_orc_resample_v_4tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n); -void video_orc_resample_h_4tap_8 (guint8 * ORC_RESTRICT d1, - const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, - const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, - const gint16 * ORC_RESTRICT s5, const gint16 * ORC_RESTRICT s6, - const gint16 * ORC_RESTRICT s7, const gint16 * ORC_RESTRICT s8, int n); -void video_orc_resample_h_multaps_8 (gint32 * ORC_RESTRICT d1, +void video_orc_resample_h_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); -void video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, - const guint32 * ORC_RESTRICT s1, int s1_stride, - const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, - const gint32 * ORC_RESTRICT s1, int n); -void video_orc_resample_h_multaps_8_lq (gint32 * ORC_RESTRICT d1, - const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); -void video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, +void video_orc_resample_h_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void video_orc_resample_scaletaps_8_lq (guint8 * ORC_RESTRICT d1, +void video_orc_resample_scaletaps_u8 (guint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n); -void video_orc_resample_v_multaps_8 (gint32 * ORC_RESTRICT d1, +void video_orc_resample_h_multaps_u8_lq (gint32 * ORC_RESTRICT d1, + const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); +void video_orc_resample_h_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, + int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, + const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); +void video_orc_resample_scaletaps_u8_lq (guint32 * ORC_RESTRICT d1, + const gint32 * ORC_RESTRICT s1, int n); +void video_orc_resample_h_multaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); +void video_orc_resample_h_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, + int d1_stride, const guint64 * ORC_RESTRICT s1, int s1_stride, + const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); +void video_orc_resample_scaletaps_u16 (guint64 * ORC_RESTRICT d1, + const gint32 * ORC_RESTRICT s1, int n); +void video_orc_resample_v_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); -void video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, +void video_orc_resample_v_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); -void video_orc_resample_v_multaps_8_lq (gint32 * ORC_RESTRICT d1, +void video_orc_resample_v_multaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_v_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_v_multaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); -void video_orc_resample_v_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, +void video_orc_resample_v_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); +void video_orc_chroma_down_h2_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, int n); +void video_orc_chroma_down_v2_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n); +void video_orc_chroma_down_v2_u16 (guint16 * ORC_RESTRICT d1, + const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, int n); +void video_orc_chroma_down_v4_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, + const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n); +void video_orc_chroma_down_v4_u16 (guint16 * ORC_RESTRICT d1, + const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, + const guint16 * ORC_RESTRICT s3, const guint16 * ORC_RESTRICT s4, int n); /* begin Orc C target preamble */ @@ -418,8 +443,9 @@ video_orc_blend_little (guint8 * ORC_RESTRICT d1, var42 = var41.i; /* 3: splatbl */ var43.i = - ((var42 & 0xff) << 24) | ((var42 & 0xff) << 16) | ((var42 & 0xff) << 8) - | (var42 & 0xff); + ((((orc_uint32) var42) & 0xff) << 24) | ((((orc_uint32) var42) & 0xff) + << 16) | ((((orc_uint32) var42) & 0xff) << 8) | (((orc_uint32) var42) & + 0xff); /* 4: convubw */ var44.x4[0] = (orc_uint8) var43.x4[0]; var44.x4[1] = (orc_uint8) var43.x4[1]; @@ -527,8 +553,9 @@ _backup_video_orc_blend_little (OrcExecutor * ORC_RESTRICT ex) var42 = var41.i; /* 3: splatbl */ var43.i = - ((var42 & 0xff) << 24) | ((var42 & 0xff) << 16) | ((var42 & 0xff) << 8) - | (var42 & 0xff); + ((((orc_uint32) var42) & 0xff) << 24) | ((((orc_uint32) var42) & 0xff) + << 16) | ((((orc_uint32) var42) & 0xff) << 8) | (((orc_uint32) var42) & + 0xff); /* 4: convubw */ var44.x4[0] = (orc_uint8) var43.x4[0]; var44.x4[1] = (orc_uint8) var43.x4[1]; @@ -610,7 +637,7 @@ video_orc_blend_little (guint8 * ORC_RESTRICT d1, static const orc_uint8 bc[] = { 1, 9, 22, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 98, 108, 101, 110, 100, 95, 108, 105, 116, 116, 108, 101, 11, 4, 4, 12, 4, 4, 14, - 4, 255, 0, 0, 0, 14, 4, 8, 0, 0, 0, 20, 4, 20, 2, 20, + 4, 255, 0, 0, 0, 14, 2, 8, 0, 0, 0, 20, 4, 20, 2, 20, 1, 20, 4, 20, 8, 20, 8, 20, 8, 113, 32, 4, 163, 33, 32, 157, 34, 33, 152, 35, 34, 21, 2, 150, 38, 35, 21, 2, 95, 38, 38, 17, 21, 2, 150, 37, 32, 113, 32, 0, 21, 2, 150, 36, 32, 21, 2, 98, @@ -627,7 +654,7 @@ video_orc_blend_little (guint8 * ORC_RESTRICT d1, orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 4, "s1"); orc_program_add_constant (p, 4, 0x000000ff, "c1"); - orc_program_add_constant (p, 4, 0x00000008, "c2"); + orc_program_add_constant (p, 2, 0x00000008, "c2"); orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 1, "t3"); @@ -738,8 +765,9 @@ video_orc_blend_big (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, var44 = var43.i; /* 4: splatbl */ var45.i = - ((var44 & 0xff) << 24) | ((var44 & 0xff) << 16) | ((var44 & 0xff) << 8) - | (var44 & 0xff); + ((((orc_uint32) var44) & 0xff) << 24) | ((((orc_uint32) var44) & 0xff) + << 16) | ((((orc_uint32) var44) & 0xff) << 8) | (((orc_uint32) var44) & + 0xff); /* 5: convubw */ var46.x4[0] = (orc_uint8) var45.x4[0]; var46.x4[1] = (orc_uint8) var45.x4[1]; @@ -850,8 +878,9 @@ _backup_video_orc_blend_big (OrcExecutor * ORC_RESTRICT ex) var44 = var43.i; /* 4: splatbl */ var45.i = - ((var44 & 0xff) << 24) | ((var44 & 0xff) << 16) | ((var44 & 0xff) << 8) - | (var44 & 0xff); + ((((orc_uint32) var44) & 0xff) << 24) | ((((orc_uint32) var44) & 0xff) + << 16) | ((((orc_uint32) var44) & 0xff) << 8) | (((orc_uint32) var44) & + 0xff); /* 5: convubw */ var46.x4[0] = (orc_uint8) var45.x4[0]; var46.x4[1] = (orc_uint8) var45.x4[1]; @@ -933,7 +962,7 @@ video_orc_blend_big (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, static const orc_uint8 bc[] = { 1, 9, 19, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 98, 108, 101, 110, 100, 95, 98, 105, 103, 11, 4, 4, 12, 4, 4, 14, 4, 0, 0, - 0, 255, 14, 4, 24, 0, 0, 0, 14, 4, 8, 0, 0, 0, 20, 4, + 0, 255, 14, 4, 24, 0, 0, 0, 14, 2, 8, 0, 0, 0, 20, 4, 20, 4, 20, 2, 20, 1, 20, 4, 20, 8, 20, 8, 20, 8, 113, 32, 4, 126, 33, 32, 17, 163, 34, 33, 157, 35, 34, 152, 36, 35, 21, 2, 150, 39, 36, 21, 2, 95, 39, 39, 18, 21, 2, 150, 38, 32, 113, 32, @@ -951,7 +980,7 @@ video_orc_blend_big (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, orc_program_add_source (p, 4, "s1"); orc_program_add_constant (p, 4, 0xff000000, "c1"); orc_program_add_constant (p, 4, 0x00000018, "c2"); - orc_program_add_constant (p, 4, 0x00000008, "c3"); + orc_program_add_constant (p, 2, 0x00000008, "c3"); orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 4, "t2"); orc_program_add_temporary (p, 2, "t3"); @@ -1466,6 +1495,137 @@ video_orc_pack_I420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, #endif +/* video_orc_pack_Y */ +#ifdef DISABLE_ORC +void +video_orc_pack_Y (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, + int n) +{ + int i; + orc_int8 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *) d1; + ptr4 = (orc_union32 *) s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + { + orc_union32 _src; + _src.i = var33.i; + var35.i = _src.x2[0]; + } + /* 2: select1wb */ + { + orc_union16 _src; + _src.i = var35.i; + var34 = _src.x2[1]; + } + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_video_orc_pack_Y (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *) ex->arrays[0]; + ptr4 = (orc_union32 *) ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + { + orc_union32 _src; + _src.i = var33.i; + var35.i = _src.x2[0]; + } + /* 2: select1wb */ + { + orc_union16 _src; + _src.i = var35.i; + var34 = _src.x2[1]; + } + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +video_orc_pack_Y (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, + int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 16, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 112, 97, 99, + 107, 95, 89, 11, 1, 1, 12, 4, 4, 20, 2, 190, 32, 4, 189, 0, + 32, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, _backup_video_orc_pack_Y); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_pack_Y"); + orc_program_set_backup_function (p, _backup_video_orc_pack_Y); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_S1, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1, + ORC_VAR_D1, ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + + func = c->exec; + func (ex); +} +#endif + + /* video_orc_unpack_YUY2 */ #ifdef DISABLE_ORC void @@ -6871,6 +7031,163 @@ video_orc_pack_A420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, #endif +/* video_orc_pack_AY */ +#ifdef DISABLE_ORC +void +video_orc_pack_AY (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, + const guint8 * ORC_RESTRICT s1, int n) +{ + int i; + orc_int8 *ORC_RESTRICT ptr0; + orc_int8 *ORC_RESTRICT ptr1; + const orc_union32 *ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + + ptr0 = (orc_int8 *) d1; + ptr1 = (orc_int8 *) d2; + ptr4 = (orc_union32 *) s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + { + orc_union32 _src; + _src.i = var33.i; + var36.i = _src.x2[0]; + } + /* 2: select1wb */ + { + orc_union16 _src; + _src.i = var36.i; + var34 = _src.x2[1]; + } + /* 3: storeb */ + ptr0[i] = var34; + /* 4: select0wb */ + { + orc_union16 _src; + _src.i = var36.i; + var35 = _src.x2[0]; + } + /* 5: storeb */ + ptr1[i] = var35; + } + +} + +#else +static void +_backup_video_orc_pack_AY (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 *ORC_RESTRICT ptr0; + orc_int8 *ORC_RESTRICT ptr1; + const orc_union32 *ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + + ptr0 = (orc_int8 *) ex->arrays[0]; + ptr1 = (orc_int8 *) ex->arrays[1]; + ptr4 = (orc_union32 *) ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + { + orc_union32 _src; + _src.i = var33.i; + var36.i = _src.x2[0]; + } + /* 2: select1wb */ + { + orc_union16 _src; + _src.i = var36.i; + var34 = _src.x2[1]; + } + /* 3: storeb */ + ptr0[i] = var34; + /* 4: select0wb */ + { + orc_union16 _src; + _src.i = var36.i; + var35 = _src.x2[0]; + } + /* 5: storeb */ + ptr1[i] = var35; + } + +} + +void +video_orc_pack_AY (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, + const guint8 * ORC_RESTRICT s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 17, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 112, 97, 99, + 107, 95, 65, 89, 11, 1, 1, 11, 1, 1, 12, 4, 4, 20, 2, 190, + 32, 4, 189, 0, 32, 188, 1, 32, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, _backup_video_orc_pack_AY); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_pack_AY"); + orc_program_set_backup_function (p, _backup_video_orc_pack_AY); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_destination (p, 1, "d2"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_S1, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D2, ORC_VAR_T1, + ORC_VAR_D1, ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->arrays[ORC_VAR_S1] = (void *) s1; + + func = c->exec; + func (ex); +} +#endif + + /* video_orc_resample_bilinear_u32 */ #ifdef DISABLE_ORC void @@ -7156,7 +7473,7 @@ video_orc_merge_linear_u8 (orc_uint8 * ORC_RESTRICT d1, static const orc_uint8 bc[] = { 1, 9, 25, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 109, 101, 114, 103, 101, 95, 108, 105, 110, 101, 97, 114, 95, 117, 56, 11, 1, 1, 12, - 1, 1, 12, 1, 1, 14, 4, 128, 0, 0, 0, 16, 1, 20, 2, 20, + 1, 1, 12, 1, 1, 14, 2, 128, 0, 0, 0, 16, 1, 20, 2, 20, 2, 20, 1, 20, 1, 43, 34, 4, 150, 32, 4, 150, 33, 5, 98, 33, 33, 32, 89, 33, 33, 24, 70, 33, 33, 16, 158, 35, 33, 33, 0, 35, 34, 2, 0, @@ -7170,7 +7487,7 @@ video_orc_merge_linear_u8 (orc_uint8 * ORC_RESTRICT d1, orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2"); - orc_program_add_constant (p, 4, 0x00000080, "c1"); + orc_program_add_constant (p, 2, 0x00000080, "c1"); orc_program_add_parameter (p, 1, "p1"); orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t2"); @@ -7809,18 +8126,13 @@ video_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, #endif orc_int8 var37; orc_union32 var38; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var39; -#else orc_int8 var39; -#endif - orc_int8 var40; - orc_union32 var41; + orc_union32 var40; + orc_int8 var41; orc_int8 var42; - orc_int8 var43; + orc_union16 var43; orc_union16 var44; orc_union16 var45; - orc_union16 var46; ptr0 = (orc_union32 *) d1; ptr1 = (orc_union32 *) d2; @@ -7831,20 +8143,18 @@ video_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, /* 3: loadpb */ var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - /* 8: loadpb */ - var39 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ for (i = 0; i < n; i++) { /* 0: loadupdb */ - var42 = ptr6[i >> 1]; + var41 = ptr6[i >> 1]; /* 1: loadupdb */ - var43 = ptr7[i >> 1]; + var42 = ptr7[i >> 1]; /* 2: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var42; - _dest.x2[1] = var43; - var44.i = _dest.i; + _dest.x2[0] = var41; + _dest.x2[1] = var42; + var43.i = _dest.i; } /* 4: loadb */ var37 = ptr4[i]; @@ -7853,35 +8163,35 @@ video_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, orc_union16 _dest; _dest.x2[0] = var36; _dest.x2[1] = var37; - var45.i = _dest.i; + var44.i = _dest.i; } /* 6: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var45.i; - _dest.x2[1] = var44.i; + _dest.x2[0] = var44.i; + _dest.x2[1] = var43.i; var38.i = _dest.i; } /* 7: storel */ ptr0[i] = var38; - /* 9: loadb */ - var40 = ptr5[i]; - /* 10: mergebw */ + /* 8: loadb */ + var39 = ptr5[i]; + /* 9: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var39; - _dest.x2[1] = var40; - var46.i = _dest.i; + _dest.x2[0] = var36; + _dest.x2[1] = var39; + var45.i = _dest.i; } - /* 11: mergewl */ + /* 10: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var46.i; - _dest.x2[1] = var44.i; - var41.i = _dest.i; + _dest.x2[0] = var45.i; + _dest.x2[1] = var43.i; + var40.i = _dest.i; } - /* 12: storel */ - ptr1[i] = var41; + /* 11: storel */ + ptr1[i] = var40; } } @@ -7905,18 +8215,13 @@ _backup_video_orc_convert_I420_AYUV (OrcExecutor * ORC_RESTRICT ex) #endif orc_int8 var37; orc_union32 var38; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var39; -#else orc_int8 var39; -#endif - orc_int8 var40; - orc_union32 var41; + orc_union32 var40; + orc_int8 var41; orc_int8 var42; - orc_int8 var43; + orc_union16 var43; orc_union16 var44; orc_union16 var45; - orc_union16 var46; ptr0 = (orc_union32 *) ex->arrays[0]; ptr1 = (orc_union32 *) ex->arrays[1]; @@ -7927,20 +8232,18 @@ _backup_video_orc_convert_I420_AYUV (OrcExecutor * ORC_RESTRICT ex) /* 3: loadpb */ var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - /* 8: loadpb */ - var39 = (int) 0x000000ff; /* 255 or 1.25987e-321f */ for (i = 0; i < n; i++) { /* 0: loadupdb */ - var42 = ptr6[i >> 1]; + var41 = ptr6[i >> 1]; /* 1: loadupdb */ - var43 = ptr7[i >> 1]; + var42 = ptr7[i >> 1]; /* 2: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var42; - _dest.x2[1] = var43; - var44.i = _dest.i; + _dest.x2[0] = var41; + _dest.x2[1] = var42; + var43.i = _dest.i; } /* 4: loadb */ var37 = ptr4[i]; @@ -7949,35 +8252,35 @@ _backup_video_orc_convert_I420_AYUV (OrcExecutor * ORC_RESTRICT ex) orc_union16 _dest; _dest.x2[0] = var36; _dest.x2[1] = var37; - var45.i = _dest.i; + var44.i = _dest.i; } /* 6: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var45.i; - _dest.x2[1] = var44.i; + _dest.x2[0] = var44.i; + _dest.x2[1] = var43.i; var38.i = _dest.i; } /* 7: storel */ ptr0[i] = var38; - /* 9: loadb */ - var40 = ptr5[i]; - /* 10: mergebw */ + /* 8: loadb */ + var39 = ptr5[i]; + /* 9: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var39; - _dest.x2[1] = var40; - var46.i = _dest.i; + _dest.x2[0] = var36; + _dest.x2[1] = var39; + var45.i = _dest.i; } - /* 11: mergewl */ + /* 10: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var46.i; - _dest.x2[1] = var44.i; - var41.i = _dest.i; + _dest.x2[0] = var45.i; + _dest.x2[1] = var43.i; + var40.i = _dest.i; } - /* 12: storel */ - ptr1[i] = var41; + /* 11: storel */ + ptr1[i] = var40; } } @@ -13470,37 +13773,32 @@ video_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, int d1_stride, orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; orc_union16 var70; - orc_union16 var71; - orc_int8 var72; + orc_int8 var71; + orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); @@ -13521,99 +13819,94 @@ video_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, int d1_stride, var51.i = p4; /* 23: loadpw */ var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 15: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var68; - var69.i = _dest.i; + _dest.x2[0] = var58; + _dest.x2[1] = var67; + var68.i = _dest.i; } /* 17: mulhsw */ - var70.i = (var63.i * var50.i) >> 16; + var69.i = (var62.i * var50.i) >> 16; /* 18: addw */ - var71.i = var65.i + var70.i; + var70.i = var64.i + var69.i; /* 19: convssswb */ - var72 = ORC_CLAMP_SB (var71.i); + var71 = ORC_CLAMP_SB (var70.i); /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var77; - _dest.x2[1] = var72; - var78.i = _dest.i; + _dest.x2[0] = var76; + _dest.x2[1] = var71; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var69.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; + _dest.x2[0] = var68.i; + _dest.x2[1] = var77.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -13640,37 +13933,32 @@ _backup_video_orc_convert_AYUV_ARGB (OrcExecutor * ORC_RESTRICT ex) orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; orc_union16 var70; - orc_union16 var71; - orc_int8 var72; + orc_int8 var71; + orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); @@ -13691,99 +13979,94 @@ _backup_video_orc_convert_AYUV_ARGB (OrcExecutor * ORC_RESTRICT ex) var51.i = ex->params[27]; /* 23: loadpw */ var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 15: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var68; - var69.i = _dest.i; + _dest.x2[0] = var58; + _dest.x2[1] = var67; + var68.i = _dest.i; } /* 17: mulhsw */ - var70.i = (var63.i * var50.i) >> 16; + var69.i = (var62.i * var50.i) >> 16; /* 18: addw */ - var71.i = var65.i + var70.i; + var70.i = var64.i + var69.i; /* 19: convssswb */ - var72 = ORC_CLAMP_SB (var71.i); + var71 = ORC_CLAMP_SB (var70.i); /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var77; - _dest.x2[1] = var72; - var78.i = _dest.i; + _dest.x2[0] = var76; + _dest.x2[1] = var71; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var69.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; + _dest.x2[0] = var68.i; + _dest.x2[1] = var77.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -13946,37 +14229,32 @@ video_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, int d1_stride, orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; orc_union16 var70; - orc_union16 var71; - orc_int8 var72; + orc_int8 var71; + orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); @@ -13997,99 +14275,94 @@ video_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, int d1_stride, var51.i = p4; /* 23: loadpw */ var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 15: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var68; - _dest.x2[1] = var59; - var69.i = _dest.i; + _dest.x2[0] = var67; + _dest.x2[1] = var58; + var68.i = _dest.i; } /* 17: mulhsw */ - var70.i = (var63.i * var50.i) >> 16; + var69.i = (var62.i * var50.i) >> 16; /* 18: addw */ - var71.i = var65.i + var70.i; + var70.i = var64.i + var69.i; /* 19: convssswb */ - var72 = ORC_CLAMP_SB (var71.i); + var71 = ORC_CLAMP_SB (var70.i); /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var72; - _dest.x2[1] = var77; - var78.i = _dest.i; + _dest.x2[0] = var71; + _dest.x2[1] = var76; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var78.i; - _dest.x2[1] = var69.i; - var79.i = _dest.i; + _dest.x2[0] = var77.i; + _dest.x2[1] = var68.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -14116,37 +14389,32 @@ _backup_video_orc_convert_AYUV_BGRA (OrcExecutor * ORC_RESTRICT ex) orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; orc_union16 var70; - orc_union16 var71; - orc_int8 var72; + orc_int8 var71; + orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); @@ -14167,99 +14435,94 @@ _backup_video_orc_convert_AYUV_BGRA (OrcExecutor * ORC_RESTRICT ex) var51.i = ex->params[27]; /* 23: loadpw */ var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 15: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var68; - _dest.x2[1] = var59; - var69.i = _dest.i; + _dest.x2[0] = var67; + _dest.x2[1] = var58; + var68.i = _dest.i; } /* 17: mulhsw */ - var70.i = (var63.i * var50.i) >> 16; + var69.i = (var62.i * var50.i) >> 16; /* 18: addw */ - var71.i = var65.i + var70.i; + var70.i = var64.i + var69.i; /* 19: convssswb */ - var72 = ORC_CLAMP_SB (var71.i); + var71 = ORC_CLAMP_SB (var70.i); /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var72; - _dest.x2[1] = var77; - var78.i = _dest.i; + _dest.x2[0] = var71; + _dest.x2[1] = var76; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var78.i; - _dest.x2[1] = var69.i; - var79.i = _dest.i; + _dest.x2[0] = var77.i; + _dest.x2[1] = var68.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -14422,37 +14685,32 @@ video_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, int d1_stride, orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; - orc_union16 var70; - orc_int8 var71; + orc_int8 var70; + orc_union16 var71; orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); @@ -14473,99 +14731,94 @@ video_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, int d1_stride, var51.i = p4; /* 23: loadpw */ var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 16: mulhsw */ - var69.i = (var63.i * var50.i) >> 16; + var68.i = (var62.i * var50.i) >> 16; /* 17: addw */ - var70.i = var65.i + var69.i; + var69.i = var64.i + var68.i; /* 18: convssswb */ - var71 = ORC_CLAMP_SB (var70.i); + var70 = ORC_CLAMP_SB (var69.i); /* 19: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var71; - var72.i = _dest.i; + _dest.x2[0] = var58; + _dest.x2[1] = var70; + var71.i = _dest.i; } /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var77; - _dest.x2[1] = var68; - var78.i = _dest.i; + _dest.x2[0] = var76; + _dest.x2[1] = var67; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var72.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; + _dest.x2[0] = var71.i; + _dest.x2[1] = var77.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -14592,37 +14845,32 @@ _backup_video_orc_convert_AYUV_ABGR (OrcExecutor * ORC_RESTRICT ex) orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; - orc_union16 var70; - orc_int8 var71; + orc_int8 var70; + orc_union16 var71; orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); @@ -14643,99 +14891,94 @@ _backup_video_orc_convert_AYUV_ABGR (OrcExecutor * ORC_RESTRICT ex) var51.i = ex->params[27]; /* 23: loadpw */ var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 16: mulhsw */ - var69.i = (var63.i * var50.i) >> 16; + var68.i = (var62.i * var50.i) >> 16; /* 17: addw */ - var70.i = var65.i + var69.i; + var69.i = var64.i + var68.i; /* 18: convssswb */ - var71 = ORC_CLAMP_SB (var70.i); + var70 = ORC_CLAMP_SB (var69.i); /* 19: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var59; - _dest.x2[1] = var71; - var72.i = _dest.i; + _dest.x2[0] = var58; + _dest.x2[1] = var70; + var71.i = _dest.i; } /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var77; - _dest.x2[1] = var68; - var78.i = _dest.i; + _dest.x2[0] = var76; + _dest.x2[1] = var67; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var72.i; - _dest.x2[1] = var78.i; - var79.i = _dest.i; + _dest.x2[0] = var71.i; + _dest.x2[1] = var77.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -14898,37 +15141,32 @@ video_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, int d1_stride, orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; - orc_union16 var70; - orc_int8 var71; + orc_int8 var70; + orc_union16 var71; orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); @@ -14949,99 +15187,94 @@ video_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, int d1_stride, var51.i = p4; /* 23: loadpw */ var52.i = p5; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 16: mulhsw */ - var69.i = (var63.i * var50.i) >> 16; + var68.i = (var62.i * var50.i) >> 16; /* 17: addw */ - var70.i = var65.i + var69.i; + var69.i = var64.i + var68.i; /* 18: convssswb */ - var71 = ORC_CLAMP_SB (var70.i); + var70 = ORC_CLAMP_SB (var69.i); /* 19: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var71; - _dest.x2[1] = var59; - var72.i = _dest.i; + _dest.x2[0] = var70; + _dest.x2[1] = var58; + var71.i = _dest.i; } /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var68; - _dest.x2[1] = var77; - var78.i = _dest.i; + _dest.x2[0] = var67; + _dest.x2[1] = var76; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var78.i; - _dest.x2[1] = var72.i; - var79.i = _dest.i; + _dest.x2[0] = var77.i; + _dest.x2[1] = var71.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -15068,37 +15301,32 @@ _backup_video_orc_convert_AYUV_RGBA (OrcExecutor * ORC_RESTRICT ex) orc_union16 var50; orc_union16 var51; orc_union16 var52; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var53; -#else orc_union32 var53; -#endif orc_union32 var54; - orc_union32 var55; + orc_union16 var55; orc_union16 var56; - orc_union16 var57; + orc_int8 var57; orc_int8 var58; orc_int8 var59; orc_int8 var60; - orc_int8 var61; + orc_union16 var61; orc_union16 var62; orc_union16 var63; orc_union16 var64; orc_union16 var65; orc_union16 var66; - orc_union16 var67; - orc_int8 var68; + orc_int8 var67; + orc_union16 var68; orc_union16 var69; - orc_union16 var70; - orc_int8 var71; + orc_int8 var70; + orc_union16 var71; orc_union16 var72; orc_union16 var73; orc_union16 var74; orc_union16 var75; - orc_union16 var76; - orc_int8 var77; - orc_union16 var78; - orc_union32 var79; + orc_int8 var76; + orc_union16 var77; + orc_union32 var78; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); @@ -15119,99 +15347,94 @@ _backup_video_orc_convert_AYUV_RGBA (OrcExecutor * ORC_RESTRICT ex) var51.i = ex->params[27]; /* 23: loadpw */ var52.i = ex->params[28]; - /* 29: loadpb */ - var53.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var53.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadl */ var46 = ptr4[i]; /* 2: subb */ - var55.x4[0] = var46.x4[0] - var47.x4[0]; - var55.x4[1] = var46.x4[1] - var47.x4[1]; - var55.x4[2] = var46.x4[2] - var47.x4[2]; - var55.x4[3] = var46.x4[3] - var47.x4[3]; + var54.x4[0] = var46.x4[0] - var47.x4[0]; + var54.x4[1] = var46.x4[1] - var47.x4[1]; + var54.x4[2] = var46.x4[2] - var47.x4[2]; + var54.x4[3] = var46.x4[3] - var47.x4[3]; /* 3: splitlw */ { orc_union32 _src; - _src.i = var55.i; - var56.i = _src.x2[1]; - var57.i = _src.x2[0]; + _src.i = var54.i; + var55.i = _src.x2[1]; + var56.i = _src.x2[0]; } /* 4: splitwb */ { orc_union16 _src; - _src.i = var57.i; - var58 = _src.x2[1]; - var59 = _src.x2[0]; + _src.i = var56.i; + var57 = _src.x2[1]; + var58 = _src.x2[0]; } /* 5: splitwb */ { orc_union16 _src; - _src.i = var56.i; - var60 = _src.x2[1]; - var61 = _src.x2[0]; + _src.i = var55.i; + var59 = _src.x2[1]; + var60 = _src.x2[0]; } /* 6: splatbw */ - var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + var61.i = ((var57 & 0xff) << 8) | (var57 & 0xff); /* 7: splatbw */ - var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff); + var62.i = ((var60 & 0xff) << 8) | (var60 & 0xff); /* 8: splatbw */ - var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var63.i = ((var59 & 0xff) << 8) | (var59 & 0xff); /* 10: mulhsw */ - var65.i = (var62.i * var48.i) >> 16; + var64.i = (var61.i * var48.i) >> 16; /* 12: mulhsw */ - var66.i = (var64.i * var49.i) >> 16; + var65.i = (var63.i * var49.i) >> 16; /* 13: addw */ - var67.i = var65.i + var66.i; + var66.i = var64.i + var65.i; /* 14: convssswb */ - var68 = ORC_CLAMP_SB (var67.i); + var67 = ORC_CLAMP_SB (var66.i); /* 16: mulhsw */ - var69.i = (var63.i * var50.i) >> 16; + var68.i = (var62.i * var50.i) >> 16; /* 17: addw */ - var70.i = var65.i + var69.i; + var69.i = var64.i + var68.i; /* 18: convssswb */ - var71 = ORC_CLAMP_SB (var70.i); + var70 = ORC_CLAMP_SB (var69.i); /* 19: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var71; - _dest.x2[1] = var59; - var72.i = _dest.i; + _dest.x2[0] = var70; + _dest.x2[1] = var58; + var71.i = _dest.i; } /* 21: mulhsw */ - var73.i = (var63.i * var51.i) >> 16; + var72.i = (var62.i * var51.i) >> 16; /* 22: addw */ - var74.i = var65.i + var73.i; + var73.i = var64.i + var72.i; /* 24: mulhsw */ - var75.i = (var64.i * var52.i) >> 16; + var74.i = (var63.i * var52.i) >> 16; /* 25: addw */ - var76.i = var74.i + var75.i; + var75.i = var73.i + var74.i; /* 26: convssswb */ - var77 = ORC_CLAMP_SB (var76.i); + var76 = ORC_CLAMP_SB (var75.i); /* 27: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var68; - _dest.x2[1] = var77; - var78.i = _dest.i; + _dest.x2[0] = var67; + _dest.x2[1] = var76; + var77.i = _dest.i; } /* 28: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var78.i; - _dest.x2[1] = var72.i; - var79.i = _dest.i; + _dest.x2[0] = var77.i; + _dest.x2[1] = var71.i; + var78.i = _dest.i; } - /* 30: addb */ - var54.x4[0] = var79.x4[0] + var53.x4[0]; - var54.x4[1] = var79.x4[1] + var53.x4[1]; - var54.x4[2] = var79.x4[2] + var53.x4[2]; - var54.x4[3] = var79.x4[3] + var53.x4[3]; - /* 31: storel */ - ptr0[i] = var54; + /* 29: addb */ + var53.x4[0] = var78.x4[0] + var47.x4[0]; + var53.x4[1] = var78.x4[1] + var47.x4[1]; + var53.x4[2] = var78.x4[2] + var47.x4[2]; + var53.x4[3] = var78.x4[3] + var47.x4[3]; + /* 30: storel */ + ptr0[i] = var53; } } @@ -15371,55 +15594,45 @@ video_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, #else orc_int8 var43; #endif + orc_union16 var44; + orc_union16 var45; #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var44; + volatile orc_int8 var46; #else - orc_int8 var44; + orc_int8 var46; #endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var45; -#else - orc_int8 var45; -#endif - orc_union16 var46; orc_union16 var47; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var48; -#else - orc_int8 var48; -#endif + orc_union16 var48; orc_union16 var49; - orc_union16 var50; - orc_union16 var51; #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var52; + volatile orc_union32 var50; #else - orc_union32 var52; + orc_union32 var50; #endif - orc_union32 var53; + orc_union32 var51; + orc_int8 var52; + orc_union16 var53; orc_int8 var54; - orc_union16 var55; - orc_int8 var56; + orc_int8 var55; + orc_union16 var56; orc_int8 var57; - orc_union16 var58; - orc_int8 var59; - orc_int8 var60; + orc_int8 var58; + orc_union16 var59; + orc_union16 var60; orc_union16 var61; orc_union16 var62; - orc_union16 var63; + orc_int8 var63; orc_union16 var64; - orc_int8 var65; + orc_union16 var65; orc_union16 var66; - orc_union16 var67; + orc_int8 var67; orc_union16 var68; - orc_int8 var69; + orc_union16 var69; orc_union16 var70; orc_union16 var71; - orc_union16 var72; + orc_int8 var72; orc_union16 var73; - orc_int8 var74; - orc_union16 var75; - orc_union32 var76; + orc_union32 var74; ptr0 = (orc_union32 *) d1; ptr4 = (orc_int8 *) s1; @@ -15428,99 +15641,95 @@ video_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, /* 1: loadpb */ var43 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 5: loadpb */ - var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpb */ - var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */ + /* 10: loadpw */ + var44.i = p1; /* 12: loadpw */ - var46.i = p1; - /* 14: loadpw */ - var47.i = p2; - /* 18: loadpb */ - var48 = (int) 0x0000007f; /* 127 or 6.27463e-322f */ - /* 20: loadpw */ - var49.i = p3; - /* 24: loadpw */ - var50.i = p4; - /* 27: loadpw */ - var51.i = p5; - /* 33: loadpb */ - var52.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var45.i = p2; + /* 16: loadpb */ + var46 = (int) 0x0000007f; /* 127 or 6.27463e-322f */ + /* 18: loadpw */ + var47.i = p3; + /* 22: loadpw */ + var48.i = p4; + /* 25: loadpw */ + var49.i = p5; + /* 31: loadpb */ + var50.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var50.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var50.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var50.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadb */ var42 = ptr4[i]; /* 2: subb */ - var54 = var42 - var43; + var52 = var42 - var43; /* 3: splatbw */ - var55.i = ((var54 & 0xff) << 8) | (var54 & 0xff); + var53.i = ((var52 & 0xff) << 8) | (var52 & 0xff); /* 4: loadupdb */ - var56 = ptr5[i >> 1]; - /* 6: subb */ - var57 = var56 - var44; - /* 7: splatbw */ - var58.i = ((var57 & 0xff) << 8) | (var57 & 0xff); - /* 8: loadupdb */ - var59 = ptr6[i >> 1]; - /* 10: subb */ - var60 = var59 - var45; - /* 11: splatbw */ - var61.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var54 = ptr5[i >> 1]; + /* 5: subb */ + var55 = var54 - var43; + /* 6: splatbw */ + var56.i = ((var55 & 0xff) << 8) | (var55 & 0xff); + /* 7: loadupdb */ + var57 = ptr6[i >> 1]; + /* 8: subb */ + var58 = var57 - var43; + /* 9: splatbw */ + var59.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + /* 11: mulhsw */ + var60.i = (var53.i * var44.i) >> 16; /* 13: mulhsw */ - var62.i = (var55.i * var46.i) >> 16; - /* 15: mulhsw */ - var63.i = (var61.i * var47.i) >> 16; - /* 16: addw */ - var64.i = var62.i + var63.i; - /* 17: convssswb */ - var65 = ORC_CLAMP_SB (var64.i); - /* 19: mergebw */ + var61.i = (var59.i * var45.i) >> 16; + /* 14: addw */ + var62.i = var60.i + var61.i; + /* 15: convssswb */ + var63 = ORC_CLAMP_SB (var62.i); + /* 17: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var65; - _dest.x2[1] = var48; - var66.i = _dest.i; + _dest.x2[0] = var63; + _dest.x2[1] = var46; + var64.i = _dest.i; } - /* 21: mulhsw */ - var67.i = (var58.i * var49.i) >> 16; - /* 22: addw */ - var68.i = var62.i + var67.i; - /* 23: convssswb */ - var69 = ORC_CLAMP_SB (var68.i); - /* 25: mulhsw */ - var70.i = (var58.i * var50.i) >> 16; - /* 26: addw */ - var71.i = var62.i + var70.i; - /* 28: mulhsw */ - var72.i = (var61.i * var51.i) >> 16; - /* 29: addw */ - var73.i = var71.i + var72.i; - /* 30: convssswb */ - var74 = ORC_CLAMP_SB (var73.i); - /* 31: mergebw */ + /* 19: mulhsw */ + var65.i = (var56.i * var47.i) >> 16; + /* 20: addw */ + var66.i = var60.i + var65.i; + /* 21: convssswb */ + var67 = ORC_CLAMP_SB (var66.i); + /* 23: mulhsw */ + var68.i = (var56.i * var48.i) >> 16; + /* 24: addw */ + var69.i = var60.i + var68.i; + /* 26: mulhsw */ + var70.i = (var59.i * var49.i) >> 16; + /* 27: addw */ + var71.i = var69.i + var70.i; + /* 28: convssswb */ + var72 = ORC_CLAMP_SB (var71.i); + /* 29: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var69; - _dest.x2[1] = var74; - var75.i = _dest.i; + _dest.x2[0] = var67; + _dest.x2[1] = var72; + var73.i = _dest.i; } - /* 32: mergewl */ + /* 30: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var75.i; - _dest.x2[1] = var66.i; - var76.i = _dest.i; + _dest.x2[0] = var73.i; + _dest.x2[1] = var64.i; + var74.i = _dest.i; } - /* 34: addb */ - var53.x4[0] = var76.x4[0] + var52.x4[0]; - var53.x4[1] = var76.x4[1] + var52.x4[1]; - var53.x4[2] = var76.x4[2] + var52.x4[2]; - var53.x4[3] = var76.x4[3] + var52.x4[3]; - /* 35: storel */ - ptr0[i] = var53; + /* 32: addb */ + var51.x4[0] = var74.x4[0] + var50.x4[0]; + var51.x4[1] = var74.x4[1] + var50.x4[1]; + var51.x4[2] = var74.x4[2] + var50.x4[2]; + var51.x4[3] = var74.x4[3] + var50.x4[3]; + /* 33: storel */ + ptr0[i] = var51; } } @@ -15541,55 +15750,45 @@ _backup_video_orc_convert_I420_BGRA (OrcExecutor * ORC_RESTRICT ex) #else orc_int8 var43; #endif + orc_union16 var44; + orc_union16 var45; #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var44; + volatile orc_int8 var46; #else - orc_int8 var44; + orc_int8 var46; #endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var45; -#else - orc_int8 var45; -#endif - orc_union16 var46; orc_union16 var47; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_int8 var48; -#else - orc_int8 var48; -#endif + orc_union16 var48; orc_union16 var49; - orc_union16 var50; - orc_union16 var51; #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var52; + volatile orc_union32 var50; #else - orc_union32 var52; + orc_union32 var50; #endif - orc_union32 var53; + orc_union32 var51; + orc_int8 var52; + orc_union16 var53; orc_int8 var54; - orc_union16 var55; - orc_int8 var56; + orc_int8 var55; + orc_union16 var56; orc_int8 var57; - orc_union16 var58; - orc_int8 var59; - orc_int8 var60; + orc_int8 var58; + orc_union16 var59; + orc_union16 var60; orc_union16 var61; orc_union16 var62; - orc_union16 var63; + orc_int8 var63; orc_union16 var64; - orc_int8 var65; + orc_union16 var65; orc_union16 var66; - orc_union16 var67; + orc_int8 var67; orc_union16 var68; - orc_int8 var69; + orc_union16 var69; orc_union16 var70; orc_union16 var71; - orc_union16 var72; + orc_int8 var72; orc_union16 var73; - orc_int8 var74; - orc_union16 var75; - orc_union32 var76; + orc_union32 var74; ptr0 = (orc_union32 *) ex->arrays[0]; ptr4 = (orc_int8 *) ex->arrays[4]; @@ -15598,99 +15797,95 @@ _backup_video_orc_convert_I420_BGRA (OrcExecutor * ORC_RESTRICT ex) /* 1: loadpb */ var43 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 5: loadpb */ - var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */ - /* 9: loadpb */ - var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */ + /* 10: loadpw */ + var44.i = ex->params[24]; /* 12: loadpw */ - var46.i = ex->params[24]; - /* 14: loadpw */ - var47.i = ex->params[25]; - /* 18: loadpb */ - var48 = (int) 0x0000007f; /* 127 or 6.27463e-322f */ - /* 20: loadpw */ - var49.i = ex->params[26]; - /* 24: loadpw */ - var50.i = ex->params[27]; - /* 27: loadpw */ - var51.i = ex->params[28]; - /* 33: loadpb */ - var52.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var52.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var45.i = ex->params[25]; + /* 16: loadpb */ + var46 = (int) 0x0000007f; /* 127 or 6.27463e-322f */ + /* 18: loadpw */ + var47.i = ex->params[26]; + /* 22: loadpw */ + var48.i = ex->params[27]; + /* 25: loadpw */ + var49.i = ex->params[28]; + /* 31: loadpb */ + var50.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var50.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var50.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var50.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ for (i = 0; i < n; i++) { /* 0: loadb */ var42 = ptr4[i]; /* 2: subb */ - var54 = var42 - var43; + var52 = var42 - var43; /* 3: splatbw */ - var55.i = ((var54 & 0xff) << 8) | (var54 & 0xff); + var53.i = ((var52 & 0xff) << 8) | (var52 & 0xff); /* 4: loadupdb */ - var56 = ptr5[i >> 1]; - /* 6: subb */ - var57 = var56 - var44; - /* 7: splatbw */ - var58.i = ((var57 & 0xff) << 8) | (var57 & 0xff); - /* 8: loadupdb */ - var59 = ptr6[i >> 1]; - /* 10: subb */ - var60 = var59 - var45; - /* 11: splatbw */ - var61.i = ((var60 & 0xff) << 8) | (var60 & 0xff); + var54 = ptr5[i >> 1]; + /* 5: subb */ + var55 = var54 - var43; + /* 6: splatbw */ + var56.i = ((var55 & 0xff) << 8) | (var55 & 0xff); + /* 7: loadupdb */ + var57 = ptr6[i >> 1]; + /* 8: subb */ + var58 = var57 - var43; + /* 9: splatbw */ + var59.i = ((var58 & 0xff) << 8) | (var58 & 0xff); + /* 11: mulhsw */ + var60.i = (var53.i * var44.i) >> 16; /* 13: mulhsw */ - var62.i = (var55.i * var46.i) >> 16; - /* 15: mulhsw */ - var63.i = (var61.i * var47.i) >> 16; - /* 16: addw */ - var64.i = var62.i + var63.i; - /* 17: convssswb */ - var65 = ORC_CLAMP_SB (var64.i); - /* 19: mergebw */ + var61.i = (var59.i * var45.i) >> 16; + /* 14: addw */ + var62.i = var60.i + var61.i; + /* 15: convssswb */ + var63 = ORC_CLAMP_SB (var62.i); + /* 17: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var65; - _dest.x2[1] = var48; - var66.i = _dest.i; + _dest.x2[0] = var63; + _dest.x2[1] = var46; + var64.i = _dest.i; } - /* 21: mulhsw */ - var67.i = (var58.i * var49.i) >> 16; - /* 22: addw */ - var68.i = var62.i + var67.i; - /* 23: convssswb */ - var69 = ORC_CLAMP_SB (var68.i); - /* 25: mulhsw */ - var70.i = (var58.i * var50.i) >> 16; - /* 26: addw */ - var71.i = var62.i + var70.i; - /* 28: mulhsw */ - var72.i = (var61.i * var51.i) >> 16; - /* 29: addw */ - var73.i = var71.i + var72.i; - /* 30: convssswb */ - var74 = ORC_CLAMP_SB (var73.i); - /* 31: mergebw */ + /* 19: mulhsw */ + var65.i = (var56.i * var47.i) >> 16; + /* 20: addw */ + var66.i = var60.i + var65.i; + /* 21: convssswb */ + var67 = ORC_CLAMP_SB (var66.i); + /* 23: mulhsw */ + var68.i = (var56.i * var48.i) >> 16; + /* 24: addw */ + var69.i = var60.i + var68.i; + /* 26: mulhsw */ + var70.i = (var59.i * var49.i) >> 16; + /* 27: addw */ + var71.i = var69.i + var70.i; + /* 28: convssswb */ + var72 = ORC_CLAMP_SB (var71.i); + /* 29: mergebw */ { orc_union16 _dest; - _dest.x2[0] = var69; - _dest.x2[1] = var74; - var75.i = _dest.i; + _dest.x2[0] = var67; + _dest.x2[1] = var72; + var73.i = _dest.i; } - /* 32: mergewl */ + /* 30: mergewl */ { orc_union32 _dest; - _dest.x2[0] = var75.i; - _dest.x2[1] = var66.i; - var76.i = _dest.i; + _dest.x2[0] = var73.i; + _dest.x2[1] = var64.i; + var74.i = _dest.i; } - /* 34: addb */ - var53.x4[0] = var76.x4[0] + var52.x4[0]; - var53.x4[1] = var76.x4[1] + var52.x4[1]; - var53.x4[2] = var76.x4[2] + var52.x4[2]; - var53.x4[3] = var76.x4[3] + var52.x4[3]; - /* 35: storel */ - ptr0[i] = var53; + /* 32: addb */ + var51.x4[0] = var74.x4[0] + var50.x4[0]; + var51.x4[1] = var74.x4[1] + var50.x4[1]; + var51.x4[2] = var74.x4[2] + var50.x4[2]; + var51.x4[3] = var74.x4[3] + var50.x4[3]; + /* 33: storel */ + ptr0[i] = var51; } } @@ -15716,7 +15911,7 @@ video_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, 1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50, 48, 95, 66, 71, 82, 65, 11, 4, 4, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 1, 128, 0, 0, 0, - 14, 4, 127, 0, 0, 0, 16, 2, 16, 2, 16, 2, 16, 2, 16, 2, + 14, 1, 127, 0, 0, 0, 16, 2, 16, 2, 16, 2, 16, 2, 16, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 1, 20, 1, 20, 1, 20, 4, 65, 38, 4, 16, 151, 32, 38, 45, 38, 5, 65, 38, 38, 16, 151, 33, 38, 45, 38, 6, 65, 38, 38, 16, 151, 34, 38, 90, @@ -15737,7 +15932,7 @@ video_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s3"); orc_program_add_constant (p, 1, 0x00000080, "c1"); - orc_program_add_constant (p, 4, 0x0000007f, "c2"); + orc_program_add_constant (p, 1, 0x0000007f, "c2"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_parameter (p, 2, "p2"); orc_program_add_parameter (p, 2, "p3"); @@ -15851,193 +16046,187 @@ video_orc_matrix8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, #else orc_union64 var45; #endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var46; -#else orc_union32 var46; -#endif - orc_union32 var47; + orc_union64 var47; orc_union64 var48; orc_union64 var49; - orc_union64 var50; - orc_union32 var51; + orc_union32 var50; + orc_union16 var51; orc_union16 var52; - orc_union16 var53; + orc_int8 var53; orc_int8 var54; - orc_int8 var55; - orc_union32 var56; + orc_union32 var55; + orc_union64 var56; orc_union64 var57; - orc_union64 var58; - orc_union32 var59; + orc_union32 var58; + orc_union64 var59; orc_union64 var60; orc_union64 var61; - orc_union64 var62; - orc_int8 var63; - orc_union32 var64; + orc_int8 var62; + orc_union32 var63; + orc_union64 var64; orc_union64 var65; orc_union64 var66; - orc_union64 var67; - orc_int8 var68; - orc_union32 var69; + orc_int8 var67; + orc_union32 var68; + orc_union64 var69; orc_union64 var70; orc_union64 var71; - orc_union64 var72; - orc_union32 var73; + orc_union32 var72; ptr0 = (orc_union32 *) d1; ptr4 = (orc_union32 *) s1; /* 0: loadpq */ - var48.i = p1; + var47.i = p1; /* 1: loadpq */ - var49.i = p2; + var48.i = p2; /* 2: loadpq */ - var50.i = p3; + var49.i = p3; /* 4: loadpb */ var44.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ var44.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ var44.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ var44.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ /* 12: loadpq */ - var45.i = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - /* 29: loadpb */ - var46.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var46.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var46.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var46.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var45.i = ORC_UINT64_C (0x00000000000000ff); /* 1.25987e-321f */ for (i = 0; i < n; i++) { /* 3: loadl */ var43 = ptr4[i]; /* 5: subb */ - var51.x4[0] = var43.x4[0] - var44.x4[0]; - var51.x4[1] = var43.x4[1] - var44.x4[1]; - var51.x4[2] = var43.x4[2] - var44.x4[2]; - var51.x4[3] = var43.x4[3] - var44.x4[3]; + var50.x4[0] = var43.x4[0] - var44.x4[0]; + var50.x4[1] = var43.x4[1] - var44.x4[1]; + var50.x4[2] = var43.x4[2] - var44.x4[2]; + var50.x4[3] = var43.x4[3] - var44.x4[3]; /* 6: select0lw */ { orc_union32 _src; - _src.i = var51.i; - var52.i = _src.x2[0]; + _src.i = var50.i; + var51.i = _src.x2[0]; } /* 7: select1lw */ { orc_union32 _src; - _src.i = var51.i; - var53.i = _src.x2[1]; + _src.i = var50.i; + var52.i = _src.x2[1]; } /* 8: select0wb */ { orc_union16 _src; - _src.i = var52.i; - var54 = _src.x2[0]; + _src.i = var51.i; + var53 = _src.x2[0]; } /* 9: select1wb */ { orc_union16 _src; - _src.i = var52.i; - var55 = _src.x2[1]; + _src.i = var51.i; + var54 = _src.x2[1]; } /* 10: splatbl */ - var56.i = - ((var54 & 0xff) << 24) | ((var54 & 0xff) << 16) | ((var54 & 0xff) << 8) - | (var54 & 0xff); + var55.i = + ((((orc_uint32) var53) & 0xff) << 24) | ((((orc_uint32) var53) & 0xff) + << 16) | ((((orc_uint32) var53) & 0xff) << 8) | (((orc_uint32) var53) & + 0xff); /* 11: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var56.i; - _dest.x2[1] = var56.i; - var57.i = _dest.i; + _dest.x2[0] = var55.i; + _dest.x2[1] = var55.i; + var56.i = _dest.i; } /* 13: andq */ - var58.i = var57.i & var45.i; + var57.i = var56.i & var45.i; /* 14: splatbl */ - var59.i = - ((var55 & 0xff) << 24) | ((var55 & 0xff) << 16) | ((var55 & 0xff) << 8) - | (var55 & 0xff); + var58.i = + ((((orc_uint32) var54) & 0xff) << 24) | ((((orc_uint32) var54) & 0xff) + << 16) | ((((orc_uint32) var54) & 0xff) << 8) | (((orc_uint32) var54) & + 0xff); /* 15: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var59.i; - _dest.x2[1] = var59.i; - var60.i = _dest.i; + _dest.x2[0] = var58.i; + _dest.x2[1] = var58.i; + var59.i = _dest.i; } /* 16: mulhsw */ - var61.x4[0] = (var60.x4[0] * var48.x4[0]) >> 16; - var61.x4[1] = (var60.x4[1] * var48.x4[1]) >> 16; - var61.x4[2] = (var60.x4[2] * var48.x4[2]) >> 16; - var61.x4[3] = (var60.x4[3] * var48.x4[3]) >> 16; + var60.x4[0] = (var59.x4[0] * var47.x4[0]) >> 16; + var60.x4[1] = (var59.x4[1] * var47.x4[1]) >> 16; + var60.x4[2] = (var59.x4[2] * var47.x4[2]) >> 16; + var60.x4[3] = (var59.x4[3] * var47.x4[3]) >> 16; /* 17: addssw */ - var62.x4[0] = ORC_CLAMP_SW (var58.x4[0] + var61.x4[0]); - var62.x4[1] = ORC_CLAMP_SW (var58.x4[1] + var61.x4[1]); - var62.x4[2] = ORC_CLAMP_SW (var58.x4[2] + var61.x4[2]); - var62.x4[3] = ORC_CLAMP_SW (var58.x4[3] + var61.x4[3]); + var61.x4[0] = ORC_CLAMP_SW (var57.x4[0] + var60.x4[0]); + var61.x4[1] = ORC_CLAMP_SW (var57.x4[1] + var60.x4[1]); + var61.x4[2] = ORC_CLAMP_SW (var57.x4[2] + var60.x4[2]); + var61.x4[3] = ORC_CLAMP_SW (var57.x4[3] + var60.x4[3]); /* 18: select0wb */ { orc_union16 _src; - _src.i = var53.i; - var63 = _src.x2[0]; + _src.i = var52.i; + var62 = _src.x2[0]; } /* 19: splatbl */ - var64.i = - ((var63 & 0xff) << 24) | ((var63 & 0xff) << 16) | ((var63 & 0xff) << 8) - | (var63 & 0xff); + var63.i = + ((((orc_uint32) var62) & 0xff) << 24) | ((((orc_uint32) var62) & 0xff) + << 16) | ((((orc_uint32) var62) & 0xff) << 8) | (((orc_uint32) var62) & + 0xff); /* 20: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var64.i; - _dest.x2[1] = var64.i; - var65.i = _dest.i; + _dest.x2[0] = var63.i; + _dest.x2[1] = var63.i; + var64.i = _dest.i; } /* 21: mulhsw */ - var66.x4[0] = (var65.x4[0] * var49.x4[0]) >> 16; - var66.x4[1] = (var65.x4[1] * var49.x4[1]) >> 16; - var66.x4[2] = (var65.x4[2] * var49.x4[2]) >> 16; - var66.x4[3] = (var65.x4[3] * var49.x4[3]) >> 16; + var65.x4[0] = (var64.x4[0] * var48.x4[0]) >> 16; + var65.x4[1] = (var64.x4[1] * var48.x4[1]) >> 16; + var65.x4[2] = (var64.x4[2] * var48.x4[2]) >> 16; + var65.x4[3] = (var64.x4[3] * var48.x4[3]) >> 16; /* 22: addssw */ - var67.x4[0] = ORC_CLAMP_SW (var62.x4[0] + var66.x4[0]); - var67.x4[1] = ORC_CLAMP_SW (var62.x4[1] + var66.x4[1]); - var67.x4[2] = ORC_CLAMP_SW (var62.x4[2] + var66.x4[2]); - var67.x4[3] = ORC_CLAMP_SW (var62.x4[3] + var66.x4[3]); + var66.x4[0] = ORC_CLAMP_SW (var61.x4[0] + var65.x4[0]); + var66.x4[1] = ORC_CLAMP_SW (var61.x4[1] + var65.x4[1]); + var66.x4[2] = ORC_CLAMP_SW (var61.x4[2] + var65.x4[2]); + var66.x4[3] = ORC_CLAMP_SW (var61.x4[3] + var65.x4[3]); /* 23: select1wb */ { orc_union16 _src; - _src.i = var53.i; - var68 = _src.x2[1]; + _src.i = var52.i; + var67 = _src.x2[1]; } /* 24: splatbl */ - var69.i = - ((var68 & 0xff) << 24) | ((var68 & 0xff) << 16) | ((var68 & 0xff) << 8) - | (var68 & 0xff); + var68.i = + ((((orc_uint32) var67) & 0xff) << 24) | ((((orc_uint32) var67) & 0xff) + << 16) | ((((orc_uint32) var67) & 0xff) << 8) | (((orc_uint32) var67) & + 0xff); /* 25: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var69.i; - _dest.x2[1] = var69.i; - var70.i = _dest.i; + _dest.x2[0] = var68.i; + _dest.x2[1] = var68.i; + var69.i = _dest.i; } /* 26: mulhsw */ - var71.x4[0] = (var70.x4[0] * var50.x4[0]) >> 16; - var71.x4[1] = (var70.x4[1] * var50.x4[1]) >> 16; - var71.x4[2] = (var70.x4[2] * var50.x4[2]) >> 16; - var71.x4[3] = (var70.x4[3] * var50.x4[3]) >> 16; + var70.x4[0] = (var69.x4[0] * var49.x4[0]) >> 16; + var70.x4[1] = (var69.x4[1] * var49.x4[1]) >> 16; + var70.x4[2] = (var69.x4[2] * var49.x4[2]) >> 16; + var70.x4[3] = (var69.x4[3] * var49.x4[3]) >> 16; /* 27: addssw */ - var72.x4[0] = ORC_CLAMP_SW (var67.x4[0] + var71.x4[0]); - var72.x4[1] = ORC_CLAMP_SW (var67.x4[1] + var71.x4[1]); - var72.x4[2] = ORC_CLAMP_SW (var67.x4[2] + var71.x4[2]); - var72.x4[3] = ORC_CLAMP_SW (var67.x4[3] + var71.x4[3]); + var71.x4[0] = ORC_CLAMP_SW (var66.x4[0] + var70.x4[0]); + var71.x4[1] = ORC_CLAMP_SW (var66.x4[1] + var70.x4[1]); + var71.x4[2] = ORC_CLAMP_SW (var66.x4[2] + var70.x4[2]); + var71.x4[3] = ORC_CLAMP_SW (var66.x4[3] + var70.x4[3]); /* 28: convssswb */ - var73.x4[0] = ORC_CLAMP_SB (var72.x4[0]); - var73.x4[1] = ORC_CLAMP_SB (var72.x4[1]); - var73.x4[2] = ORC_CLAMP_SB (var72.x4[2]); - var73.x4[3] = ORC_CLAMP_SB (var72.x4[3]); - /* 30: addb */ - var47.x4[0] = var73.x4[0] + var46.x4[0]; - var47.x4[1] = var73.x4[1] + var46.x4[1]; - var47.x4[2] = var73.x4[2] + var46.x4[2]; - var47.x4[3] = var73.x4[3] + var46.x4[3]; - /* 31: storel */ - ptr0[i] = var47; + var72.x4[0] = ORC_CLAMP_SB (var71.x4[0]); + var72.x4[1] = ORC_CLAMP_SB (var71.x4[1]); + var72.x4[2] = ORC_CLAMP_SB (var71.x4[2]); + var72.x4[3] = ORC_CLAMP_SB (var71.x4[3]); + /* 29: addb */ + var46.x4[0] = var72.x4[0] + var44.x4[0]; + var46.x4[1] = var72.x4[1] + var44.x4[1]; + var46.x4[2] = var72.x4[2] + var44.x4[2]; + var46.x4[3] = var72.x4[3] + var44.x4[3]; + /* 30: storel */ + ptr0[i] = var46; } } @@ -16061,52 +16250,47 @@ _backup_video_orc_matrix8 (OrcExecutor * ORC_RESTRICT ex) #else orc_union64 var45; #endif -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var46; -#else orc_union32 var46; -#endif - orc_union32 var47; + orc_union64 var47; orc_union64 var48; orc_union64 var49; - orc_union64 var50; - orc_union32 var51; + orc_union32 var50; + orc_union16 var51; orc_union16 var52; - orc_union16 var53; + orc_int8 var53; orc_int8 var54; - orc_int8 var55; - orc_union32 var56; + orc_union32 var55; + orc_union64 var56; orc_union64 var57; - orc_union64 var58; - orc_union32 var59; + orc_union32 var58; + orc_union64 var59; orc_union64 var60; orc_union64 var61; - orc_union64 var62; - orc_int8 var63; - orc_union32 var64; + orc_int8 var62; + orc_union32 var63; + orc_union64 var64; orc_union64 var65; orc_union64 var66; - orc_union64 var67; - orc_int8 var68; - orc_union32 var69; + orc_int8 var67; + orc_union32 var68; + orc_union64 var69; orc_union64 var70; orc_union64 var71; - orc_union64 var72; - orc_union32 var73; + orc_union32 var72; ptr0 = (orc_union32 *) ex->arrays[0]; ptr4 = (orc_union32 *) ex->arrays[4]; /* 0: loadpq */ - var48.i = + var47.i = (ex->params[24] & 0xffffffff) | ((orc_uint64) (ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); /* 1: loadpq */ - var49.i = + var48.i = (ex->params[25] & 0xffffffff) | ((orc_uint64) (ex->params[25 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); /* 2: loadpq */ - var50.i = + var49.i = (ex->params[26] & 0xffffffff) | ((orc_uint64) (ex->params[26 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); /* 4: loadpb */ @@ -16115,145 +16299,144 @@ _backup_video_orc_matrix8 (OrcExecutor * ORC_RESTRICT ex) var44.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ var44.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ /* 12: loadpq */ - var45.i = (int) 0x000000ff; /* 255 or 1.25987e-321f */ - /* 29: loadpb */ - var46.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var46.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var46.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */ - var46.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */ + var45.i = ORC_UINT64_C (0x00000000000000ff); /* 1.25987e-321f */ for (i = 0; i < n; i++) { /* 3: loadl */ var43 = ptr4[i]; /* 5: subb */ - var51.x4[0] = var43.x4[0] - var44.x4[0]; - var51.x4[1] = var43.x4[1] - var44.x4[1]; - var51.x4[2] = var43.x4[2] - var44.x4[2]; - var51.x4[3] = var43.x4[3] - var44.x4[3]; + var50.x4[0] = var43.x4[0] - var44.x4[0]; + var50.x4[1] = var43.x4[1] - var44.x4[1]; + var50.x4[2] = var43.x4[2] - var44.x4[2]; + var50.x4[3] = var43.x4[3] - var44.x4[3]; /* 6: select0lw */ { orc_union32 _src; - _src.i = var51.i; - var52.i = _src.x2[0]; + _src.i = var50.i; + var51.i = _src.x2[0]; } /* 7: select1lw */ { orc_union32 _src; - _src.i = var51.i; - var53.i = _src.x2[1]; + _src.i = var50.i; + var52.i = _src.x2[1]; } /* 8: select0wb */ { orc_union16 _src; - _src.i = var52.i; - var54 = _src.x2[0]; + _src.i = var51.i; + var53 = _src.x2[0]; } /* 9: select1wb */ { orc_union16 _src; - _src.i = var52.i; - var55 = _src.x2[1]; + _src.i = var51.i; + var54 = _src.x2[1]; } /* 10: splatbl */ - var56.i = - ((var54 & 0xff) << 24) | ((var54 & 0xff) << 16) | ((var54 & 0xff) << 8) - | (var54 & 0xff); + var55.i = + ((((orc_uint32) var53) & 0xff) << 24) | ((((orc_uint32) var53) & 0xff) + << 16) | ((((orc_uint32) var53) & 0xff) << 8) | (((orc_uint32) var53) & + 0xff); /* 11: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var56.i; - _dest.x2[1] = var56.i; - var57.i = _dest.i; + _dest.x2[0] = var55.i; + _dest.x2[1] = var55.i; + var56.i = _dest.i; } /* 13: andq */ - var58.i = var57.i & var45.i; + var57.i = var56.i & var45.i; /* 14: splatbl */ - var59.i = - ((var55 & 0xff) << 24) | ((var55 & 0xff) << 16) | ((var55 & 0xff) << 8) - | (var55 & 0xff); + var58.i = + ((((orc_uint32) var54) & 0xff) << 24) | ((((orc_uint32) var54) & 0xff) + << 16) | ((((orc_uint32) var54) & 0xff) << 8) | (((orc_uint32) var54) & + 0xff); /* 15: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var59.i; - _dest.x2[1] = var59.i; - var60.i = _dest.i; + _dest.x2[0] = var58.i; + _dest.x2[1] = var58.i; + var59.i = _dest.i; } /* 16: mulhsw */ - var61.x4[0] = (var60.x4[0] * var48.x4[0]) >> 16; - var61.x4[1] = (var60.x4[1] * var48.x4[1]) >> 16; - var61.x4[2] = (var60.x4[2] * var48.x4[2]) >> 16; - var61.x4[3] = (var60.x4[3] * var48.x4[3]) >> 16; + var60.x4[0] = (var59.x4[0] * var47.x4[0]) >> 16; + var60.x4[1] = (var59.x4[1] * var47.x4[1]) >> 16; + var60.x4[2] = (var59.x4[2] * var47.x4[2]) >> 16; + var60.x4[3] = (var59.x4[3] * var47.x4[3]) >> 16; /* 17: addssw */ - var62.x4[0] = ORC_CLAMP_SW (var58.x4[0] + var61.x4[0]); - var62.x4[1] = ORC_CLAMP_SW (var58.x4[1] + var61.x4[1]); - var62.x4[2] = ORC_CLAMP_SW (var58.x4[2] + var61.x4[2]); - var62.x4[3] = ORC_CLAMP_SW (var58.x4[3] + var61.x4[3]); + var61.x4[0] = ORC_CLAMP_SW (var57.x4[0] + var60.x4[0]); + var61.x4[1] = ORC_CLAMP_SW (var57.x4[1] + var60.x4[1]); + var61.x4[2] = ORC_CLAMP_SW (var57.x4[2] + var60.x4[2]); + var61.x4[3] = ORC_CLAMP_SW (var57.x4[3] + var60.x4[3]); /* 18: select0wb */ { orc_union16 _src; - _src.i = var53.i; - var63 = _src.x2[0]; + _src.i = var52.i; + var62 = _src.x2[0]; } /* 19: splatbl */ - var64.i = - ((var63 & 0xff) << 24) | ((var63 & 0xff) << 16) | ((var63 & 0xff) << 8) - | (var63 & 0xff); + var63.i = + ((((orc_uint32) var62) & 0xff) << 24) | ((((orc_uint32) var62) & 0xff) + << 16) | ((((orc_uint32) var62) & 0xff) << 8) | (((orc_uint32) var62) & + 0xff); /* 20: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var64.i; - _dest.x2[1] = var64.i; - var65.i = _dest.i; + _dest.x2[0] = var63.i; + _dest.x2[1] = var63.i; + var64.i = _dest.i; } /* 21: mulhsw */ - var66.x4[0] = (var65.x4[0] * var49.x4[0]) >> 16; - var66.x4[1] = (var65.x4[1] * var49.x4[1]) >> 16; - var66.x4[2] = (var65.x4[2] * var49.x4[2]) >> 16; - var66.x4[3] = (var65.x4[3] * var49.x4[3]) >> 16; + var65.x4[0] = (var64.x4[0] * var48.x4[0]) >> 16; + var65.x4[1] = (var64.x4[1] * var48.x4[1]) >> 16; + var65.x4[2] = (var64.x4[2] * var48.x4[2]) >> 16; + var65.x4[3] = (var64.x4[3] * var48.x4[3]) >> 16; /* 22: addssw */ - var67.x4[0] = ORC_CLAMP_SW (var62.x4[0] + var66.x4[0]); - var67.x4[1] = ORC_CLAMP_SW (var62.x4[1] + var66.x4[1]); - var67.x4[2] = ORC_CLAMP_SW (var62.x4[2] + var66.x4[2]); - var67.x4[3] = ORC_CLAMP_SW (var62.x4[3] + var66.x4[3]); + var66.x4[0] = ORC_CLAMP_SW (var61.x4[0] + var65.x4[0]); + var66.x4[1] = ORC_CLAMP_SW (var61.x4[1] + var65.x4[1]); + var66.x4[2] = ORC_CLAMP_SW (var61.x4[2] + var65.x4[2]); + var66.x4[3] = ORC_CLAMP_SW (var61.x4[3] + var65.x4[3]); /* 23: select1wb */ { orc_union16 _src; - _src.i = var53.i; - var68 = _src.x2[1]; + _src.i = var52.i; + var67 = _src.x2[1]; } /* 24: splatbl */ - var69.i = - ((var68 & 0xff) << 24) | ((var68 & 0xff) << 16) | ((var68 & 0xff) << 8) - | (var68 & 0xff); + var68.i = + ((((orc_uint32) var67) & 0xff) << 24) | ((((orc_uint32) var67) & 0xff) + << 16) | ((((orc_uint32) var67) & 0xff) << 8) | (((orc_uint32) var67) & + 0xff); /* 25: mergelq */ { orc_union64 _dest; - _dest.x2[0] = var69.i; - _dest.x2[1] = var69.i; - var70.i = _dest.i; + _dest.x2[0] = var68.i; + _dest.x2[1] = var68.i; + var69.i = _dest.i; } /* 26: mulhsw */ - var71.x4[0] = (var70.x4[0] * var50.x4[0]) >> 16; - var71.x4[1] = (var70.x4[1] * var50.x4[1]) >> 16; - var71.x4[2] = (var70.x4[2] * var50.x4[2]) >> 16; - var71.x4[3] = (var70.x4[3] * var50.x4[3]) >> 16; + var70.x4[0] = (var69.x4[0] * var49.x4[0]) >> 16; + var70.x4[1] = (var69.x4[1] * var49.x4[1]) >> 16; + var70.x4[2] = (var69.x4[2] * var49.x4[2]) >> 16; + var70.x4[3] = (var69.x4[3] * var49.x4[3]) >> 16; /* 27: addssw */ - var72.x4[0] = ORC_CLAMP_SW (var67.x4[0] + var71.x4[0]); - var72.x4[1] = ORC_CLAMP_SW (var67.x4[1] + var71.x4[1]); - var72.x4[2] = ORC_CLAMP_SW (var67.x4[2] + var71.x4[2]); - var72.x4[3] = ORC_CLAMP_SW (var67.x4[3] + var71.x4[3]); + var71.x4[0] = ORC_CLAMP_SW (var66.x4[0] + var70.x4[0]); + var71.x4[1] = ORC_CLAMP_SW (var66.x4[1] + var70.x4[1]); + var71.x4[2] = ORC_CLAMP_SW (var66.x4[2] + var70.x4[2]); + var71.x4[3] = ORC_CLAMP_SW (var66.x4[3] + var70.x4[3]); /* 28: convssswb */ - var73.x4[0] = ORC_CLAMP_SB (var72.x4[0]); - var73.x4[1] = ORC_CLAMP_SB (var72.x4[1]); - var73.x4[2] = ORC_CLAMP_SB (var72.x4[2]); - var73.x4[3] = ORC_CLAMP_SB (var72.x4[3]); - /* 30: addb */ - var47.x4[0] = var73.x4[0] + var46.x4[0]; - var47.x4[1] = var73.x4[1] + var46.x4[1]; - var47.x4[2] = var73.x4[2] + var46.x4[2]; - var47.x4[3] = var73.x4[3] + var46.x4[3]; - /* 31: storel */ - ptr0[i] = var47; + var72.x4[0] = ORC_CLAMP_SB (var71.x4[0]); + var72.x4[1] = ORC_CLAMP_SB (var71.x4[1]); + var72.x4[2] = ORC_CLAMP_SB (var71.x4[2]); + var72.x4[3] = ORC_CLAMP_SB (var71.x4[3]); + /* 29: addb */ + var46.x4[0] = var72.x4[0] + var44.x4[0]; + var46.x4[1] = var72.x4[1] + var44.x4[1]; + var46.x4[2] = var72.x4[2] + var44.x4[2]; + var46.x4[3] = var72.x4[3] + var44.x4[3]; + /* 30: storel */ + ptr0[i] = var46; } } @@ -16276,16 +16459,16 @@ video_orc_matrix8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, static const orc_uint8 bc[] = { 1, 9, 17, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 109, 97, 116, 114, 105, 120, 56, 11, 4, 4, 12, 4, 4, 14, 1, 128, 0, 0, 0, - 14, 4, 255, 0, 0, 0, 18, 8, 18, 8, 18, 8, 20, 2, 20, 2, - 20, 1, 20, 1, 20, 4, 20, 4, 20, 8, 20, 8, 20, 8, 20, 8, - 20, 8, 134, 40, 24, 134, 41, 25, 134, 42, 26, 21, 2, 65, 36, 4, - 16, 190, 32, 36, 191, 33, 36, 188, 34, 32, 189, 35, 32, 152, 36, 34, - 194, 38, 36, 36, 140, 38, 38, 17, 152, 36, 35, 194, 39, 36, 36, 21, - 2, 90, 39, 39, 40, 21, 2, 71, 38, 38, 39, 188, 34, 33, 152, 36, - 34, 194, 39, 36, 36, 21, 2, 90, 39, 39, 41, 21, 2, 71, 38, 38, - 39, 189, 35, 33, 152, 36, 35, 194, 39, 36, 36, 21, 2, 90, 39, 39, - 42, 21, 2, 71, 38, 38, 39, 21, 2, 159, 37, 38, 21, 2, 33, 0, - 37, 16, 2, 0, + 15, 8, 255, 0, 0, 0, 0, 0, 0, 0, 18, 8, 18, 8, 18, 8, + 20, 2, 20, 2, 20, 1, 20, 1, 20, 4, 20, 4, 20, 8, 20, 8, + 20, 8, 20, 8, 20, 8, 134, 40, 24, 134, 41, 25, 134, 42, 26, 21, + 2, 65, 36, 4, 16, 190, 32, 36, 191, 33, 36, 188, 34, 32, 189, 35, + 32, 152, 36, 34, 194, 38, 36, 36, 140, 38, 38, 17, 152, 36, 35, 194, + 39, 36, 36, 21, 2, 90, 39, 39, 40, 21, 2, 71, 38, 38, 39, 188, + 34, 33, 152, 36, 34, 194, 39, 36, 36, 21, 2, 90, 39, 39, 41, 21, + 2, 71, 38, 38, 39, 189, 35, 33, 152, 36, 35, 194, 39, 36, 36, 21, + 2, 90, 39, 39, 42, 21, 2, 71, 38, 38, 39, 21, 2, 159, 37, 38, + 21, 2, 33, 0, 37, 16, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, _backup_video_orc_matrix8); @@ -16296,7 +16479,7 @@ video_orc_matrix8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 4, "s1"); orc_program_add_constant (p, 1, 0x00000080, "c1"); - orc_program_add_constant (p, 4, 0x000000ff, "c2"); + orc_program_add_constant_int64 (p, 8, 0x00000000000000ffULL, "c2"); orc_program_add_parameter_int64 (p, 8, "p1"); orc_program_add_parameter_int64 (p, 8, "p2"); orc_program_add_parameter_int64 (p, 8, "p3"); @@ -16406,10 +16589,10 @@ video_orc_matrix8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, #endif -/* video_orc_resample_h_near_8888_lq */ +/* video_orc_resample_h_near_u32_lq */ #ifdef DISABLE_ORC void -video_orc_resample_h_near_8888_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_h_near_u32_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n) { int i; @@ -16432,7 +16615,7 @@ video_orc_resample_h_near_8888_lq (guint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_h_near_8888_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_h_near_u32_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -16454,7 +16637,7 @@ _backup_video_orc_resample_h_near_8888_lq (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_h_near_8888_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_h_near_u32_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n) { OrcExecutor _ex, *ex = &_ex; @@ -16469,19 +16652,19 @@ video_orc_resample_h_near_8888_lq (guint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, - 97, 109, 112, 108, 101, 95, 104, 95, 110, 101, 97, 114, 95, 56, 56, 56, - 56, 95, 108, 113, 11, 4, 4, 12, 4, 4, 16, 4, 16, 4, 49, 0, - 4, 24, 25, 2, 0, + 1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 104, 95, 110, 101, 97, 114, 95, 117, 51, 50, + 95, 108, 113, 11, 4, 4, 12, 4, 4, 16, 4, 16, 4, 49, 0, 4, + 24, 25, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_near_8888_lq); + _backup_video_orc_resample_h_near_u32_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_h_near_8888_lq"); + orc_program_set_name (p, "video_orc_resample_h_near_u32_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_near_8888_lq); + _backup_video_orc_resample_h_near_u32_lq); orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 4, "s1"); orc_program_add_parameter (p, 4, "p1"); @@ -16513,10 +16696,10 @@ video_orc_resample_h_near_8888_lq (guint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_h_2tap_8888_lq */ +/* video_orc_resample_h_2tap_4u8_lq */ #ifdef DISABLE_ORC void -video_orc_resample_h_2tap_8888_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_h_2tap_4u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n) { int i; @@ -16555,7 +16738,7 @@ video_orc_resample_h_2tap_8888_lq (guint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_h_2tap_8888_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_h_2tap_4u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -16593,7 +16776,7 @@ _backup_video_orc_resample_h_2tap_8888_lq (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_h_2tap_8888_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_h_2tap_4u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n) { OrcExecutor _ex, *ex = &_ex; @@ -16608,19 +16791,19 @@ video_orc_resample_h_2tap_8888_lq (guint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, - 97, 109, 112, 108, 101, 95, 104, 95, 50, 116, 97, 112, 95, 56, 56, 56, - 56, 95, 108, 113, 11, 4, 4, 12, 4, 4, 16, 4, 16, 4, 51, 0, - 4, 24, 25, 2, 0, + 1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 104, 95, 50, 116, 97, 112, 95, 52, 117, 56, + 95, 108, 113, 11, 4, 4, 12, 4, 4, 16, 4, 16, 4, 51, 0, 4, + 24, 25, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_2tap_8888_lq); + _backup_video_orc_resample_h_2tap_4u8_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_h_2tap_8888_lq"); + orc_program_set_name (p, "video_orc_resample_h_2tap_4u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_2tap_8888_lq); + _backup_video_orc_resample_h_2tap_4u8_lq); orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 4, "s1"); orc_program_add_parameter (p, 4, "p1"); @@ -16652,10 +16835,10 @@ video_orc_resample_h_2tap_8888_lq (guint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_2tap_8_lq */ +/* video_orc_resample_v_2tap_u8_lq */ #ifdef DISABLE_ORC void -video_orc_resample_v_2tap_8_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_2tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n) { @@ -16718,7 +16901,7 @@ video_orc_resample_v_2tap_8_lq (guint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_v_2tap_8_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_2tap_u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -16779,7 +16962,7 @@ _backup_video_orc_resample_v_2tap_8_lq (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_v_2tap_8_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_2tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n) { @@ -16795,25 +16978,25 @@ video_orc_resample_v_2tap_8_lq (guint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 30, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, - 97, 109, 112, 108, 101, 95, 118, 95, 50, 116, 97, 112, 95, 56, 95, 108, - 113, 11, 1, 1, 12, 1, 1, 12, 1, 1, 14, 4, 128, 0, 0, 0, - 16, 2, 20, 1, 20, 2, 20, 2, 150, 33, 4, 150, 34, 5, 98, 34, - 34, 33, 89, 34, 34, 24, 70, 34, 34, 16, 158, 32, 34, 33, 0, 32, - 4, 2, 0, + 1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 118, 95, 50, 116, 97, 112, 95, 117, 56, 95, + 108, 113, 11, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 128, 0, 0, + 0, 16, 2, 20, 1, 20, 2, 20, 2, 150, 33, 4, 150, 34, 5, 98, + 34, 34, 33, 89, 34, 34, 24, 70, 34, 34, 16, 158, 32, 34, 33, 0, + 32, 4, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_2tap_8_lq); + _backup_video_orc_resample_v_2tap_u8_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_2tap_8_lq"); + orc_program_set_name (p, "video_orc_resample_v_2tap_u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_2tap_8_lq); + _backup_video_orc_resample_v_2tap_u8_lq); orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2"); - orc_program_add_constant (p, 4, 0x00000080, "c1"); + orc_program_add_constant (p, 2, 0x00000080, "c1"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_temporary (p, 1, "t1"); orc_program_add_temporary (p, 2, "t2"); @@ -16857,10 +17040,226 @@ video_orc_resample_v_2tap_8_lq (guint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_2tap_8 */ +/* video_orc_resample_v_2tap_u16 */ #ifdef DISABLE_ORC void -video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_2tap_u16 (guint64 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, const guint64 * ORC_RESTRICT s2, int p1, + int n) +{ + int i; + orc_union16 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + const orc_union16 *ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union32 var38; +#else + orc_union32 var38; +#endif + orc_union16 var39; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union32 var44; + orc_union32 var45; + orc_union32 var46; + orc_union32 var47; + + ptr0 = (orc_union16 *) d1; + ptr4 = (orc_union16 *) s1; + ptr5 = (orc_union16 *) s2; + + /* 5: loadpw */ + var37.i = p1; + /* 8: loadpl */ + var38.i = (int) 0x00001000; /* 4096 or 2.02369e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr4[i]; + /* 1: convuwl */ + var40.i = (orc_uint16) var35.i; + /* 2: loadw */ + var36 = ptr5[i]; + /* 3: convuwl */ + var41.i = (orc_uint16) var36.i; + /* 4: subl */ + var42.i = ((orc_uint32) var41.i) - ((orc_uint32) var40.i); + /* 6: convuwl */ + var43.i = (orc_uint16) var37.i; + /* 7: mulll */ + var44.i = (((orc_uint32) var42.i) * ((orc_uint32) var43.i)) & 0xffffffff; + /* 9: addl */ + var45.i = ((orc_uint32) var44.i) + ((orc_uint32) var38.i); + /* 10: shrsl */ + var46.i = var45.i >> 12; + /* 11: addl */ + var47.i = ((orc_uint32) var40.i) + ((orc_uint32) var46.i); + /* 12: convsuslw */ + var39.i = ORC_CLAMP_UW (var47.i); + /* 13: storew */ + ptr0[i] = var39; + } + +} + +#else +static void +_backup_video_orc_resample_v_2tap_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + const orc_union16 *ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union32 var38; +#else + orc_union32 var38; +#endif + orc_union16 var39; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union32 var44; + orc_union32 var45; + orc_union32 var46; + orc_union32 var47; + + ptr0 = (orc_union16 *) ex->arrays[0]; + ptr4 = (orc_union16 *) ex->arrays[4]; + ptr5 = (orc_union16 *) ex->arrays[5]; + + /* 5: loadpw */ + var37.i = ex->params[24]; + /* 8: loadpl */ + var38.i = (int) 0x00001000; /* 4096 or 2.02369e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr4[i]; + /* 1: convuwl */ + var40.i = (orc_uint16) var35.i; + /* 2: loadw */ + var36 = ptr5[i]; + /* 3: convuwl */ + var41.i = (orc_uint16) var36.i; + /* 4: subl */ + var42.i = ((orc_uint32) var41.i) - ((orc_uint32) var40.i); + /* 6: convuwl */ + var43.i = (orc_uint16) var37.i; + /* 7: mulll */ + var44.i = (((orc_uint32) var42.i) * ((orc_uint32) var43.i)) & 0xffffffff; + /* 9: addl */ + var45.i = ((orc_uint32) var44.i) + ((orc_uint32) var38.i); + /* 10: shrsl */ + var46.i = var45.i >> 12; + /* 11: addl */ + var47.i = ((orc_uint32) var40.i) + ((orc_uint32) var46.i); + /* 12: convsuslw */ + var39.i = ORC_CLAMP_UW (var47.i); + /* 13: storew */ + ptr0[i] = var39; + } + +} + +void +video_orc_resample_v_2tap_u16 (guint64 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, const guint64 * ORC_RESTRICT s2, int p1, + int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 29, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 118, 95, 50, 116, 97, 112, 95, 117, 49, 54, + 11, 2, 2, 12, 2, 2, 12, 2, 2, 14, 4, 0, 16, 0, 0, 14, + 4, 12, 0, 0, 0, 16, 2, 20, 4, 20, 4, 20, 4, 154, 32, 4, + 154, 33, 5, 129, 33, 33, 32, 154, 34, 24, 120, 33, 33, 34, 103, 33, + 33, 16, 125, 33, 33, 17, 103, 32, 32, 33, 166, 0, 32, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, + _backup_video_orc_resample_v_2tap_u16); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_resample_v_2tap_u16"); + orc_program_set_backup_function (p, + _backup_video_orc_resample_v_2tap_u16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00001000, "c1"); + orc_program_add_constant (p, 4, 0x0000000c, "c2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 4, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "subl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, + ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, + ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); + orc_program_append_2 (p, "convsuslw", 0, ORC_VAR_D1, ORC_VAR_T1, + ORC_VAR_D1, ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->arrays[ORC_VAR_S2] = (void *) s2; + ex->params[ORC_VAR_P1] = p1; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_resample_v_2tap_u8 */ +#ifdef DISABLE_ORC +void +video_orc_resample_v_2tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n) { @@ -16909,7 +17308,7 @@ video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, /* 6: mulswl */ var45.i = var44.i * var39.i; /* 8: addl */ - var46.i = var45.i + var40.i; + var46.i = ((orc_uint32) var45.i) + ((orc_uint32) var40.i); /* 9: shrsl */ var47.i = var46.i >> 12; /* 10: convlw */ @@ -16926,7 +17325,7 @@ video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_v_2tap_8 (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_2tap_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -16974,7 +17373,7 @@ _backup_video_orc_resample_v_2tap_8 (OrcExecutor * ORC_RESTRICT ex) /* 6: mulswl */ var45.i = var44.i * var39.i; /* 8: addl */ - var46.i = var45.i + var40.i; + var46.i = ((orc_uint32) var45.i) + ((orc_uint32) var40.i); /* 9: shrsl */ var47.i = var46.i >> 12; /* 10: convlw */ @@ -16990,7 +17389,7 @@ _backup_video_orc_resample_v_2tap_8 (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_2tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n) { @@ -17006,20 +17405,20 @@ video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, - 97, 109, 112, 108, 101, 95, 118, 95, 50, 116, 97, 112, 95, 56, 11, 1, - 1, 12, 1, 1, 12, 1, 1, 14, 4, 255, 15, 0, 0, 14, 4, 12, - 0, 0, 0, 16, 2, 20, 1, 20, 2, 20, 2, 20, 4, 20, 4, 150, - 33, 4, 150, 34, 5, 98, 34, 34, 33, 176, 36, 34, 24, 103, 36, 36, - 16, 125, 36, 36, 17, 163, 34, 36, 70, 34, 34, 33, 160, 0, 34, 2, - 0, + 1, 9, 28, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 118, 95, 50, 116, 97, 112, 95, 117, 56, 11, + 1, 1, 12, 1, 1, 12, 1, 1, 14, 4, 255, 15, 0, 0, 14, 4, + 12, 0, 0, 0, 16, 2, 20, 1, 20, 2, 20, 2, 20, 4, 20, 4, + 150, 33, 4, 150, 34, 5, 98, 34, 34, 33, 176, 36, 34, 24, 103, 36, + 36, 16, 125, 36, 36, 17, 163, 34, 36, 70, 34, 34, 33, 160, 0, 34, + 2, 0, }; p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, _backup_video_orc_resample_v_2tap_8); + orc_program_set_backup_function (p, _backup_video_orc_resample_v_2tap_u8); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_2tap_8"); - orc_program_set_backup_function (p, _backup_video_orc_resample_v_2tap_8); + orc_program_set_name (p, "video_orc_resample_v_2tap_u8"); + orc_program_set_backup_function (p, _backup_video_orc_resample_v_2tap_u8); orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2"); @@ -17074,10 +17473,10 @@ video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_4tap_8_lq */ +/* video_orc_resample_v_4tap_u8_lq */ #ifdef DISABLE_ORC void -video_orc_resample_v_4tap_8_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_4tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n) @@ -17178,7 +17577,7 @@ video_orc_resample_v_4tap_8_lq (guint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_v_4tap_8_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_4tap_u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -17276,7 +17675,7 @@ _backup_video_orc_resample_v_4tap_8_lq (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_v_4tap_8_lq (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_4tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n) @@ -17293,30 +17692,30 @@ video_orc_resample_v_4tap_8_lq (guint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 30, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, - 97, 109, 112, 108, 101, 95, 118, 95, 52, 116, 97, 112, 95, 56, 95, 108, - 113, 11, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, - 14, 4, 32, 0, 0, 0, 14, 4, 6, 0, 0, 0, 16, 2, 16, 2, - 16, 2, 16, 2, 20, 2, 20, 2, 150, 32, 4, 89, 32, 32, 24, 150, - 33, 5, 89, 33, 33, 25, 70, 32, 32, 33, 150, 33, 6, 89, 33, 33, - 26, 70, 32, 32, 33, 150, 33, 7, 89, 33, 33, 27, 70, 32, 32, 33, - 70, 32, 32, 16, 94, 32, 32, 17, 160, 0, 32, 2, 0, + 1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 118, 95, 52, 116, 97, 112, 95, 117, 56, 95, + 108, 113, 11, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, + 1, 14, 2, 32, 0, 0, 0, 14, 2, 6, 0, 0, 0, 16, 2, 16, + 2, 16, 2, 16, 2, 20, 2, 20, 2, 150, 32, 4, 89, 32, 32, 24, + 150, 33, 5, 89, 33, 33, 25, 70, 32, 32, 33, 150, 33, 6, 89, 33, + 33, 26, 70, 32, 32, 33, 150, 33, 7, 89, 33, 33, 27, 70, 32, 32, + 33, 70, 32, 32, 16, 94, 32, 32, 17, 160, 0, 32, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_4tap_8_lq); + _backup_video_orc_resample_v_4tap_u8_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_4tap_8_lq"); + orc_program_set_name (p, "video_orc_resample_v_4tap_u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_4tap_8_lq); + _backup_video_orc_resample_v_4tap_u8_lq); orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s3"); orc_program_add_source (p, 1, "s4"); - orc_program_add_constant (p, 4, 0x00000020, "c1"); - orc_program_add_constant (p, 4, 0x00000006, "c2"); + orc_program_add_constant (p, 2, 0x00000020, "c1"); + orc_program_add_constant (p, 2, 0x00000006, "c2"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_parameter (p, 2, "p2"); orc_program_add_parameter (p, 2, "p3"); @@ -17381,10 +17780,10 @@ video_orc_resample_v_4tap_8_lq (guint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_4tap_8 */ +/* video_orc_resample_v_4tap_u8 */ #ifdef DISABLE_ORC void -video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_4tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n) @@ -17455,7 +17854,7 @@ video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, /* 7: mulswl */ var49.i = var48.i * var39.i; /* 8: addl */ - var50.i = var47.i + var49.i; + var50.i = ((orc_uint32) var47.i) + ((orc_uint32) var49.i); /* 9: loadb */ var40 = ptr6[i]; /* 10: convubw */ @@ -17463,7 +17862,7 @@ video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, /* 12: mulswl */ var52.i = var51.i * var41.i; /* 13: addl */ - var53.i = var50.i + var52.i; + var53.i = ((orc_uint32) var50.i) + ((orc_uint32) var52.i); /* 14: loadb */ var42 = ptr7[i]; /* 15: convubw */ @@ -17471,9 +17870,9 @@ video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, /* 17: mulswl */ var55.i = var54.i * var43.i; /* 18: addl */ - var56.i = var53.i + var55.i; + var56.i = ((orc_uint32) var53.i) + ((orc_uint32) var55.i); /* 20: addl */ - var57.i = var56.i + var44.i; + var57.i = ((orc_uint32) var56.i) + ((orc_uint32) var44.i); /* 21: shrsl */ var58.i = var57.i >> 12; /* 22: convlw */ @@ -17488,7 +17887,7 @@ video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_v_4tap_8 (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_4tap_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -17557,7 +17956,7 @@ _backup_video_orc_resample_v_4tap_8 (OrcExecutor * ORC_RESTRICT ex) /* 7: mulswl */ var49.i = var48.i * var39.i; /* 8: addl */ - var50.i = var47.i + var49.i; + var50.i = ((orc_uint32) var47.i) + ((orc_uint32) var49.i); /* 9: loadb */ var40 = ptr6[i]; /* 10: convubw */ @@ -17565,7 +17964,7 @@ _backup_video_orc_resample_v_4tap_8 (OrcExecutor * ORC_RESTRICT ex) /* 12: mulswl */ var52.i = var51.i * var41.i; /* 13: addl */ - var53.i = var50.i + var52.i; + var53.i = ((orc_uint32) var50.i) + ((orc_uint32) var52.i); /* 14: loadb */ var42 = ptr7[i]; /* 15: convubw */ @@ -17573,9 +17972,9 @@ _backup_video_orc_resample_v_4tap_8 (OrcExecutor * ORC_RESTRICT ex) /* 17: mulswl */ var55.i = var54.i * var43.i; /* 18: addl */ - var56.i = var53.i + var55.i; + var56.i = ((orc_uint32) var53.i) + ((orc_uint32) var55.i); /* 20: addl */ - var57.i = var56.i + var44.i; + var57.i = ((orc_uint32) var56.i) + ((orc_uint32) var44.i); /* 21: shrsl */ var58.i = var57.i >> 12; /* 22: convlw */ @@ -17589,7 +17988,7 @@ _backup_video_orc_resample_v_4tap_8 (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, +video_orc_resample_v_4tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n) @@ -17606,22 +18005,22 @@ video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, - 97, 109, 112, 108, 101, 95, 118, 95, 52, 116, 97, 112, 95, 56, 11, 1, - 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 4, 255, - 15, 0, 0, 14, 4, 12, 0, 0, 0, 16, 2, 16, 2, 16, 2, 16, - 2, 20, 2, 20, 2, 20, 4, 20, 4, 150, 32, 4, 176, 34, 32, 24, - 150, 33, 5, 176, 35, 33, 25, 103, 34, 34, 35, 150, 33, 6, 176, 35, - 33, 26, 103, 34, 34, 35, 150, 33, 7, 176, 35, 33, 27, 103, 34, 34, - 35, 103, 34, 34, 16, 125, 34, 34, 17, 163, 32, 34, 160, 0, 32, 2, - 0, + 1, 9, 28, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 118, 95, 52, 116, 97, 112, 95, 117, 56, 11, + 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 4, + 255, 15, 0, 0, 14, 4, 12, 0, 0, 0, 16, 2, 16, 2, 16, 2, + 16, 2, 20, 2, 20, 2, 20, 4, 20, 4, 150, 32, 4, 176, 34, 32, + 24, 150, 33, 5, 176, 35, 33, 25, 103, 34, 34, 35, 150, 33, 6, 176, + 35, 33, 26, 103, 34, 34, 35, 150, 33, 7, 176, 35, 33, 27, 103, 34, + 34, 35, 103, 34, 34, 16, 125, 34, 34, 17, 163, 32, 34, 160, 0, 32, + 2, 0, }; p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, _backup_video_orc_resample_v_4tap_8); + orc_program_set_backup_function (p, _backup_video_orc_resample_v_4tap_u8); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_4tap_8"); - orc_program_set_backup_function (p, _backup_video_orc_resample_v_4tap_8); + orc_program_set_name (p, "video_orc_resample_v_4tap_u8"); + orc_program_set_backup_function (p, _backup_video_orc_resample_v_4tap_u8); orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2"); @@ -17697,344 +18096,10 @@ video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_h_4tap_8 */ +/* video_orc_resample_h_multaps_u8 */ #ifdef DISABLE_ORC void -video_orc_resample_h_4tap_8 (guint8 * ORC_RESTRICT d1, - const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, - const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, - const gint16 * ORC_RESTRICT s5, const gint16 * ORC_RESTRICT s6, - const gint16 * ORC_RESTRICT s7, const gint16 * ORC_RESTRICT s8, int n) -{ - int i; - orc_int8 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; - const orc_union16 *ORC_RESTRICT ptr8; - const orc_union16 *ORC_RESTRICT ptr9; - const orc_union16 *ORC_RESTRICT ptr10; - const orc_union16 *ORC_RESTRICT ptr11; - orc_int8 var36; - orc_union16 var37; - orc_int8 var38; - orc_union16 var39; - orc_int8 var40; - orc_union16 var41; - orc_int8 var42; - orc_union16 var43; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var44; -#else - orc_union32 var44; -#endif - orc_int8 var45; - orc_union16 var46; - orc_union32 var47; - orc_union16 var48; - orc_union32 var49; - orc_union32 var50; - orc_union16 var51; - orc_union32 var52; - orc_union32 var53; - orc_union16 var54; - orc_union32 var55; - orc_union32 var56; - orc_union32 var57; - orc_union32 var58; - orc_union16 var59; - - ptr0 = (orc_int8 *) d1; - ptr4 = (orc_int8 *) s1; - ptr5 = (orc_int8 *) s2; - ptr6 = (orc_int8 *) s3; - ptr7 = (orc_int8 *) s4; - ptr8 = (orc_union16 *) s5; - ptr9 = (orc_union16 *) s6; - ptr10 = (orc_union16 *) s7; - ptr11 = (orc_union16 *) s8; - - /* 19: loadpl */ - var44.i = (int) 0x00000fff; /* 4095 or 2.0232e-320f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var36 = ptr4[i]; - /* 1: convubw */ - var46.i = (orc_uint8) var36; - /* 2: loadw */ - var37 = ptr8[i]; - /* 3: mulswl */ - var47.i = var46.i * var37.i; - /* 4: loadb */ - var38 = ptr5[i]; - /* 5: convubw */ - var48.i = (orc_uint8) var38; - /* 6: loadw */ - var39 = ptr9[i]; - /* 7: mulswl */ - var49.i = var48.i * var39.i; - /* 8: addl */ - var50.i = var47.i + var49.i; - /* 9: loadb */ - var40 = ptr6[i]; - /* 10: convubw */ - var51.i = (orc_uint8) var40; - /* 11: loadw */ - var41 = ptr10[i]; - /* 12: mulswl */ - var52.i = var51.i * var41.i; - /* 13: addl */ - var53.i = var50.i + var52.i; - /* 14: loadb */ - var42 = ptr7[i]; - /* 15: convubw */ - var54.i = (orc_uint8) var42; - /* 16: loadw */ - var43 = ptr11[i]; - /* 17: mulswl */ - var55.i = var54.i * var43.i; - /* 18: addl */ - var56.i = var53.i + var55.i; - /* 20: addl */ - var57.i = var56.i + var44.i; - /* 21: shrsl */ - var58.i = var57.i >> 12; - /* 22: convlw */ - var59.i = var58.i; - /* 23: convsuswb */ - var45 = ORC_CLAMP_UB (var59.i); - /* 24: storeb */ - ptr0[i] = var45; - } - -} - -#else -static void -_backup_video_orc_resample_h_4tap_8 (OrcExecutor * ORC_RESTRICT ex) -{ - int i; - int n = ex->n; - orc_int8 *ORC_RESTRICT ptr0; - const orc_int8 *ORC_RESTRICT ptr4; - const orc_int8 *ORC_RESTRICT ptr5; - const orc_int8 *ORC_RESTRICT ptr6; - const orc_int8 *ORC_RESTRICT ptr7; - const orc_union16 *ORC_RESTRICT ptr8; - const orc_union16 *ORC_RESTRICT ptr9; - const orc_union16 *ORC_RESTRICT ptr10; - const orc_union16 *ORC_RESTRICT ptr11; - orc_int8 var36; - orc_union16 var37; - orc_int8 var38; - orc_union16 var39; - orc_int8 var40; - orc_union16 var41; - orc_int8 var42; - orc_union16 var43; -#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) - volatile orc_union32 var44; -#else - orc_union32 var44; -#endif - orc_int8 var45; - orc_union16 var46; - orc_union32 var47; - orc_union16 var48; - orc_union32 var49; - orc_union32 var50; - orc_union16 var51; - orc_union32 var52; - orc_union32 var53; - orc_union16 var54; - orc_union32 var55; - orc_union32 var56; - orc_union32 var57; - orc_union32 var58; - orc_union16 var59; - - ptr0 = (orc_int8 *) ex->arrays[0]; - ptr4 = (orc_int8 *) ex->arrays[4]; - ptr5 = (orc_int8 *) ex->arrays[5]; - ptr6 = (orc_int8 *) ex->arrays[6]; - ptr7 = (orc_int8 *) ex->arrays[7]; - ptr8 = (orc_union16 *) ex->arrays[8]; - ptr9 = (orc_union16 *) ex->arrays[9]; - ptr10 = (orc_union16 *) ex->arrays[10]; - ptr11 = (orc_union16 *) ex->arrays[11]; - - /* 19: loadpl */ - var44.i = (int) 0x00000fff; /* 4095 or 2.0232e-320f */ - - for (i = 0; i < n; i++) { - /* 0: loadb */ - var36 = ptr4[i]; - /* 1: convubw */ - var46.i = (orc_uint8) var36; - /* 2: loadw */ - var37 = ptr8[i]; - /* 3: mulswl */ - var47.i = var46.i * var37.i; - /* 4: loadb */ - var38 = ptr5[i]; - /* 5: convubw */ - var48.i = (orc_uint8) var38; - /* 6: loadw */ - var39 = ptr9[i]; - /* 7: mulswl */ - var49.i = var48.i * var39.i; - /* 8: addl */ - var50.i = var47.i + var49.i; - /* 9: loadb */ - var40 = ptr6[i]; - /* 10: convubw */ - var51.i = (orc_uint8) var40; - /* 11: loadw */ - var41 = ptr10[i]; - /* 12: mulswl */ - var52.i = var51.i * var41.i; - /* 13: addl */ - var53.i = var50.i + var52.i; - /* 14: loadb */ - var42 = ptr7[i]; - /* 15: convubw */ - var54.i = (orc_uint8) var42; - /* 16: loadw */ - var43 = ptr11[i]; - /* 17: mulswl */ - var55.i = var54.i * var43.i; - /* 18: addl */ - var56.i = var53.i + var55.i; - /* 20: addl */ - var57.i = var56.i + var44.i; - /* 21: shrsl */ - var58.i = var57.i >> 12; - /* 22: convlw */ - var59.i = var58.i; - /* 23: convsuswb */ - var45 = ORC_CLAMP_UB (var59.i); - /* 24: storeb */ - ptr0[i] = var45; - } - -} - -void -video_orc_resample_h_4tap_8 (guint8 * ORC_RESTRICT d1, - const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, - const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, - const gint16 * ORC_RESTRICT s5, const gint16 * ORC_RESTRICT s6, - const gint16 * ORC_RESTRICT s7, const gint16 * ORC_RESTRICT s8, int n) -{ - OrcExecutor _ex, *ex = &_ex; - static volatile int p_inited = 0; - static OrcCode *c = 0; - void (*func) (OrcExecutor *); - - if (!p_inited) { - orc_once_mutex_lock (); - if (!p_inited) { - OrcProgram *p; - -#if 1 - static const orc_uint8 bc[] = { - 1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, - 97, 109, 112, 108, 101, 95, 104, 95, 52, 116, 97, 112, 95, 56, 11, 1, - 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 2, 2, - 12, 2, 2, 12, 2, 2, 12, 2, 2, 14, 4, 255, 15, 0, 0, 14, - 4, 12, 0, 0, 0, 20, 2, 20, 2, 20, 4, 20, 4, 150, 32, 4, - 176, 34, 32, 8, 150, 33, 5, 176, 35, 33, 9, 103, 34, 34, 35, 150, - 33, 6, 176, 35, 33, 10, 103, 34, 34, 35, 150, 33, 7, 176, 35, 33, - 11, 103, 34, 34, 35, 103, 34, 34, 16, 125, 34, 34, 17, 163, 32, 34, - 160, 0, 32, 2, 0, - }; - p = orc_program_new_from_static_bytecode (bc); - orc_program_set_backup_function (p, _backup_video_orc_resample_h_4tap_8); -#else - p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_h_4tap_8"); - orc_program_set_backup_function (p, _backup_video_orc_resample_h_4tap_8); - orc_program_add_destination (p, 1, "d1"); - orc_program_add_source (p, 1, "s1"); - orc_program_add_source (p, 1, "s2"); - orc_program_add_source (p, 1, "s3"); - orc_program_add_source (p, 1, "s4"); - orc_program_add_source (p, 2, "s5"); - orc_program_add_source (p, 2, "s6"); - orc_program_add_source (p, 2, "s7"); - orc_program_add_source (p, 2, "s8"); - orc_program_add_constant (p, 4, 0x00000fff, "c1"); - orc_program_add_constant (p, 4, 0x0000000c, "c2"); - orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); - orc_program_add_temporary (p, 4, "t3"); - orc_program_add_temporary (p, 4, "t4"); - - orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S5, - ORC_VAR_D1); - orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_S6, - ORC_VAR_D1); - orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_S7, - ORC_VAR_D1); - orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S4, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_S8, - ORC_VAR_D1); - orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, - ORC_VAR_D1); - orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C1, - ORC_VAR_D1); - orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C2, - ORC_VAR_D1); - orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, - ORC_VAR_D1); - orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, - ORC_VAR_D1, ORC_VAR_D1); -#endif - - orc_program_compile (p); - c = orc_program_take_code (p); - orc_program_free (p); - } - p_inited = TRUE; - orc_once_mutex_unlock (); - } - ex->arrays[ORC_VAR_A2] = c; - ex->program = 0; - - ex->n = n; - ex->arrays[ORC_VAR_D1] = d1; - ex->arrays[ORC_VAR_S1] = (void *) s1; - ex->arrays[ORC_VAR_S2] = (void *) s2; - ex->arrays[ORC_VAR_S3] = (void *) s3; - ex->arrays[ORC_VAR_S4] = (void *) s4; - ex->arrays[ORC_VAR_S5] = (void *) s5; - ex->arrays[ORC_VAR_S6] = (void *) s6; - ex->arrays[ORC_VAR_S7] = (void *) s7; - ex->arrays[ORC_VAR_S8] = (void *) s8; - - func = c->exec; - func (ex); -} -#endif - - -/* video_orc_resample_h_multaps_8 */ -#ifdef DISABLE_ORC -void -video_orc_resample_h_multaps_8 (gint32 * ORC_RESTRICT d1, +video_orc_resample_h_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n) { int i; @@ -18068,7 +18133,7 @@ video_orc_resample_h_multaps_8 (gint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_h_multaps_8 (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_h_multaps_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -18101,7 +18166,7 @@ _backup_video_orc_resample_h_multaps_8 (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_h_multaps_8 (gint32 * ORC_RESTRICT d1, +video_orc_resample_h_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n) { OrcExecutor _ex, *ex = &_ex; @@ -18116,20 +18181,20 @@ video_orc_resample_h_multaps_8 (gint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 30, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 116, 97, 112, 115, 95, - 56, 11, 4, 4, 12, 1, 1, 12, 2, 2, 20, 2, 150, 32, 4, 176, - 0, 32, 5, 2, 0, + 117, 56, 11, 4, 4, 12, 1, 1, 12, 2, 2, 20, 2, 150, 32, 4, + 176, 0, 32, 5, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_multaps_8); + _backup_video_orc_resample_h_multaps_u8); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_h_multaps_8"); + orc_program_set_name (p, "video_orc_resample_h_multaps_u8"); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_multaps_8); + _backup_video_orc_resample_h_multaps_u8); orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 2, "s2"); @@ -18162,10 +18227,10 @@ video_orc_resample_h_multaps_8 (gint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_h_muladdtaps_8 */ +/* video_orc_resample_h_muladdtaps_u8 */ #ifdef DISABLE_ORC void -video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, +video_orc_resample_h_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m) { @@ -18199,7 +18264,7 @@ video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, /* 4: loadl */ var36 = ptr0[i]; /* 5: addl */ - var37.i = var36.i + var39.i; + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var39.i); /* 6: storel */ ptr0[i] = var37; } @@ -18209,7 +18274,7 @@ video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, #else static void -_backup_video_orc_resample_h_muladdtaps_8 (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_h_muladdtaps_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int j; @@ -18243,7 +18308,7 @@ _backup_video_orc_resample_h_muladdtaps_8 (OrcExecutor * ORC_RESTRICT ex) /* 4: loadl */ var36 = ptr0[i]; /* 5: addl */ - var37.i = var36.i + var39.i; + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var39.i); /* 6: storel */ ptr0[i] = var37; } @@ -18252,7 +18317,7 @@ _backup_video_orc_resample_h_muladdtaps_8 (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, +video_orc_resample_h_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m) { @@ -18268,21 +18333,22 @@ video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, #if 1 static const orc_uint8 bc[] = { - 1, 7, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, + 1, 7, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100, 116, - 97, 112, 115, 95, 56, 11, 4, 4, 12, 1, 1, 12, 2, 2, 20, 2, - 20, 4, 150, 32, 4, 176, 33, 32, 5, 103, 0, 0, 33, 2, 0, + 97, 112, 115, 95, 117, 56, 11, 4, 4, 12, 1, 1, 12, 2, 2, 20, + 2, 20, 4, 150, 32, 4, 176, 33, 32, 5, 103, 0, 0, 33, 2, 0, + }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_muladdtaps_8); + _backup_video_orc_resample_h_muladdtaps_u8); #else p = orc_program_new (); orc_program_set_2d (p); - orc_program_set_name (p, "video_orc_resample_h_muladdtaps_8"); + orc_program_set_name (p, "video_orc_resample_h_muladdtaps_u8"); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_muladdtaps_8); + _backup_video_orc_resample_h_muladdtaps_u8); orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 2, "s2"); @@ -18322,10 +18388,10 @@ video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, #endif -/* video_orc_resample_scaletaps_8 */ +/* video_orc_resample_scaletaps_u8 */ #ifdef DISABLE_ORC void -video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, +video_orc_resample_scaletaps_u8 (guint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n) { int i; @@ -18352,7 +18418,7 @@ video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, /* 0: loadl */ var34 = ptr4[i]; /* 2: addl */ - var37.i = var34.i + var35.i; + var37.i = ((orc_uint32) var34.i) + ((orc_uint32) var35.i); /* 3: shrsl */ var38.i = var37.i >> 12; /* 4: convlw */ @@ -18367,7 +18433,7 @@ video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_scaletaps_8 (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_scaletaps_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -18394,7 +18460,7 @@ _backup_video_orc_resample_scaletaps_8 (OrcExecutor * ORC_RESTRICT ex) /* 0: loadl */ var34 = ptr4[i]; /* 2: addl */ - var37.i = var34.i + var35.i; + var37.i = ((orc_uint32) var34.i) + ((orc_uint32) var35.i); /* 3: shrsl */ var38.i = var37.i >> 12; /* 4: convlw */ @@ -18408,7 +18474,7 @@ _backup_video_orc_resample_scaletaps_8 (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, +video_orc_resample_scaletaps_u8 (guint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n) { OrcExecutor _ex, *ex = &_ex; @@ -18423,21 +18489,21 @@ video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 30, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 115, 99, 97, 108, 101, 116, 97, 112, 115, 95, - 56, 11, 1, 1, 12, 4, 4, 14, 4, 255, 15, 0, 0, 14, 4, 12, - 0, 0, 0, 20, 2, 20, 4, 103, 33, 4, 16, 125, 33, 33, 17, 163, - 32, 33, 160, 0, 32, 2, 0, + 117, 56, 11, 1, 1, 12, 4, 4, 14, 4, 255, 15, 0, 0, 14, 4, + 12, 0, 0, 0, 20, 2, 20, 4, 103, 33, 4, 16, 125, 33, 33, 17, + 163, 32, 33, 160, 0, 32, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_scaletaps_8); + _backup_video_orc_resample_scaletaps_u8); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_scaletaps_8"); + orc_program_set_name (p, "video_orc_resample_scaletaps_u8"); orc_program_set_backup_function (p, - _backup_video_orc_resample_scaletaps_8); + _backup_video_orc_resample_scaletaps_u8); orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 4, "s1"); orc_program_add_constant (p, 4, 0x00000fff, "c1"); @@ -18475,10 +18541,10 @@ video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, #endif -/* video_orc_resample_h_multaps_8_lq */ +/* video_orc_resample_h_multaps_u8_lq */ #ifdef DISABLE_ORC void -video_orc_resample_h_multaps_8_lq (gint32 * ORC_RESTRICT d1, +video_orc_resample_h_multaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n) { int i; @@ -18512,7 +18578,7 @@ video_orc_resample_h_multaps_8_lq (gint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_h_multaps_8_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_h_multaps_u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -18545,7 +18611,7 @@ _backup_video_orc_resample_h_multaps_8_lq (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_h_multaps_8_lq (gint32 * ORC_RESTRICT d1, +video_orc_resample_h_multaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n) { OrcExecutor _ex, *ex = &_ex; @@ -18560,20 +18626,20 @@ video_orc_resample_h_multaps_8_lq (gint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 116, 97, 112, 115, 95, - 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12, 2, 2, 20, 2, 150, - 32, 4, 89, 0, 32, 5, 2, 0, + 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12, 2, 2, 20, 2, + 150, 32, 4, 89, 0, 32, 5, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_multaps_8_lq); + _backup_video_orc_resample_h_multaps_u8_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_h_multaps_8_lq"); + orc_program_set_name (p, "video_orc_resample_h_multaps_u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_multaps_8_lq); + _backup_video_orc_resample_h_multaps_u8_lq); orc_program_add_destination (p, 2, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 2, "s2"); @@ -18606,10 +18672,10 @@ video_orc_resample_h_multaps_8_lq (gint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_h_muladdtaps_8_lq */ +/* video_orc_resample_h_muladdtaps_u8_lq */ #ifdef DISABLE_ORC void -video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, +video_orc_resample_h_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m) { @@ -18618,12 +18684,12 @@ video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, orc_union16 *ORC_RESTRICT ptr0; const orc_int8 *ORC_RESTRICT ptr4; const orc_union16 *ORC_RESTRICT ptr5; - orc_int8 var34; + orc_int8 var33; + orc_union16 var34; orc_union16 var35; orc_union16 var36; orc_union16 var37; orc_union16 var38; - orc_union16 var39; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); @@ -18633,19 +18699,19 @@ video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, for (i = 0; i < n; i++) { /* 0: loadb */ - var34 = ptr4[i]; + var33 = ptr4[i]; /* 1: convubw */ - var38.i = (orc_uint8) var34; + var37.i = (orc_uint8) var33; /* 2: loadw */ - var35 = ptr5[i]; + var34 = ptr5[i]; /* 3: mullw */ - var39.i = (var38.i * var35.i) & 0xffff; + var38.i = (var37.i * var34.i) & 0xffff; /* 4: loadw */ - var36 = ptr0[i]; + var35 = ptr0[i]; /* 5: addw */ - var37.i = var36.i + var39.i; + var36.i = var35.i + var38.i; /* 6: storew */ - ptr0[i] = var37; + ptr0[i] = var36; } } @@ -18653,7 +18719,7 @@ video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, #else static void -_backup_video_orc_resample_h_muladdtaps_8_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_h_muladdtaps_u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int j; @@ -18662,12 +18728,12 @@ _backup_video_orc_resample_h_muladdtaps_8_lq (OrcExecutor * ORC_RESTRICT ex) orc_union16 *ORC_RESTRICT ptr0; const orc_int8 *ORC_RESTRICT ptr4; const orc_union16 *ORC_RESTRICT ptr5; - orc_int8 var34; + orc_int8 var33; + orc_union16 var34; orc_union16 var35; orc_union16 var36; orc_union16 var37; orc_union16 var38; - orc_union16 var39; for (j = 0; j < m; j++) { ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); @@ -18677,26 +18743,26 @@ _backup_video_orc_resample_h_muladdtaps_8_lq (OrcExecutor * ORC_RESTRICT ex) for (i = 0; i < n; i++) { /* 0: loadb */ - var34 = ptr4[i]; + var33 = ptr4[i]; /* 1: convubw */ - var38.i = (orc_uint8) var34; + var37.i = (orc_uint8) var33; /* 2: loadw */ - var35 = ptr5[i]; + var34 = ptr5[i]; /* 3: mullw */ - var39.i = (var38.i * var35.i) & 0xffff; + var38.i = (var37.i * var34.i) & 0xffff; /* 4: loadw */ - var36 = ptr0[i]; + var35 = ptr0[i]; /* 5: addw */ - var37.i = var36.i + var39.i; + var36.i = var35.i + var38.i; /* 6: storew */ - ptr0[i] = var37; + ptr0[i] = var36; } } } void -video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, +video_orc_resample_h_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m) { @@ -18712,33 +18778,32 @@ video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, #if 1 static const orc_uint8 bc[] = { - 1, 7, 9, 36, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, + 1, 7, 9, 37, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100, 116, - 97, 112, 115, 95, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12, 2, - 2, 20, 2, 20, 2, 150, 32, 4, 89, 33, 32, 5, 70, 0, 0, 33, - 2, 0, + 97, 112, 115, 95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12, + 2, 2, 20, 2, 150, 32, 4, 89, 32, 32, 5, 70, 0, 0, 32, 2, + 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_muladdtaps_8_lq); + _backup_video_orc_resample_h_muladdtaps_u8_lq); #else p = orc_program_new (); orc_program_set_2d (p); - orc_program_set_name (p, "video_orc_resample_h_muladdtaps_8_lq"); + orc_program_set_name (p, "video_orc_resample_h_muladdtaps_u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_h_muladdtaps_8_lq); + _backup_video_orc_resample_h_muladdtaps_u8_lq); orc_program_add_destination (p, 2, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 2, "s2"); orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S2, + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1); - orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); #endif @@ -18767,10 +18832,10 @@ video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, #endif -/* video_orc_resample_scaletaps_8_lq */ +/* video_orc_resample_scaletaps_u8_lq */ #ifdef DISABLE_ORC void -video_orc_resample_scaletaps_8_lq (guint8 * ORC_RESTRICT d1, +video_orc_resample_scaletaps_u8_lq (guint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n) { int i; @@ -18809,7 +18874,7 @@ video_orc_resample_scaletaps_8_lq (guint8 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_scaletaps_8_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_scaletaps_u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -18847,7 +18912,7 @@ _backup_video_orc_resample_scaletaps_8_lq (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_scaletaps_8_lq (guint8 * ORC_RESTRICT d1, +video_orc_resample_scaletaps_u8_lq (guint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n) { OrcExecutor _ex, *ex = &_ex; @@ -18862,25 +18927,25 @@ video_orc_resample_scaletaps_8_lq (guint8 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 115, 99, 97, 108, 101, 116, 97, 112, 115, 95, - 56, 95, 108, 113, 11, 1, 1, 12, 2, 2, 14, 4, 32, 0, 0, 0, - 14, 4, 6, 0, 0, 0, 20, 2, 70, 32, 4, 16, 94, 32, 32, 17, - 160, 0, 32, 2, 0, + 117, 56, 95, 108, 113, 11, 1, 1, 12, 2, 2, 14, 2, 32, 0, 0, + 0, 14, 2, 6, 0, 0, 0, 20, 2, 70, 32, 4, 16, 94, 32, 32, + 17, 160, 0, 32, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_scaletaps_8_lq); + _backup_video_orc_resample_scaletaps_u8_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_scaletaps_8_lq"); + orc_program_set_name (p, "video_orc_resample_scaletaps_u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_scaletaps_8_lq); + _backup_video_orc_resample_scaletaps_u8_lq); orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 2, "s1"); - orc_program_add_constant (p, 4, 0x00000020, "c1"); - orc_program_add_constant (p, 4, 0x00000006, "c2"); + orc_program_add_constant (p, 2, 0x00000020, "c1"); + orc_program_add_constant (p, 2, 0x00000006, "c2"); orc_program_add_temporary (p, 2, "t1"); orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, @@ -18911,10 +18976,463 @@ video_orc_resample_scaletaps_8_lq (guint8 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_multaps_8 */ +/* video_orc_resample_h_multaps_u16 */ #ifdef DISABLE_ORC void -video_orc_resample_v_multaps_8 (gint32 * ORC_RESTRICT d1, +video_orc_resample_h_multaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n) +{ + int i; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + const orc_union16 *ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + + ptr0 = (orc_union32 *) d1; + ptr4 = (orc_union16 *) s1; + ptr5 = (orc_union16 *) s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: convuwl */ + var37.i = (orc_uint16) var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: convswl */ + var38.i = var35.i; + /* 4: mulll */ + var36.i = (((orc_uint32) var37.i) * ((orc_uint32) var38.i)) & 0xffffffff; + /* 5: storel */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_video_orc_resample_h_multaps_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + const orc_union16 *ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + + ptr0 = (orc_union32 *) ex->arrays[0]; + ptr4 = (orc_union16 *) ex->arrays[4]; + ptr5 = (orc_union16 *) ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: convuwl */ + var37.i = (orc_uint16) var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: convswl */ + var38.i = var35.i; + /* 4: mulll */ + var36.i = (((orc_uint32) var37.i) * ((orc_uint32) var38.i)) & 0xffffffff; + /* 5: storel */ + ptr0[i] = var36; + } + +} + +void +video_orc_resample_h_multaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 116, 97, 112, 115, + 95, + 117, 49, 54, 11, 4, 4, 12, 2, 2, 12, 2, 2, 20, 4, 20, 4, + 154, 32, 4, 153, 33, 5, 120, 0, 32, 33, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, + _backup_video_orc_resample_h_multaps_u16); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_resample_h_multaps_u16"); + orc_program_set_backup_function (p, + _backup_video_orc_resample_h_multaps_u16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->arrays[ORC_VAR_S2] = (void *) s2; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_resample_h_muladdtaps_u16 */ +#ifdef DISABLE_ORC +void +video_orc_resample_h_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, int d1_stride, + const guint64 * ORC_RESTRICT s1, int s1_stride, + const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m) +{ + int i; + int j; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + const orc_union16 *ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: convuwl */ + var38.i = (orc_uint16) var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: convswl */ + var39.i = var35.i; + /* 4: mulll */ + var40.i = (((orc_uint32) var38.i) * ((orc_uint32) var39.i)) & 0xffffffff; + /* 5: loadl */ + var36 = ptr0[i]; + /* 6: addl */ + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var40.i); + /* 7: storel */ + ptr0[i] = var37; + } + } + +} + +#else +static void +_backup_video_orc_resample_h_muladdtaps_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + const orc_union16 *ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: convuwl */ + var38.i = (orc_uint16) var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: convswl */ + var39.i = var35.i; + /* 4: mulll */ + var40.i = (((orc_uint32) var38.i) * ((orc_uint32) var39.i)) & 0xffffffff; + /* 5: loadl */ + var36 = ptr0[i]; + /* 6: addl */ + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var40.i); + /* 7: storel */ + ptr0[i] = var37; + } + } + +} + +void +video_orc_resample_h_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, int d1_stride, + const guint64 * ORC_RESTRICT s1, int s1_stride, + const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, + 115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100, + 116, + 97, 112, 115, 95, 117, 49, 54, 11, 4, 4, 12, 2, 2, 12, 2, 2, + 20, 4, 20, 4, 154, 32, 4, 153, 33, 5, 120, 32, 32, 33, 103, 0, + 0, 32, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, + _backup_video_orc_resample_h_muladdtaps_u16); +#else + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "video_orc_resample_h_muladdtaps_u16"); + orc_program_set_backup_function (p, + _backup_video_orc_resample_h_muladdtaps_u16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ORC_EXECUTOR_M (ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *) s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_resample_scaletaps_u16 */ +#ifdef DISABLE_ORC +void +video_orc_resample_scaletaps_u16 (guint64 * ORC_RESTRICT d1, + const gint32 * ORC_RESTRICT s1, int n) +{ + int i; + orc_union16 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + orc_union32 var33; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union32 var34; +#else + orc_union32 var34; +#endif + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + + ptr0 = (orc_union16 *) d1; + ptr4 = (orc_union32 *) s1; + + /* 1: loadpl */ + var34.i = (int) 0x00000fff; /* 4095 or 2.0232e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 2: addl */ + var36.i = ((orc_uint32) var33.i) + ((orc_uint32) var34.i); + /* 3: shrsl */ + var37.i = var36.i >> 12; + /* 4: convsuslw */ + var35.i = ORC_CLAMP_UW (var37.i); + /* 5: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_video_orc_resample_scaletaps_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + orc_union32 var33; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union32 var34; +#else + orc_union32 var34; +#endif + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + + ptr0 = (orc_union16 *) ex->arrays[0]; + ptr4 = (orc_union32 *) ex->arrays[4]; + + /* 1: loadpl */ + var34.i = (int) 0x00000fff; /* 4095 or 2.0232e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 2: addl */ + var36.i = ((orc_uint32) var33.i) + ((orc_uint32) var34.i); + /* 3: shrsl */ + var37.i = var36.i >> 12; + /* 4: convsuslw */ + var35.i = ORC_CLAMP_UW (var37.i); + /* 5: storew */ + ptr0[i] = var35; + } + +} + +void +video_orc_resample_scaletaps_u16 (guint64 * ORC_RESTRICT d1, + const gint32 * ORC_RESTRICT s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 115, 99, 97, 108, 101, 116, 97, 112, 115, + 95, + 117, 49, 54, 11, 2, 2, 12, 4, 4, 14, 4, 255, 15, 0, 0, 14, + 4, 12, 0, 0, 0, 20, 4, 103, 32, 4, 16, 125, 32, 32, 17, 166, + 0, 32, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, + _backup_video_orc_resample_scaletaps_u16); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_resample_scaletaps_u16"); + orc_program_set_backup_function (p, + _backup_video_orc_resample_scaletaps_u16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x00000fff, "c1"); + orc_program_add_constant (p, 4, 0x0000000c, "c2"); + orc_program_add_temporary (p, 4, "t1"); + + orc_program_append_2 (p, "addl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, + ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, + ORC_VAR_D1); + orc_program_append_2 (p, "convsuslw", 0, ORC_VAR_D1, ORC_VAR_T1, + ORC_VAR_D1, ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_resample_v_multaps_u8 */ +#ifdef DISABLE_ORC +void +video_orc_resample_v_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { int i; @@ -18946,7 +19464,7 @@ video_orc_resample_v_multaps_8 (gint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_v_multaps_8 (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_multaps_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -18977,7 +19495,7 @@ _backup_video_orc_resample_v_multaps_8 (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_v_multaps_8 (gint32 * ORC_RESTRICT d1, +video_orc_resample_v_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { OrcExecutor _ex, *ex = &_ex; @@ -18992,20 +19510,20 @@ video_orc_resample_v_multaps_8 (gint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 30, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 116, 97, 112, 115, 95, - 56, 11, 4, 4, 12, 1, 1, 16, 2, 20, 2, 150, 32, 4, 176, 0, - 32, 24, 2, 0, + 117, 56, 11, 4, 4, 12, 1, 1, 16, 2, 20, 2, 150, 32, 4, 176, + 0, 32, 24, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_multaps_8); + _backup_video_orc_resample_v_multaps_u8); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_multaps_8"); + orc_program_set_name (p, "video_orc_resample_v_multaps_u8"); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_multaps_8); + _backup_video_orc_resample_v_multaps_u8); orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_parameter (p, 2, "p1"); @@ -19038,10 +19556,10 @@ video_orc_resample_v_multaps_8 (gint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_muladdtaps_8 */ +/* video_orc_resample_v_muladdtaps_u8 */ #ifdef DISABLE_ORC void -video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, +video_orc_resample_v_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { int i; @@ -19070,7 +19588,7 @@ video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, /* 4: loadl */ var36 = ptr0[i]; /* 5: addl */ - var37.i = var36.i + var39.i; + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var39.i); /* 6: storel */ ptr0[i] = var37; } @@ -19079,7 +19597,7 @@ video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_v_muladdtaps_8 (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_muladdtaps_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -19108,7 +19626,7 @@ _backup_video_orc_resample_v_muladdtaps_8 (OrcExecutor * ORC_RESTRICT ex) /* 4: loadl */ var36 = ptr0[i]; /* 5: addl */ - var37.i = var36.i + var39.i; + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var39.i); /* 6: storel */ ptr0[i] = var37; } @@ -19116,7 +19634,7 @@ _backup_video_orc_resample_v_muladdtaps_8 (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, +video_orc_resample_v_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { OrcExecutor _ex, *ex = &_ex; @@ -19131,20 +19649,20 @@ video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 116, 97, - 112, 115, 95, 56, 11, 4, 4, 12, 1, 1, 16, 2, 20, 2, 20, 4, - 150, 32, 4, 176, 33, 32, 24, 103, 0, 0, 33, 2, 0, + 112, 115, 95, 117, 56, 11, 4, 4, 12, 1, 1, 16, 2, 20, 2, 20, + 4, 150, 32, 4, 176, 33, 32, 24, 103, 0, 0, 33, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_muladdtaps_8); + _backup_video_orc_resample_v_muladdtaps_u8); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_muladdtaps_8"); + orc_program_set_name (p, "video_orc_resample_v_muladdtaps_u8"); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_muladdtaps_8); + _backup_video_orc_resample_v_muladdtaps_u8); orc_program_add_destination (p, 4, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_parameter (p, 2, "p1"); @@ -19180,10 +19698,288 @@ video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_multaps_8_lq */ +/* video_orc_resample_v_multaps_u16 */ #ifdef DISABLE_ORC void -video_orc_resample_v_multaps_8_lq (gint32 * ORC_RESTRICT d1, +video_orc_resample_v_multaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, int p1, int n) +{ + int i; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union32 var34; + orc_union32 var35; + orc_union32 var36; + + ptr0 = (orc_union32 *) d1; + ptr4 = (orc_union16 *) s1; + + /* 2: loadpl */ + var34.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: convuwl */ + var36.i = (orc_uint16) var33.i; + /* 3: mulll */ + var35.i = (((orc_uint32) var36.i) * ((orc_uint32) var34.i)) & 0xffffffff; + /* 4: storel */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_video_orc_resample_v_multaps_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union32 var34; + orc_union32 var35; + orc_union32 var36; + + ptr0 = (orc_union32 *) ex->arrays[0]; + ptr4 = (orc_union16 *) ex->arrays[4]; + + /* 2: loadpl */ + var34.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: convuwl */ + var36.i = (orc_uint16) var33.i; + /* 3: mulll */ + var35.i = (((orc_uint32) var36.i) * ((orc_uint32) var34.i)) & 0xffffffff; + /* 4: storel */ + ptr0[i] = var35; + } + +} + +void +video_orc_resample_v_multaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 116, 97, 112, 115, + 95, + 117, 49, 54, 11, 4, 4, 12, 2, 2, 16, 2, 20, 4, 154, 32, 4, + 120, 0, 32, 24, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, + _backup_video_orc_resample_v_multaps_u16); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_resample_v_multaps_u16"); + orc_program_set_backup_function (p, + _backup_video_orc_resample_v_multaps_u16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_temporary (p, 4, "t1"); + + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_P1, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->params[ORC_VAR_P1] = p1; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_resample_v_muladdtaps_u16 */ +#ifdef DISABLE_ORC +void +video_orc_resample_v_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, int p1, int n) +{ + int i; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + + ptr0 = (orc_union32 *) d1; + ptr4 = (orc_union16 *) s1; + + /* 2: loadpw */ + var35.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: convuwl */ + var38.i = (orc_uint16) var34.i; + /* 3: convswl */ + var39.i = var35.i; + /* 4: mulll */ + var40.i = (((orc_uint32) var38.i) * ((orc_uint32) var39.i)) & 0xffffffff; + /* 5: loadl */ + var36 = ptr0[i]; + /* 6: addl */ + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var40.i); + /* 7: storel */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_video_orc_resample_v_muladdtaps_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union16 *ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + + ptr0 = (orc_union32 *) ex->arrays[0]; + ptr4 = (orc_union16 *) ex->arrays[4]; + + /* 2: loadpw */ + var35.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: convuwl */ + var38.i = (orc_uint16) var34.i; + /* 3: convswl */ + var39.i = var35.i; + /* 4: mulll */ + var40.i = (((orc_uint32) var38.i) * ((orc_uint32) var39.i)) & 0xffffffff; + /* 5: loadl */ + var36 = ptr0[i]; + /* 6: addl */ + var37.i = ((orc_uint32) var36.i) + ((orc_uint32) var40.i); + /* 7: storel */ + ptr0[i] = var37; + } + +} + +void +video_orc_resample_v_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, + const guint64 * ORC_RESTRICT s1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 35, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 116, + 97, + 112, 115, 95, 117, 49, 54, 11, 4, 4, 12, 2, 2, 16, 2, 20, 4, + 20, 4, 154, 32, 4, 153, 33, 24, 120, 32, 32, 33, 103, 0, 0, 32, + 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, + _backup_video_orc_resample_v_muladdtaps_u16); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_resample_v_muladdtaps_u16"); + orc_program_set_backup_function (p, + _backup_video_orc_resample_v_muladdtaps_u16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T2, ORC_VAR_P1, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->params[ORC_VAR_P1] = p1; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_resample_v_multaps_u8_lq */ +#ifdef DISABLE_ORC +void +video_orc_resample_v_multaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { int i; @@ -19215,7 +20011,7 @@ video_orc_resample_v_multaps_8_lq (gint32 * ORC_RESTRICT d1, #else static void -_backup_video_orc_resample_v_multaps_8_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_multaps_u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; @@ -19246,7 +20042,7 @@ _backup_video_orc_resample_v_multaps_8_lq (OrcExecutor * ORC_RESTRICT ex) } void -video_orc_resample_v_multaps_8_lq (gint32 * ORC_RESTRICT d1, +video_orc_resample_v_multaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { OrcExecutor _ex, *ex = &_ex; @@ -19261,20 +20057,20 @@ video_orc_resample_v_multaps_8_lq (gint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 116, 97, 112, 115, 95, - 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 16, 2, 20, 2, 150, 32, - 4, 89, 0, 32, 24, 2, 0, + 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 16, 2, 20, 2, 150, + 32, 4, 89, 0, 32, 24, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_multaps_8_lq); + _backup_video_orc_resample_v_multaps_u8_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_multaps_8_lq"); + orc_program_set_name (p, "video_orc_resample_v_multaps_u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_multaps_8_lq); + _backup_video_orc_resample_v_multaps_u8_lq); orc_program_add_destination (p, 2, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_parameter (p, 2, "p1"); @@ -19307,85 +20103,85 @@ video_orc_resample_v_multaps_8_lq (gint32 * ORC_RESTRICT d1, #endif -/* video_orc_resample_v_muladdtaps_8_lq */ +/* video_orc_resample_v_muladdtaps_u8_lq */ #ifdef DISABLE_ORC void -video_orc_resample_v_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, +video_orc_resample_v_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { int i; orc_union16 *ORC_RESTRICT ptr0; const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var34; + orc_int8 var33; + orc_union16 var34; orc_union16 var35; orc_union16 var36; orc_union16 var37; orc_union16 var38; - orc_union16 var39; ptr0 = (orc_union16 *) d1; ptr4 = (orc_int8 *) s1; /* 2: loadpw */ - var35.i = p1; + var34.i = p1; for (i = 0; i < n; i++) { /* 0: loadb */ - var34 = ptr4[i]; + var33 = ptr4[i]; /* 1: convubw */ - var38.i = (orc_uint8) var34; + var37.i = (orc_uint8) var33; /* 3: mullw */ - var39.i = (var38.i * var35.i) & 0xffff; + var38.i = (var37.i * var34.i) & 0xffff; /* 4: loadw */ - var36 = ptr0[i]; + var35 = ptr0[i]; /* 5: addw */ - var37.i = var36.i + var39.i; + var36.i = var35.i + var38.i; /* 6: storew */ - ptr0[i] = var37; + ptr0[i] = var36; } } #else static void -_backup_video_orc_resample_v_muladdtaps_8_lq (OrcExecutor * ORC_RESTRICT ex) +_backup_video_orc_resample_v_muladdtaps_u8_lq (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; orc_union16 *ORC_RESTRICT ptr0; const orc_int8 *ORC_RESTRICT ptr4; - orc_int8 var34; + orc_int8 var33; + orc_union16 var34; orc_union16 var35; orc_union16 var36; orc_union16 var37; orc_union16 var38; - orc_union16 var39; ptr0 = (orc_union16 *) ex->arrays[0]; ptr4 = (orc_int8 *) ex->arrays[4]; /* 2: loadpw */ - var35.i = ex->params[24]; + var34.i = ex->params[24]; for (i = 0; i < n; i++) { /* 0: loadb */ - var34 = ptr4[i]; + var33 = ptr4[i]; /* 1: convubw */ - var38.i = (orc_uint8) var34; + var37.i = (orc_uint8) var33; /* 3: mullw */ - var39.i = (var38.i * var35.i) & 0xffff; + var38.i = (var37.i * var34.i) & 0xffff; /* 4: loadw */ - var36 = ptr0[i]; + var35 = ptr0[i]; /* 5: addw */ - var37.i = var36.i + var39.i; + var36.i = var35.i + var38.i; /* 6: storew */ - ptr0[i] = var37; + ptr0[i] = var36; } } void -video_orc_resample_v_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, +video_orc_resample_v_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n) { OrcExecutor _ex, *ex = &_ex; @@ -19400,32 +20196,30 @@ video_orc_resample_v_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, #if 1 static const orc_uint8 bc[] = { - 1, 9, 36, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, + 1, 9, 37, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115, 97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 116, 97, - 112, 115, 95, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 16, 2, 20, - 2, 20, 2, 150, 32, 4, 89, 33, 32, 24, 70, 0, 0, 33, 2, 0, - + 112, 115, 95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 16, 2, + 20, 2, 150, 32, 4, 89, 32, 32, 24, 70, 0, 0, 32, 2, 0, }; p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_muladdtaps_8_lq); + _backup_video_orc_resample_v_muladdtaps_u8_lq); #else p = orc_program_new (); - orc_program_set_name (p, "video_orc_resample_v_muladdtaps_8_lq"); + orc_program_set_name (p, "video_orc_resample_v_muladdtaps_u8_lq"); orc_program_set_backup_function (p, - _backup_video_orc_resample_v_muladdtaps_8_lq); + _backup_video_orc_resample_v_muladdtaps_u8_lq); orc_program_add_destination (p, 2, "d1"); orc_program_add_source (p, 1, "s1"); orc_program_add_parameter (p, 2, "p1"); orc_program_add_temporary (p, 2, "t1"); - orc_program_add_temporary (p, 2, "t2"); orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); - orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); - orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); #endif @@ -19448,3 +20242,1319 @@ video_orc_resample_v_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, func (ex); } #endif + + +/* video_orc_chroma_down_h2_u8 */ +#ifdef DISABLE_ORC +void +video_orc_chroma_down_h2_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, int n) +{ + int i; + orc_union64 *ORC_RESTRICT ptr0; + const orc_union64 *ORC_RESTRICT ptr4; + orc_union64 var37; + orc_union64 var38; + orc_union32 var39; + orc_union32 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + + ptr0 = (orc_union64 *) d1; + ptr4 = (orc_union64 *) s1; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var37 = ptr4[i]; + /* 1: splitql */ + { + orc_union64 _src; + _src.i = var37.i; + var39.i = _src.x2[1]; + var40.i = _src.x2[0]; + } + /* 2: splitlw */ + { + orc_union32 _src; + _src.i = var40.i; + var41.i = _src.x2[1]; + var42.i = _src.x2[0]; + } + /* 3: select1lw */ + { + orc_union32 _src; + _src.i = var39.i; + var43.i = _src.x2[1]; + } + /* 4: avgub */ + var44.x2[0] = ((orc_uint8) var41.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1; + var44.x2[1] = ((orc_uint8) var41.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1; + /* 5: mergewl */ + { + orc_union32 _dest; + _dest.x2[0] = var42.i; + _dest.x2[1] = var44.i; + var45.i = _dest.i; + } + /* 6: mergelq */ + { + orc_union64 _dest; + _dest.x2[0] = var45.i; + _dest.x2[1] = var39.i; + var38.i = _dest.i; + } + /* 7: storeq */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_video_orc_chroma_down_h2_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 *ORC_RESTRICT ptr0; + const orc_union64 *ORC_RESTRICT ptr4; + orc_union64 var37; + orc_union64 var38; + orc_union32 var39; + orc_union32 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + + ptr0 = (orc_union64 *) ex->arrays[0]; + ptr4 = (orc_union64 *) ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var37 = ptr4[i]; + /* 1: splitql */ + { + orc_union64 _src; + _src.i = var37.i; + var39.i = _src.x2[1]; + var40.i = _src.x2[0]; + } + /* 2: splitlw */ + { + orc_union32 _src; + _src.i = var40.i; + var41.i = _src.x2[1]; + var42.i = _src.x2[0]; + } + /* 3: select1lw */ + { + orc_union32 _src; + _src.i = var39.i; + var43.i = _src.x2[1]; + } + /* 4: avgub */ + var44.x2[0] = ((orc_uint8) var41.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1; + var44.x2[1] = ((orc_uint8) var41.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1; + /* 5: mergewl */ + { + orc_union32 _dest; + _dest.x2[0] = var42.i; + _dest.x2[1] = var44.i; + var45.i = _dest.i; + } + /* 6: mergelq */ + { + orc_union64 _dest; + _dest.x2[0] = var45.i; + _dest.x2[1] = var39.i; + var38.i = _dest.i; + } + /* 7: storeq */ + ptr0[i] = var38; + } + +} + +void +video_orc_chroma_down_h2_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 99, 104, 114, + 111, 109, 97, 95, 100, 111, 119, 110, 95, 104, 50, 95, 117, 56, 11, 8, + 8, 12, 8, 8, 20, 4, 20, 4, 20, 2, 20, 2, 20, 2, 197, 33, + 32, 4, 198, 35, 34, 32, 191, 36, 33, 21, 1, 39, 35, 35, 36, 195, + 32, 34, 35, 194, 0, 32, 33, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_h2_u8); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_chroma_down_h2_u8"); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_h2_u8); + orc_program_add_destination (p, 8, "d1"); + orc_program_add_source (p, 8, "s1"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 4, "t2"); + orc_program_add_temporary (p, 2, "t3"); + orc_program_add_temporary (p, 2, "t4"); + orc_program_add_temporary (p, 2, "t5"); + + orc_program_append_2 (p, "splitql", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, + ORC_VAR_D1); + orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T1, + ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T5, ORC_VAR_T2, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgub", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, + ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4, + ORC_VAR_D1); + orc_program_append_2 (p, "mergelq", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_chroma_down_v2_u8 */ +#ifdef DISABLE_ORC +void +video_orc_chroma_down_v2_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n) +{ + int i; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + const orc_union32 *ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union32 *) d1; + ptr4 = (orc_union32 *) s1; + ptr5 = (orc_union32 *) s2; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: splitlw */ + { + orc_union32 _src; + _src.i = var35.i; + var38.i = _src.x2[1]; + var39.i = _src.x2[0]; + } + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: select1lw */ + { + orc_union32 _src; + _src.i = var36.i; + var40.i = _src.x2[1]; + } + /* 4: avgub */ + var41.x2[0] = ((orc_uint8) var38.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1; + var41.x2[1] = ((orc_uint8) var38.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1; + /* 5: mergewl */ + { + orc_union32 _dest; + _dest.x2[0] = var39.i; + _dest.x2[1] = var41.i; + var37.i = _dest.i; + } + /* 6: storel */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_video_orc_chroma_down_v2_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + const orc_union32 *ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union32 *) ex->arrays[0]; + ptr4 = (orc_union32 *) ex->arrays[4]; + ptr5 = (orc_union32 *) ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: splitlw */ + { + orc_union32 _src; + _src.i = var35.i; + var38.i = _src.x2[1]; + var39.i = _src.x2[0]; + } + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: select1lw */ + { + orc_union32 _src; + _src.i = var36.i; + var40.i = _src.x2[1]; + } + /* 4: avgub */ + var41.x2[0] = ((orc_uint8) var38.x2[0] + (orc_uint8) var40.x2[0] + 1) >> 1; + var41.x2[1] = ((orc_uint8) var38.x2[1] + (orc_uint8) var40.x2[1] + 1) >> 1; + /* 5: mergewl */ + { + orc_union32 _dest; + _dest.x2[0] = var39.i; + _dest.x2[1] = var41.i; + var37.i = _dest.i; + } + /* 6: storel */ + ptr0[i] = var37; + } + +} + +void +video_orc_chroma_down_v2_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 99, 104, 114, + 111, 109, 97, 95, 100, 111, 119, 110, 95, 118, 50, 95, 117, 56, 11, 4, + 4, 12, 4, 4, 12, 4, 4, 20, 2, 20, 2, 20, 2, 198, 33, 32, + 4, 191, 34, 5, 21, 1, 39, 33, 33, 34, 195, 0, 32, 33, 2, 0, + + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v2_u8); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_chroma_down_v2_u8"); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v2_u8); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 2, "t3"); + + orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, + ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T3, ORC_VAR_S2, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgub", 1, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, + ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->arrays[ORC_VAR_S2] = (void *) s2; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_chroma_down_v2_u16 */ +#ifdef DISABLE_ORC +void +video_orc_chroma_down_v2_u16 (guint16 * ORC_RESTRICT d1, + const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, int n) +{ + int i; + orc_union64 *ORC_RESTRICT ptr0; + const orc_union64 *ORC_RESTRICT ptr4; + const orc_union64 *ORC_RESTRICT ptr5; + orc_union64 var35; + orc_union64 var36; + orc_union64 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + orc_union32 var41; + + ptr0 = (orc_union64 *) d1; + ptr4 = (orc_union64 *) s1; + ptr5 = (orc_union64 *) s2; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var35 = ptr4[i]; + /* 1: splitql */ + { + orc_union64 _src; + _src.i = var35.i; + var38.i = _src.x2[1]; + var39.i = _src.x2[0]; + } + /* 2: loadq */ + var36 = ptr5[i]; + /* 3: select1ql */ + { + orc_union64 _src; + _src.i = var36.i; + var40.i = _src.x2[1]; + } + /* 4: avguw */ + var41.x2[0] = + ((orc_uint16) var38.x2[0] + (orc_uint16) var40.x2[0] + 1) >> 1; + var41.x2[1] = + ((orc_uint16) var38.x2[1] + (orc_uint16) var40.x2[1] + 1) >> 1; + /* 5: mergelq */ + { + orc_union64 _dest; + _dest.x2[0] = var39.i; + _dest.x2[1] = var41.i; + var37.i = _dest.i; + } + /* 6: storeq */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_video_orc_chroma_down_v2_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 *ORC_RESTRICT ptr0; + const orc_union64 *ORC_RESTRICT ptr4; + const orc_union64 *ORC_RESTRICT ptr5; + orc_union64 var35; + orc_union64 var36; + orc_union64 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + orc_union32 var41; + + ptr0 = (orc_union64 *) ex->arrays[0]; + ptr4 = (orc_union64 *) ex->arrays[4]; + ptr5 = (orc_union64 *) ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var35 = ptr4[i]; + /* 1: splitql */ + { + orc_union64 _src; + _src.i = var35.i; + var38.i = _src.x2[1]; + var39.i = _src.x2[0]; + } + /* 2: loadq */ + var36 = ptr5[i]; + /* 3: select1ql */ + { + orc_union64 _src; + _src.i = var36.i; + var40.i = _src.x2[1]; + } + /* 4: avguw */ + var41.x2[0] = + ((orc_uint16) var38.x2[0] + (orc_uint16) var40.x2[0] + 1) >> 1; + var41.x2[1] = + ((orc_uint16) var38.x2[1] + (orc_uint16) var40.x2[1] + 1) >> 1; + /* 5: mergelq */ + { + orc_union64 _dest; + _dest.x2[0] = var39.i; + _dest.x2[1] = var41.i; + var37.i = _dest.i; + } + /* 6: storeq */ + ptr0[i] = var37; + } + +} + +void +video_orc_chroma_down_v2_u16 (guint16 * ORC_RESTRICT d1, + const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 28, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 99, 104, 114, + 111, 109, 97, 95, 100, 111, 119, 110, 95, 118, 50, 95, 117, 49, 54, 11, + 8, 8, 12, 8, 8, 12, 8, 8, 20, 4, 20, 4, 20, 4, 197, 33, + 32, 4, 193, 34, 5, 21, 1, 76, 33, 33, 34, 194, 0, 32, 33, 2, + 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v2_u16); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_chroma_down_v2_u16"); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v2_u16); + orc_program_add_destination (p, 8, "d1"); + orc_program_add_source (p, 8, "s1"); + orc_program_add_source (p, 8, "s2"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 4, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "splitql", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, + ORC_VAR_D1); + orc_program_append_2 (p, "select1ql", 0, ORC_VAR_T3, ORC_VAR_S2, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avguw", 1, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, + ORC_VAR_D1); + orc_program_append_2 (p, "mergelq", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->arrays[ORC_VAR_S2] = (void *) s2; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_chroma_down_v4_u8 */ +#ifdef DISABLE_ORC +void +video_orc_chroma_down_v4_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, + const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n) +{ + int i; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + const orc_union32 *ORC_RESTRICT ptr5; + const orc_union32 *ORC_RESTRICT ptr6; + const orc_union32 *ORC_RESTRICT ptr7; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union32 var41; +#else + orc_union32 var41; +#endif + orc_union32 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union16 var49; + orc_union32 var50; + orc_union16 var51; + orc_union32 var52; + orc_union32 var53; + orc_union32 var54; + orc_union32 var55; + orc_union32 var56; + orc_union32 var57; + orc_union32 var58; + orc_union16 var59; + + ptr0 = (orc_union32 *) d1; + ptr4 = (orc_union32 *) s1; + ptr5 = (orc_union32 *) s2; + ptr6 = (orc_union32 *) s3; + ptr7 = (orc_union32 *) s4; + + /* 17: loadpw */ + var41.x2[0] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + var41.x2[1] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: splitlw */ + { + orc_union32 _src; + _src.i = var37.i; + var43.i = _src.x2[1]; + var44.i = _src.x2[0]; + } + /* 2: convubw */ + var45.x2[0] = (orc_uint8) var43.x2[0]; + var45.x2[1] = (orc_uint8) var43.x2[1]; + /* 3: loadl */ + var38 = ptr7[i]; + /* 4: select1lw */ + { + orc_union32 _src; + _src.i = var38.i; + var46.i = _src.x2[1]; + } + /* 5: convubw */ + var47.x2[0] = (orc_uint8) var46.x2[0]; + var47.x2[1] = (orc_uint8) var46.x2[1]; + /* 6: addw */ + var48.x2[0] = var45.x2[0] + var47.x2[0]; + var48.x2[1] = var45.x2[1] + var47.x2[1]; + /* 7: loadl */ + var39 = ptr5[i]; + /* 8: select1lw */ + { + orc_union32 _src; + _src.i = var39.i; + var49.i = _src.x2[1]; + } + /* 9: convubw */ + var50.x2[0] = (orc_uint8) var49.x2[0]; + var50.x2[1] = (orc_uint8) var49.x2[1]; + /* 10: loadl */ + var40 = ptr6[i]; + /* 11: select1lw */ + { + orc_union32 _src; + _src.i = var40.i; + var51.i = _src.x2[1]; + } + /* 12: convubw */ + var52.x2[0] = (orc_uint8) var51.x2[0]; + var52.x2[1] = (orc_uint8) var51.x2[1]; + /* 13: addw */ + var53.x2[0] = var50.x2[0] + var52.x2[0]; + var53.x2[1] = var50.x2[1] + var52.x2[1]; + /* 14: shlw */ + var54.x2[0] = ((orc_uint16) var53.x2[0]) << 1; + var54.x2[1] = ((orc_uint16) var53.x2[1]) << 1; + /* 15: addw */ + var55.x2[0] = var53.x2[0] + var54.x2[0]; + var55.x2[1] = var53.x2[1] + var54.x2[1]; + /* 16: addw */ + var56.x2[0] = var48.x2[0] + var55.x2[0]; + var56.x2[1] = var48.x2[1] + var55.x2[1]; + /* 18: addw */ + var57.x2[0] = var56.x2[0] + var41.x2[0]; + var57.x2[1] = var56.x2[1] + var41.x2[1]; + /* 19: shruw */ + var58.x2[0] = ((orc_uint16) var57.x2[0]) >> 3; + var58.x2[1] = ((orc_uint16) var57.x2[1]) >> 3; + /* 20: convwb */ + var59.x2[0] = var58.x2[0]; + var59.x2[1] = var58.x2[1]; + /* 21: mergewl */ + { + orc_union32 _dest; + _dest.x2[0] = var44.i; + _dest.x2[1] = var59.i; + var42.i = _dest.i; + } + /* 22: storel */ + ptr0[i] = var42; + } + +} + +#else +static void +_backup_video_orc_chroma_down_v4_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 *ORC_RESTRICT ptr0; + const orc_union32 *ORC_RESTRICT ptr4; + const orc_union32 *ORC_RESTRICT ptr5; + const orc_union32 *ORC_RESTRICT ptr6; + const orc_union32 *ORC_RESTRICT ptr7; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union32 var41; +#else + orc_union32 var41; +#endif + orc_union32 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union16 var49; + orc_union32 var50; + orc_union16 var51; + orc_union32 var52; + orc_union32 var53; + orc_union32 var54; + orc_union32 var55; + orc_union32 var56; + orc_union32 var57; + orc_union32 var58; + orc_union16 var59; + + ptr0 = (orc_union32 *) ex->arrays[0]; + ptr4 = (orc_union32 *) ex->arrays[4]; + ptr5 = (orc_union32 *) ex->arrays[5]; + ptr6 = (orc_union32 *) ex->arrays[6]; + ptr7 = (orc_union32 *) ex->arrays[7]; + + /* 17: loadpw */ + var41.x2[0] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + var41.x2[1] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: splitlw */ + { + orc_union32 _src; + _src.i = var37.i; + var43.i = _src.x2[1]; + var44.i = _src.x2[0]; + } + /* 2: convubw */ + var45.x2[0] = (orc_uint8) var43.x2[0]; + var45.x2[1] = (orc_uint8) var43.x2[1]; + /* 3: loadl */ + var38 = ptr7[i]; + /* 4: select1lw */ + { + orc_union32 _src; + _src.i = var38.i; + var46.i = _src.x2[1]; + } + /* 5: convubw */ + var47.x2[0] = (orc_uint8) var46.x2[0]; + var47.x2[1] = (orc_uint8) var46.x2[1]; + /* 6: addw */ + var48.x2[0] = var45.x2[0] + var47.x2[0]; + var48.x2[1] = var45.x2[1] + var47.x2[1]; + /* 7: loadl */ + var39 = ptr5[i]; + /* 8: select1lw */ + { + orc_union32 _src; + _src.i = var39.i; + var49.i = _src.x2[1]; + } + /* 9: convubw */ + var50.x2[0] = (orc_uint8) var49.x2[0]; + var50.x2[1] = (orc_uint8) var49.x2[1]; + /* 10: loadl */ + var40 = ptr6[i]; + /* 11: select1lw */ + { + orc_union32 _src; + _src.i = var40.i; + var51.i = _src.x2[1]; + } + /* 12: convubw */ + var52.x2[0] = (orc_uint8) var51.x2[0]; + var52.x2[1] = (orc_uint8) var51.x2[1]; + /* 13: addw */ + var53.x2[0] = var50.x2[0] + var52.x2[0]; + var53.x2[1] = var50.x2[1] + var52.x2[1]; + /* 14: shlw */ + var54.x2[0] = ((orc_uint16) var53.x2[0]) << 1; + var54.x2[1] = ((orc_uint16) var53.x2[1]) << 1; + /* 15: addw */ + var55.x2[0] = var53.x2[0] + var54.x2[0]; + var55.x2[1] = var53.x2[1] + var54.x2[1]; + /* 16: addw */ + var56.x2[0] = var48.x2[0] + var55.x2[0]; + var56.x2[1] = var48.x2[1] + var55.x2[1]; + /* 18: addw */ + var57.x2[0] = var56.x2[0] + var41.x2[0]; + var57.x2[1] = var56.x2[1] + var41.x2[1]; + /* 19: shruw */ + var58.x2[0] = ((orc_uint16) var57.x2[0]) >> 3; + var58.x2[1] = ((orc_uint16) var57.x2[1]) >> 3; + /* 20: convwb */ + var59.x2[0] = var58.x2[0]; + var59.x2[1] = var58.x2[1]; + /* 21: mergewl */ + { + orc_union32 _dest; + _dest.x2[0] = var44.i; + _dest.x2[1] = var59.i; + var42.i = _dest.i; + } + /* 22: storel */ + ptr0[i] = var42; + } + +} + +void +video_orc_chroma_down_v4_u8 (guint8 * ORC_RESTRICT d1, + const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, + const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 99, 104, 114, + 111, 109, 97, 95, 100, 111, 119, 110, 95, 118, 52, 95, 117, 56, 11, 4, + 4, 12, 4, 4, 12, 4, 4, 12, 4, 4, 12, 4, 4, 14, 2, 1, + 0, 0, 0, 14, 2, 4, 0, 0, 0, 14, 2, 3, 0, 0, 0, 20, + 2, 20, 2, 20, 4, 20, 4, 20, 4, 198, 33, 32, 4, 21, 1, 150, + 34, 33, 191, 33, 7, 21, 1, 150, 35, 33, 21, 1, 70, 36, 34, 35, + 191, 33, 5, 21, 1, 150, 34, 33, 191, 33, 6, 21, 1, 150, 35, 33, + 21, 1, 70, 34, 34, 35, 21, 1, 93, 35, 34, 16, 21, 1, 70, 34, + 34, 35, 21, 1, 70, 36, 36, 34, 21, 1, 70, 36, 36, 17, 21, 1, + 95, 36, 36, 18, 21, 1, 157, 33, 36, 195, 0, 32, 33, 2, 0, + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v4_u8); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_chroma_down_v4_u8"); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v4_u8); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_source (p, 4, "s3"); + orc_program_add_source (p, 4, "s4"); + orc_program_add_constant (p, 2, 0x00000001, "c1"); + orc_program_add_constant (p, 2, 0x00000004, "c2"); + orc_program_add_constant (p, 2, 0x00000003, "c3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + orc_program_add_temporary (p, 4, "t5"); + + orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, + ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 1, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S4, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 1, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "addw", 1, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_T4, + ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S2, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 1, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S3, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 1, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "addw", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, + ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 1, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_C1, + ORC_VAR_D1); + orc_program_append_2 (p, "addw", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, + ORC_VAR_D1); + orc_program_append_2 (p, "addw", 1, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T3, + ORC_VAR_D1); + orc_program_append_2 (p, "addw", 1, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, + ORC_VAR_D1); + orc_program_append_2 (p, "shruw", 1, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C3, + ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 1, ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->arrays[ORC_VAR_S2] = (void *) s2; + ex->arrays[ORC_VAR_S3] = (void *) s3; + ex->arrays[ORC_VAR_S4] = (void *) s4; + + func = c->exec; + func (ex); +} +#endif + + +/* video_orc_chroma_down_v4_u16 */ +#ifdef DISABLE_ORC +void +video_orc_chroma_down_v4_u16 (guint16 * ORC_RESTRICT d1, + const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, + const guint16 * ORC_RESTRICT s3, const guint16 * ORC_RESTRICT s4, int n) +{ + int i; + orc_union64 *ORC_RESTRICT ptr0; + const orc_union64 *ORC_RESTRICT ptr4; + const orc_union64 *ORC_RESTRICT ptr5; + const orc_union64 *ORC_RESTRICT ptr6; + const orc_union64 *ORC_RESTRICT ptr7; + orc_union64 var37; + orc_union64 var38; + orc_union64 var39; + orc_union64 var40; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union64 var41; +#else + orc_union64 var41; +#endif + orc_union64 var42; + orc_union32 var43; + orc_union32 var44; + orc_union64 var45; + orc_union32 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union32 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union64 var57; + orc_union64 var58; + orc_union32 var59; + + ptr0 = (orc_union64 *) d1; + ptr4 = (orc_union64 *) s1; + ptr5 = (orc_union64 *) s2; + ptr6 = (orc_union64 *) s3; + ptr7 = (orc_union64 *) s4; + + /* 17: loadpl */ + var41.x2[0] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + var41.x2[1] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var37 = ptr4[i]; + /* 1: splitql */ + { + orc_union64 _src; + _src.i = var37.i; + var43.i = _src.x2[1]; + var44.i = _src.x2[0]; + } + /* 2: convuwl */ + var45.x2[0] = (orc_uint16) var43.x2[0]; + var45.x2[1] = (orc_uint16) var43.x2[1]; + /* 3: loadq */ + var38 = ptr7[i]; + /* 4: select1ql */ + { + orc_union64 _src; + _src.i = var38.i; + var46.i = _src.x2[1]; + } + /* 5: convuwl */ + var47.x2[0] = (orc_uint16) var46.x2[0]; + var47.x2[1] = (orc_uint16) var46.x2[1]; + /* 6: addl */ + var48.x2[0] = ((orc_uint32) var45.x2[0]) + ((orc_uint32) var47.x2[0]); + var48.x2[1] = ((orc_uint32) var45.x2[1]) + ((orc_uint32) var47.x2[1]); + /* 7: loadq */ + var39 = ptr5[i]; + /* 8: select1ql */ + { + orc_union64 _src; + _src.i = var39.i; + var49.i = _src.x2[1]; + } + /* 9: convuwl */ + var50.x2[0] = (orc_uint16) var49.x2[0]; + var50.x2[1] = (orc_uint16) var49.x2[1]; + /* 10: loadq */ + var40 = ptr6[i]; + /* 11: select1ql */ + { + orc_union64 _src; + _src.i = var40.i; + var51.i = _src.x2[1]; + } + /* 12: convuwl */ + var52.x2[0] = (orc_uint16) var51.x2[0]; + var52.x2[1] = (orc_uint16) var51.x2[1]; + /* 13: addl */ + var53.x2[0] = ((orc_uint32) var50.x2[0]) + ((orc_uint32) var52.x2[0]); + var53.x2[1] = ((orc_uint32) var50.x2[1]) + ((orc_uint32) var52.x2[1]); + /* 14: shll */ + var54.x2[0] = ((orc_uint32) var53.x2[0]) << 1; + var54.x2[1] = ((orc_uint32) var53.x2[1]) << 1; + /* 15: addl */ + var55.x2[0] = ((orc_uint32) var53.x2[0]) + ((orc_uint32) var54.x2[0]); + var55.x2[1] = ((orc_uint32) var53.x2[1]) + ((orc_uint32) var54.x2[1]); + /* 16: addl */ + var56.x2[0] = ((orc_uint32) var48.x2[0]) + ((orc_uint32) var55.x2[0]); + var56.x2[1] = ((orc_uint32) var48.x2[1]) + ((orc_uint32) var55.x2[1]); + /* 18: addl */ + var57.x2[0] = ((orc_uint32) var56.x2[0]) + ((orc_uint32) var41.x2[0]); + var57.x2[1] = ((orc_uint32) var56.x2[1]) + ((orc_uint32) var41.x2[1]); + /* 19: shrul */ + var58.x2[0] = ((orc_uint32) var57.x2[0]) >> 3; + var58.x2[1] = ((orc_uint32) var57.x2[1]) >> 3; + /* 20: convlw */ + var59.x2[0] = var58.x2[0]; + var59.x2[1] = var58.x2[1]; + /* 21: mergelq */ + { + orc_union64 _dest; + _dest.x2[0] = var44.i; + _dest.x2[1] = var59.i; + var42.i = _dest.i; + } + /* 22: storeq */ + ptr0[i] = var42; + } + +} + +#else +static void +_backup_video_orc_chroma_down_v4_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 *ORC_RESTRICT ptr0; + const orc_union64 *ORC_RESTRICT ptr4; + const orc_union64 *ORC_RESTRICT ptr5; + const orc_union64 *ORC_RESTRICT ptr6; + const orc_union64 *ORC_RESTRICT ptr7; + orc_union64 var37; + orc_union64 var38; + orc_union64 var39; + orc_union64 var40; +#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) + volatile orc_union64 var41; +#else + orc_union64 var41; +#endif + orc_union64 var42; + orc_union32 var43; + orc_union32 var44; + orc_union64 var45; + orc_union32 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union32 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union64 var57; + orc_union64 var58; + orc_union32 var59; + + ptr0 = (orc_union64 *) ex->arrays[0]; + ptr4 = (orc_union64 *) ex->arrays[4]; + ptr5 = (orc_union64 *) ex->arrays[5]; + ptr6 = (orc_union64 *) ex->arrays[6]; + ptr7 = (orc_union64 *) ex->arrays[7]; + + /* 17: loadpl */ + var41.x2[0] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + var41.x2[1] = (int) 0x00000004; /* 4 or 1.97626e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var37 = ptr4[i]; + /* 1: splitql */ + { + orc_union64 _src; + _src.i = var37.i; + var43.i = _src.x2[1]; + var44.i = _src.x2[0]; + } + /* 2: convuwl */ + var45.x2[0] = (orc_uint16) var43.x2[0]; + var45.x2[1] = (orc_uint16) var43.x2[1]; + /* 3: loadq */ + var38 = ptr7[i]; + /* 4: select1ql */ + { + orc_union64 _src; + _src.i = var38.i; + var46.i = _src.x2[1]; + } + /* 5: convuwl */ + var47.x2[0] = (orc_uint16) var46.x2[0]; + var47.x2[1] = (orc_uint16) var46.x2[1]; + /* 6: addl */ + var48.x2[0] = ((orc_uint32) var45.x2[0]) + ((orc_uint32) var47.x2[0]); + var48.x2[1] = ((orc_uint32) var45.x2[1]) + ((orc_uint32) var47.x2[1]); + /* 7: loadq */ + var39 = ptr5[i]; + /* 8: select1ql */ + { + orc_union64 _src; + _src.i = var39.i; + var49.i = _src.x2[1]; + } + /* 9: convuwl */ + var50.x2[0] = (orc_uint16) var49.x2[0]; + var50.x2[1] = (orc_uint16) var49.x2[1]; + /* 10: loadq */ + var40 = ptr6[i]; + /* 11: select1ql */ + { + orc_union64 _src; + _src.i = var40.i; + var51.i = _src.x2[1]; + } + /* 12: convuwl */ + var52.x2[0] = (orc_uint16) var51.x2[0]; + var52.x2[1] = (orc_uint16) var51.x2[1]; + /* 13: addl */ + var53.x2[0] = ((orc_uint32) var50.x2[0]) + ((orc_uint32) var52.x2[0]); + var53.x2[1] = ((orc_uint32) var50.x2[1]) + ((orc_uint32) var52.x2[1]); + /* 14: shll */ + var54.x2[0] = ((orc_uint32) var53.x2[0]) << 1; + var54.x2[1] = ((orc_uint32) var53.x2[1]) << 1; + /* 15: addl */ + var55.x2[0] = ((orc_uint32) var53.x2[0]) + ((orc_uint32) var54.x2[0]); + var55.x2[1] = ((orc_uint32) var53.x2[1]) + ((orc_uint32) var54.x2[1]); + /* 16: addl */ + var56.x2[0] = ((orc_uint32) var48.x2[0]) + ((orc_uint32) var55.x2[0]); + var56.x2[1] = ((orc_uint32) var48.x2[1]) + ((orc_uint32) var55.x2[1]); + /* 18: addl */ + var57.x2[0] = ((orc_uint32) var56.x2[0]) + ((orc_uint32) var41.x2[0]); + var57.x2[1] = ((orc_uint32) var56.x2[1]) + ((orc_uint32) var41.x2[1]); + /* 19: shrul */ + var58.x2[0] = ((orc_uint32) var57.x2[0]) >> 3; + var58.x2[1] = ((orc_uint32) var57.x2[1]) >> 3; + /* 20: convlw */ + var59.x2[0] = var58.x2[0]; + var59.x2[1] = var58.x2[1]; + /* 21: mergelq */ + { + orc_union64 _dest; + _dest.x2[0] = var44.i; + _dest.x2[1] = var59.i; + var42.i = _dest.i; + } + /* 22: storeq */ + ptr0[i] = var42; + } + +} + +void +video_orc_chroma_down_v4_u16 (guint16 * ORC_RESTRICT d1, + const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, + const guint16 * ORC_RESTRICT s3, const guint16 * ORC_RESTRICT s4, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static volatile int p_inited = 0; + static OrcCode *c = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcProgram *p; + +#if 1 + static const orc_uint8 bc[] = { + 1, 9, 28, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 99, 104, 114, + 111, 109, 97, 95, 100, 111, 119, 110, 95, 118, 52, 95, 117, 49, 54, 11, + 8, 8, 12, 8, 8, 12, 8, 8, 12, 8, 8, 12, 8, 8, 14, 4, + 1, 0, 0, 0, 14, 4, 4, 0, 0, 0, 14, 4, 3, 0, 0, 0, + 20, 4, 20, 4, 20, 8, 20, 8, 20, 8, 197, 33, 32, 4, 21, 1, + 154, 34, 33, 193, 33, 7, 21, 1, 154, 35, 33, 21, 1, 103, 36, 34, + 35, 193, 33, 5, 21, 1, 154, 34, 33, 193, 33, 6, 21, 1, 154, 35, + 33, 21, 1, 103, 34, 34, 35, 21, 1, 124, 35, 34, 16, 21, 1, 103, + 34, 34, 35, 21, 1, 103, 36, 36, 34, 21, 1, 103, 36, 36, 17, 21, + 1, 126, 36, 36, 18, 21, 1, 163, 33, 36, 194, 0, 32, 33, 2, 0, + + }; + p = orc_program_new_from_static_bytecode (bc); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v4_u16); +#else + p = orc_program_new (); + orc_program_set_name (p, "video_orc_chroma_down_v4_u16"); + orc_program_set_backup_function (p, _backup_video_orc_chroma_down_v4_u16); + orc_program_add_destination (p, 8, "d1"); + orc_program_add_source (p, 8, "s1"); + orc_program_add_source (p, 8, "s2"); + orc_program_add_source (p, 8, "s3"); + orc_program_add_source (p, 8, "s4"); + orc_program_add_constant (p, 4, 0x00000001, "c1"); + orc_program_add_constant (p, 4, 0x00000004, "c2"); + orc_program_add_constant (p, 4, 0x00000003, "c3"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 4, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "splitql", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1, + ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 1, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "select1ql", 0, ORC_VAR_T2, ORC_VAR_S4, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 1, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 1, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_T4, + ORC_VAR_D1); + orc_program_append_2 (p, "select1ql", 0, ORC_VAR_T2, ORC_VAR_S2, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 1, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "select1ql", 0, ORC_VAR_T2, ORC_VAR_S3, + ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 1, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, + ORC_VAR_D1); + orc_program_append_2 (p, "shll", 1, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_C1, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 1, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T3, + ORC_VAR_D1); + orc_program_append_2 (p, "addl", 1, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, + ORC_VAR_D1); + orc_program_append_2 (p, "shrul", 1, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C3, + ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 1, ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1, + ORC_VAR_D1); + orc_program_append_2 (p, "mergelq", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, + ORC_VAR_D1); +#endif + + orc_program_compile (p); + c = orc_program_take_code (p); + orc_program_free (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->arrays[ORC_VAR_A2] = c; + ex->program = 0; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *) s1; + ex->arrays[ORC_VAR_S2] = (void *) s2; + ex->arrays[ORC_VAR_S3] = (void *) s3; + ex->arrays[ORC_VAR_S4] = (void *) s4; + + func = c->exec; + func (ex); +} +#endif diff --git a/gst-libs/gst/video/video-orc-dist.h b/gst-libs/gst/video/video-orc-dist.h index d7c84d2d43..4ebf466e3d 100644 --- a/gst-libs/gst/video/video-orc-dist.h +++ b/gst-libs/gst/video/video-orc-dist.h @@ -84,6 +84,7 @@ void video_orc_blend_little (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRI void video_orc_blend_big (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n); void video_orc_unpack_I420 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int n); void video_orc_pack_I420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, const guint8 * ORC_RESTRICT s1, int n); +void video_orc_pack_Y (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n); void video_orc_unpack_YUY2 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n); void video_orc_pack_YUY2 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n); void video_orc_pack_UYVY (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n); @@ -111,6 +112,7 @@ void video_orc_unpack_NV24 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRIC void video_orc_pack_NV24 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n); void video_orc_unpack_A420 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n); void video_orc_pack_A420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, int n); +void video_orc_pack_AY (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n); void video_orc_resample_bilinear_u32 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int p1, int p2, int n); void video_orc_merge_linear_u8 (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int p1, int n); void video_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m); @@ -149,23 +151,33 @@ void video_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, int d1_stride, const void video_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m); void video_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, int n); void video_orc_matrix8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, orc_int64 p1, orc_int64 p2, orc_int64 p3, int n); -void video_orc_resample_h_near_8888_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n); -void video_orc_resample_h_2tap_8888_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n); -void video_orc_resample_v_2tap_8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); -void video_orc_resample_v_2tap_8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); -void video_orc_resample_v_4tap_8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n); -void video_orc_resample_v_4tap_8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n); -void video_orc_resample_h_4tap_8 (guint8 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, const gint16 * ORC_RESTRICT s5, const gint16 * ORC_RESTRICT s6, const gint16 * ORC_RESTRICT s7, const gint16 * ORC_RESTRICT s8, int n); -void video_orc_resample_h_multaps_8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); -void video_orc_resample_h_muladdtaps_8 (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void video_orc_resample_scaletaps_8 (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n); -void video_orc_resample_h_multaps_8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); -void video_orc_resample_h_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); -void video_orc_resample_scaletaps_8_lq (guint8 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n); -void video_orc_resample_v_multaps_8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); -void video_orc_resample_v_muladdtaps_8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); -void video_orc_resample_v_multaps_8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); -void video_orc_resample_v_muladdtaps_8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_h_near_u32_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n); +void video_orc_resample_h_2tap_4u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int p2, int n); +void video_orc_resample_v_2tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); +void video_orc_resample_v_2tap_u16 (guint64 * ORC_RESTRICT d1, const guint64 * ORC_RESTRICT s1, const guint64 * ORC_RESTRICT s2, int p1, int n); +void video_orc_resample_v_2tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); +void video_orc_resample_v_4tap_u8_lq (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n); +void video_orc_resample_v_4tap_u8 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, const guint32 * ORC_RESTRICT s3, const guint32 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n); +void video_orc_resample_h_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); +void video_orc_resample_h_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); +void video_orc_resample_scaletaps_u8 (guint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n); +void video_orc_resample_h_multaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); +void video_orc_resample_h_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, int d1_stride, const guint32 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); +void video_orc_resample_scaletaps_u8_lq (guint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n); +void video_orc_resample_h_multaps_u16 (gint32 * ORC_RESTRICT d1, const guint64 * ORC_RESTRICT s1, const gint16 * ORC_RESTRICT s2, int n); +void video_orc_resample_h_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, int d1_stride, const guint64 * ORC_RESTRICT s1, int s1_stride, const gint16 * ORC_RESTRICT s2, int s2_stride, int n, int m); +void video_orc_resample_scaletaps_u16 (guint64 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n); +void video_orc_resample_v_multaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_v_muladdtaps_u8 (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_v_multaps_u16 (gint32 * ORC_RESTRICT d1, const guint64 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_v_muladdtaps_u16 (gint32 * ORC_RESTRICT d1, const guint64 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_v_multaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); +void video_orc_resample_v_muladdtaps_u8_lq (gint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int p1, int n); +void video_orc_chroma_down_h2_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n); +void video_orc_chroma_down_v2_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n); +void video_orc_chroma_down_v2_u16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, int n); +void video_orc_chroma_down_v4_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n); +void video_orc_chroma_down_v4_u16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, const guint16 * ORC_RESTRICT s3, const guint16 * ORC_RESTRICT s4, int n); #ifdef __cplusplus }