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

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

?? slicereader.cpp

?? JMVM MPEG MVC/3DAV 測試平臺 國際通用標準
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*
********************************************************************************

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.

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




#define _ABT_FLAG_IN_SLICE_HEADER_
#include "H264AVCDecoderLib.h"

#include "ControlMngH264AVCDecoder.h"
#include "H264AVCCommonLib/TraceFile.h"

#include "MbParser.h"
#include "H264AVCCommonLib/FrameMng.h"
#include "H264AVCCommonLib/ParameterSetMng.h"

#include "SliceReader.h"
#include "DecError.h"

#include "H264AVCCommonLib/CFMO.h"

H264AVC_NAMESPACE_BEGIN


SliceReader::SliceReader():
  m_pcHeaderReadIf( NULL ),
  m_pcParameterSetMng(NULL),
  m_pcMbParser( NULL ),
  m_pcControlMng( NULL ),
  m_bInitDone( false)
{
}


SliceReader::~SliceReader()
{
}


ErrVal SliceReader::create( SliceReader*& rpcSliceReader )
{
  rpcSliceReader = new SliceReader;

  ROT( NULL == rpcSliceReader );

  return Err::m_nOK;
}


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


ErrVal SliceReader::init( HeaderSymbolReadIf* pcHeaderSymbolReadIf,
                          ParameterSetMng* pcParameterSetMng,
                          MbParser* pcMbParser,
                          ControlMngIf* pcControlMng )
{
  ROT( m_bInitDone );
  ROT( NULL == pcHeaderSymbolReadIf );
  ROT( NULL == pcMbParser );
  ROT( NULL == pcControlMng );


  m_pcParameterSetMng = pcParameterSetMng;
  m_pcControlMng      = pcControlMng;
  m_pcHeaderReadIf    = pcHeaderSymbolReadIf;
  m_pcMbParser        = pcMbParser;

  m_bInitDone = true;
  return Err::m_nOK;
}


ErrVal SliceReader::uninit()
{
  ROF( m_bInitDone );
  m_pcHeaderReadIf = NULL;
  m_pcMbParser = NULL;
  m_bInitDone = false;

  return Err::m_nOK;
}


// JVT-S054 (2) (REPLACE)
//ErrVal SliceReader::process( const SliceHeader& rcSH, UInt& ruiMbRead )
ErrVal SliceReader::process( SliceHeader& rcSH, UInt& ruiMbRead )
{
  int sgId = rcSH.getFMO()->getSliceGroupId(rcSH.getFirstMbInSlice());  
  int pocOrder = rcSH.getPicOrderCntLsb();
  rcSH.getFMO()->setCodedSG(sgId, pocOrder);  

  ROF( m_bInitDone );

  //====== initialization ======
  UInt  uiMbAddress       = rcSH.getFirstMbInSlice();
  Bool  bEndOfSlice       = false;

  //===== loop over macroblocks =====
  for(  ruiMbRead = 0; !bEndOfSlice; ruiMbRead++ ) //--ICU/ETRI FMO Implementation
  {
    DTRACE_NEWMB( uiMbAddress );
    MbDataAccess* pcMbDataAccess;

    RNOK( m_pcControlMng->initMbForParsing( pcMbDataAccess, uiMbAddress ) );
    pcMbDataAccess->getMbData().deactivateMotionRefinement();

    DECRNOK( m_pcMbParser->process( *pcMbDataAccess, bEndOfSlice) );

    // JVT-S054 (2) (ADD)
    rcSH.setLastMbInSlice(uiMbAddress);
    //--ICU/ETRI FMO Implementation
    uiMbAddress  = rcSH.getFMO()->getNextMBNr(uiMbAddress ); 

  }
  // JVT-S054 (2) (ADD)
  rcSH.setNumMbsInSlice(ruiMbRead);

  return Err::m_nOK;
}







ErrVal  SliceReader::read( SliceHeader&   rcSH,
                           MbDataCtrl*    pcMbDataCtrl,
                           MbDataCtrl*    pcMbDataCtrlBase,
                           Int            iSpatialScalabilityType,
                           UInt           uiMbInRow,
                           UInt&          ruiMbRead )
{
  ROF( m_bInitDone );

  UInt  uiMbAddress   = rcSH.getFirstMbInSlice();
  UInt  uiNumMbInPic  = rcSH.getSPS().getMbInFrame();
  Bool  bEndOfSlice   = false;

  RNOK( pcMbDataCtrl->initSlice( rcSH, PARSE_PROCESS, true, NULL ) );

  //===== loop over macroblocks =====
  for( ruiMbRead = 0; !bEndOfSlice; ) //--ICU/ETRI FMO Implementation  
  {
    DTRACE_NEWMB( uiMbAddress );

    UInt          uiMbY               = uiMbAddress / uiMbInRow;
    UInt          uiMbX               = uiMbAddress % uiMbInRow;
    MbDataAccess* pcMbDataAccess      = 0;
    MbDataAccess* pcMbDataAccessBase  = 0;
    Bool          bCropWindowFlag     = pcMbDataCtrl->getMbData( uiMbX, uiMbY ).getInCropWindowFlag();

    RNOK( pcMbDataCtrl        ->initMb    ( pcMbDataAccess,     uiMbY, uiMbX ) );
    pcMbDataAccess->getMbData().deactivateMotionRefinement();
    pcMbDataAccess->getMbData().setInCropWindowFlag( bCropWindowFlag );

    if  ( pcMbDataCtrlBase )
    {
      RNOK( pcMbDataCtrlBase  ->initMb    ( pcMbDataAccessBase, uiMbY, uiMbX ) );
    }
    RNOK( m_pcMbParser        ->read      ( *pcMbDataAccess,
                                            pcMbDataAccessBase,
                                            iSpatialScalabilityType,
                                            bEndOfSlice  ) );
    ruiMbRead++;
	  if(ruiMbRead == uiNumMbInPic) bEndOfSlice = true; //FRAG_FIX
    // JVT-S054 (2) (ADD)
    rcSH.setLastMbInSlice(uiMbAddress);
    //--ICU/ETRI FMO Implementation
    uiMbAddress  = rcSH.getFMO()->getNextMBNr(uiMbAddress ); 

  }

  // JVT-S054 (2) (ADD)
  rcSH.setNumMbsInSlice(ruiMbRead);

  //ICU/ETRI FGS FMO
  int sgId = rcSH.getFMO()->getSliceGroupId(rcSH.getFirstMbInSlice());  
  int pocOrder = rcSH.getPicOrderCntLsb();

  rcSH.getFMO()->setCodedSG(sgId, pocOrder);  

  //--ICU/ETRI FMO Implementation
  // JVT-S054 (REMOVE)
  //ROF( ruiMbRead == rcSH.getNumMbInSlice());

  return Err::m_nOK;
}




//TMM_EC {{
ErrVal  SliceReader::readVirtual( SliceHeader&   rcSH,
																	MbDataCtrl*    pcMbDataCtrl,
																	MbDataCtrl*    pcMbDataCtrlRef,
																	MbDataCtrl*    pcMbDataCtrlBase,
																	Int            iSpatialScalabilityType,
																	UInt           uiMbInRow,
																	UInt&          ruiMbRead,
																	ERROR_CONCEAL			m_eErrorConceal)
{
  ROF( m_bInitDone );

  UInt  uiMbAddress   = rcSH.getFirstMbInSlice();
  UInt  uiNumMbInPic  = rcSH.getSPS().getMbInFrame();
  Bool  bEndOfSlice   = false;

  RNOK( pcMbDataCtrl->initSlice( rcSH, PARSE_PROCESS, true, NULL ) );

  //===== loop over macroblocks =====
	for( ruiMbRead = 0; ruiMbRead < uiNumMbInPic; uiMbAddress++ )
  {
    DTRACE_NEWMB( uiMbAddress );

    UInt          uiMbY               = uiMbAddress / uiMbInRow;
    UInt          uiMbX               = uiMbAddress % uiMbInRow;
    MbDataAccess* pcMbDataAccess      = 0;
    MbDataAccess* pcMbDataAccessBase  = 0;

		if ( rcSH.getTrueSlice() || rcSH.m_eErrorConceal != EC_TEMPORAL_DIRECT)
		{
			RNOK( pcMbDataCtrl        ->initMb    ( pcMbDataAccess,     uiMbY, uiMbX ) );
		}
		else
		{
			RNOK( pcMbDataCtrl        ->initMbTDEnhance( pcMbDataAccess, pcMbDataCtrl, pcMbDataCtrlRef, uiMbY, uiMbX ) );
		}
    pcMbDataAccess->getMbData().deactivateMotionRefinement();
		if  ( pcMbDataCtrlBase )
    {
      RNOK( pcMbDataCtrlBase  ->initMb    ( pcMbDataAccessBase, uiMbY, uiMbX ) );
    }
		RNOK( m_pcMbParser        ->readVirtual( *pcMbDataAccess,
                                            pcMbDataAccessBase,
                                            iSpatialScalabilityType,
                                            bEndOfSlice,
																						m_eErrorConceal) );
		ruiMbRead++;
  }
  ROF( ruiMbRead == uiNumMbInPic );

  return Err::m_nOK;
}
//TMM_EC }}
//TMM_EC {{
ErrVal 
SliceReader::readSliceHeaderVirtual(	NalUnitType   eNalUnitType,
																			SliceHeader	*rpcVeryFirstSliceHeader,
																			UInt	uiDecompositionStages,
																			UInt  uiMaxDecompositionStages,
																			UInt	uiGopSize,
																			UInt	uiMaxGopSize,
																			UInt	uiFrameNum,
																			UInt	uiPoc,
																			UInt	uiTemporalLevel,
																			SliceHeader*& rpcSH)
{
  SequenceParameterSet* pcSPS;
  PictureParameterSet*  pcPPS;

	UInt	uiPPSId	=	rpcVeryFirstSliceHeader->getPPS().getPicParameterSetId();

  RNOK( m_pcParameterSetMng ->get    ( pcPPS, uiPPSId) );
  RNOK( m_pcParameterSetMng ->get    ( pcSPS, pcPPS->getSeqParameterSetId() ) );

  rpcSH = new SliceHeader ( *pcSPS, *pcPPS );
  ROF( rpcSH );

  rpcSH->setNalUnitType   ( eNalUnitType    );

  if(eNalUnitType==NAL_UNIT_CODED_SLICE_SCALABLE)
  {
		rpcSH->setLayerId       ( 1       );
    rpcSH->setBaseLayerId(MSYS_UINT_MAX); // will be modified later
  }
  else
  {
    rpcSH->setLayerId(0);
		rpcSH->setBaseLayerId   ( MSYS_UINT_MAX       );
  }
  rpcSH->setTemporalLevel ( uiTemporalLevel );
  rpcSH->setQualityLevel  ( 0       );
  rpcSH->setFirstMbInSlice( 0       );
	rpcSH->setFragmentedFlag( false);

	UInt	uiMaxPocLsb		=	1 << rpcSH->getSPS().getLog2MaxPicOrderCntLsb();
	rpcSH->setFrameNum( uiFrameNum);
	rpcSH->setPicOrderCntLsb( uiPoc % uiMaxPocLsb);
	rpcSH->setPoc( uiPoc);
	rpcSH->setAdaptivePredictionFlag(1);
	rpcSH->setDirectSpatialMvPredFlag(false);
	rpcSH->setNumRefIdxActiveOverrideFlag( true);
	rpcSH->setNumRefIdxActive( LIST_0, 1);

	if ( rpcSH->getPicOrderCntLsb() % uiMaxGopSize == 0 || (uiGopSize - ((rpcSH->getPicOrderCntLsb() % uiMaxGopSize) >> (uiMaxDecompositionStages-uiDecompositionStages)) < (unsigned)( 1<<(uiDecompositionStages-uiTemporalLevel) ) ) )
	{
		rpcSH->setSliceType     ( P_SLICE );
		if( rpcSH->getPicOrderCntLsb() % (1<<(uiMaxDecompositionStages-uiDecompositionStages+1)) == 0)
			rpcSH->setNalRefIdc   ( NAL_REF_IDC_PRIORITY_HIGHEST);
		else
			rpcSH->setNalRefIdc     ( NAL_REF_IDC_PRIORITY_HIGH);
		rpcSH->setKeyPictureFlag( 1);
	}
  else
	{
		rpcSH->setSliceType     ( B_SLICE );
		if( rpcSH->getPicOrderCntLsb() % (1<<(uiMaxDecompositionStages-uiDecompositionStages+1)) == 0)
			rpcSH->setNalRefIdc   ( NAL_REF_IDC_PRIORITY_LOW);
		else
			rpcSH->setNalRefIdc     ( NAL_REF_IDC_PRIORITY_LOWEST);
		rpcSH->setNumRefIdxActive( LIST_1, 1);
		rpcSH->setKeyPictureFlag( 0);
	}
  //if(eNalUnitType==NAL_UNIT_CODED_SLICE||)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品国产一区二区精华液 | 夜夜嗨av一区二区三区四季av| 欧美在线不卡一区| 懂色av中文字幕一区二区三区| 免费欧美在线视频| 午夜视频一区二区三区| 亚洲一区二区影院| 一区二区三区日韩欧美| 国产精品乱码一区二区三区软件| 日韩精品一区二区三区视频播放 | 亚洲精品你懂的| 欧美经典一区二区三区| 精品久久久久久综合日本欧美| 欧美怡红院视频| 欧美综合色免费| 91理论电影在线观看| 春色校园综合激情亚洲| 国产成人亚洲综合a∨婷婷图片| 久草中文综合在线| 日本视频一区二区| 韩国中文字幕2020精品| 国产精品视频一区二区三区不卡| 久久精品视频一区| 综合激情网...| 一区二区三区在线播| 亚洲精品老司机| 亚洲成a人在线观看| 蜜桃一区二区三区在线观看| 亚洲电影第三页| 六月丁香婷婷色狠狠久久| 国内精品伊人久久久久av一坑| 国产福利一区二区三区视频在线| 国产成人免费9x9x人网站视频| 成人aaaa免费全部观看| 欧洲精品中文字幕| 色屁屁一区二区| 在线播放日韩导航| 日韩欧美不卡在线观看视频| 精品成人一区二区| 国产精品美女久久久久aⅴ国产馆| 最近日韩中文字幕| 亚洲欧洲日本在线| 日韩电影一二三区| 成人教育av在线| 91麻豆swag| 日韩一区二区免费高清| 亚洲国产高清不卡| 日韩专区在线视频| 国产精品1区2区3区在线观看| 99re在线精品| 欧美成人官网二区| 国产精品卡一卡二卡三| 亚洲福利视频一区| 国产成+人+日韩+欧美+亚洲| 欧美三级电影一区| 欧美国产精品专区| 日韩和欧美一区二区| 懂色av中文字幕一区二区三区 | 国产人伦精品一区二区| **网站欧美大片在线观看| 日本欧美一区二区三区乱码| 91麻豆精品视频| 国产亚洲自拍一区| 亚洲午夜电影网| aaa欧美大片| 欧美三级日韩三级国产三级| 中文一区二区完整视频在线观看| 视频一区二区中文字幕| 色综合久久久久久久久| 中文字幕av不卡| 国产一区福利在线| 色久综合一二码| 国产精品污污网站在线观看| 久久国产精品99久久人人澡| 欧美日韩国产综合一区二区| 亚洲欧洲精品一区二区三区不卡| 国产一本一道久久香蕉| 欧美高清性hdvideosex| 久久久久久免费网| 国产一区91精品张津瑜| 久久久天堂av| 国产精品中文字幕日韩精品 | 偷窥少妇高潮呻吟av久久免费| av在线播放不卡| 欧美国产日本韩| 国产成人免费视频一区| 久久新电视剧免费观看| 久久se精品一区二区| 日韩三级.com| 日本sm残虐另类| 日韩一区和二区| 青青草精品视频| 欧美成人在线直播| 日韩精品成人一区二区三区| 在线91免费看| 亚洲丝袜另类动漫二区| 91看片淫黄大片一级在线观看| 国产精品久久久久久妇女6080| 成人av动漫网站| 国产精品国产三级国产有无不卡| 成人激情电影免费在线观看| 国产精品沙发午睡系列990531| 成人免费视频caoporn| 亚洲欧洲一区二区在线播放| 91亚洲国产成人精品一区二区三| 国产亚洲一区二区三区四区| 国产精品1024| 亚洲欧洲日产国码二区| 欧美专区亚洲专区| 免费在线观看精品| 久久综合中文字幕| 91亚洲午夜精品久久久久久| 亚洲国产日日夜夜| 欧美大片拔萝卜| 丁香婷婷综合网| 一区二区视频在线| 国产精品1区2区| 五月天欧美精品| 亚洲国产精品v| 欧美xxxx老人做受| 欧美在线一区二区| 成人av电影免费观看| 日本不卡视频一二三区| 国产精品国产三级国产普通话99| 91精品国产91热久久久做人人 | 亚洲主播在线观看| 国产亚洲欧美一级| 6080亚洲精品一区二区| 91国产丝袜在线播放| 国产91综合一区在线观看| 午夜精品久久久久久| 亚洲精品久久久蜜桃| 国产精品理伦片| 日本一区二区成人| 亚洲精品一线二线三线| 日韩一区二区免费高清| 欧美肥妇free| 91精品国产日韩91久久久久久| 99re66热这里只有精品3直播| 国产精品一区二区x88av| 美女视频黄频大全不卡视频在线播放| 一区二区欧美视频| 亚洲欧美在线观看| 欧美激情一区二区三区| 国产亚洲欧美一区在线观看| 26uuu亚洲综合色| 精品国产凹凸成av人导航| 欧美精品在欧美一区二区少妇| 一本一道久久a久久精品综合蜜臀| 国产成a人亚洲精品| 国产成人久久精品77777最新版本| 经典三级一区二区| 久久草av在线| 国产在线精品国自产拍免费| 狠狠久久亚洲欧美| 国产精品一区二区视频| 国产精品一区二区男女羞羞无遮挡| 另类小说欧美激情| 国产精品一二三在| 成人网男人的天堂| 91丨九色丨蝌蚪丨老版| 91毛片在线观看| 一本一道久久a久久精品| 欧美天堂一区二区三区| 欧美日韩国产影片| 日韩一区二区在线看| 久久久久久久综合色一本| 国产精品私人影院| 亚洲男人的天堂在线aⅴ视频| 亚洲综合久久久久| 免费观看一级欧美片| 国产一区二区91| 一本色道a无线码一区v| 色狠狠综合天天综合综合| 7878成人国产在线观看| 久久久精品tv| 一区二区三区成人在线视频| 亚洲成人综合网站| 另类小说综合欧美亚洲| 成人动漫一区二区| 在线观看精品一区| 亚洲精品一线二线三线无人区| 国产精品视频一二| 丝袜诱惑亚洲看片| 国产成人aaa| 欧美精品乱码久久久久久| wwwwww.欧美系列| 亚洲激情图片qvod| 精品在线观看视频| 色综合久久综合网| 欧美成人一区二区| 亚洲欧美另类小说视频| 久久精品国产亚洲高清剧情介绍| 成人a级免费电影| 日韩精品最新网址| 一区二区三区四区在线播放| 精品亚洲欧美一区| 日本高清视频一区二区| 欧美韩国日本不卡| 免费成人深夜小野草|