From 288f8babd11491689c6e9b97bf19c5711392f323 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 30 Apr 2011 17:21:28 +0100 Subject: [PATCH] gst: update orc-generated disted C backup code to orc 0.4.14 --- gst/videoscale/gstvideoscaleorc-dist.c | 192 ++++++++++++++++++++++++--------- gst/volume/gstvolumeorc-dist.c | 48 ++++++--- 2 files changed, 180 insertions(+), 60 deletions(-) diff --git a/gst/videoscale/gstvideoscaleorc-dist.c b/gst/videoscale/gstvideoscaleorc-dist.c index 7b7eb21..034baf5 100644 --- a/gst/videoscale/gstvideoscaleorc-dist.c +++ b/gst/videoscale/gstvideoscaleorc-dist.c @@ -662,8 +662,12 @@ orc_downsample_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, /* 0: loadw */ var34 = ptr4[i]; /* 1: splitwb */ - var36 = (var34.i >> 8) & 0xff; - var37 = var34.i & 0xff; + { + orc_union16 _src; + _src.i = var34.i; + var36 = _src.x2[1]; + var37 = _src.x2[0]; + } /* 2: avgub */ var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1; /* 3: storeb */ @@ -693,8 +697,12 @@ _backup_orc_downsample_u8 (OrcExecutor * ORC_RESTRICT ex) /* 0: loadw */ var34 = ptr4[i]; /* 1: splitwb */ - var36 = (var34.i >> 8) & 0xff; - var37 = var34.i & 0xff; + { + orc_union16 _src; + _src.i = var34.i; + var36 = _src.x2[1]; + var37 = _src.x2[0]; + } /* 2: avgub */ var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1; /* 3: storeb */ @@ -746,8 +754,12 @@ orc_downsample_u16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1, /* 0: loadl */ var34 = ptr4[i]; /* 1: splitlw */ - var36.i = (var34.i >> 16) & 0xffff; - var37.i = var34.i & 0xffff; + { + orc_union32 _src; + _src.i = var34.i; + var36.i = _src.x2[1]; + var37.i = _src.x2[0]; + } /* 2: avguw */ var35.i = ((orc_uint16) var36.i + (orc_uint16) var37.i + 1) >> 1; /* 3: storew */ @@ -777,8 +789,12 @@ _backup_orc_downsample_u16 (OrcExecutor * ORC_RESTRICT ex) /* 0: loadl */ var34 = ptr4[i]; /* 1: splitlw */ - var36.i = (var34.i >> 16) & 0xffff; - var37.i = var34.i & 0xffff; + { + orc_union32 _src; + _src.i = var34.i; + var36.i = _src.x2[1]; + var37.i = _src.x2[0]; + } /* 2: avguw */ var35.i = ((orc_uint16) var36.i + (orc_uint16) var37.i + 1) >> 1; /* 3: storew */ @@ -830,8 +846,12 @@ gst_videoscale_orc_downsample_u32 (guint8 * ORC_RESTRICT d1, /* 0: loadq */ var34 = ptr4[i]; /* 1: splitql */ - var36.i = (var34.i >> 32) & 0xffffffff; - var37.i = var34.i & 0xffffffff; + { + orc_union64 _src; + _src.i = var34.i; + var36.i = _src.x2[1]; + var37.i = _src.x2[0]; + } /* 2: avgub */ var35.x4[0] = ((orc_uint8) var36.x4[0] + (orc_uint8) var37.x4[0] + 1) >> 1; var35.x4[1] = ((orc_uint8) var36.x4[1] + (orc_uint8) var37.x4[1] + 1) >> 1; @@ -864,8 +884,12 @@ _backup_gst_videoscale_orc_downsample_u32 (OrcExecutor * ORC_RESTRICT ex) /* 0: loadq */ var34 = ptr4[i]; /* 1: splitql */ - var36.i = (var34.i >> 32) & 0xffffffff; - var37.i = var34.i & 0xffffffff; + { + orc_union64 _src; + _src.i = var34.i; + var36.i = _src.x2[1]; + var37.i = _src.x2[0]; + } /* 2: avgub */ var35.x4[0] = ((orc_uint8) var36.x4[0] + (orc_uint8) var37.x4[0] + 1) >> 1; var35.x4[1] = ((orc_uint8) var36.x4[1] + (orc_uint8) var37.x4[1] + 1) >> 1; @@ -926,33 +950,69 @@ gst_videoscale_orc_downsample_yuyv (guint8 * ORC_RESTRICT d1, /* 0: loadq */ var38 = ptr4[i]; /* 1: splitwb */ - var40.x4[0] = (var38.x4[0] >> 8) & 0xff; - var41.x4[0] = var38.x4[0] & 0xff; - var40.x4[1] = (var38.x4[1] >> 8) & 0xff; - var41.x4[1] = var38.x4[1] & 0xff; - var40.x4[2] = (var38.x4[2] >> 8) & 0xff; - var41.x4[2] = var38.x4[2] & 0xff; - var40.x4[3] = (var38.x4[3] >> 8) & 0xff; - var41.x4[3] = var38.x4[3] & 0xff; + { + orc_union16 _src; + _src.i = var38.x4[0]; + var40.x4[0] = _src.x2[1]; + var41.x4[0] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var38.x4[1]; + var40.x4[1] = _src.x2[1]; + var41.x4[1] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var38.x4[2]; + var40.x4[2] = _src.x2[1]; + var41.x4[2] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var38.x4[3]; + var40.x4[3] = _src.x2[1]; + var41.x4[3] = _src.x2[0]; + } /* 2: splitwb */ - var42.x2[0] = (var40.x2[0] >> 8) & 0xff; - var43.x2[0] = var40.x2[0] & 0xff; - var42.x2[1] = (var40.x2[1] >> 8) & 0xff; - var43.x2[1] = var40.x2[1] & 0xff; + { + orc_union16 _src; + _src.i = var40.x2[0]; + var42.x2[0] = _src.x2[1]; + var43.x2[0] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var40.x2[1]; + var42.x2[1] = _src.x2[1]; + var43.x2[1] = _src.x2[0]; + } /* 3: avgub */ var44.x2[0] = ((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1; var44.x2[1] = ((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1; /* 4: splitlw */ - var45.i = (var41.i >> 16) & 0xffff; - var46.i = var41.i & 0xffff; + { + orc_union32 _src; + _src.i = var41.i; + var45.i = _src.x2[1]; + var46.i = _src.x2[0]; + } /* 5: avgub */ var47.x2[0] = ((orc_uint8) var45.x2[0] + (orc_uint8) var46.x2[0] + 1) >> 1; var47.x2[1] = ((orc_uint8) var45.x2[1] + (orc_uint8) var46.x2[1] + 1) >> 1; /* 6: mergebw */ - var39.x2[0] = - ((orc_uint8) var44.x2[0] & 0x00ff) | ((orc_uint8) var47.x2[0] << 8); - var39.x2[1] = - ((orc_uint8) var44.x2[1] & 0x00ff) | ((orc_uint8) var47.x2[1] << 8); + { + orc_union16 _dest; + _dest.x2[0] = var44.x2[0]; + _dest.x2[1] = var47.x2[0]; + var39.x2[0] = _dest.i; + } + { + orc_union16 _dest; + _dest.x2[0] = var44.x2[1]; + _dest.x2[1] = var47.x2[1]; + var39.x2[1] = _dest.i; + } /* 7: storel */ ptr0[i] = var39; } @@ -986,33 +1046,69 @@ _backup_gst_videoscale_orc_downsample_yuyv (OrcExecutor * ORC_RESTRICT ex) /* 0: loadq */ var38 = ptr4[i]; /* 1: splitwb */ - var40.x4[0] = (var38.x4[0] >> 8) & 0xff; - var41.x4[0] = var38.x4[0] & 0xff; - var40.x4[1] = (var38.x4[1] >> 8) & 0xff; - var41.x4[1] = var38.x4[1] & 0xff; - var40.x4[2] = (var38.x4[2] >> 8) & 0xff; - var41.x4[2] = var38.x4[2] & 0xff; - var40.x4[3] = (var38.x4[3] >> 8) & 0xff; - var41.x4[3] = var38.x4[3] & 0xff; + { + orc_union16 _src; + _src.i = var38.x4[0]; + var40.x4[0] = _src.x2[1]; + var41.x4[0] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var38.x4[1]; + var40.x4[1] = _src.x2[1]; + var41.x4[1] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var38.x4[2]; + var40.x4[2] = _src.x2[1]; + var41.x4[2] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var38.x4[3]; + var40.x4[3] = _src.x2[1]; + var41.x4[3] = _src.x2[0]; + } /* 2: splitwb */ - var42.x2[0] = (var40.x2[0] >> 8) & 0xff; - var43.x2[0] = var40.x2[0] & 0xff; - var42.x2[1] = (var40.x2[1] >> 8) & 0xff; - var43.x2[1] = var40.x2[1] & 0xff; + { + orc_union16 _src; + _src.i = var40.x2[0]; + var42.x2[0] = _src.x2[1]; + var43.x2[0] = _src.x2[0]; + } + { + orc_union16 _src; + _src.i = var40.x2[1]; + var42.x2[1] = _src.x2[1]; + var43.x2[1] = _src.x2[0]; + } /* 3: avgub */ var44.x2[0] = ((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1; var44.x2[1] = ((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1; /* 4: splitlw */ - var45.i = (var41.i >> 16) & 0xffff; - var46.i = var41.i & 0xffff; + { + orc_union32 _src; + _src.i = var41.i; + var45.i = _src.x2[1]; + var46.i = _src.x2[0]; + } /* 5: avgub */ var47.x2[0] = ((orc_uint8) var45.x2[0] + (orc_uint8) var46.x2[0] + 1) >> 1; var47.x2[1] = ((orc_uint8) var45.x2[1] + (orc_uint8) var46.x2[1] + 1) >> 1; /* 6: mergebw */ - var39.x2[0] = - ((orc_uint8) var44.x2[0] & 0x00ff) | ((orc_uint8) var47.x2[0] << 8); - var39.x2[1] = - ((orc_uint8) var44.x2[1] & 0x00ff) | ((orc_uint8) var47.x2[1] << 8); + { + orc_union16 _dest; + _dest.x2[0] = var44.x2[0]; + _dest.x2[1] = var47.x2[0]; + var39.x2[0] = _dest.i; + } + { + orc_union16 _dest; + _dest.x2[0] = var44.x2[1]; + _dest.x2[1] = var47.x2[1]; + var39.x2[1] = _dest.i; + } /* 7: storel */ ptr0[i] = var39; } diff --git a/gst/volume/gstvolumeorc-dist.c b/gst/volume/gstvolumeorc-dist.c index 6ecf5bb..1028649 100644 --- a/gst/volume/gstvolumeorc-dist.c +++ b/gst/volume/gstvolumeorc-dist.c @@ -1310,8 +1310,12 @@ orc_process_controlled_f32_2ch (gfloat * ORC_RESTRICT d1, var37.i = ORC_DENORMAL (_dest.i); } /* 2: mergelq */ - var38.i = ((orc_uint64) var37.i & ORC_UINT64_C (0xffffffff)) | ((orc_uint64) - var37.i << 32); + { + orc_union64 _dest; + _dest.x2[0] = var37.i; + _dest.x2[1] = var37.i; + var38.i = _dest.i; + } /* 3: loadq */ var35 = ptr0[i]; /* 4: mulf */ @@ -1369,8 +1373,12 @@ _backup_orc_process_controlled_f32_2ch (OrcExecutor * ORC_RESTRICT ex) var37.i = ORC_DENORMAL (_dest.i); } /* 2: mergelq */ - var38.i = ((orc_uint64) var37.i & ORC_UINT64_C (0xffffffff)) | ((orc_uint64) - var37.i << 32); + { + orc_union64 _dest; + _dest.x2[0] = var37.i; + _dest.x2[1] = var37.i; + var38.i = _dest.i; + } /* 3: loadq */ var35 = ptr0[i]; /* 4: mulf */ @@ -1732,8 +1740,12 @@ orc_process_controlled_int16_2ch (gint16 * ORC_RESTRICT d1, var40.i = ORC_DENORMAL (_dest.i); } /* 5: mergelq */ - var41.i = ((orc_uint64) var40.i & ORC_UINT64_C (0xffffffff)) | ((orc_uint64) - var40.i << 32); + { + orc_union64 _dest; + _dest.x2[0] = var40.i; + _dest.x2[1] = var40.i; + var41.i = _dest.i; + } /* 6: mulf */ { orc_union32 _src1; @@ -1819,8 +1831,12 @@ _backup_orc_process_controlled_int16_2ch (OrcExecutor * ORC_RESTRICT ex) var40.i = ORC_DENORMAL (_dest.i); } /* 5: mergelq */ - var41.i = ((orc_uint64) var40.i & ORC_UINT64_C (0xffffffff)) | ((orc_uint64) - var40.i << 32); + { + orc_union64 _dest; + _dest.x2[0] = var40.i; + _dest.x2[1] = var40.i; + var41.i = _dest.i; + } /* 6: mulf */ { orc_union32 _src1; @@ -2095,8 +2111,12 @@ orc_process_controlled_int8_2ch (gint8 * ORC_RESTRICT d1, var41.i = ORC_DENORMAL (_dest.i); } /* 6: mergelq */ - var42.i = ((orc_uint64) var41.i & ORC_UINT64_C (0xffffffff)) | ((orc_uint64) - var41.i << 32); + { + orc_union64 _dest; + _dest.x2[0] = var41.i; + _dest.x2[1] = var41.i; + var42.i = _dest.i; + } /* 7: mulf */ { orc_union32 _src1; @@ -2190,8 +2210,12 @@ _backup_orc_process_controlled_int8_2ch (OrcExecutor * ORC_RESTRICT ex) var41.i = ORC_DENORMAL (_dest.i); } /* 6: mergelq */ - var42.i = ((orc_uint64) var41.i & ORC_UINT64_C (0xffffffff)) | ((orc_uint64) - var41.i << 32); + { + orc_union64 _dest; + _dest.x2[0] = var41.i; + _dest.x2[1] = var41.i; + var42.i = _dest.i; + } /* 7: mulf */ { orc_union32 _src1; -- 2.7.4