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

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

?? loopfilter.c

?? 網絡MPEG4IP流媒體開發源代碼
?? C
字號:
/************************************************************************* COPYRIGHT AND WARRANTY INFORMATION** Copyright 2001, International Telecommunications Union, Geneva** DISCLAIMER OF WARRANTY** These software programs are available to the user without any* license fee or royalty on an "as is" basis. The ITU disclaims* any and all warranties, whether express, implied, or* statutory, including any implied warranties of merchantability* or of fitness for a particular purpose.  In no event shall the* contributor or the ITU be liable for any incidental, punitive, or* consequential damages of any kind whatsoever arising from the* use of these programs.** This disclaimer of warranty extends to the user of these programs* and user's customers, employees, agents, transferees, successors,* and assigns.** The ITU does not represent or warrant that the programs furnished* hereunder are free of infringement of any third-party patents.* Commercial implementations of ITU-T Recommendations, including* shareware, may be subject to royalty fees to patent holders.* Information regarding the ITU-T patent policy is available from* the ITU Web site at http://www.itu.int.** THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE ITU-T PATENT POLICY.*************************************************************************//*! ************************************************************************************* * \file loopFilter.c * * \brief *    Filter to reduce blocking artifacts on a macroblock level. *    The filter strengh is QP dependent. * * \author *    Contributors: *    - Peter List      Peter.List@t-systems.de:  Original code                             (13.8.2001) *    - Jani Lainema    Jani.Lainema@nokia.com:   Some bug fixing, removal of recusiveness  (16.8.2001) ************************************************************************************* */#include <stdlib.h>#include <string.h>#include "global.h"#define  Clip( Min, Max, Val) (((Val)<(Min))? (Min):(((Val)>(Max))? (Max):(Val)))int ALPHA_TABLE[32]  = {128,128,128,128,128,128,128,128,128,128,122, 96, 75, 59, 47, 37,                         29, 23, 18, 15, 13, 11,  9,  8,  7,  6,  5,  4,  3,  3,  2,  2 } ;int  BETA_TABLE[32]  = {  0,  0,  0,  0,  0,  0,  0,  0,  3,  3,  3,  4,  4,  4,  6,  6,                          6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14  } ;byte CLIP_TBL[3][32] = {{0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},                        {0,0,0,0,0,0,0,0, 0,0,0,1,1,1,1,1, 1,1,1,1,1,2,2,2, 2,3,3,3,3,4,5,5},                        {0,0,0,0,0,0,0,0, 0,1,1,1,1,1,1,1, 1,2,2,2,2,3,3,3, 4,4,5,5,5,7,8,9}} ;byte MASK_L[2][16]   = {{3,0,1,2,  7,4,5,6,  11,8,9,10,  15,12,13,14}, {12,13,14,15,  0,1,2,3, 4,5,6,7, 8,9,10,11}} ;byte MASK_C[2][ 4]   = {{1,0,3,2}, {2,3,0,1}} ;/*! ***************************************************************************************** * \brief *    Filters one edge of 4 (luma) or 2 (chroma) pel ***************************************************************************************** */void EdgeLoop( byte* ptrOut, int* ptrIn, Macroblock *MbP, Macroblock *MbQ, int VecDif, int dir, int CbpMaskP, int CbpMaskQ, int widthOut, int widthIn, int luma ){  int      StrengthP, StrengthQ ;  int      alpha, beta  ;  int      pel, ap, aq;  int      incIn, incIn2, incIn3, incIn4 ;  int      incOut, incOut2, incOut3 ;  int      C0, Cq, Cp, c0, n, delta, strong, dif ;  int      lastPel = luma ? 4 : 2;  StrengthQ = ((MbQ->intraOrInter != INTER_MB) || (img->types == SP_IMG))? 2: ((MbQ->cbp_blk & CbpMaskQ) != 0)? 1:0 ;  // if not INTRA: has this  StrengthP = ((MbP->intraOrInter != INTER_MB) || (img->types == SP_IMG))? 2: ((MbP->cbp_blk & CbpMaskP) != 0)? 1:0 ;       // 4x4 block coeffs?  if( StrengthP || StrengthQ || VecDif )  {    alpha   = ALPHA_TABLE[ MbQ->qp ] ;    beta    = BETA_TABLE [ MbQ->qp ] ;    Cq      = CLIP_TBL[ StrengthQ ][ MbQ->qp ] ;    Cp      = CLIP_TBL[ StrengthP ][ MbQ->qp ] ;    C0      = Cq + Cp ;    incIn   = dir ?  widthIn : 1 ;                     // vertical filtering increment to next pixel is 1 else width    incIn2  = incIn<<1 ;    incIn3  = incIn + incIn2 ;    incIn4  = incIn<<2 ;    incOut  = dir ?  widthOut : 1 ;                    // vertical filtering increment to next pixel is 1 else width    incOut2 = incOut<<1 ;    incOut3 = incOut + incOut2 ;    strong  = (MbP != MbQ ) && ((StrengthQ == 2) || (StrengthP == 2)) ; // stronger filtering possible if Macroblock                                                                                // boundary and one of MB's is Intra    for( pel=0 ; pel<lastPel ; pel++ )    {      delta = abs( ptrIn[0] - ptrIn[-incIn] ) ;      n     = min( 3, 4-(delta*alpha >> 7) ) ;      for( aq=1 ; aq<n ; aq++ )        if( abs(ptrIn[     0] - ptrIn[     aq*incIn]) > beta)          break ;      for( ap=1 ; ap<n  ; ap++ )        if( abs(ptrIn[-incIn] - ptrIn[(-1-ap)*incIn]) > beta)          break ;      if( strong & (ap+aq == 6) & (delta < MbQ->qp>>2) & (delta >= 2) )                   // INTRA strong filtering      {        ptrOut[ -incOut]   = (25*( ptrIn[-incIn3] +  ptrIn[  incIn]) + 26*( ptrIn[-incIn2] + ptrIn[-incIn ] +  ptrIn[      0 ]) + 64) >> 7 ;        ptrOut[-incOut2]   = (25*( ptrIn[-incIn4] +  ptrIn[      0]) + 26*( ptrIn[-incIn3] + ptrIn[-incIn2] + ptrOut[ -incOut]) + 64) >> 7 ;        ptrOut[       0]   = (25*( ptrIn[-incIn2] +  ptrIn[ incIn2]) + 26*( ptrIn[ -incIn] + ptrIn[      0] +  ptrIn[  incIn ]) + 64) >> 7 ;        ptrOut[  incOut]   = (25*( ptrIn[-incIn ] +  ptrIn[ incIn3]) + 26*(ptrOut[      0] + ptrIn[ incIn ] +  ptrIn[  incIn2]) + 64) >> 7 ;        if( luma )                                                                  // For luma do two more pixels        {          ptrOut[-incOut3] = (25*( ptrIn[-incIn3] + ptrOut[-incOut]) + 26*( ptrIn[-incIn4] + ptrIn[-incIn3] + ptrOut[-incOut2]) + 64) >> 7 ;          ptrOut[ incOut2] = (25*(ptrOut[      0] +  ptrIn[ incIn2]) + 26*(ptrOut[ incOut] + ptrIn[ incIn2] +  ptrIn[  incIn3]) + 64) >> 7 ;        }      }      else      {        if( (ap > 1) && (aq > 1) )                                                             // normal filtering        {          c0                 = (C0 + ap + aq) >> 1 ;          dif                = Clip( -c0,  c0, (((ptrIn[0] - ptrIn[-incIn]) << 2) + (ptrIn[-incIn2] - ptrIn[incIn]) + 4) >> 3 ) ;          ptrOut[-incOut ]   = Clip(   0, 255, ptrIn[-incIn] + dif ) ;          ptrOut[      0 ]   = Clip(   0, 255, ptrIn[    0 ] - dif ) ;          if( ap == 3)          {            dif              = Clip( -Cp,  Cp, (ptrIn[-incIn3] + ptrIn[-incIn] - (ptrIn[-incIn2]<<1)) >> 1 ) ;            ptrOut[-incOut2] = ptrIn[-incIn2] + dif;          }          if( aq == 3)          {            dif              = Clip( -Cq,  Cq, (ptrIn[ incIn2] + ptrIn[     0] - (ptrIn[  incIn]<<1)) >> 1 ) ;            ptrOut[  incOut] = ptrIn[  incIn] + dif;          }        }      }      ptrOut += dir?  1:widthOut ;      // Increment to next set of pixel      ptrIn  += dir?  1:widthIn  ;    }  }}/*! ***************************************************************************************** * \brief *    returns VecDiff for different Frame types ***************************************************************************************** */int GetVecDif( ImageParameters *img, int dir, int blk_y, int blk_x ){  if( img->type == B_IMG )  {    if( img->imod != B_Direct )      return ( abs( tmp_fwMV[0][blk_y][blk_x+4] - tmp_fwMV[0][blk_y-dir][blk_x+4-!dir]) >= 4) |             ( abs( tmp_fwMV[1][blk_y][blk_x+4] - tmp_fwMV[1][blk_y-dir][blk_x+4-!dir]) >= 4) |             ( abs( tmp_bwMV[0][blk_y][blk_x+4] - tmp_bwMV[0][blk_y-dir][blk_x+4-!dir]) >= 4) |             ( abs( tmp_bwMV[1][blk_y][blk_x+4] - tmp_bwMV[1][blk_y-dir][blk_x+4-!dir]) >= 4)  ;    else      return ( abs(     dfMV[0][blk_y][blk_x+4] -     dfMV[0][blk_y-dir][blk_x+4-!dir]) >= 4) |             ( abs(     dfMV[1][blk_y][blk_x+4] -     dfMV[1][blk_y-dir][blk_x+4-!dir]) >= 4) |             ( abs(     dbMV[0][blk_y][blk_x+4] -     dbMV[0][blk_y-dir][blk_x+4-!dir]) >= 4) |             ( abs(     dbMV[1][blk_y][blk_x+4] -     dbMV[1][blk_y-dir][blk_x+4-!dir]) >= 4)  ;  }  else    return   ( abs(   tmp_mv[0][blk_y][blk_x+4] -   tmp_mv[0][blk_y-dir][blk_x+4-!dir]) >= 4 ) |             ( abs(   tmp_mv[1][blk_y][blk_x+4] -   tmp_mv[1][blk_y-dir][blk_x+4-!dir]) >= 4 ) |             (         refFrArr[blk_y][blk_x  ]!=    refFrArr[blk_y-dir][blk_x  -!dir]);}/*! ***************************************************************************************** * \brief *    The main MB-filtering function ***************************************************************************************** */void DeblockMb(ImageParameters *img, byte **imgY, byte ***imgUV){  int           ofs_x, ofs_y ;  int           blk_x, blk_y ;  int           x, y, EdgeX, EdgeY ;  int           VecDif ;                                    // TRUE if x or ydifference to neighboring mv is >= 4  int           dir ;                                                         // horizontal or vertical filtering  int           CbpMaskQ ;  Macroblock    *MbP, *MbQ ;                                        // the current (MbQ) and neighboring (MbP) mb  int           bufferY[20*20],  bufferU[12*12], bufferV[12*12];  int xFirst =  img->block_x? -4:0;  int yFirst =  img->block_y? -4:0;  for( dir=0 ; dir<2 ; dir++ )                                           // vertical edges, than horicontal edges  {    for( y = yFirst ; y < 16 ; y++ )                        // Copy the original data to be filtered into buffers      for( x = xFirst ; x < 16 ; x++ )        bufferY[20*y+x+84] = imgY[img->pix_y+y][img->pix_x+x];    if (imgUV!=NULL)      for( y = yFirst ; y < 8 ; y++ )        for( x = xFirst ; x < 8 ; x++ )        {          bufferU[12*y+x+52] = imgUV[0][img->pix_c_y+y][img->pix_c_x+x];          bufferV[12*y+x+52] = imgUV[1][img->pix_c_y+y][img->pix_c_x+x];        }    EdgeX = ( dir || img->block_x)? 0:1 ;    EdgeY = (!dir || img->block_y)? 0:1 ;    for( ofs_y=EdgeY ; ofs_y<4 ; ofs_y++ )             // go  vertically through 4x4 blocks      for( ofs_x=EdgeX ; ofs_x<4 ; ofs_x++ )          // go horicontally through 4x4 blocks      {        blk_y    = img->block_y + ofs_y ;                                                 // absolute 4x4 address        blk_x    = img->block_x + ofs_x ;        MbQ      = MbP = &img->mb_data[ img->current_mb_nr ] ;                                      // current Mb        MbP     -= ( !ofs_x && !dir)? 1 : ((!ofs_y && dir)? (img->width>>4) : 0) ;              // neighboring Mb        VecDif   = GetVecDif( img, dir, blk_y, blk_x ) ;                 // Get Vecdiff for different frame types        CbpMaskQ = (ofs_y<<2) + ofs_x ;        EdgeLoop( imgY[blk_y<<2] + (blk_x<<2), bufferY + ((20*ofs_y+ofs_x)<<2) + 84, MbP, MbQ, VecDif, dir, 1<<MASK_L[dir][CbpMaskQ], 1<<CbpMaskQ, img->width, 20, 1 ) ;        if (imgUV!=NULL)        {          if( (!dir && !(ofs_x & 1)) || (dir && !(ofs_y & 1)) )                      // do the same for chrominance          {            CbpMaskQ = (ofs_y & 0xfe) + (ofs_x>>1) ;            EdgeLoop( imgUV[0][blk_y<<1] + ((blk_x)<<1), bufferU + ((12*ofs_y+ofs_x)<<1) + 52, MbP, MbQ, VecDif, dir, 0x010000<<MASK_C[dir][CbpMaskQ], 0x010000<<CbpMaskQ, img->width_cr, 12, 0 ) ;            EdgeLoop( imgUV[1][blk_y<<1] + ((blk_x)<<1), bufferV + ((12*ofs_y+ofs_x)<<1) + 52, MbP, MbQ, VecDif, dir, 0x100000<<MASK_C[dir][CbpMaskQ], 0x100000<<CbpMaskQ, img->width_cr, 12, 0 ) ;          }        }      }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区二区三区在线| 国产日韩精品一区| 亚洲精品在线观| 中文字幕中文字幕一区二区| 日本视频在线一区| 在线看不卡av| 国产精品福利一区| 极品少妇xxxx精品少妇| 在线观看日产精品| 国产精品天天看| 国产一区二区三区| 欧美一卡二卡三卡四卡| 亚洲人成亚洲人成在线观看图片| 99视频在线精品| 欧美一卡2卡3卡4卡| 亚洲韩国精品一区| 99久久久国产精品| 中文字幕欧美区| 黄色小说综合网站| 日韩免费成人网| 天天色天天操综合| 欧美精品九九99久久| 亚洲另类在线一区| 91免费看视频| 亚洲欧美色图小说| 91亚洲国产成人精品一区二区三| 99久久精品国产精品久久| 欧美大片拔萝卜| 午夜精品久久久久久| 欧美性猛片xxxx免费看久爱| 日韩理论电影院| 色香蕉成人二区免费| 亚洲婷婷综合色高清在线| 99精品欧美一区二区蜜桃免费| 94-欧美-setu| 亚洲欧美在线aaa| 91在线视频播放地址| 亚洲精选视频在线| 日本韩国欧美一区| 亚洲成人动漫在线免费观看| 欧美婷婷六月丁香综合色| 亚洲国产精品影院| 欧美三级电影一区| 日韩影院免费视频| 精品99久久久久久| 成人福利视频网站| 成人欧美一区二区三区视频网页 | 成人av免费观看| 欧美国产精品一区二区三区| 国产mv日韩mv欧美| 亚洲欧洲精品天堂一级| 在线观看视频一区| 毛片基地黄久久久久久天堂| 久久先锋资源网| 91网站最新网址| 亚洲国产日日夜夜| 91精品久久久久久久99蜜桃| 国产曰批免费观看久久久| 欧美激情在线观看视频免费| 91成人看片片| 免费不卡在线观看| 国产精品电影一区二区| 欧美日韩国产免费| 国产精品一区不卡| 亚洲综合一区二区精品导航| 欧美一区二区三区视频在线| 国产成人综合在线| 亚洲一区电影777| 久久人人97超碰com| 99re66热这里只有精品3直播 | 日本韩国视频一区二区| 日本美女一区二区| 中文字幕+乱码+中文字幕一区| 亚洲18影院在线观看| 26uuu国产日韩综合| 在线影视一区二区三区| 精彩视频一区二区三区| 中文字幕永久在线不卡| 欧美一二三区精品| 欧美性猛交xxxx黑人交| 老色鬼精品视频在线观看播放| 欧美亚洲日本国产| 久久爱另类一区二区小说| 亚洲免费在线视频一区 二区| 成人av在线播放网站| 裸体一区二区三区| 亚洲欧洲韩国日本视频| 337p日本欧洲亚洲大胆色噜噜| 久久国产夜色精品鲁鲁99| 亚洲欧洲精品天堂一级| 久久久久久久久久久电影| 欧美日韩的一区二区| 99精品视频中文字幕| 国内成人精品2018免费看| 午夜一区二区三区在线观看| 综合精品久久久| 亚洲国产精品av| 26uuu色噜噜精品一区| 91精品久久久久久久久99蜜臂| 蜜臀99久久精品久久久久久软件| 538在线一区二区精品国产| 成人美女视频在线看| 国产精品一区免费在线观看| 视频在线观看91| 午夜精品久久久久久久| 亚洲va欧美va人人爽午夜| 亚洲欧美日韩久久精品| 亚洲日本在线视频观看| 国产精品久久久久久久裸模 | 国产99久久久久久免费看农村| 国产精品美女久久久久aⅴ | 欧美日韩国产小视频在线观看| 亚洲二区在线观看| 一区二区三区在线观看欧美| 亚洲人成7777| 亚洲视频在线一区二区| 亚洲欧美怡红院| 一色屋精品亚洲香蕉网站| 中文字幕亚洲综合久久菠萝蜜| 欧美日本不卡视频| 777a∨成人精品桃花网| 91精品国产欧美一区二区18 | 日韩电影免费在线看| 天堂资源在线中文精品| 午夜欧美电影在线观看| 丝袜亚洲另类欧美| 蜜臀国产一区二区三区在线播放| 中文字幕av资源一区| 国产精品毛片久久久久久| 亚洲天堂福利av| 亚洲成人一区在线| 美女视频网站久久| 国产在线视频一区二区| 成人午夜视频免费看| 色先锋资源久久综合| 911国产精品| 久久免费视频一区| 亚洲欧美另类久久久精品2019 | 精品污污网站免费看| 欧美日韩另类国产亚洲欧美一级| 不卡一区二区三区四区| 色丁香久综合在线久综合在线观看| 老司机精品视频在线| 高清国产一区二区| 色综合视频一区二区三区高清| 国产中文字幕精品| 色婷婷综合五月| 制服丝袜亚洲网站| 国产亚洲欧美一区在线观看| 日韩毛片在线免费观看| 青青草国产精品亚洲专区无| 成人国产精品免费观看动漫| 欧美体内she精视频| 国产欧美日韩在线观看| 亚洲影院理伦片| 国产精品原创巨作av| 欧美系列亚洲系列| 久久精品视频一区二区| 亚洲一二三区不卡| 国产成a人亚洲精| 欧美精品亚洲一区二区在线播放| 欧洲一区二区三区在线| 日韩欧美高清一区| 亚洲人快播电影网| 国内精品国产三级国产a久久| 久久精工是国产品牌吗| 色婷婷亚洲精品| 久久久精品人体av艺术| 亚洲一级不卡视频| 成人av午夜影院| 久久综合国产精品| 婷婷夜色潮精品综合在线| 99视频精品免费视频| 久久久亚洲高清| 蜜臀av国产精品久久久久 | 精品国产一区二区三区忘忧草| 91精品国产麻豆国产自产在线| 欧美日韩在线亚洲一区蜜芽| 欧美国产一区二区在线观看| 青草国产精品久久久久久| 色中色一区二区| 中文字幕国产精品一区二区| 看电视剧不卡顿的网站| 欧美乱妇一区二区三区不卡视频| 欧美日韩国产高清一区| 亚洲手机成人高清视频| 国产99久久久国产精品| 久久日韩精品一区二区五区| 麻豆久久一区二区| 制服视频三区第一页精品| 亚洲午夜成aⅴ人片| 91在线视频官网| 亚洲免费在线看| 91搞黄在线观看| 一区二区三区在线视频播放| 91美女在线视频| 亚洲女人****多毛耸耸8| 成人午夜短视频| 国产精品蜜臀在线观看| 99热在这里有精品免费|