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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mc.c

?? 圖象壓縮程序
?? C
字號:
/***************************************************************************** * mc.c: h264 encoder library (Motion Compensation) ***************************************************************************** * Copyright (C) 2003 Laurent Aimar * $Id: mc.c,v 1.5 2004/03/25 12:10:42 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 <stdlib.h>#include <stdio.h>#include <string.h>#include <stdint.h>#include "../x264.h"#include "mc.h"#include "clip1.h"#ifdef HAVE_MMXEXT#   include "i386/mc.h"#endif#ifdef HAVE_ALTIVEC#   include "ppc/mc.h"#endifstatic inline int x264_tapfilter( uint8_t *pix, int i_pix_next ){    return pix[-2*i_pix_next] - 5*pix[-1*i_pix_next] + 20*(pix[0] + pix[1*i_pix_next]) - 5*pix[ 2*i_pix_next] + pix[ 3*i_pix_next];}static inline int x264_tapfilter1( uint8_t *pix ){    return pix[-2] - 5*pix[-1] + 20*(pix[0] + pix[1]) - 5*pix[ 2] + pix[ 3];}static inline void pixel_avg( uint8_t *dst,  int i_dst_stride,                              uint8_t *src1, int i_src1_stride,                              uint8_t *src2, int i_src2_stride,                              int i_width, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < i_width; x++ )        {            dst[x] = ( src1[x] + src2[x] + 1 ) >> 1;        }        dst  += i_dst_stride;        src1 += i_src1_stride;        src2 += i_src2_stride;    }}typedef void (*pf_mc_t)(uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height );static void mc_copy( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    int y;    for( y = 0; y < i_height; y++ )    {        memcpy( dst, src, i_width );        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hh( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < i_width; x++ )        {            dst[x] = x264_mc_clip1( ( x264_tapfilter1( &src[x] ) + 16 ) >> 5 );        }        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hv( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < i_width; x++ )        {            dst[x] = x264_mc_clip1( ( x264_tapfilter( &src[x], i_src_stride ) + 16 ) >> 5 );        }        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hc( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t *out;    uint8_t *pix;    int x, y;    for( x = 0; x < i_width; x++ )    {        int tap[6];        pix = &src[x];        out = &dst[x];        tap[0] = x264_tapfilter1( &pix[-2*i_src_stride] );        tap[1] = x264_tapfilter1( &pix[-1*i_src_stride] );        tap[2] = x264_tapfilter1( &pix[ 0*i_src_stride] );        tap[3] = x264_tapfilter1( &pix[ 1*i_src_stride] );        tap[4] = x264_tapfilter1( &pix[ 2*i_src_stride] );        for( y = 0; y < i_height; y++ )        {            tap[5] = x264_tapfilter1( &pix[ 3*i_src_stride] );            *out = x264_mc_clip1( ( tap[0] - 5*tap[1] + 20 * tap[2] + 20 * tap[3] -5*tap[4] + tap[5] + 512 ) >> 10 );            /* Next line */            pix += i_src_stride;            out += i_dst_stride;            tap[0] = tap[1];            tap[1] = tap[2];            tap[2] = tap[3];            tap[3] = tap[4];            tap[4] = tap[5];        }    }}/* mc I+H */static void mc_xy10( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp[16*16];    mc_hh( src, i_src_stride, tmp, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, src, i_src_stride, tmp, i_width, i_width, i_height );}static void mc_xy30( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp[16*16];    mc_hh( src, i_src_stride, tmp, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, src+1, i_src_stride, tmp, i_width, i_width, i_height );}/* mc I+V */static void mc_xy01( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp[16*16];    mc_hv( src, i_src_stride, tmp, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, src, i_src_stride, tmp, i_width, i_width, i_height );}static void mc_xy03( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp[16*16];    mc_hv( src, i_src_stride, tmp, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, src+i_src_stride, i_src_stride, tmp, i_width, i_width, i_height );}/* H+V */static void mc_xy11( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hv( src, i_src_stride, tmp1, i_width, i_width, i_height );    mc_hh( src, i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void mc_xy31( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hv( src+1, i_src_stride, tmp1, i_width, i_width, i_height );    mc_hh( src,   i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void mc_xy13( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hv( src,              i_src_stride, tmp1, i_width, i_width, i_height );    mc_hh( src+i_src_stride, i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void mc_xy33( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hv( src+1,            i_src_stride, tmp1, i_width, i_width, i_height );    mc_hh( src+i_src_stride, i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void mc_xy21( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hc( src, i_src_stride, tmp1, i_width, i_width, i_height );    mc_hh( src, i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void mc_xy12( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hc( src, i_src_stride, tmp1, i_width, i_width, i_height );    mc_hv( src, i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void mc_xy32( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hc( src,   i_src_stride, tmp1, i_width, i_width, i_height );    mc_hv( src+1, i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void mc_xy23( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t tmp1[16*16];    uint8_t tmp2[16*16];    mc_hc( src,              i_src_stride, tmp1, i_width, i_width, i_height );    mc_hh( src+i_src_stride, i_src_stride, tmp2, i_width, i_width, i_height );    pixel_avg( dst, i_dst_stride, tmp1, i_width, tmp2, i_width, i_width, i_height );}static void motion_compensation_luma( uint8_t *src, int i_src_stride,                                      uint8_t *dst, int i_dst_stride,                                      int mvx,int mvy,                                      int i_width, int i_height ){    static pf_mc_t pf_mc[4][4] =    /*XXX [dqy][dqx] */    {        { mc_copy,  mc_xy10,    mc_hh,      mc_xy30 },        { mc_xy01,  mc_xy11,    mc_xy21,    mc_xy31 },        { mc_hv,    mc_xy12,    mc_hc,      mc_xy32 },        { mc_xy03,  mc_xy13,    mc_xy23,    mc_xy33 },    };    src += (mvy >> 2) * i_src_stride + (mvx >> 2);    pf_mc[mvy&0x03][mvx&0x03]( src, i_src_stride, dst, i_dst_stride, i_width, i_height );}/* full chroma mc (ie until 1/8 pixel)*/static void motion_compensation_chroma( uint8_t *src, int i_src_stride,                                        uint8_t *dst, int i_dst_stride,                                        int mvx, int mvy,                                        int i_width, int i_height ){    uint8_t *srcp;    int x, y;    const int d8x = mvx&0x07;    const int d8y = mvy&0x07;    const int cA = (8-d8x)*(8-d8y);    const int cB = d8x    *(8-d8y);    const int cC = (8-d8x)*d8y;    const int cD = d8x    *d8y;    src  += (mvy >> 3) * i_src_stride + (mvx >> 3);    srcp = &src[i_src_stride];    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < i_width; x++ )        {            dst[x] = ( cA*src[x]  + cB*src[x+1] +                       cC*srcp[x] + cD*srcp[x+1] + 32 ) >> 6;        }        dst  += i_dst_stride;        src   = srcp;        srcp += i_src_stride;    }}void x264_mc_init( int cpu, x264_mc_t pf[2] ){    pf[MC_LUMA]   = motion_compensation_luma;    pf[MC_CHROMA] = motion_compensation_chroma;#ifdef HAVE_MMXEXT    if( cpu&X264_CPU_MMXEXT )    {        x264_mc_mmxext_init( pf );    }#endif#ifdef HAVE_ALTIVEC    if( cpu&X264_CPU_ALTIVEC )    {        x264_mc_altivec_init( pf );    }#endif}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲摸摸操操av| 精品少妇一区二区三区在线视频| 国产精品三级视频| 国产成a人无v码亚洲福利| 精品久久久久香蕉网| 国产精品亚洲一区二区三区在线| 国产亚洲欧美激情| 99精品桃花视频在线观看| 一区二区三区四区乱视频| 欧美精品在线视频| 国产一区二区三区免费观看| 中文字幕成人av| 欧美亚洲尤物久久| 精品午夜久久福利影院| 国产精品乱码一区二区三区软件 | 国产精品沙发午睡系列990531| 成人国产一区二区三区精品| 一区二区三区欧美在线观看| 日韩一区二区三免费高清| 国产麻豆9l精品三级站| 亚洲自拍偷拍网站| 久久一区二区三区国产精品| 91美女在线看| 欧美日免费三级在线| 免费在线观看视频一区| 国产精品毛片久久久久久久| 欧美美女一区二区在线观看| 岛国av在线一区| 亚洲不卡av一区二区三区| 久久免费的精品国产v∧| 日本韩国欧美一区二区三区| 国产一区二区三区免费| 亚洲电影视频在线| 欧美国产成人在线| 日韩午夜激情电影| 色婷婷亚洲婷婷| 国产麻豆视频精品| 日韩va亚洲va欧美va久久| 最新久久zyz资源站| 日韩一级片在线观看| 色综合欧美在线| 国产91富婆露脸刺激对白| 日韩二区在线观看| 一区二区三区在线影院| 国产日韩欧美精品一区| 欧美一区二区三区四区视频| 色呦呦国产精品| 波多野结衣91| 国产精品99久久久久久有的能看 | 国产精品成人免费| 精品精品国产高清a毛片牛牛 | 97精品视频在线观看自产线路二| 美女爽到高潮91| 亚洲第一综合色| 亚洲免费观看高清在线观看| 久久精品视频网| xnxx国产精品| 精品国产一区二区三区忘忧草 | 亚洲综合一二三区| 亚洲视频一区二区在线观看| 久久久国际精品| 欧美精品一区二区高清在线观看| 欧美视频在线播放| 欧美视频一区在线观看| 欧美色图一区二区三区| 一本久久综合亚洲鲁鲁五月天| 成人性生交大片免费看中文网站| 国产一区二区女| 国产一区欧美二区| 国产成人夜色高潮福利影视| 国产精品88av| 成人激情视频网站| 99re热这里只有精品视频| 成人av资源在线观看| 成人高清在线视频| av网站免费线看精品| av激情成人网| 中文字幕精品三区| 国产欧美精品一区二区色综合朱莉| 2023国产一二三区日本精品2022| 精品动漫一区二区三区在线观看| 久久综合给合久久狠狠狠97色69| 亚洲精品一区在线观看| 国产亚洲精品久| 亚洲欧洲性图库| 亚洲国产中文字幕| 日韩精品国产精品| 九一九一国产精品| 丰满亚洲少妇av| 色屁屁一区二区| 91麻豆精品国产91久久久 | 欧美国产欧美亚州国产日韩mv天天看完整| 久久网这里都是精品| 国产精品三级av在线播放| 中文字幕欧美一| 亚洲国产cao| 久久国产日韩欧美精品| www.亚洲色图| 欧美日本视频在线| 精品88久久久久88久久久| 国产精品久久777777| 亚洲午夜国产一区99re久久| 卡一卡二国产精品| 成人ar影院免费观看视频| 在线视频亚洲一区| 日韩美女在线视频| 成人免费一区二区三区视频 | 日韩美女主播在线视频一区二区三区| 国产亚洲一二三区| 亚洲在线观看免费| 国产剧情一区二区三区| 日本高清成人免费播放| 日韩午夜激情视频| 亚洲欧美精品午睡沙发| 麻豆一区二区在线| 99久久伊人久久99| 欧美大片免费久久精品三p| 亚洲人一二三区| 久久se精品一区精品二区| 91性感美女视频| 26uuu欧美| 亚洲sss视频在线视频| 国产成人亚洲精品狼色在线| 欧美日韩日日夜夜| 国产精品电影院| 久久精品国产免费看久久精品| 91亚洲国产成人精品一区二区三| 欧美mv和日韩mv的网站| 亚洲综合久久av| av在线不卡网| 久久午夜老司机| 日日摸夜夜添夜夜添精品视频| 99在线视频精品| 中文字幕高清不卡| 91精品国产综合久久福利软件| 日韩欧美一区二区三区在线| 久久久影院官网| 天堂va蜜桃一区二区三区| 色综合久久久久综合体| 中文字幕成人在线观看| 精品无码三级在线观看视频| 欧美精品久久天天躁| 国产成人精品亚洲777人妖| 欧美猛男男办公室激情| 一区二区三区四区蜜桃| 东方aⅴ免费观看久久av| 精品国产麻豆免费人成网站| 亚洲成人av中文| 欧美中文字幕不卡| 亚洲综合色丁香婷婷六月图片| av中文一区二区三区| 亚洲国产成人自拍| 国产成人在线免费| 国产日韩欧美制服另类| 韩国精品免费视频| 久久视频一区二区| 国内不卡的二区三区中文字幕| 日韩一区二区三区免费看 | 欧美视频中文字幕| 一区二区三区国产精品| 99国产欧美久久久精品| 国产精品久久久久影院亚瑟| 成人免费视频国产在线观看| 国产精品美女视频| 成人午夜av在线| 国产精品麻豆久久久| 成人黄色小视频| **网站欧美大片在线观看| proumb性欧美在线观看| 亚洲欧美日韩国产一区二区三区| 成人污视频在线观看| 国产精品美女久久久久aⅴ国产馆| 风间由美一区二区三区在线观看| 国产精品欧美极品| 91浏览器在线视频| 亚洲一区二区三区在线| 6080午夜不卡| 青青草原综合久久大伊人精品| 日韩免费电影一区| 国产盗摄视频一区二区三区| 国产精品久久久久久久久免费樱桃| 国产成人免费视频| 亚洲精品欧美二区三区中文字幕| 日本韩国欧美在线| 日韩 欧美一区二区三区| 久久亚洲免费视频| 91一区二区三区在线播放| 夜夜精品浪潮av一区二区三区| 欧美日本在线观看| 国内精品国产成人国产三级粉色| 国产欧美日韩精品a在线观看| 色香蕉成人二区免费| 天天av天天翘天天综合网| 精品国产sm最大网站| 91亚洲午夜精品久久久久久| 日本欧美在线观看| 国产女主播在线一区二区| 欧美日韩一区二区三区在线看 | 色综合婷婷久久| 午夜伊人狠狠久久|