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

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

?? mc.c

?? 圖象壓縮程序
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***************************************************************************** * mc.c: h264 encoder library (Motion Compensation) ***************************************************************************** * Copyright (C) 2003 Laurent Aimar * $Id: mc.c,v 1.1 2003/11/09 23:25:04 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 "../mc.h"#include "../clip1.h"#include "mc.h"#define UNUSED_UINT64( foo ) \    static const uint64_t foo __asm__ (#foo)  __attribute__((unused))UNUSED_UINT64( x264_w0x10 ) = 0x0010001000100010ULL;static 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_w4( uint8_t *dst,  int i_dst_stride,                                 uint8_t *src1, int i_src1_stride,                                 uint8_t *src2, int i_src2_stride,                                 int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < 4; 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_w8( uint8_t *dst,  int i_dst_stride,                                 uint8_t *src1, int i_src1_stride,                                 uint8_t *src2, int i_src2_stride,                                 int i_height ){    int y;    for( y = 0; y < i_height; y++ )    {        asm volatile(            "movq (%1), %%mm0\n"            "movq (%2), %%mm1\n"            "pavgb %%mm1, %%mm0\n"            "movq %%mm0, (%0)\n"            : : "r"(dst), "r"(src1), "r"(src2)            );        dst  += i_dst_stride;        src1 += i_src1_stride;        src2 += i_src2_stride;    }}static inline void pixel_avg_w16( uint8_t *dst,  int i_dst_stride,                                  uint8_t *src1, int i_src1_stride,                                  uint8_t *src2, int i_src2_stride,                                  int i_height ){    int y;    for( y = 0; y < i_height; y++ )    {        asm volatile(            "movq (%1), %%mm0\n"            "movq 8(%1), %%mm2\n"            "movq (%2), %%mm1\n"            "movq 8(%2), %%mm3\n"            "pavgb %%mm1, %%mm0\n"            "movq %%mm0, (%0)\n"            "pavgb %%mm3, %%mm2\n"            "movq %%mm2, 8(%0)\n"            : : "r"(dst), "r"(src1), "r"(src2)            );        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_height );/***************************************************************************** * MC with width == 4 (height <= 8) *****************************************************************************/static void mc_copy_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    int y;    for( y = 0; y < i_height; y++ )    {        memcpy( dst, src, 4 );        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hh_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < 4; 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_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    int y;    src -= 2 * i_src_stride;    asm volatile(        "pxor %%mm7,        %%mm7\n"        "movq x264_w0x10,   %%mm4\n" : : );    for( y = 0; y < i_height; y++ )    {        asm volatile(            "leal   (%0, %1),   %%eax\n"            "movd       (%0),   %%mm0\n"    /* load pix-2 */            "punpcklbw  %%mm7,  %%mm0\n"            "movd       (%%eax),%%mm1\n"    /* load pix-1 */            "punpcklbw  %%mm7,  %%mm1\n"            "psubw      %%mm1,  %%mm0\n"            "psllw      $2,     %%mm1\n"            "psubw      %%mm1,  %%mm0\n"            "movd       (%%eax,%1),%%mm1\n"  /* load pix */            "punpcklbw  %%mm7,  %%mm1\n"            "psllw      $2,     %%mm1\n"            "paddw      %%mm1,  %%mm0\n"            "psllw      $2,     %%mm1\n"            "paddw      %%mm1,  %%mm0\n"            "movd       (%%eax,%1,2),%%mm1\n"  /* load pix+1 */            "punpcklbw  %%mm7,  %%mm1\n"            "psllw      $2,     %%mm1\n"            "paddw      %%mm1,  %%mm0\n"            "psllw      $2,     %%mm1\n"            "paddw      %%mm1,  %%mm0\n"            "movd       (%0,%1,4),%%mm1\n"  /* load pix+2 */            "punpcklbw  %%mm7,  %%mm1\n"            "psubw      %%mm1,  %%mm0\n"            "psllw      $2,     %%mm1\n"            "psubw      %%mm1,  %%mm0\n"            "movd       (%%eax,%1,4),%%mm1\n"  /* load pix+3 */            "punpcklbw  %%mm7,  %%mm1\n"            "paddw      %%mm1,  %%mm0\n"            "paddw      %%mm4,  %%mm0\n"            "psraw      $5,     %%mm0\n"            "packuswb   %%mm7,  %%mm0\n"            "movd       %%mm0,  (%2)\n"            : : "r"(src), "r"(i_src_stride), "r"(dst) : "%eax" );        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hc_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){#if 0    uint8_t *out;    uint8_t *pix;    int x, y;    for( x = 0; x < 4; 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];        }    }#else    int i, x, y;    for( y = 0; y < i_height; y++ )    {        int16_t tap[5+4];        for( i = 0; i < 5+4; i++ )        {            tap[i] = x264_tapfilter( &src[-2+i], i_src_stride );        }        for( x = 0; x < 4; x++ )        {            dst[x] = x264_mc_clip1( ( tap[0+x] - 5*tap[1+x] + 20 * tap[2+x] + 20 * tap[3+x] -5*tap[4+x] + tap[5+x] + 512 ) >> 10 );        }        src += i_src_stride;        dst += i_dst_stride;    }#endif}/* mc I+H */static void mc_xy10_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp[4*8];    mc_hh_w4( src, i_src_stride, tmp, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, src, i_src_stride, tmp, 4, i_height );}static void mc_xy30_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp[4*8];    mc_hh_w4( src, i_src_stride, tmp, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, src+1, i_src_stride, tmp, 4, i_height );}/* mc I+V */static void mc_xy01_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp[4*8];    mc_hv_w4( src, i_src_stride, tmp, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, src, i_src_stride, tmp, 4, i_height );}static void mc_xy03_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp[4*8];    mc_hv_w4( src, i_src_stride, tmp, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, src+i_src_stride, i_src_stride, tmp, 4, i_height );}/* H+V */static void mc_xy11_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hv_w4( src, i_src_stride, tmp1, 4, i_height );    mc_hh_w4( src, i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}static void mc_xy31_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hv_w4( src+1, i_src_stride, tmp1, 4, i_height );    mc_hh_w4( src,   i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}static void mc_xy13_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hv_w4( src,              i_src_stride, tmp1, 4, i_height );    mc_hh_w4( src+i_src_stride, i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}static void mc_xy33_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hv_w4( src+1,            i_src_stride, tmp1, 4, i_height );    mc_hh_w4( src+i_src_stride, i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}static void mc_xy21_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hc_w4( src, i_src_stride, tmp1, 4, i_height );    mc_hh_w4( src, i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}static void mc_xy12_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hc_w4( src, i_src_stride, tmp1, 4, i_height );    mc_hv_w4( src, i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}static void mc_xy32_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hc_w4( src,   i_src_stride, tmp1, 4, i_height );    mc_hv_w4( src+1, i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}static void mc_xy23_w4( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    uint8_t tmp1[4*8];    uint8_t tmp2[4*8];    mc_hc_w4( src,              i_src_stride, tmp1, 4, i_height );    mc_hh_w4( src+i_src_stride, i_src_stride, tmp2, 4, i_height );    pixel_avg_w4( dst, i_dst_stride, tmp1, 4, tmp2, 4, i_height );}/***************************************************************************** * MC with width == 8 (height <= 16) *****************************************************************************/static void mc_copy_w8( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    int y;    for( y = 0; y < i_height; y++ )    {        memcpy( dst, src, 8 );        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hh_w8( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < 8; x++ )        {            dst[x] = x264_mc_clip1( ( x264_tapfilter1( &src[x] ) + 16 ) >> 5 );        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久一日本道色综合| 91福利在线导航| 欧美精品一区男女天堂| 欧美精品一区二区三区在线| 麻豆国产一区二区| 欧美中文字幕一区二区三区 | 国产精品人成在线观看免费| 国产.欧美.日韩| 一区二区三区高清| 成人在线综合网| 一区二区三区国产精华| 91.麻豆视频| 国产福利一区二区三区视频在线 | 精品污污网站免费看| 日韩精品欧美精品| 久久久精品影视| 色成年激情久久综合| 免费在线观看一区| 91精品视频网| 亚洲一区中文日韩| 久久综合九色综合欧美就去吻| 亚洲国产日韩a在线播放| 日韩视频免费直播| av电影在线观看一区| 日本一区二区免费在线观看视频| 精品午夜久久福利影院| 中文字幕在线不卡一区二区三区| 国产夫妻精品视频| 亚洲一区二区高清| 久久久欧美精品sm网站| 韩国午夜理伦三级不卡影院| 国产精品视频第一区| 欧美伦理影视网| 成人综合在线观看| 欧美a级理论片| 悠悠色在线精品| 欧美视频一区二区三区| 国产成人免费网站| 国产精品久久99| 欧美一级夜夜爽| 91成人在线观看喷潮| 国产激情一区二区三区桃花岛亚洲| 一区二区三区日本| 久久久国产午夜精品| 欧美另类高清zo欧美| 99精品热视频| 国产精品影视在线| 蜜桃视频在线观看一区| 欧美成人精品1314www| 狠狠色丁香婷婷综合| 亚洲国产精品麻豆| 1024国产精品| 国产欧美视频一区二区| 欧美www视频| 成人国产精品免费观看| 九色porny丨国产精品| 亚洲资源在线观看| 亚洲图片另类小说| 中文字幕制服丝袜成人av| 久久免费国产精品| 欧美一区二区三区影视| 欧美日韩国产a| 精品视频免费看| 在线视频欧美区| 一本久久综合亚洲鲁鲁五月天| 亚洲国产日韩精品| 精品国产亚洲一区二区三区在线观看| 国产a久久麻豆| 国产伦精品一区二区三区免费| 国产精品久久久久aaaa樱花| 欧美日韩第一区日日骚| 国产精品亚洲一区二区三区在线| 中文字幕av一区二区三区高| 久久毛片高清国产| 久久青草欧美一区二区三区| 久久先锋影音av鲁色资源网| 菠萝蜜视频在线观看一区| 国产丶欧美丶日本不卡视频| 亚洲综合网站在线观看| 亚洲成人av一区二区三区| 亚洲电影在线播放| 欧美韩国一区二区| 中文幕一区二区三区久久蜜桃| 欧美日韩激情一区二区三区| 精品视频在线视频| 欧美一区二区日韩| 精品剧情v国产在线观看在线| 91在线免费视频观看| 91麻豆精品秘密| 欧美在线一区二区三区| 欧美性感一区二区三区| 91精品婷婷国产综合久久竹菊| 日本韩国欧美在线| 粉嫩绯色av一区二区在线观看| 丝袜美腿亚洲一区| 免费欧美高清视频| 国产69精品久久久久毛片| 91在线porny国产在线看| 欧美色图在线观看| 亚洲精品一区二区三区在线观看| 欧美亚洲国产bt| 欧美一区二区三区视频在线观看| 一本到不卡免费一区二区| 欧美人体做爰大胆视频| 在线视频一区二区三| 日韩精品在线看片z| 久久精品视频一区二区三区| 亚洲三级免费观看| 日韩avvvv在线播放| 国产精品亚洲第一区在线暖暖韩国 | 1区2区3区精品视频| 亚洲自拍偷拍九九九| 美女一区二区三区| 99热在这里有精品免费| 这里是久久伊人| 国产精品久久久久国产精品日日| 国产欧美精品一区二区三区四区| 久久综合九色综合97婷婷女人| 欧美大白屁股肥臀xxxxxx| 国产精品入口麻豆九色| 国产日产欧美精品一区二区三区| xfplay精品久久| 久久精品夜色噜噜亚洲aⅴ| 亚洲精品va在线观看| 国产福利精品导航| 91精品国产综合久久福利| 日韩亚洲欧美一区| 亚洲人成网站影音先锋播放| 美女一区二区三区在线观看| 色久综合一二码| 国产午夜久久久久| 麻豆极品一区二区三区| 欧美亚洲一区二区在线| 国产精品伦理在线| 亚洲人吸女人奶水| 国产在线不卡一卡二卡三卡四卡| 国产成人午夜精品影院观看视频| 国产精品亚洲成人| 欧美成人一级视频| 日韩1区2区3区| 欧美系列在线观看| 亚洲视频在线一区观看| 国产精品一区二区果冻传媒| 欧美一区二区久久| 国产精品污www在线观看| 韩国三级中文字幕hd久久精品| 99精品欧美一区| 中文字幕欧美日本乱码一线二线| 亚洲色图.com| 日韩国产一区二| 国产成人精品影院| 久久精品视频网| 国产老女人精品毛片久久| 91精品国产综合久久精品性色| 久久久国产一区二区三区四区小说| 亚洲视频在线一区二区| 成人免费视频免费观看| 国产肉丝袜一区二区| 国产曰批免费观看久久久| 欧美成人bangbros| 美女精品一区二区| 91丨porny丨户外露出| 欧美日韩高清一区二区| 午夜久久久影院| 欧美日韩在线三区| 日韩激情在线观看| 99热国产精品| 亚洲私人黄色宅男| 欧美三级在线视频| 亚洲高清免费视频| 欧美精品第1页| 亚洲色欲色欲www在线观看| eeuss鲁一区二区三区| 日韩免费视频一区二区| 韩国女主播一区| 国产日韩亚洲欧美综合| 99精品欧美一区二区三区小说| 精品国产91乱码一区二区三区| 亚洲人成网站色在线观看| 国产呦萝稀缺另类资源| 日本一二三四高清不卡| 一本大道av伊人久久综合| 国产亚洲综合性久久久影院| 丰满少妇久久久久久久| 亚洲四区在线观看| 欧美日韩高清影院| 国产在线视频精品一区| 国产精品成人免费在线| 国内外精品视频| 国产精品狼人久久影院观看方式| 精品在线观看免费| 欧美国产成人在线| 欧美三级午夜理伦三级中视频| 亚洲人吸女人奶水| 成人涩涩免费视频| 亚洲18影院在线观看| 精品欧美一区二区在线观看| 丁香婷婷综合激情五月色| 亚洲已满18点击进入久久| 亚洲精品一区二区三区99|