Last change
on this file since 47 was
2,
checked in by hhi, 13 years ago
|
inital import
|
-
Property svn:eol-style set to
native
|
File size:
1.5 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | /** \file TVideoIOYuv.h |
---|
4 | \brief YUV file I/O class (header) |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef __TVIDEOIOYUV__ |
---|
8 | #define __TVIDEOIOYUV__ |
---|
9 | |
---|
10 | #include <stdio.h> |
---|
11 | #include <fstream> |
---|
12 | #include <iostream> |
---|
13 | #include "../TLibCommon/CommonDef.h" |
---|
14 | #include "../TLibCommon/TComPicYuv.h" |
---|
15 | |
---|
16 | using namespace std; |
---|
17 | |
---|
18 | // ==================================================================================================================== |
---|
19 | // Class definition |
---|
20 | // ==================================================================================================================== |
---|
21 | |
---|
22 | /// YUV file I/O class |
---|
23 | class TVideoIOYuv |
---|
24 | { |
---|
25 | private: |
---|
26 | fstream m_cHandle; ///< file handle |
---|
27 | unsigned int m_fileBitdepth; ///< bitdepth of input/output video file |
---|
28 | int m_bitdepthShift; ///< number of bits to increase or decrease image by before/after write/read |
---|
29 | |
---|
30 | public: |
---|
31 | TVideoIOYuv() {} |
---|
32 | virtual ~TVideoIOYuv() {} |
---|
33 | |
---|
34 | Void open ( char* pchFile, Bool bWriteMode, unsigned int fileBitDepth, unsigned int internalBitDepth ); ///< open or create file |
---|
35 | Void close (); ///< close file |
---|
36 | |
---|
37 | void skipFrames(unsigned int numFrames, unsigned int width, unsigned int height); |
---|
38 | |
---|
39 | Void read ( TComPicYuv*& rpcPicYuv, Int aiPad[2], Bool bRewind = false ); ///< read one YUV frame with padding parameter |
---|
40 | Void write ( TComPicYuv* pcPicYuv, Int aiPad[2] ); ///< write one YUV frame with padding parameter |
---|
41 | |
---|
42 | Bool isEof (); ///< check end-of-file |
---|
43 | |
---|
44 | }; |
---|
45 | |
---|
46 | #endif // __TVIDEOIOYUV__ |
---|
47 | |
---|
Note: See
TracBrowser for help on using the repository browser.