1// { dg-do compile } 2 3typedef struct { 4} IppLibraryVersion; 5typedef unsigned char Ipp8u; 6typedef unsigned int Ipp32u; 7typedef signed int Ipp32s; 8typedef enum e_vm_Status { 9 VM_OK = 0, VM_OPERATION_FAILED =-999, VM_NOT_INITIALIZED =-998, VM_TIMEOUT =-987, VM_NOT_ENOUGH_DATA =-996, VM_NULL_PTR =-995, VM_SO_CANT_LOAD =-994, VM_SO_INVALID_HANDLE =-993, VM_SO_CANT_GET_ADDR =-992 } 10 vm_status; 11 typedef Ipp32s Status; 12 class MediaReceiver { 13 }; 14class MediaBuffer : public MediaReceiver { 15}; 16struct TrackInfo { 17}; 18struct Mpeg2TrackInfo : public TrackInfo { 19}; 20class BitstreamReader { 21public: BitstreamReader(void); 22 virtual ~BitstreamReader(void) { 23 } 24 Ipp32u GetBits(Ipp32s iNum); 25 void SkipBits(Ipp32s iNum); 26protected: virtual void Refresh(void); 27 Ipp32s m_iReadyBits; 28}; 29class FrameConstructor : public MediaBuffer { 30}; 31class VideoFrameConstructor : public FrameConstructor { 32}; 33class Mpeg2FrameConstructor : public VideoFrameConstructor { 34 static Status ParsePictureHeader(Ipp8u *buf, Ipp32s iLen, Mpeg2TrackInfo *pInfo); 35}; 36Status Mpeg2FrameConstructor::ParsePictureHeader(Ipp8u *buf, Ipp32s iLen, Mpeg2TrackInfo *pInfo) { 37 BitstreamReader bs; 38 bs.SkipBits(32 + 4 + 4 + 4 + 4 + 4 + 2); 39 bs.SkipBits(1 + 1 + 1 + 1 + 1 + 1 + 1); 40 bs.SkipBits(5); 41 bs.SkipBits(3); 42 Ipp8u source_format; 43 bs.SkipBits(22); 44 bs.SkipBits(8); 45 if (7 == source_format) { 46 Ipp8u ufep = (Ipp8u)bs.GetBits(3); 47 if (0x01 == ufep) { 48 bs.SkipBits(10); 49 } 50 } 51} 52void BitstreamReader::SkipBits(Ipp32s iNum) { 53 if (iNum <= m_iReadyBits) { 54 m_iReadyBits -= iNum; 55 Refresh(); 56 } 57} 58void BitstreamReader::Refresh(void) { } 59