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

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

?? mc.c

?? 絕對好的源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************** * mc.c: h264 encoder library (Motion Compensation) ***************************************************************************** * Copyright (C) 2003 Laurent Aimar * $Id: mc.c,v 1.1 2004/06/03 19:27:07 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 <stdio.h>#include <string.h>#include "common.h"#include "clip1.h"#ifdef HAVE_MMXEXT#include "i386/mc.h"#endif#ifdef ARCH_PPC#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;    }}static inline void pixel_avg_wxh( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int width, int height ){    int x, y;    for( y = 0; y < height; y++ )    {        for( x = 0; x < width; x++ )        {            dst[x] = ( dst[x] + src[x] + 1 ) >> 1;        }        dst += i_dst;        src += i_src;    }}#define PIXEL_AVG_C( name, width, height ) \static void name( uint8_t *pix1, int i_stride_pix1, \                  uint8_t *pix2, int i_stride_pix2 ) \{ \    pixel_avg_wxh( pix1, i_stride_pix1, pix2, i_stride_pix2, width, height ); \}PIXEL_AVG_C( pixel_avg_16x16, 16, 16 )PIXEL_AVG_C( pixel_avg_16x8,  16, 8 )PIXEL_AVG_C( pixel_avg_8x16,  8, 16 )PIXEL_AVG_C( pixel_avg_8x8,   8, 8 )PIXEL_AVG_C( pixel_avg_8x4,   8, 4 )PIXEL_AVG_C( pixel_avg_4x8,   4, 8 )PIXEL_AVG_C( pixel_avg_4x4,   4, 4 )PIXEL_AVG_C( pixel_avg_4x2,   4, 2 )PIXEL_AVG_C( pixel_avg_2x4,   2, 4 )PIXEL_AVG_C( pixel_avg_2x2,   2, 2 )/* Implicit weighted bipred only: * assumes log2_denom = 5, offset = 0, weight1 + weight2 = 64 */#define op_scale2(x) dst[x] = x264_clip_uint8( (dst[x]*i_weight1 + src[x]*i_weight2 + (1<<5)) >> 6 )static inline void pixel_avg_weight_wxh( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int width, int height, int i_weight1 ){    int y;    const int i_weight2 = 64 - i_weight1;    for(y=0; y<height; y++, dst += i_dst, src += i_src){        op_scale2(0);        op_scale2(1);        if(width==2) continue;        op_scale2(2);        op_scale2(3);        if(width==4) continue;        op_scale2(4);        op_scale2(5);        op_scale2(6);        op_scale2(7);        if(width==8) continue;        op_scale2(8);        op_scale2(9);        op_scale2(10);        op_scale2(11);        op_scale2(12);        op_scale2(13);        op_scale2(14);        op_scale2(15);    }}#define PIXEL_AVG_WEIGHT_C( width, height ) \static void pixel_avg_weight_##width##x##height( \                uint8_t *pix1, int i_stride_pix1, \                uint8_t *pix2, int i_stride_pix2, int i_weight1 ) \{ \    pixel_avg_weight_wxh( pix1, i_stride_pix1, pix2, i_stride_pix2, width, height, i_weight1 ); \}PIXEL_AVG_WEIGHT_C(16,16)PIXEL_AVG_WEIGHT_C(16,8)PIXEL_AVG_WEIGHT_C(8,16)PIXEL_AVG_WEIGHT_C(8,8)PIXEL_AVG_WEIGHT_C(8,4)PIXEL_AVG_WEIGHT_C(4,8)PIXEL_AVG_WEIGHT_C(4,4)PIXEL_AVG_WEIGHT_C(4,2)PIXEL_AVG_WEIGHT_C(2,4)PIXEL_AVG_WEIGHT_C(2,2)#undef op_scale2#undef PIXEL_AVG_WEIGHT_Ctypedef 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];        }    }}static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};static void mc_luma( uint8_t *src[4], int i_src_stride,                     uint8_t *dst,    int i_dst_stride,                     int mvx,int mvy,                     int i_width, int i_height ){    int qpel_idx = ((mvy&3)<<2) + (mvx&3);    int offset = (mvy>>2)*i_src_stride + (mvx>>2);    uint8_t *src1 = src[hpel_ref0[qpel_idx]] + offset + ((mvy&3) == 3) * i_src_stride;    if( qpel_idx & 5 ) /* qpel interpolation needed */    {        uint8_t *src2 = src[hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);        pixel_avg( dst, i_dst_stride, src1, i_src_stride,                   src2, i_src_stride, i_width, i_height );    }    else    {        mc_copy( src1, i_src_stride, dst, i_dst_stride, i_width, i_height );    }}static uint8_t *get_ref( uint8_t *src[4], int i_src_stride,                         uint8_t *dst,    int * i_dst_stride,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线区一区二视频| 亚洲丝袜自拍清纯另类| 国产精品综合在线视频| 国产欧美一区二区三区网站| 国产精品一区二区在线观看网站 | 奇米精品一区二区三区四区| 欧美一级黄色片| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 91精品国产综合久久香蕉的特点 | 成人av电影在线| 亚洲成人激情社区| 中文字幕免费观看一区| 欧美日韩高清一区| 7777精品伊人久久久大香线蕉完整版 | 成人av在线影院| 久久99久久精品| 亚洲夂夂婷婷色拍ww47| 中文字幕第一区综合| 91精品国产色综合久久| 一本色道久久综合亚洲aⅴ蜜桃| 日韩电影在线观看网站| 亚洲黄色录像片| 亚洲欧美日本韩国| 一区二区三区欧美日| 亚洲综合一区二区精品导航| 中文字幕在线播放不卡一区| 日韩欧美国产麻豆| 欧美一区二区三区播放老司机| 欧美中文字幕一区二区三区亚洲| 91无套直看片红桃| 日本高清无吗v一区| 色综合天天综合网天天看片| 91美女福利视频| 欧美影院一区二区| 日韩一区二区三| 欧美一卡二卡三卡| 久久久亚洲精华液精华液精华液| 久久精品欧美日韩| 日韩美女视频一区二区| 中文字幕亚洲欧美在线不卡| 亚洲一区二区三区四区五区中文| 午夜精品免费在线观看| 日本va欧美va瓶| 成人亚洲精品久久久久软件| 色94色欧美sute亚洲线路一久| 欧美久久一区二区| 国产精品久久久久一区| 天天av天天翘天天综合网色鬼国产 | 日本欧美在线看| 99精品国产热久久91蜜凸| 欧美性感一区二区三区| 精品国产91亚洲一区二区三区婷婷| 中文子幕无线码一区tr| 午夜激情综合网| 91一区二区在线观看| 26uuu精品一区二区在线观看| 中文字幕亚洲一区二区va在线| 久久99精品国产91久久来源| 色婷婷久久久亚洲一区二区三区| 国产三级精品三级在线专区| 毛片不卡一区二区| 欧美天堂一区二区三区| 中文字幕欧美一| 成年人午夜久久久| 国产视频一区二区在线| 精品一区二区三区不卡| 欧美一级高清大全免费观看| 亚洲图片欧美综合| 777色狠狠一区二区三区| 日日摸夜夜添夜夜添亚洲女人| 欧美亚洲国产一区二区三区va | 在线国产电影不卡| 性感美女极品91精品| 欧美日本一区二区三区| 天天操天天色综合| 欧美一级理论片| 精品中文av资源站在线观看| 精品sm在线观看| 豆国产96在线|亚洲| 亚洲精品国产无天堂网2021| 欧美视频一区二区三区四区| 亚洲18色成人| 欧美精品一区二区三区高清aⅴ| 国产一区二区视频在线播放| 国产女主播在线一区二区| 一本大道久久精品懂色aⅴ| 亚洲高清免费在线| 久久先锋资源网| 91一区二区三区在线播放| 免费av网站大全久久| 国产欧美va欧美不卡在线 | 91视频观看免费| 蜜臀av国产精品久久久久| 国产午夜精品理论片a级大结局| 91丨九色丨黑人外教| 美女视频免费一区| 亚洲人成精品久久久久久| 7777精品久久久大香线蕉| 国产成人av在线影院| 麻豆91在线观看| 香蕉av福利精品导航| 日韩一区欧美小说| 亚洲三级在线免费观看| 国产欧美日本一区二区三区| 精品久久人人做人人爽| 51精品秘密在线观看| 91福利在线观看| 日本高清不卡aⅴ免费网站| caoporn国产一区二区| 国产老妇另类xxxxx| 国产乱码精品一区二区三| 国产在线精品一区在线观看麻豆| 舔着乳尖日韩一区| 欧美aaa在线| 久久99最新地址| 国产精品996| 91麻豆免费看片| 精品一区二区久久| 欧美xxxx在线观看| 日本欧美一区二区在线观看| 国产日韩欧美高清| 麻豆精品国产91久久久久久| 一本高清dvd不卡在线观看| 国产欧美一区二区三区在线看蜜臀 | 久久婷婷色综合| 国产精品国产三级国产普通话三级| 亚洲欧洲综合另类在线| 亚洲国产裸拍裸体视频在线观看乱了 | 精品国产a毛片| 亚洲自拍偷拍网站| 国产九九视频一区二区三区| 色欧美乱欧美15图片| 欧美精品一区二区三区久久久| 国产精品私房写真福利视频| 亚洲乱码国产乱码精品精可以看 | 亚洲一级片在线观看| 国产一区 二区| 欧美日韩国产免费一区二区 | 亚洲电影一级片| a4yy欧美一区二区三区| 欧美国产1区2区| 国产一区二区三区四区五区入口| 欧美日韩国产综合久久| 日韩国产精品久久| 欧美日韩亚州综合| 亚洲chinese男男1069| 欧美艳星brazzers| 亚洲国产美女搞黄色| 欧美在线播放高清精品| 亚洲综合男人的天堂| 欧美日韩国产综合一区二区三区| 一区二区高清视频在线观看| 91老司机福利 在线| 国产精品久久久久一区二区三区共 | 最新中文字幕一区二区三区 | 久久精品一区二区三区不卡| 国产精品综合二区| 亚洲午夜激情网站| 久久嫩草精品久久久久| 94色蜜桃网一区二区三区| 亚洲一区在线观看免费 | 亚洲欧美色图小说| 日韩欧美国产一区二区在线播放 | 国产精品主播直播| 91行情网站电视在线观看高清版| 丝袜a∨在线一区二区三区不卡| 国产精品乱码人人做人人爱| 久久免费国产精品| www激情久久| 久久久www成人免费毛片麻豆| 日韩欧美不卡在线观看视频| 欧美三级资源在线| 91精品欧美一区二区三区综合在| 99久久精品一区| 国产精品亚洲专一区二区三区| 午夜不卡av在线| 亚洲自拍偷拍综合| 亚洲小少妇裸体bbw| 国产精品久久久久久久久图文区| 欧美精品 日韩| 日本久久一区二区三区| 国产成人精品一区二区三区四区| 亚洲一区视频在线| 亚洲综合色网站| 17c精品麻豆一区二区免费| 国产喂奶挤奶一区二区三区| 欧美一级一区二区| 欧美成人午夜电影| 26uuu国产电影一区二区| 久久久久久久国产精品影院| 久久综合给合久久狠狠狠97色69| 久久先锋影音av| 国产精品久久网站| 亚洲国产毛片aaaaa无费看 | 亚洲成a天堂v人片| 日韩成人伦理电影在线观看| 国产乱子伦视频一区二区三区| 高清国产一区二区三区| 欧美午夜理伦三级在线观看| 26uuu国产一区二区三区|