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

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

?? reduced.c

?? 從FFMPEG轉換而來的H264解碼程序,VC下編譯..
?? C
字號:
/*****************************************************************************
 *
 *  XVID MPEG-4 VIDEO CODEC
 *   Reduced-Resolution utilities
 *
 *  Copyright(C) 2002 Pascal Massimino <skal@planet-d.net>
 *
 *  XviD 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-1307 USA
 *
 * $Id: reduced.c,v 1.4 2004/05/31 21:36:23 edgomez Exp $
 *
 ****************************************************************************/

#include "../portab.h"
#include "../global.h"
#include "reduced.h"

/* function pointers */
COPY_UPSAMPLED_8X8_16TO8 * copy_upsampled_8x8_16to8;
ADD_UPSAMPLED_8X8_16TO8 * add_upsampled_8x8_16to8;
VFILTER_31 * vfilter_31;
HFILTER_31 * hfilter_31;
FILTER_18X18_TO_8X8 * filter_18x18_to_8x8;
FILTER_DIFF_18X18_TO_8X8 * filter_diff_18x18_to_8x8;

/*----------------------------------------------------------------------------
 * Upsampling (1/3/3/1) filter
 *--------------------------------------------------------------------------*/

#define ADD(dst,src)  (dst) = CLIP((dst)+(src), 0, 255)

static __inline void Filter_31(uint8_t *Dst1, uint8_t *Dst2,
                             const int16_t *Src1, const int16_t *Src2)
{
    /* Src[] is assumed to be >=0. So we can use ">>2" instead of "/2" */
  int16_t a = (3*Src1[0]+  Src2[0]+2) >> 2;
  int16_t b = (  Src1[0]+3*Src2[0]+2) >> 2;
  Dst1[0] = CLIP(a, 0, 255);
  Dst2[0] = CLIP(b, 0, 255);
}

static __inline void Filter_9331(uint8_t *Dst1, uint8_t *Dst2,
                               const int16_t *Src1, const int16_t *Src2)
{
    /* Src[] is assumed to be >=0. So we can use ">>4" instead of "/16" */
  int16_t a = (9*Src1[0]+  3*Src1[1]+ 3*Src2[0] + 1*Src2[1] + 8) >> 4;
  int16_t b = (3*Src1[0]+  9*Src1[1]+ 1*Src2[0] + 3*Src2[1] + 8) >> 4;
  int16_t c = (3*Src1[0]+  1*Src1[1]+ 9*Src2[0] + 3*Src2[1] + 8) >> 4;
  int16_t d = (1*Src1[0]+  3*Src1[1]+ 3*Src2[0] + 9*Src2[1] + 8) >> 4;
  Dst1[0] = CLIP(a, 0, 255);
  Dst1[1] = CLIP(b, 0, 255);
  Dst2[0] = CLIP(c, 0, 255);
  Dst2[1] = CLIP(d, 0, 255);
}

void xvid_Copy_Upsampled_8x8_16To8_C(uint8_t *Dst, const int16_t *Src, const int BpS)
{
  int x, y;

  Dst[0] = CLIP(Src[0], 0, 255);
  for(x=0; x<7; ++x) Filter_31(Dst+2*x+1, Dst+2*x+2, Src+x, Src+x+1);
  Dst[15] = CLIP(Src[7], 0, 255);
  Dst += BpS;
  for(y=0; y<7; ++y) {
    uint8_t *const Dst2 = Dst + BpS;
    Filter_31(Dst, Dst2, Src, Src+8);
    for(x=0; x<7; ++x)
      Filter_9331(Dst+2*x+1, Dst2+2*x+1, Src+x, Src+x+8);
    Filter_31(Dst+15, Dst2+15, Src+7, Src+7+8);
    Src += 8;
    Dst += 2*BpS;
  }
  Dst[0] = CLIP(Src[0], 0, 255);
  for(x=0; x<7; ++x) Filter_31(Dst+2*x+1, Dst+2*x+2, Src+x, Src+x+1);
  Dst[15] = CLIP(Src[7], 0, 255);
}

static __inline void Filter_Add_31(uint8_t *Dst1, uint8_t *Dst2,
                             const int16_t *Src1, const int16_t *Src2)
{
    /* Here, we must use "/4", since Src[] is in [-256, 255] */
  int16_t a = (3*Src1[0]+  Src2[0] + 2) / 4;
  int16_t b = (  Src1[0]+3*Src2[0] + 2) / 4;
  ADD(Dst1[0], a);
  ADD(Dst2[0], b);
}

static __inline void Filter_Add_9331(uint8_t *Dst1, uint8_t *Dst2,
                                   const int16_t *Src1, const int16_t *Src2)
{
  int16_t a = (9*Src1[0]+  3*Src1[1]+ 3*Src2[0] + 1*Src2[1] + 8) / 16;
  int16_t b = (3*Src1[0]+  9*Src1[1]+ 1*Src2[0] + 3*Src2[1] + 8) / 16;
  int16_t c = (3*Src1[0]+  1*Src1[1]+ 9*Src2[0] + 3*Src2[1] + 8) / 16;
  int16_t d = (1*Src1[0]+  3*Src1[1]+ 3*Src2[0] + 9*Src2[1] + 8) / 16;
  ADD(Dst1[0], a);
  ADD(Dst1[1], b);
  ADD(Dst2[0], c);
  ADD(Dst2[1], d);
}

void xvid_Add_Upsampled_8x8_16To8_C(uint8_t *Dst, const int16_t *Src, const int BpS)
{
  int x, y;

  ADD(Dst[0], Src[0]);
  for(x=0; x<7; ++x) Filter_Add_31(Dst+2*x+1, Dst+2*x+2, Src+x, Src+x+1);
  ADD(Dst[15], Src[7]);
  Dst += BpS;
  for(y=0; y<7; ++y) {
    uint8_t *const Dst2 = Dst + BpS;
    Filter_Add_31(Dst, Dst2, Src, Src+8);
    for(x=0; x<7; ++x)
      Filter_Add_9331(Dst+2*x+1, Dst2+2*x+1, Src+x, Src+x+8);
    Filter_Add_31(Dst+15, Dst2+15, Src+7, Src+7+8);
    Src += 8;
    Dst += 2*BpS;
  }
  ADD(Dst[0], Src[0]);
  for(x=0; x<7; ++x) Filter_Add_31(Dst+2*x+1, Dst+2*x+2, Src+x, Src+x+1);
  ADD(Dst[15], Src[7]);
}
#undef ADD

/*----------------------------------------------------------------------------
 * horizontal and vertical deblocking
 *--------------------------------------------------------------------------*/

void xvid_HFilter_31_C(uint8_t *Src1, uint8_t *Src2, int Nb_Blks)
{
  Nb_Blks *= 8;
  while(Nb_Blks-->0) {
    uint8_t a = ( 3*Src1[0] + 1*Src2[0] + 2 ) >> 2;
    uint8_t b = ( 1*Src1[0] + 3*Src2[0] + 2 ) >> 2;
    *Src1++ = a;
    *Src2++ = b;
  }
}

void xvid_VFilter_31_C(uint8_t *Src1, uint8_t *Src2, const int BpS, int Nb_Blks)
{
  Nb_Blks *= 8;
  while(Nb_Blks-->0) {
    uint8_t a = ( 3*Src1[0] + 1*Src2[0] + 2 ) >> 2;
    uint8_t b = ( 1*Src1[0] + 3*Src2[0] + 2 ) >> 2;
    *Src1 = a;
    *Src2 = b;
    Src1 += BpS;
    Src2 += BpS;
  }
}

/*----------------------------------------------------------------------------
 * 16x16 -> 8x8  (1/3/3/1) downsampling
 *
 * Warning! These read 1 pixel outside of the input 16x16 block!
 *--------------------------------------------------------------------------*/

void xvid_Filter_18x18_To_8x8_C(int16_t *Dst, const uint8_t *Src, const int BpS)
{
  int16_t *T, Tmp[18*8];
  int i, j;

  T = Tmp;
  Src -= BpS;
  for(j=-1; j<17; j++) {
    for(i=0; i<8; ++i)
      T[i] = Src[2*i-1] + 3*Src[2*i+0] + 3*Src[2*i+1] + Src[2*i+2];
    T += 8;
    Src += BpS;
  }
  T = Tmp + 8;
  for(j=0; j<8; j++) {
    for(i=0; i<8; ++i)
      Dst[i] = ( T[-8+i] + 3*T[0+i] + 3*T[8+i] + T[16+i] + 32 ) / 64;
    Dst += 8;
    T += 16;
  }
}

void xvid_Filter_Diff_18x18_To_8x8_C(int16_t *Dst, const uint8_t *Src, const int BpS)
{
  int16_t *T, Tmp[18*8];
  int i, j;

  T = Tmp;
  Src -= BpS;
  for(j=-1; j<17; j++) {
    for(i=0; i<8; ++i)
      T[i] = Src[2*i-1] + 3*Src[2*i+0] + 3*Src[2*i+1] + Src[2*i+2];
    T += 8;
    Src += BpS;
  }
  T = Tmp;
  for(j=0; j<8; j++) {
    for(i=0; i<8; ++i)
      Dst[i] -= ( T[i] + 3*T[8+i] + 3*T[16+i] + T[24+i] + 32 ) / 64;
    Dst += 8;
    T += 16;
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区不卡在线观看| 欧美一区二区播放| 亚洲婷婷在线视频| 在线观看www91| 午夜电影久久久| 欧美一级高清大全免费观看| 极品美女销魂一区二区三区 | 成人午夜电影小说| 亚洲欧洲精品一区二区三区| 欧美午夜在线一二页| 美女mm1313爽爽久久久蜜臀| 中文字幕高清不卡| 欧美视频完全免费看| 极品尤物av久久免费看| 中文字幕在线观看一区| 欧美日本韩国一区| 国产美女在线观看一区| 一区二区三区不卡在线观看| 日韩精品一区二区三区视频在线观看| 国产乱对白刺激视频不卡| 18成人在线观看| 日韩一级欧美一级| 97精品超碰一区二区三区| 轻轻草成人在线| 成人免费在线视频观看| 91精品国产综合久久久蜜臀粉嫩| 国产精品一区二区久久精品爱涩 | 国产视频在线观看一区二区三区 | 色综合久久久久综合体桃花网| 日韩精品一级中文字幕精品视频免费观看 | 日韩精品专区在线| 91麻豆国产精品久久| 久久精品99国产国产精| 亚洲男人都懂的| 久久日韩精品一区二区五区| 欧美日韩视频在线观看一区二区三区| 久久精品国产99国产| 一区二区在线免费观看| 久久久久久久精| 欧美狂野另类xxxxoooo| 成人av网站在线| 国产裸体歌舞团一区二区| 午夜激情久久久| 一级日本不卡的影视| 中文成人av在线| 精品久久久久久久久久久久久久久久久| 99久久精品国产精品久久| 蜜臀国产一区二区三区在线播放| 亚洲人成小说网站色在线 | 91丨porny丨国产| 精品一区二区三区在线观看国产| 亚洲一级二级在线| 国产精品久久精品日日| 精品sm捆绑视频| 欧美精品久久一区| 欧美在线免费观看亚洲| 99国产精品久| 91小视频免费看| 成人黄色在线网站| 成人av网址在线| 岛国一区二区三区| 高清日韩电视剧大全免费| 九九国产精品视频| 另类小说一区二区三区| 蜜臀av一级做a爰片久久| 日本亚洲天堂网| 热久久久久久久| 日韩精品高清不卡| 日本一不卡视频| 免费观看一级欧美片| 青青草成人在线观看| 五月婷婷综合在线| 青青草国产精品97视觉盛宴| 视频精品一区二区| 日本在线播放一区二区三区| 天天综合网 天天综合色| 午夜免费欧美电影| 日韩1区2区3区| 久久黄色级2电影| 国产精品一区免费在线观看| 国产精品一区二区91| 国产激情视频一区二区在线观看| 国产一区二区三区四| 国产999精品久久久久久| 国产suv精品一区二区三区| 国产iv一区二区三区| 99在线精品视频| 91福利视频网站| 在线观看91av| 精品久久国产字幕高潮| 日本一区二区三区高清不卡| 自拍偷在线精品自拍偷无码专区| 一区二区三区在线播放| 日韩黄色片在线观看| 国产一区二区三区高清播放| 成人黄页在线观看| 欧美日韩激情一区二区三区| 日韩欧美一区二区不卡| 国产精品网曝门| 亚洲成人午夜影院| 国产综合色在线视频区| 97久久精品人人做人人爽 | 国产一区二区三区综合| 成人激情小说乱人伦| 欧美主播一区二区三区美女| 欧美大片在线观看一区| 日本一区二区三区dvd视频在线| 亚洲另类在线制服丝袜| 久久爱另类一区二区小说| 岛国精品在线播放| 欧美福利电影网| 国产欧美精品一区二区色综合| 亚洲男人的天堂一区二区| 日本少妇一区二区| av中文字幕不卡| 欧美一区二区三区免费| 国产精品卡一卡二| 日韩电影免费在线观看网站| 成人免费视频免费观看| 欧美精三区欧美精三区| 欧美激情在线免费观看| 日韩av一区二区在线影视| 成人激情免费网站| 日韩免费一区二区三区在线播放| 亚洲国产成人午夜在线一区| 奇米一区二区三区| 色94色欧美sute亚洲13| 久久精品夜色噜噜亚洲a∨| 三级不卡在线观看| 成人av动漫在线| 欧美精品一区在线观看| 亚洲高清在线视频| 一本色道久久综合亚洲aⅴ蜜桃 | 国产网站一区二区三区| 午夜精品免费在线观看| 91在线国产观看| 国产日韩精品一区二区三区在线| 日韩精品亚洲一区二区三区免费| 一本一道波多野结衣一区二区| 欧美激情一区不卡| 久久精品国产一区二区| 欧美午夜精品久久久| 国产精品国产馆在线真实露脸 | 国产乱子伦视频一区二区三区| 欧美乱熟臀69xxxxxx| 亚洲欧美另类图片小说| 国产91在线观看| 久久久一区二区三区| 奇米精品一区二区三区在线观看 | 精品久久久久一区二区国产| 午夜精彩视频在线观看不卡| 欧美性欧美巨大黑白大战| 亚洲视频图片小说| aa级大片欧美| 国产精品福利一区二区| 成人av在线一区二区三区| 国产精品免费视频观看| 丰满亚洲少妇av| 国产人久久人人人人爽| 国产麻豆精品在线观看| wwww国产精品欧美| 国产在线一区观看| 精品成a人在线观看| 国产一区二区三区精品视频| 久久色中文字幕| 国产成人在线视频免费播放| 精品对白一区国产伦| 国产一区二区三区美女| 国产午夜精品一区二区三区视频| 国产在线不卡一区| 久久精品综合网| 成人免费黄色在线| 自拍偷在线精品自拍偷无码专区 | 不卡视频在线观看| 综合久久综合久久| 欧美性淫爽ww久久久久无| 午夜欧美视频在线观看| 欧美一级二级三级蜜桃| 国产剧情在线观看一区二区| 日本一区二区视频在线| 91网上在线视频| 亚洲一区二区三区在线播放| 欧美一区二区三区爱爱| 国产在线国偷精品免费看| 国产精品欧美久久久久一区二区| 色综合婷婷久久| 亚洲h精品动漫在线观看| 日韩亚洲欧美高清| 国产精品一区一区三区| 日韩一区欧美一区| 3d动漫精品啪啪1区2区免费 | 欧美手机在线视频| 蜜桃精品在线观看| 国产精品免费视频一区| 欧美美女网站色| 国产成人日日夜夜| 亚洲一区在线视频| 精品久久久久久亚洲综合网| 成人a区在线观看| 午夜精品久久久久久|