summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/mpegplay/picture.h
blob: 7be35ab70bc1a93b333076901c85ffa302c185d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
  mpeg video picture
  Copyright (C) 2000  Martin Vogt

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Library General Public License as published by
  the Free Software Foundation.

  For more information look at the file COPYRIGHT in this package

 */





#ifndef __PICTURE_H
#define __PICTURE_H


#include "mpegExtension.h"


class Picture {

/* Picture structure. */

  unsigned int temp_ref;                 /* Temporal reference.             */
  unsigned int code_type;                /* Frame type: P, B, I             */
  unsigned int vbv_delay;                /* Buffer delay.                   */
  int full_pel_forw_vector;              /* Forw. vectors specified in full
					    pixel values flag.              */
  unsigned int forw_r_size;              /* Used for vector decoding.       */
  unsigned int forw_f;                   /* Used for vector decoding.       */
  int full_pel_back_vector;              /* Back vectors specified in full 
					    pixel values flag.              */
  unsigned int back_r_size;              /* Used in decoding.               */
  unsigned int back_f;                   /* Used in decoding.               */


  // MPEG 2 [START]
  

  MpegExtension* extension;
  // sync info
  class TimeStamp* startOfPicStamp;

  // MPEG 2 things
  int extraBit;

 public:
  Picture();
  ~Picture();

  int processPicture(class MpegVideoStream* mpegVideoStream);
  int processPictureCodingExtension(class MpegVideoStream* mpegVideoStream);


  inline unsigned int getCodeType()      { return code_type; }
  inline unsigned int getForw_f()        { return forw_f;}
  inline unsigned int getBack_f()        { return back_f;}
  inline void setForw_f(unsigned int f)  { forw_f=f;}
  inline void setBack_f(unsigned int f)  { back_f=f;}

  inline int getExtraBit()               { return extraBit; }

  inline TimeStamp* getStartOfPicStamp() { return startOfPicStamp;}
  inline unsigned int getFull_pel_forw_vector() {return full_pel_forw_vector;}
  inline unsigned int getFull_pel_back_vector() {return full_pel_back_vector;}

  inline void setFull_pel_forw_vector(unsigned int v) {full_pel_forw_vector=v;}
  inline void setFull_pel_back_vector(unsigned int v) {full_pel_back_vector=v;}

  unsigned int geth_back_r(class MpegVideoStream* mpegVideoStream);
  unsigned int getv_back_r(class MpegVideoStream* mpegVideoStream);
 
  unsigned int geth_forw_r(class MpegVideoStream* mpegVideoStream);
  unsigned int getv_forw_r(class MpegVideoStream* mpegVideoStream);
 

};
#endif