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

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

?? dct.c

?? 絕對(duì)好的源碼
?? C
字號(hào):
/***************************************************************************** * dct.c: h264 encoder library ***************************************************************************** * Copyright (C) 2003 Laurent Aimar * $Id: dct.c,v 1.1 2004/06/03 19:27:06 fenrir Exp $ * * Authors: Laurent Aimar <fenrir@via.ecp.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. *****************************************************************************/#include "common.h"#ifdef HAVE_MMXEXT#   include "i386/dct.h"#endif#ifdef ARCH_PPC#   include "ppc/dct.h"#endifstatic inline int clip_uint8( int a ){    if (a&(~255))        return (-a)>>31;    else        return a;}/* * XXX For all dct dc : input could be equal to output so ... */static void dct2x2dc( int16_t d[2][2] ){    int tmp[2][2];    tmp[0][0] = d[0][0] + d[0][1];    tmp[1][0] = d[0][0] - d[0][1];    tmp[0][1] = d[1][0] + d[1][1];    tmp[1][1] = d[1][0] - d[1][1];    d[0][0] = tmp[0][0] + tmp[0][1];    d[1][0] = tmp[1][0] + tmp[1][1];    d[0][1] = tmp[0][0] - tmp[0][1];    d[1][1] = tmp[1][0] - tmp[1][1];}static void dct4x4dc( int16_t d[4][4] ){    int16_t tmp[4][4];    int s01, s23;    int d01, d23;    int i;    for( i = 0; i < 4; i++ )    {        s01 = d[i][0] + d[i][1];        d01 = d[i][0] - d[i][1];        s23 = d[i][2] + d[i][3];        d23 = d[i][2] - d[i][3];        tmp[0][i] = s01 + s23;        tmp[1][i] = s01 - s23;        tmp[2][i] = d01 - d23;        tmp[3][i] = d01 + d23;    }    for( i = 0; i < 4; i++ )    {        s01 = tmp[i][0] + tmp[i][1];        d01 = tmp[i][0] - tmp[i][1];        s23 = tmp[i][2] + tmp[i][3];        d23 = tmp[i][2] - tmp[i][3];        d[i][0] = ( s01 + s23 + 1 ) >> 1;        d[i][1] = ( s01 - s23 + 1 ) >> 1;        d[i][2] = ( d01 - d23 + 1 ) >> 1;        d[i][3] = ( d01 + d23 + 1 ) >> 1;    }}static void idct4x4dc( int16_t d[4][4] ){    int16_t tmp[4][4];    int s01, s23;    int d01, d23;    int i;    for( i = 0; i < 4; i++ )    {        s01 = d[i][0] + d[i][1];        d01 = d[i][0] - d[i][1];        s23 = d[i][2] + d[i][3];        d23 = d[i][2] - d[i][3];        tmp[0][i] = s01 + s23;        tmp[1][i] = s01 - s23;        tmp[2][i] = d01 - d23;        tmp[3][i] = d01 + d23;    }    for( i = 0; i < 4; i++ )    {        s01 = tmp[i][0] + tmp[i][1];        d01 = tmp[i][0] - tmp[i][1];        s23 = tmp[i][2] + tmp[i][3];        d23 = tmp[i][2] - tmp[i][3];        d[i][0] = s01 + s23;        d[i][1] = s01 - s23;        d[i][2] = d01 - d23;        d[i][3] = d01 + d23;    }}static inline void pixel_sub_wxh( int16_t *diff, int i_size,                                  uint8_t *pix1, int i_pix1, uint8_t *pix2, int i_pix2 ){    int y, x;    for( y = 0; y < i_size; y++ )    {        for( x = 0; x < i_size; x++ )        {            diff[x + y*i_size] = pix1[x] - pix2[x];        }        pix1 += i_pix1;        pix2 += i_pix2;    }}static void sub4x4_dct( int16_t dct[4][4], uint8_t *pix1, uint8_t *pix2 ){    int16_t d[4][4];    int16_t tmp[4][4];    int i;    pixel_sub_wxh( (int16_t*)d, 4, pix1, FENC_STRIDE, pix2, FDEC_STRIDE );    for( i = 0; i < 4; i++ )    {        const int s03 = d[i][0] + d[i][3];        const int s12 = d[i][1] + d[i][2];        const int d03 = d[i][0] - d[i][3];        const int d12 = d[i][1] - d[i][2];        tmp[0][i] =   s03 +   s12;        tmp[1][i] = 2*d03 +   d12;        tmp[2][i] =   s03 -   s12;        tmp[3][i] =   d03 - 2*d12;    }    for( i = 0; i < 4; i++ )    {        const int s03 = tmp[i][0] + tmp[i][3];        const int s12 = tmp[i][1] + tmp[i][2];        const int d03 = tmp[i][0] - tmp[i][3];        const int d12 = tmp[i][1] - tmp[i][2];        dct[i][0] =   s03 +   s12;        dct[i][1] = 2*d03 +   d12;        dct[i][2] =   s03 -   s12;        dct[i][3] =   d03 - 2*d12;    }}static void sub8x8_dct( int16_t dct[4][4][4], uint8_t *pix1, uint8_t *pix2 ){    sub4x4_dct( dct[0], &pix1[0], &pix2[0] );    sub4x4_dct( dct[1], &pix1[4], &pix2[4] );    sub4x4_dct( dct[2], &pix1[4*FENC_STRIDE+0], &pix2[4*FDEC_STRIDE+0] );    sub4x4_dct( dct[3], &pix1[4*FENC_STRIDE+4], &pix2[4*FDEC_STRIDE+4] );}static void sub16x16_dct( int16_t dct[16][4][4], uint8_t *pix1, uint8_t *pix2 ){    sub8x8_dct( &dct[ 0], &pix1[0], &pix2[0] );    sub8x8_dct( &dct[ 4], &pix1[8], &pix2[8] );    sub8x8_dct( &dct[ 8], &pix1[8*FENC_STRIDE+0], &pix2[8*FDEC_STRIDE+0] );    sub8x8_dct( &dct[12], &pix1[8*FENC_STRIDE+8], &pix2[8*FDEC_STRIDE+8] );}static void add4x4_idct( uint8_t *p_dst, int16_t dct[4][4] ){    int16_t d[4][4];    int16_t tmp[4][4];    int x, y;    int i;    for( i = 0; i < 4; i++ )    {        const int s02 =  dct[0][i]     +  dct[2][i];        const int d02 =  dct[0][i]     -  dct[2][i];        const int s13 =  dct[1][i]     + (dct[3][i]>>1);        const int d13 = (dct[1][i]>>1) -  dct[3][i];        tmp[i][0] = s02 + s13;        tmp[i][1] = d02 + d13;        tmp[i][2] = d02 - d13;        tmp[i][3] = s02 - s13;    }    for( i = 0; i < 4; i++ )    {        const int s02 =  tmp[0][i]     +  tmp[2][i];        const int d02 =  tmp[0][i]     -  tmp[2][i];        const int s13 =  tmp[1][i]     + (tmp[3][i]>>1);        const int d13 = (tmp[1][i]>>1) -  tmp[3][i];        d[0][i] = ( s02 + s13 + 32 ) >> 6;        d[1][i] = ( d02 + d13 + 32 ) >> 6;        d[2][i] = ( d02 - d13 + 32 ) >> 6;        d[3][i] = ( s02 - s13 + 32 ) >> 6;    }    for( y = 0; y < 4; y++ )    {        for( x = 0; x < 4; x++ )        {            p_dst[x] = clip_uint8( p_dst[x] + d[y][x] );        }        p_dst += FDEC_STRIDE;    }}static void add8x8_idct( uint8_t *p_dst, int16_t dct[4][4][4] ){    add4x4_idct( &p_dst[0],               dct[0] );    add4x4_idct( &p_dst[4],               dct[1] );    add4x4_idct( &p_dst[4*FDEC_STRIDE+0], dct[2] );    add4x4_idct( &p_dst[4*FDEC_STRIDE+4], dct[3] );}static void add16x16_idct( uint8_t *p_dst, int16_t dct[16][4][4] ){    add8x8_idct( &p_dst[0],               &dct[0] );    add8x8_idct( &p_dst[8],               &dct[4] );    add8x8_idct( &p_dst[8*FDEC_STRIDE+0], &dct[8] );    add8x8_idct( &p_dst[8*FDEC_STRIDE+8], &dct[12] );}/**************************************************************************** * 8x8 transform: ****************************************************************************/#define DCT8_1D {\    const int s07 = SRC(0) + SRC(7);\    const int s16 = SRC(1) + SRC(6);\    const int s25 = SRC(2) + SRC(5);\    const int s34 = SRC(3) + SRC(4);\    const int a0 = s07 + s34;\    const int a1 = s16 + s25;\    const int a2 = s07 - s34;\    const int a3 = s16 - s25;\    const int d07 = SRC(0) - SRC(7);\    const int d16 = SRC(1) - SRC(6);\    const int d25 = SRC(2) - SRC(5);\    const int d34 = SRC(3) - SRC(4);\    const int a4 = d16 + d25 + (d07 + (d07>>1));\    const int a5 = d07 - d34 - (d25 + (d25>>1));\    const int a6 = d07 + d34 - (d16 + (d16>>1));\    const int a7 = d16 - d25 + (d34 + (d34>>1));\    DST(0) =  a0 + a1     ;\    DST(1) =  a4 + (a7>>2);\    DST(2) =  a2 + (a3>>1);\    DST(3) =  a5 + (a6>>2);\    DST(4) =  a0 - a1     ;\    DST(5) =  a6 - (a5>>2);\    DST(6) = (a2>>1) - a3 ;\    DST(7) = (a4>>2) - a7 ;\}static void sub8x8_dct8( int16_t dct[8][8], uint8_t *pix1, uint8_t *pix2 ){    int i;    int16_t tmp[8][8];    pixel_sub_wxh( (int16_t*)tmp, 8, pix1, FENC_STRIDE, pix2, FDEC_STRIDE );#define SRC(x) tmp[x][i]#define DST(x) tmp[x][i]    for( i = 0; i < 8; i++ )        DCT8_1D#undef SRC#undef DST#define SRC(x) tmp[i][x]#define DST(x) dct[x][i]    for( i = 0; i < 8; i++ )        DCT8_1D#undef SRC#undef DST}static void sub16x16_dct8( int16_t dct[4][8][8], uint8_t *pix1, uint8_t *pix2 ){    sub8x8_dct8( dct[0], &pix1[0],               &pix2[0] );    sub8x8_dct8( dct[1], &pix1[8],               &pix2[8] );    sub8x8_dct8( dct[2], &pix1[8*FENC_STRIDE+0], &pix2[8*FDEC_STRIDE+0] );    sub8x8_dct8( dct[3], &pix1[8*FENC_STRIDE+8], &pix2[8*FDEC_STRIDE+8] );}#define IDCT8_1D {\    const int a0 =  SRC(0) + SRC(4);\    const int a2 =  SRC(0) - SRC(4);\    const int a4 = (SRC(2)>>1) - SRC(6);\    const int a6 = (SRC(6)>>1) + SRC(2);\    const int b0 = a0 + a6;\    const int b2 = a2 + a4;\    const int b4 = a2 - a4;\    const int b6 = a0 - a6;\    const int a1 = -SRC(3) + SRC(5) - SRC(7) - (SRC(7)>>1);\    const int a3 =  SRC(1) + SRC(7) - SRC(3) - (SRC(3)>>1);\    const int a5 = -SRC(1) + SRC(7) + SRC(5) + (SRC(5)>>1);\    const int a7 =  SRC(3) + SRC(5) + SRC(1) + (SRC(1)>>1);\    const int b1 = (a7>>2) + a1;\    const int b3 =  a3 + (a5>>2);\    const int b5 = (a3>>2) - a5;\    const int b7 =  a7 - (a1>>2);\    DST(0, b0 + b7);\    DST(1, b2 + b5);\    DST(2, b4 + b3);\    DST(3, b6 + b1);\    DST(4, b6 - b1);\    DST(5, b4 - b3);\    DST(6, b2 - b5);\    DST(7, b0 - b7);\}static void add8x8_idct8( uint8_t *dst, int16_t dct[8][8] ){    int i;    dct[0][0] += 32; // rounding for the >>6 at the end#define SRC(x)     dct[x][i]#define DST(x,rhs) dct[x][i] = (rhs)    for( i = 0; i < 8; i++ )        IDCT8_1D#undef SRC#undef DST#define SRC(x)     dct[i][x]#define DST(x,rhs) dst[i + x*FDEC_STRIDE] = clip_uint8( dst[i + x*FDEC_STRIDE] + ((rhs) >> 6) );    for( i = 0; i < 8; i++ )        IDCT8_1D#undef SRC#undef DST}static void add16x16_idct8( uint8_t *dst, int16_t dct[4][8][8] ){    add8x8_idct8( &dst[0],               dct[0] );    add8x8_idct8( &dst[8],               dct[1] );    add8x8_idct8( &dst[8*FDEC_STRIDE+0], dct[2] );    add8x8_idct8( &dst[8*FDEC_STRIDE+8], dct[3] );}/**************************************************************************** * x264_dct_init: ****************************************************************************/void x264_dct_init( int cpu, x264_dct_function_t *dctf ){    dctf->sub4x4_dct    = sub4x4_dct;    dctf->add4x4_idct   = add4x4_idct;    dctf->sub8x8_dct    = sub8x8_dct;    dctf->add8x8_idct   = add8x8_idct;    dctf->sub16x16_dct  = sub16x16_dct;    dctf->add16x16_idct = add16x16_idct;    dctf->sub8x8_dct8   = sub8x8_dct8;    dctf->add8x8_idct8  = add8x8_idct8;    dctf->sub16x16_dct8  = sub16x16_dct8;    dctf->add16x16_idct8 = add16x16_idct8;    dctf->dct4x4dc  = dct4x4dc;    dctf->idct4x4dc = idct4x4dc;    dctf->dct2x2dc  = dct2x2dc;    dctf->idct2x2dc = dct2x2dc;#ifdef HAVE_MMXEXT    if( cpu&X264_CPU_MMX )    {        dctf->sub4x4_dct    = x264_sub4x4_dct_mmx;        dctf->sub8x8_dct    = x264_sub8x8_dct_mmx;        dctf->sub16x16_dct  = x264_sub16x16_dct_mmx;        dctf->add4x4_idct   = x264_add4x4_idct_mmx;        dctf->add8x8_idct   = x264_add8x8_idct_mmx;        dctf->add16x16_idct = x264_add16x16_idct_mmx;        dctf->dct4x4dc      = x264_dct4x4dc_mmx;        dctf->idct4x4dc     = x264_idct4x4dc_mmx;#ifndef ARCH_X86_64        dctf->sub8x8_dct8   = x264_sub8x8_dct8_mmx;        dctf->sub16x16_dct8 = x264_sub16x16_dct8_mmx;        dctf->add8x8_idct8  = x264_add8x8_idct8_mmx;        dctf->add16x16_idct8= x264_add16x16_idct8_mmx;#endif    }#endif#if defined(HAVE_SSE2) && defined(ARCH_X86_64)    if( cpu&X264_CPU_SSE2 )    {        dctf->sub8x8_dct8   = x264_sub8x8_dct8_sse2;        dctf->sub16x16_dct8 = x264_sub16x16_dct8_sse2;        dctf->add8x8_idct8  = x264_add8x8_idct8_sse2;        dctf->add16x16_idct8= x264_add16x16_idct8_sse2;    }#endif#ifdef ARCH_PPC    if( cpu&X264_CPU_ALTIVEC )    {        dctf->sub4x4_dct    = x264_sub4x4_dct_altivec;        dctf->sub8x8_dct    = x264_sub8x8_dct_altivec;        dctf->sub16x16_dct  = x264_sub16x16_dct_altivec;    }#endif}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美图片一区二区三区| 精品国产一区久久| 日韩视频永久免费| 中文字幕佐山爱一区二区免费| 天堂成人免费av电影一区| 成人精品一区二区三区四区| 欧美日韩成人综合| 亚洲欧洲日韩一区二区三区| 久久99热狠狠色一区二区| 色综合久久综合网97色综合| 欧美xxxxxxxx| 亚洲成人一区二区| av在线播放不卡| 日韩精品最新网址| 亚洲综合一区二区精品导航| 国产ts人妖一区二区| 91精品国产色综合久久ai换脸| 中文字幕一区二区三区色视频 | 精品一区二区精品| 欧美日韩在线播放三区| 亚洲视频免费观看| 国产91富婆露脸刺激对白| 日韩一级二级三级| 亚洲大片在线观看| 欧美日韩中文字幕一区二区| 日韩美女啊v在线免费观看| 国产成人精品亚洲777人妖| 日韩欧美中文一区| 男女男精品网站| 欧美日韩国产一级片| 蜜乳av一区二区| 欧美剧情片在线观看| 亚洲国产另类av| 欧美日韩高清在线| 日韩精品一级中文字幕精品视频免费观看 | 国产精品1024久久| 久久这里都是精品| 韩国一区二区三区| 久久嫩草精品久久久精品一| 亚洲激情在线激情| 成人h动漫精品| 久久精品视频在线免费观看| 久久精品国产99国产精品| 欧美色涩在线第一页| 亚洲免费观看视频| 91在线你懂得| 亚洲欧洲成人精品av97| 九色|91porny| 久久一区二区三区国产精品| 激情深爱一区二区| www国产精品av| 国产一区二区导航在线播放| 欧美一区二区三区人| 日韩电影在线免费看| 欧美年轻男男videosbes| 尤物av一区二区| 在线观看不卡视频| 亚洲一区二区三区免费视频| 欧美在线一二三四区| 亚洲免费色视频| 欧美性xxxxx极品少妇| 国产精品色在线| 国产成人午夜精品影院观看视频 | 精品99一区二区| 久久99精品国产麻豆婷婷洗澡| 日韩西西人体444www| 老鸭窝一区二区久久精品| 欧美一区二区精品久久911| 青青国产91久久久久久| 精品久久久三级丝袜| 国产成人av一区二区三区在线观看| 国产欧美一区二区三区网站| 成人美女视频在线观看18| 自拍偷自拍亚洲精品播放| 高清在线不卡av| 中文字幕在线不卡| 日韩精品专区在线影院观看| 国产91精品久久久久久久网曝门| 亚洲日本免费电影| 欧美区视频在线观看| 精品中文字幕一区二区| 国产欧美日韩综合精品一区二区 | 国产精品一区二区三区99| 国产精品麻豆久久久| 成人精品电影在线观看| 亚洲成a人片在线不卡一二三区| 日韩视频在线你懂得| 99精品偷自拍| 日韩av一区二| 国产精品乱人伦中文| 欧美系列在线观看| 国产精品中文字幕日韩精品| 成人免费在线播放视频| 欧美肥妇毛茸茸| 九一九一国产精品| 中文字幕一区二区三区精华液 | 日本伊人色综合网| 国产午夜精品美女毛片视频| 欧美自拍偷拍一区| 国产黑丝在线一区二区三区| 亚洲va欧美va人人爽| 国产亚洲女人久久久久毛片| 欧美日韩日日骚| 成人午夜av在线| 久久精品国产99国产精品| 亚洲激情男女视频| 久久久国产精华| 欧美一二三区在线观看| 91色在线porny| 国产91精品欧美| 天堂成人国产精品一区| 亚洲综合自拍偷拍| 国产精品色婷婷| 精品久久免费看| 在线电影院国产精品| 91免费视频观看| 懂色av一区二区三区蜜臀| 日本不卡视频在线观看| 亚洲午夜精品在线| 亚洲欧美日韩国产一区二区三区 | 国产在线国偷精品产拍免费yy| 亚洲女同ⅹxx女同tv| 国产欧美一区二区在线观看| 91精品久久久久久久久99蜜臂| 欧美在线观看你懂的| 99久久久久久99| 国产成人精品免费网站| 麻豆成人在线观看| 美女脱光内衣内裤视频久久影院| 亚洲国产精品久久艾草纯爱| 亚洲精品你懂的| 一区二区三区欧美| 国产偷国产偷亚洲高清人白洁| 69堂成人精品免费视频| 欧美精品色综合| 欧美日韩国产精品成人| 欧美亚州韩日在线看免费版国语版| av不卡免费电影| 91啦中文在线观看| 91亚洲永久精品| 99久久精品99国产精品| 欧美视频精品在线观看| 欧美综合天天夜夜久久| 欧美三级三级三级爽爽爽| 精品视频一区三区九区| 欧美精品色一区二区三区| 欧美精品丝袜中出| 欧美电影在线免费观看| 欧美日韩日本视频| 日韩午夜精品电影| 欧美电影在线免费观看| 欧美成人精品3d动漫h| 久久久电影一区二区三区| 欧美经典一区二区| 中文字幕一区二区三| 亚洲精品视频观看| 日本视频中文字幕一区二区三区| 五月天激情小说综合| 蜜乳av一区二区三区| 国产91精品入口| 欧美吻胸吃奶大尺度电影| 欧美视频中文一区二区三区在线观看| jlzzjlzz国产精品久久| 这里只有精品电影| 国产午夜精品一区二区三区视频| 日韩一区在线免费观看| 亚洲一区二区精品视频| 精品一区二区三区视频在线观看| 国产高清在线精品| 欧美图区在线视频| 亚洲精品一区二区精华| 最近中文字幕一区二区三区| 亚洲v精品v日韩v欧美v专区| 国内精品视频666| 国产成人精品一区二| aa级大片欧美| 精品久久久久久无| 一区二区三区鲁丝不卡| 久久精品国产秦先生| 99riav一区二区三区| 日韩欧美中文字幕一区| 亚洲天堂中文字幕| 久久精品国产免费| 色先锋资源久久综合| 亚洲精品在线免费播放| 亚洲国产另类av| 成人看片黄a免费看在线| 在线影视一区二区三区| 91精品国产综合久久久久久漫画| 国产精品美女www爽爽爽| 日本不卡在线视频| 一本色道久久综合狠狠躁的推荐| 精品美女一区二区三区| 亚洲国产日韩精品| 成人的网站免费观看| 久久品道一品道久久精品| 日韩激情在线观看| 成人涩涩免费视频| 26uuu久久天堂性欧美| 香蕉加勒比综合久久|