~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/util/render/yuvPicture.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  describes a picture in yuv format
 
3
  Copyright (C) 2000 Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
#ifndef __YUVPICTURE_H
 
16
#define __YUVPICTURE_H
 
17
 
 
18
 
 
19
extern "C" {
 
20
#include <stdio.h>
 
21
#include <string.h>
 
22
}
 
23
 
 
24
#include "../timeStamp.h"
 
25
 
 
26
#define PICTURE_NO_TYPE     -1
 
27
 
 
28
#define PICTURE_YUVMODE_CR_CB   1
 
29
#define PICTURE_YUVMODE_CB_CR   2
 
30
#define PICTURE_RGB             3
 
31
#define PICTURE_RGB_FLIPPED     4
 
32
#define PICTURE_YUVMODE_YUY2    5
 
33
#define PICTURE_YUVMODE_UYVY    6
 
34
 
 
35
class YUVPicture {
 
36
 
 
37
  unsigned char* imagePtr;               /* Pointer to complete yuv image */
 
38
 
 
39
  unsigned char* luminance;              /* Luminance plane.   */
 
40
  unsigned char* Cr;                     /* Cr plane.          */
 
41
  unsigned char* Cb;                     /* Cb plane.          */
 
42
 
 
43
 
 
44
  int width;
 
45
  int height;
 
46
 
 
47
  float picPerSec;
 
48
  int lumLength;
 
49
  int colorLength;
 
50
  int imageSize;
 
51
 
 
52
  TimeStamp* startTimeStamp;
 
53
  TimeStamp* waitTime;
 
54
  TimeStamp* earlyTime;
 
55
 
 
56
  int mpegType;
 
57
  int instance;
 
58
  int imageType;
 
59
 
 
60
  unsigned char* image_mode;            /* start Pointer to complete image */
 
61
  unsigned char* luminance_mode;         /* Luminace plane.          */
 
62
  unsigned char* Cr_mode;                /* Cr plane.          */
 
63
  unsigned char* Cb_mode;                /* Cb plane.          */
 
64
 
 
65
 public:
 
66
  YUVPicture(int width,int height);
 
67
  ~YUVPicture();
 
68
 
 
69
  //
 
70
  //  For YUV Images
 
71
  //
 
72
  inline unsigned char* getLuminancePtr() {return luminance_mode;}
 
73
  inline unsigned char* getCrPtr() {return Cr_mode;}
 
74
  inline unsigned char* getCbPtr() {return Cb_mode;}
 
75
 
 
76
  // general
 
77
  inline unsigned char* getImagePtr() {return imagePtr;}
 
78
 
 
79
  // use these to swap the image Types
 
80
  inline int getImageType()           { return imageType; }
 
81
  void setImageType(int mode);
 
82
 
 
83
 
 
84
  int getHeight();
 
85
  int getWidth();
 
86
 
 
87
  int getLumLength();
 
88
  int getColorLength();
 
89
  int getImageSize();
 
90
 
 
91
  void setPicturePerSecond(float val);
 
92
  float getPicturePerSecond();
 
93
 
 
94
 
 
95
  void setStartTimeStamp(TimeStamp* timeStamp);
 
96
  TimeStamp* getStartTimeStamp();
 
97
 
 
98
  void setWaitTime(TimeStamp* waitTime);
 
99
  TimeStamp* getWaitTime();
 
100
 
 
101
  void setEarylTime(TimeStamp* earlyTime);
 
102
  TimeStamp* getEarlyTime();
 
103
 
 
104
  void setMpegPictureType(int type);
 
105
  int getMpegPictureType();
 
106
 
 
107
 
 
108
  void print(const char* title);
 
109
};
 
110
#endif