OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr45874.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
typedef struct {
4
} IppLibraryVersion;
5
typedef unsigned char Ipp8u;
6
typedef unsigned int Ipp32u;
7
typedef signed int Ipp32s;
8
typedef 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
    };
14
class MediaBuffer : public MediaReceiver {
15
};
16
struct TrackInfo {
17
};
18
struct Mpeg2TrackInfo : public TrackInfo     {
19
};
20
class BitstreamReader     {
21
public:          BitstreamReader(void);
22
                 virtual ~BitstreamReader(void) {
23
                 }
24
                 Ipp32u GetBits(Ipp32s iNum);
25
                 void SkipBits(Ipp32s iNum);
26
protected:          virtual void Refresh(void);
27
                    Ipp32s m_iReadyBits;
28
};
29
class FrameConstructor : public MediaBuffer     {
30
};
31
class VideoFrameConstructor : public FrameConstructor     {
32
};
33
class Mpeg2FrameConstructor : public VideoFrameConstructor     {
34
    static Status ParsePictureHeader(Ipp8u *buf, Ipp32s iLen, Mpeg2TrackInfo *pInfo);
35
};
36
Status 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
}
52
void BitstreamReader::SkipBits(Ipp32s iNum) {
53
    if (iNum <= m_iReadyBits)     {
54
        m_iReadyBits -= iNum;
55
        Refresh();
56
    }
57
}
58
void BitstreamReader::Refresh(void) { }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.