HEVC Test Model (HM)  HM-16.3
TAppEncTop.h
Go to the documentation of this file.
1 /* The copyright in this software is being made available under the BSD
2  * License, included below. This software may be subject to other third party
3  * and contributor rights, including patent rights, and no such rights are
4  * granted under this license.
5  *
6  * Copyright (c) 2010-2015, ITU/ISO/IEC
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18  * be used to endorse or promote products derived from this software without
19  * specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31  * THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
38 #ifndef __TAPPENCTOP__
39 #define __TAPPENCTOP__
40 
41 #include <list>
42 #include <ostream>
43 
44 #include "TLibEncoder/TEncTop.h"
46 #include "TLibCommon/AccessUnit.h"
47 #include "TAppEncCfg.h"
48 
51 
52 // ====================================================================================================================
53 // Class definition
54 // ====================================================================================================================
55 
57 class TAppEncTop : public TAppEncCfg
58 {
59 private:
60  // class interface
64 
66 
68 
71 
72 protected:
73  // initialization
74  Void xCreateLib ();
75  Void xInitLibCfg ();
76  Void xInitLib (Bool isFieldCoding);
77  Void xDestroyLib ();
78 
80  Void xGetBuffer(TComPicYuv*& rpcPicYuvRec);
81 
84 
85  // file I/O
86  Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits);
87  Void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats);
90 
91 public:
92  TAppEncTop();
93  virtual ~TAppEncTop();
94 
95  Void encode ();
96  TEncTop& getTEncTop () { return m_cTEncTop; }
97 
98 };// END CLASS DEFINITION TAppEncTop
99 
101 
102 #endif // __TAPPENCTOP__
103 
YUV file I/O class.
Definition: TVideoIOYuv.h:54
Void rateStatsAccum(const AccessUnit &au, const std::vector< UInt > &stats)
Definition: TAppEncTop.cpp:625
Void printChromaFormat()
Definition: TAppEncTop.cpp:672
picture YUV buffer class
Definition: TComPicYuv.h:55
void Void
Definition: TypeDef.h:285
TVideoIOYuv m_cTVideoIOYuvReconFile
output reconstruction file
Definition: TAppEncTop.h:63
virtual ~TAppEncTop()
Definition: TAppEncTop.cpp:65
Void xDeleteBuffer()
delete allocated buffers
Definition: TAppEncTop.cpp:539
unsigned int UInt
Definition: TypeDef.h:297
Void xInitLib(Bool isFieldCoding)
initialize encoder class
Definition: TAppEncTop.cpp:389
TEncTop & getTEncTop()
return encoder class pointer reference
Definition: TAppEncTop.h:96
Int m_iFrameRcvd
number of received frames
Definition: TAppEncTop.h:67
YUV file I/O class (header)
Void xWriteOutput(std::ostream &bitstreamFile, Int iNumEncoded, const std::list< AccessUnit > &accessUnits)
write bitstream to file
Definition: TAppEncTop.cpp:560
TComList< TComPicYuv * > m_cListPicYuvRec
list of reconstruction YUV files
Definition: TAppEncTop.h:65
bool Bool
Definition: TypeDef.h:286
Void xCreateLib()
create files & encoder class
Definition: TAppEncTop.cpp:364
Void printRateSummary()
Definition: TAppEncTop.cpp:663
encoder configuration class
Definition: TAppEncCfg.h:54
encoder application class
Definition: TAppEncTop.h:57
Handle encoder configuration parameters (header)
Void xInitLibCfg()
initialize internal variables
Definition: TAppEncTop.cpp:69
Access Unit class (header)
encoder class (header)
UInt m_totalBytes
Definition: TAppEncTop.h:70
Void xGetBuffer(TComPicYuv *&rpcPicYuvRec)
obtain required buffers
Definition: TAppEncTop.cpp:519
Void encode()
main encoding function
Definition: TAppEncTop.cpp:406
TVideoIOYuv m_cTVideoIOYuvInputFile
input YUV file
Definition: TAppEncTop.h:62
Void xDestroyLib()
destroy encoder class
Definition: TAppEncTop.cpp:379
TEncTop m_cTEncTop
encoder class
Definition: TAppEncTop.h:61
int Int
Definition: TypeDef.h:296
UInt m_essentialBytes
Definition: TAppEncTop.h:69
encoder class
Definition: TEncTop.h:68