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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? mctf.cpp

?? JMVM MPEG MVC/3DAV 測(cè)試平臺(tái) 國(guó)際通用標(biāo)準(zhǔn)
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/*
********************************************************************************

NOTE - One of the two copyright statements below may be chosen
that applies for the software.

********************************************************************************

This software module was originally developed by

Heiko Schwarz    (Fraunhofer HHI),
Tobias Hinz      (Fraunhofer HHI),
Karsten Suehring (Fraunhofer HHI)

in the course of development of the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video
Coding) for reference purposes and its performance may not have been optimized.
This software module is an implementation of one or more tools as specified by
the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding).

Those intending to use this software module in products are advised that its
use may infringe existing patents. ISO/IEC have no liability for use of this
software module or modifications thereof.

Assurance that the originally developed software module can be used
(1) in the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding) once the
ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding) has been adopted; and
(2) to develop the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding): 

To the extent that Fraunhofer HHI owns patent rights that would be required to
make, use, or sell the originally developed software module or portions thereof
included in the ISO/IEC 14496-10:2005 Amd.1 (Scalable Video Coding) in a
conforming product, Fraunhofer HHI will assure the ISO/IEC that it is willing
to negotiate licenses under reasonable and non-discriminatory terms and
conditions with applicants throughout the world.

Fraunhofer HHI retains full right to modify and use the code for its own
purpose, assign or donate the code to a third party and to inhibit third
parties from using the code for products that do not conform to MPEG-related
ITU Recommendations and/or ISO/IEC International Standards. 

This copyright notice must be included in all copies or derivative works.
Copyright (c) ISO/IEC 2005. 

********************************************************************************

COPYRIGHT AND WARRANTY INFORMATION

Copyright 2005, International Telecommunications Union, Geneva

The Fraunhofer HHI hereby donate this source code to the ITU, with the following
understanding:
1. Fraunhofer HHI retain the right to do whatever they wish with the
contributed source code, without limit.
2. Fraunhofer HHI retain full patent rights (if any exist) in the technical
content of techniques and algorithms herein.
3. The ITU shall make this code available to anyone, free of license or
royalty fees.

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.

********************************************************************************
*/

#include "H264AVCEncoderLib.h"
#include "MCTF.h"
#include "PreProcessorParameter.h"
#include "../../lib/H264AVCEncoderLib/SliceEncoder.h"

H264AVC_NAMESPACE_BEGIN

#define FACTOR_22_HP  0.70710678118654752440084436210485  //sqrt( 1.0/ 2.0)
#define FACTOR_22_LP  1.4142135623730950488016887242097   //sqrt( 2.0/ 1.0)
#define FACTOR_53_HP  0.84779124789065851738306954082825  //sqrt(23.0/32.0)
#define FACTOR_53_LP  1.2247448713915890490986420373529   //sqrt( 3.0/ 2.0)


MCTF::MCTF()
: m_pcSPS                   ( 0 )
, m_pcPPS                   ( 0 )
, m_pcYuvFullPelBufferCtrl  ( 0 )
, m_pcYuvHalfPelBufferCtrl  ( 0 )
, m_pcMbEncoder             ( 0 )
, m_pcMotionEstimation      ( 0 )
, m_bFirstGOPCoded          ( false )
, m_uiGOPSize               ( 0 )
, m_uiDecompositionStages   ( 0 )
, m_uiFrameWidthInMb        ( 0 )
, m_uiFrameHeightInMb       ( 0 )
, m_uiMbNumber              ( 0 )
, m_papcFrame               ( 0 )
, m_papcResidual            ( 0 )
, m_pcFrameTemp             ( 0 )
, m_pacControlData          ( 0 )
{
}


MCTF::~MCTF()
{
}


ErrVal
MCTF::create( MCTF*& rpcMCTF )
{
  rpcMCTF = new MCTF;
  ROF( rpcMCTF );
  return Err::m_nOK;
}


ErrVal
MCTF::destroy()
{
  delete this;
  return Err::m_nOK;
}


ErrVal
MCTF::init( PreProcessorParameter*  pcParameter,
            MbEncoder*              pcMbEncoder,
            YuvBufferCtrl*          pcYuvFullPelBufferCtrl,
            YuvBufferCtrl*          pcYuvHalfPelBufferCtrl,
            QuarterPelFilter*       pcQuarterPelFilter,
            MotionEstimation*       pcMotionEstimation )
{
  ROF( pcParameter );
  ROF( pcMbEncoder );
  ROF( pcYuvFullPelBufferCtrl );
  ROF( pcYuvHalfPelBufferCtrl );
  ROF( pcQuarterPelFilter );
  ROF( pcMotionEstimation );

  //----- references -----
  m_pcSPS                   = 0;
  m_pcPPS                   = 0;
  m_pcYuvFullPelBufferCtrl  = pcYuvFullPelBufferCtrl;
  m_pcYuvHalfPelBufferCtrl  = pcYuvHalfPelBufferCtrl;
  m_pcMbEncoder             = pcMbEncoder;
  m_pcQuarterPelFilter      = pcQuarterPelFilter;
  m_pcMotionEstimation      = pcMotionEstimation;

  //----- control parameters -----
  m_uiDecompositionStages   = (UInt)floor( 0.5 + log10( (Double)pcParameter->getGOPSize() ) / log10( 2.0 ) );

  for( UInt uiStage = 0; uiStage < MAX_DSTAGES; uiStage++ )
  {
    m_adBaseQpLambdaMotion[uiStage] = pcParameter->getQP();
  }

  //----- init parameter sets -----
  m_uiFrameWidthInMb      = pcParameter->getFrameWidth  () >> 4;
  m_uiFrameHeightInMb     = pcParameter->getFrameHeight () >> 4;
  m_uiMbNumber            = m_uiFrameWidthInMb * m_uiFrameHeightInMb;
  m_bFirstGOPCoded        = false;
  RNOK( SequenceParameterSet::create( m_pcSPS ) );
  RNOK( PictureParameterSet ::create( m_pcPPS ) );
  m_pcSPS->setFrameWidthInMbs           ( m_uiFrameWidthInMb  );
  m_pcSPS->setFrameHeightInMbs          ( m_uiFrameHeightInMb );
  m_pcSPS->setDirect8x8InferenceFlag    ( true  );
  m_pcPPS->setNumRefIdxActive           ( LIST_0, 1 );
  m_pcPPS->setNumRefIdxActive           ( LIST_1, 1 );
  m_pcPPS->setConstrainedIntraPredFlag  ( true );

  //----- init frame buffer controls -----
  RNOK( m_pcYuvFullPelBufferCtrl->initSPS( m_uiFrameHeightInMb<<4, m_uiFrameWidthInMb<<4, YUV_Y_MARGIN, YUV_X_MARGIN    ) );
  RNOK( m_pcYuvHalfPelBufferCtrl->initSPS( m_uiFrameHeightInMb<<4, m_uiFrameWidthInMb<<4, YUV_Y_MARGIN, YUV_X_MARGIN, 1 ) );

  //------ re-allocate dynamic memory -----
  RNOK( xDeleteData() );
  RNOK( xCreateData( *m_pcSPS ) );

  return Err::m_nOK;
}


ErrVal
MCTF::xCreateData( const SequenceParameterSet& rcSPS )
{
  UInt uiIndex;

  ROFS   ( ( m_papcFrame       = new IntFrame*   [ ( 1 << m_uiDecompositionStages ) + 1 ] ) );
  ROFS   ( ( m_papcResidual    = new IntFrame*   [ ( 1 << m_uiDecompositionStages ) + 1 ] ) );
  ROFS   ( ( m_pacControlData  = new ControlData [ ( 1 << m_uiDecompositionStages ) + 1 ] ) );

  for( uiIndex = 0; uiIndex <= ( 1U << m_uiDecompositionStages ); uiIndex++ )
  {
    ROFS ( ( m_papcFrame         [ uiIndex ] = new IntFrame( *m_pcYuvFullPelBufferCtrl,
                                                              *m_pcYuvHalfPelBufferCtrl ) ) );
    ROFS ( ( m_papcResidual      [ uiIndex ] = new IntFrame( *m_pcYuvFullPelBufferCtrl,
                                                              *m_pcYuvHalfPelBufferCtrl ) ) );
    RNOK  (   m_papcFrame         [ uiIndex ] ->init        () );
    RNOK  (   m_papcResidual      [ uiIndex ] ->init        () );

    MbDataCtrl*   pcMbDataCtrl                = 0;
    ROFS ( (     pcMbDataCtrl                = new MbDataCtrl  () ) );
    RNOK  (       pcMbDataCtrl                ->init            ( rcSPS ) );
    RNOK  (       m_pacControlData[ uiIndex ] . setMbDataCtrl   ( pcMbDataCtrl ) );

    SliceHeader*  pcSliceHeader               = 0;
    ROFS ( (     pcSliceHeader               = new SliceHeader ( *m_pcSPS, *m_pcPPS ) ) );
    RNOK  (       m_pacControlData[ uiIndex ] . setSliceHeader  (  pcSliceHeader ) );
  }

  ROFS   ( ( m_pcFrameTemp                   = new IntFrame( *m_pcYuvFullPelBufferCtrl,
                                                              *m_pcYuvHalfPelBufferCtrl ) ) );
  RNOK    (   m_pcFrameTemp                   ->init        () );

  return Err::m_nOK;
}


ErrVal
MCTF::xDeleteData()
{
  UInt uiIndex;

  if( m_papcFrame )
  {
    for( uiIndex = 0; uiIndex <= ( 1U << m_uiDecompositionStages ); uiIndex++ )
    {
      if( m_papcFrame[ uiIndex ] )
      {
        RNOK(   m_papcFrame[ uiIndex ]->uninit() );
        delete  m_papcFrame[ uiIndex ];
        m_papcFrame[ uiIndex ] = 0;
      }
    }
    delete [] m_papcFrame;
    m_papcFrame = 0;
  }

  if( m_papcResidual )
  {
    for( uiIndex = 0; uiIndex <= ( 1U << m_uiDecompositionStages ); uiIndex++ )
    {
      if( m_papcResidual[ uiIndex ] )
      {
        RNOK(   m_papcResidual[ uiIndex ]->uninit() );
        delete  m_papcResidual[ uiIndex ];
        m_papcResidual[ uiIndex ] = 0;
      }
    }
    delete [] m_papcResidual;
    m_papcResidual = 0;
  }

  if( m_pcFrameTemp )
  {
    RNOK(   m_pcFrameTemp->uninit() );
    delete  m_pcFrameTemp;
    m_pcFrameTemp = 0;
  }

  if( m_pacControlData )
  {
    for( uiIndex = 0; uiIndex <= ( 1U << m_uiDecompositionStages ); uiIndex++ )
    {
      MbDataCtrl*   pcMbDataCtrl  = m_pacControlData[ uiIndex ].getMbDataCtrl  ();
      SliceHeader*  pcSliceHeader = m_pacControlData[ uiIndex ].getSliceHeader ();
      if( pcMbDataCtrl )
      {
        RNOK( pcMbDataCtrl->uninit() );
      }
      delete pcMbDataCtrl;
      delete pcSliceHeader;
    }
    delete [] m_pacControlData;
    m_pacControlData = 0;
  }

  return Err::m_nOK;
}


ErrVal
MCTF::uninit()
{
  xDeleteData();

  return Err::m_nOK;
}


ErrVal
MCTF::xFillAndUpsampleFrame( IntFrame* rcFrame )
{
  RNOK( m_pcYuvFullPelBufferCtrl->initMb() );
  RNOK( m_pcYuvHalfPelBufferCtrl->initMb() );

  if( ! rcFrame->isHalfPel() )
  {
    RNOK( rcFrame->initHalfPel() );
  }
  RNOK( rcFrame->extendFrame( m_pcQuarterPelFilter ) );

  return Err::m_nOK;
}


ErrVal
MCTF::xFillAndExtendFrame( IntFrame* rcFrame )
{
  RNOK( m_pcYuvFullPelBufferCtrl->initMb() );
  RNOK( rcFrame->extendFrame( NULL ) );
  return Err::m_nOK;
}


ErrVal
MCTF::xMotionEstimation( RefFrameList*    pcRefFrameList0,
                         RefFrameList*    pcRefFrameList1,
                         const IntFrame*  pcOrigFrame,
                         ControlData&     rcControlData )
{
  SliceHeader&  rcSliceHeader = *rcControlData.getSliceHeader();
  MbDataCtrl*   pcMbDataCtrl  =  rcControlData.getMbDataCtrl ();

  //===== initialization =====
  RNOK( m_pcMotionEstimation->initSlice( rcSliceHeader ) );
  RNOK( m_pcMbEncoder       ->initSlice( rcSliceHeader ) );

  //===== loop over macroblocks =====
  for( UInt uiMbIndex = 0; uiMbIndex < m_uiMbNumber; uiMbIndex++ )
  {
    UInt          uiMbY               = uiMbIndex / m_uiFrameWidthInMb;
    UInt          uiMbX               = uiMbIndex % m_uiFrameWidthInMb;
    MbDataAccess* pcMbDataAccess      = 0;

    RNOK( pcMbDataCtrl            ->initMb  ( pcMbDataAccess, uiMbY, uiMbX ) );
    RNOK( m_pcYuvFullPelBufferCtrl->initMb  ( uiMbY, uiMbX ) );
    RNOK( m_pcYuvHalfPelBufferCtrl->initMb  ( uiMbY, uiMbX ) );
    RNOK( m_pcMotionEstimation    ->initMb  ( uiMbY, uiMbX, *pcMbDataAccess ) );

    RNOK( m_pcMbEncoder->estimatePrediction ( *pcMbDataAccess, NULL, 0, 
                                              *pcRefFrameList0, *pcRefFrameList1, NULL, NULL,

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本久道久久综合中文字幕| 在线免费av一区| 精品福利在线导航| 又紧又大又爽精品一区二区| 99久久精品国产观看| 国产天堂亚洲国产碰碰| 韩国成人福利片在线播放| 精品国产91乱码一区二区三区| 美女视频一区二区| 日本一二三四高清不卡| aa级大片欧美| 日韩va亚洲va欧美va久久| 3d成人h动漫网站入口| 欧美日韩久久久久久| 国产精品入口麻豆九色| 91一区二区在线观看| 视频一区欧美日韩| 国产精品美女www爽爽爽| 欧美中文字幕久久| 国产乱码精品一区二区三| 国产精品午夜春色av| 制服.丝袜.亚洲.另类.中文| 国产在线视频精品一区| 亚洲一区二区在线观看视频| 久久精品视频在线看| 欧美一区二区在线免费播放| 成人精品国产福利| 久久精品理论片| 亚洲一级二级三级| 亚洲精品一二三区| 国产精品三级av在线播放| 亚洲精品一区二区三区影院| 日本二三区不卡| 91丨九色porny丨蝌蚪| 国产福利不卡视频| 精品一区二区三区在线播放| 亚洲国产成人91porn| 亚洲乱码日产精品bd| 一区二区在线观看av| 亚洲综合在线五月| 天天色综合天天| 五月激情六月综合| 久久精品国产一区二区三| 九九精品一区二区| 国产激情一区二区三区| 国产91丝袜在线播放九色| 国产一区二区导航在线播放| 国内成+人亚洲+欧美+综合在线| 秋霞电影网一区二区| 日韩中文字幕不卡| 中文成人av在线| 欧美r级电影在线观看| 欧美浪妇xxxx高跟鞋交| 26uuu国产电影一区二区| 国产欧美va欧美不卡在线 | eeuss鲁片一区二区三区 | 国产精品福利一区| 亚洲一区二区综合| 国产精品1024| 91精品国产乱码久久蜜臀| 中文幕一区二区三区久久蜜桃| 亚洲天堂2014| 国产精品资源在线| 7777精品伊人久久久大香线蕉的| 国产日本亚洲高清| 天天色综合天天| 欧美亚洲图片小说| 欧美韩日一区二区三区四区| 日本亚洲三级在线| 日本韩国视频一区二区| 国产清纯白嫩初高生在线观看91| 午夜精品一区二区三区三上悠亚| 成人黄页在线观看| 国产欧美一区二区三区网站| 久久99久久99| 4438成人网| 视频一区二区不卡| 欧美日韩一本到| 五月天中文字幕一区二区| 色先锋aa成人| 午夜影视日本亚洲欧洲精品| 欧美在线一二三四区| 亚洲精品写真福利| 91福利国产成人精品照片| 亚洲黄一区二区三区| 在线观看国产日韩| 青青草精品视频| 久久久精品黄色| 精品在线观看免费| 日韩午夜激情视频| 精品无码三级在线观看视频| 精品国产乱码久久久久久1区2区 | 国产精华液一区二区三区| 久久久不卡网国产精品二区| 福利一区二区在线观看| 中文字幕av一区二区三区高| 色屁屁一区二区| 伦理电影国产精品| 国产精品人妖ts系列视频| 色成人在线视频| 国产一区二区三区最好精华液| 久久精品一二三| 欧美一区二区三区喷汁尤物| 激情五月婷婷综合| 亚洲一本大道在线| 中文字幕欧美国产| 精品久久久影院| 欧美精品少妇一区二区三区| 高清久久久久久| 国产一区二区剧情av在线| 亚洲国产一区二区三区| 中文幕一区二区三区久久蜜桃| 日韩欧美在线综合网| 欧美在线免费播放| 91福利视频网站| 在线观看视频欧美| 91网页版在线| 91美女片黄在线观看| 成人18视频在线播放| 不卡一区二区三区四区| 激情五月播播久久久精品| 久久精品久久99精品久久| 免费成人在线播放| 免费在线看一区| 美女性感视频久久| 日韩黄色免费电影| 午夜影视日本亚洲欧洲精品| 亚洲影视资源网| 视频一区在线视频| 亚洲色图色小说| 综合分类小说区另类春色亚洲小说欧美| 精品免费国产一区二区三区四区| 91精品国产手机| 久久久一区二区三区| 亚洲品质自拍视频| 天天av天天翘天天综合网| 人人超碰91尤物精品国产| 久久99精品久久久久久| 99r国产精品| 91麻豆精品国产| 国产精品久久毛片av大全日韩| 国产精品高潮久久久久无| 婷婷综合另类小说色区| 国产伦精品一区二区三区免费迷 | 国产精品一区二区三区四区| 9i看片成人免费高清| 日韩视频免费观看高清在线视频| 国产视频一区二区在线观看| 亚洲自拍偷拍综合| www.欧美.com| 久久―日本道色综合久久| 亚洲www啪成人一区二区麻豆| 国产成人精品免费| 欧美一卡二卡三卡| 午夜精品视频一区| 在线视频欧美区| 一区二区在线免费| 91黄色免费版| 亚洲自拍偷拍综合| 在线精品视频一区二区三四| 久久人人97超碰com| 亚洲成a人在线观看| 日本黄色一区二区| 一区二区三区在线视频免费观看| 国产成人av电影在线播放| 国产偷v国产偷v亚洲高清| 激情五月婷婷综合网| 久久综合九色综合97_久久久| 同产精品九九九| 精品欧美乱码久久久久久| 丝袜美腿亚洲综合| 久久综合国产精品| 国产盗摄一区二区三区| 国产精品天干天干在观线| 高清视频一区二区| 亚洲影视资源网| 欧美精品一区二区三区在线播放 | 日韩vs国产vs欧美| 精品国产99国产精品| 99久久99久久精品免费观看| 一区二区三区四区蜜桃| 欧美成人aa大片| 99久久精品费精品国产一区二区| 中文字幕一区二区三区av| 欧美日韩电影在线| 成人做爰69片免费看网站| 亚洲国产wwwccc36天堂| 欧美国产精品一区| 337p亚洲精品色噜噜噜| 99久久久精品免费观看国产蜜| 夜夜精品视频一区二区| 中文在线一区二区| 久久一二三国产| 欧美老肥妇做.爰bbww视频| 不卡的av电影| 成人免费看片app下载| 国内成人自拍视频| 免费人成黄页网站在线一区二区| 亚洲精品免费在线播放| 欧美国产日本韩|