亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cxmathfuncs.cpp

?? 將OpenCV移植到DSP上
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/*M///////////////////////////////////////////////////////////////////////////////////////
//
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
//  By downloading, copying, installing or using the software you agree to this license.
//  If you do not agree to this license, do not download, install,
//  copy or use the software.
//
//
//                        Intel License Agreement
//                For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
//   * Redistribution's of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//
//   * Redistribution's in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//
//   * The name of Intel Corporation may not be used to endorse or promote products
//     derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/

#include "_cxcore.h"

#ifdef HAVE_CONFIG_H
#include <cvconfig.h>
#endif

#define ICV_MATH_BLOCK_SIZE  256

#define _CV_SQRT_MAGIC     0xbe6f0000

#define _CV_SQRT_MAGIC_DBL CV_BIG_UINT(0xbfcd460000000000)

#define _CV_ATAN_CF0  (-15.8131890796f)
#define _CV_ATAN_CF1  (61.0941945596f)
#define _CV_ATAN_CF2  0.f /*(-0.140500406322f)*/

static const float icvAtanTab[8] = { 0.f + _CV_ATAN_CF2, 90.f - _CV_ATAN_CF2,
    180.f - _CV_ATAN_CF2, 90.f + _CV_ATAN_CF2,
    360.f - _CV_ATAN_CF2, 270.f + _CV_ATAN_CF2,
    180.f + _CV_ATAN_CF2, 270.f - _CV_ATAN_CF2
};

static const int icvAtanSign[8] =
    { 0, 0x80000000, 0x80000000, 0, 0x80000000, 0, 0, 0x80000000 };

CV_IMPL float
cvFastArctan( float y, float x )
{
    Cv32suf _x, _y;
    int ix, iy, ygx, idx;
    double z;

    _x.f = x; _y.f = y;
    ix = _x.i; iy = _y.i;
    idx = (ix < 0) * 2 + (iy < 0) * 4;

    ix &= 0x7fffffff;
    iy &= 0x7fffffff;

    ygx = (iy <= ix) - 1;
    idx -= ygx;

    idx &= ((ix == 0) - 1) | ((iy == 0) - 1);

    /* swap ix and iy if ix < iy */
    ix ^= iy & ygx;
    iy ^= ix & ygx;
    ix ^= iy & ygx;

    _y.i = iy ^ icvAtanSign[idx];

    /* ix = ix != 0 ? ix : 1.f */
    _x.i = ((ix ^ CV_1F) & ((ix == 0) - 1)) ^ CV_1F;
    
    z = _y.f / _x.f;
    return (float)((_CV_ATAN_CF0*fabs(z) + _CV_ATAN_CF1)*z + icvAtanTab[idx]);
}


IPCVAPI_IMPL( CvStatus, icvFastArctan_32f,
    (const float *__y, const float *__x, float *angle, int len ), (__y, __x, angle, len) )
{
    int i = 0;
    const int *y = (const int*)__y, *x = (const int*)__x;

    if( !(y && x && angle && len >= 0) )
        return CV_BADFACTOR_ERR;

    /* unrolled by 4 loop */
    for( ; i <= len - 4; i += 4 )
    {
        int j, idx[4];
        float xf[4], yf[4];
        double d = 1.;

        /* calc numerators and denominators */
        for( j = 0; j < 4; j++ )
        {
            int ix = x[i + j], iy = y[i + j];
            int ygx, k = (ix < 0) * 2 + (iy < 0) * 4;
            Cv32suf _x, _y;

            ix &= 0x7fffffff;
            iy &= 0x7fffffff;

            ygx = (iy <= ix) - 1;
            k -= ygx;

            k &= ((ix == 0) - 1) | ((iy == 0) - 1);

            /* swap ix and iy if ix < iy */
            ix ^= iy & ygx;
            iy ^= ix & ygx;
            ix ^= iy & ygx;
            
            _y.i = iy ^ icvAtanSign[k];

            /* ix = ix != 0 ? ix : 1.f */
            _x.i = ((ix ^ CV_1F) & ((ix == 0) - 1)) ^ CV_1F;
            idx[j] = k;
            yf[j] = _y.f;
            d *= (xf[j] = _x.f);
        }

        d = 1. / d;

        {
            double b = xf[2] * xf[3], a = xf[0] * xf[1];

            float z0 = (float) (yf[0] * xf[1] * b * d);
            float z1 = (float) (yf[1] * xf[0] * b * d);
            float z2 = (float) (yf[2] * xf[3] * a * d);
            float z3 = (float) (yf[3] * xf[2] * a * d);

            z0 = (float)((_CV_ATAN_CF0*fabs(z0) + _CV_ATAN_CF1)*z0 + icvAtanTab[idx[0]]);
            z1 = (float)((_CV_ATAN_CF0*fabs(z1) + _CV_ATAN_CF1)*z1 + icvAtanTab[idx[1]]);
            z2 = (float)((_CV_ATAN_CF0*fabs(z2) + _CV_ATAN_CF1)*z2 + icvAtanTab[idx[2]]);
            z3 = (float)((_CV_ATAN_CF0*fabs(z3) + _CV_ATAN_CF1)*z3 + icvAtanTab[idx[3]]);

            angle[i] = z0;
            angle[i+1] = z1;
            angle[i+2] = z2;
            angle[i+3] = z3;
        }
    }

    /* process the rest */
    for( ; i < len; i++ )
        angle[i] = cvFastArctan( __y[i], __x[i] );

    return CV_OK;
}


/* ************************************************************************** *\
   Fast cube root by Ken Turkowski
   (http://www.worldserver.com/turk/computergraphics/papers.html)
\* ************************************************************************** */
CV_IMPL  float  cvCbrt( float value )
{
    float fr;
    Cv32suf v, m;
    int ix, s;
    int ex, shx;

    v.f = value;
    ix = v.i & 0x7fffffff;
    s = v.i & 0x80000000;
    ex = (ix >> 23) - 127;
    shx = ex % 3;
    shx -= shx >= 0 ? 3 : 0;
    ex = (ex - shx) / 3; /* exponent of cube root */
    v.i = (ix & ((1<<23)-1)) | ((shx + 127)<<23);
    fr = v.f;

    /* 0.125 <= fr < 1.0 */
    /* Use quartic rational polynomial with error < 2^(-24) */
    fr = (float)(((((45.2548339756803022511987494 * fr +
    192.2798368355061050458134625) * fr +
    119.1654824285581628956914143) * fr +
    13.43250139086239872172837314) * fr +
    0.1636161226585754240958355063)/
    ((((14.80884093219134573786480845 * fr +
    151.9714051044435648658557668) * fr +
    168.5254414101568283957668343) * fr +
    33.9905941350215598754191872) * fr +
    1.0));

    /* fr *= 2^ex * sign */
    m.f = value;
    v.f = fr;
    v.i = (v.i + (ex << 23) + s) & (m.i*2 != 0 ? -1 : 0);
    return v.f;
}

//static const double _0_5 = 0.5, _1_5 = 1.5;


IPCVAPI_IMPL( CvStatus, icvInvSqrt_32f, (const float *src, float *dst, int len), (src, dst, len) )
{
    int i = 0;

    if( !(src && dst && len >= 0) )
        return CV_BADFACTOR_ERR;

    for( ; i < len; i++ )
        dst[i] = (float)(1.f/sqrt(src[i]));

    return CV_OK;
}


IPCVAPI_IMPL( CvStatus, icvSqrt_32f, (const float *src, float *dst, int len), (src, dst, len) )
{
    int i = 0;

    if( !(src && dst && len >= 0) )
        return CV_BADFACTOR_ERR;

    for( ; i < len; i++ )
        dst[i] = (float)sqrt(src[i]);

    return CV_OK;
}


IPCVAPI_IMPL( CvStatus, icvSqrt_64f, (const double *src, double *dst, int len), (src, dst, len) )
{
    int i = 0;

    if( !(src && dst && len >= 0) )
        return CV_BADFACTOR_ERR;

    for( ; i < len; i++ )
        dst[i] = sqrt(src[i]);

    return CV_OK;
}


IPCVAPI_IMPL( CvStatus, icvInvSqrt_64f, (const double *src, double *dst, int len), (src, dst, len) )
{
    int i = 0;

    if( !(src && dst && len >= 0) )
        return CV_BADFACTOR_ERR;

    for( ; i < len; i++ )
        dst[i] = 1./sqrt(src[i]);

    return CV_OK;
}

#define ICV_DEF_SQR_MAGNITUDE_FUNC(flavor, arrtype, magtype)\
static CvStatus CV_STDCALL                                  \
icvSqrMagnitude_##flavor(const arrtype* x, const arrtype* y,\
                         magtype* mag, int len)             \
{                                                           \
    int i;                                                  \
                                                            \
    for( i = 0; i <= len - 4; i += 4 )                      \
    {                                                       \
        magtype x0 = (magtype)x[i], y0 = (magtype)y[i];     \
        magtype x1 = (magtype)x[i+1], y1 = (magtype)y[i+1]; \
                                                            \
        x0 = x0*x0 + y0*y0;                                 \
        x1 = x1*x1 + y1*y1;                                 \
        mag[i] = x0;                                        \
        mag[i+1] = x1;                                      \
        x0 = (magtype)x[i+2], y0 = (magtype)y[i+2];         \
        x1 = (magtype)x[i+3], y1 = (magtype)y[i+3];         \
        x0 = x0*x0 + y0*y0;                                 \
        x1 = x1*x1 + y1*y1;                                 \
        mag[i+2] = x0;                                      \
        mag[i+3] = x1;                                      \
    }                                                       \
                                                            \
    for( ; i < len; i++ )                                   \
    {                                                       \
        magtype x0 = (magtype)x[i], y0 = (magtype)y[i];     \
        mag[i] = x0*x0 + y0*y0;                             \
    }                                                       \
                                                            \
    return CV_OK;                                           \
}


ICV_DEF_SQR_MAGNITUDE_FUNC( 32f, float, float )
ICV_DEF_SQR_MAGNITUDE_FUNC( 64f, double, double )

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美国一区二区三区在线播放| 国产欧美一区视频| 国产成人综合精品三级| 91麻豆成人久久精品二区三区| 欧美精品久久一区二区三区| 日本成人在线一区| 国产一区二三区| 国产一区二区导航在线播放| 国产麻豆91精品| 欧美日韩一区二区在线视频| 欧美中文一区二区三区| 欧美韩国一区二区| 九九精品视频在线看| 欧美午夜寂寞影院| 欧美一卡二卡在线| 一区二区三区.www| 国产乱子伦视频一区二区三区| 日韩精品综合一本久道在线视频| 国产欧美一区二区在线| 国产曰批免费观看久久久| 国产不卡视频在线播放| 精品不卡在线视频| 日韩美女视频19| 亚洲国产一区二区在线播放| 日本韩国精品在线| 91精品欧美一区二区三区综合在 | 久久影院午夜片一区| 欧美精品日韩一本| 日韩电影在线免费看| 国产高清视频一区| 久久精子c满五个校花| 极品少妇xxxx精品少妇偷拍| 激情综合一区二区三区| 欧美视频一区二区三区在线观看| 国产精品另类一区| 成人亚洲一区二区一| 中文字幕精品综合| 激情欧美一区二区三区在线观看| 久久久久97国产精华液好用吗 | 夜夜揉揉日日人人青青一国产精品| 成人一区在线观看| 日韩欧美国产综合在线一区二区三区| 国产精品全国免费观看高清 | 亚洲三级在线观看| 午夜精品一区二区三区免费视频| 久久国产生活片100| 久久影院午夜片一区| 国产精品综合网| 在线视频国内一区二区| 一区二区三区丝袜| 97久久人人超碰| 一区二区三区在线观看国产| 欧美性大战久久久久久久蜜臀| 国产午夜精品一区二区三区四区| 亚洲自拍都市欧美小说| 欧美日韩免费高清一区色橹橹| 日韩黄色小视频| 日韩欧美成人一区二区| 国产精品一区免费在线观看| 日本一二三不卡| thepron国产精品| 欧美精品一区二区三区视频| 国产一区二三区| 精品国产乱码久久久久久影片| 国产成人欧美日韩在线电影| 欧美精品丝袜中出| 久久疯狂做爰流白浆xx| 欧美亚洲日本一区| 亚洲精品国产高清久久伦理二区| 欧美另类一区二区三区| 亚洲一级不卡视频| 久久久久久9999| 国产美女精品在线| 一区二区三区日本| 99久久精品免费看国产免费软件| 一区二区三区91| 久久精品夜色噜噜亚洲aⅴ| 欧洲色大大久久| 亚洲在线中文字幕| 久久色中文字幕| 免费精品视频在线| 中文字幕一区不卡| 日韩美女一区二区三区四区| 日韩精品一二三区| 91精品欧美久久久久久动漫 | 久久精品二区亚洲w码| 国产精品国产三级国产a| 欧美日本韩国一区二区三区视频 | 亚洲二区在线观看| 欧美猛男gaygay网站| 国产成人精品免费看| 午夜精品在线看| 欧美写真视频网站| 亚洲一二三四区| 欧美日本一道本| 日本韩国精品在线| 色综合色综合色综合 | 毛片一区二区三区| 中文久久乱码一区二区| 欧美日韩高清一区二区不卡| 在线免费视频一区二区| 裸体一区二区三区| 蜜臀av性久久久久蜜臀av麻豆| 免费观看成人av| 极品美女销魂一区二区三区| 亚洲午夜三级在线| 欧美国产一区在线| 中文字幕 久热精品 视频在线| 亚洲国产精品成人综合色在线婷婷| 久久视频一区二区| 欧美老肥妇做.爰bbww视频| 欧美高清视频在线高清观看mv色露露十八| 亚洲精品成人悠悠色影视| 日韩三级.com| 在线视频一区二区三区| 懂色av一区二区三区免费观看| 国产成人av电影免费在线观看| 日韩精品亚洲专区| 一区二区在线看| 亚洲国产高清在线观看视频| 欧美一区二区三区公司| 91福利国产精品| 777午夜精品视频在线播放| 欧美一级日韩一级| 久久亚洲二区三区| 日韩女优毛片在线| 91精品欧美综合在线观看最新| 欧美性感一类影片在线播放| 91精品国产综合久久香蕉麻豆 | 色综合色狠狠天天综合色| 色久优优欧美色久优优| 成人永久免费视频| 国产九九视频一区二区三区| 精品一区二区免费在线观看| 不卡在线观看av| 欧美日韩视频在线观看一区二区三区 | 欧美精品乱码久久久久久| 日韩女优av电影| 国产精品色在线| 国产午夜精品久久久久久久 | 欧美日韩精品系列| 久久亚洲综合av| 日韩精品专区在线| 国产精品第四页| 中文字幕制服丝袜成人av| 精品国产精品一区二区夜夜嗨| 7777精品伊人久久久大香线蕉| 欧美狂野另类xxxxoooo| 日本一区二区三区免费乱视频| 亚洲乱码一区二区三区在线观看| 全国精品久久少妇| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲18女电影在线观看| 国产精品一区二区在线观看网站| 国内精品国产成人| 国产成人免费网站| 欧美日韩国产一级二级| 欧美日韩精品欧美日韩精品一 | 国产精品久久一卡二卡| 日韩福利电影在线观看| 成av人片一区二区| 欧美一区二区三区四区在线观看| 国产精品美女久久久久久久| 免费人成网站在线观看欧美高清| 卡一卡二国产精品 | 裸体健美xxxx欧美裸体表演| 日本少妇一区二区| a级高清视频欧美日韩| av电影天堂一区二区在线| 欧美精品第一页| 久久亚洲影视婷婷| 中文字幕一区二区三区四区| 久久激情五月激情| 欧美人与性动xxxx| 亚洲三级在线免费观看| 肉肉av福利一精品导航| 91久久精品国产91性色tv| 91精品国产91久久综合桃花| 亚洲综合在线视频| 99riav一区二区三区| 欧美麻豆精品久久久久久| 亚洲午夜久久久久中文字幕久| 成人av午夜影院| 欧美国产日本视频| 国产高清精品在线| 久久精品一二三| 国产精品一区二区x88av| 欧美xxxxx牲另类人与| 奇米精品一区二区三区四区 | 色偷偷88欧美精品久久久| 香蕉成人伊视频在线观看| 欧美久久免费观看| 日韩美女视频一区二区| 床上的激情91.| 久久久久久久综合日本| 久久99精品久久久久久| 粉嫩aⅴ一区二区三区四区| 久久久久久久精| 国产成人在线网站| 欧美日韩你懂的|