Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1671 tullio 1
/* gethdr.c, header decoding                                                */
2
 
3
/* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */
4
 
5
/*
6
 * Disclaimer of Warranty
7
 *
8
 * These software programs are available to the user without any license fee or
9
 * royalty on an "as is" basis.  The MPEG Software Simulation Group disclaims
10
 * any and all warranties, whether express, implied, or statuary, including any
11
 * implied warranties or merchantability or of fitness for a particular
12
 * purpose.  In no event shall the copyright-holder be liable for any
13
 * incidental, punitive, or consequential damages of any kind whatsoever
14
 * arising from the use of these programs.
15
 *
16
 * This disclaimer of warranty extends to the user of these programs and user's
17
 * customers, employees, agents, transferees, successors, and assigns.
18
 *
19
 * The MPEG Software Simulation Group does not represent or warrant that the
20
 * programs furnished hereunder are free of infringement of any third-party
21
 * patents.
22
 *
23
 * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
24
 * are subject to royalty fees to patent holders.  Many of these patents are
25
 * general enough such that they are unavoidable regardless of implementation
26
 * design.
27
 *
28
 */
29
 
30
#include "config.h"
31
#include "global.h"
32
 
33
 
34
/* private prototypes */
35
static void sequence_header(void);
36
static void group_of_pictures_header(void);
37
static void picture_header(void);
38
static void sequence_extension(void);
39
static void sequence_display_extension(void);
40
static void quant_matrix_extension(void);
41
static void sequence_scalable_extension(void);
42
static void picture_display_extension(void);
43
static void picture_coding_extension(void);
44
static void picture_spatial_scalable_extension(void);
45
static void picture_temporal_scalable_extension(void);
46
static int  extra_bit_information(void);
47
static void copyright_extension(void);
48
static void user_data(void);
49
static void user_data(void);
50
51
 
52
 
53
 
54
 
55
static void Update_Temporal_Reference_Tacking_Data(void);
56
/* private variables */
57
static int Temporal_Reference_Base = 0;
58
static int Temporal_Reference_GOP_Reset = 0;
59
60
#define RESERVED    -1 
61
 
62
{
63
  0.0,
64
  ((23.0*1000.0)/1001.0),
65
  24.0,
66
  25.0,
67
  ((30.0*1000.0)/1001.0),
68
  30.0,
69
  50.0,
70
  ((60.0*1000.0)/1001.0),
71
  60.0,
72
 
73
  RESERVED,
74
 
75
  RESERVED,
76
  RESERVED,
77
  RESERVED,
78
  RESERVED,
79
  RESERVED
80
};
81
82
/*
83
 
84
 * until an End of Sequence or picture start code
85
 * is found
86
 */
87
int Get_Hdr()
88
{
89
  unsigned int code;
90
91
  for (;;)
92
 
93
    /* look for next_start_code */
94
    next_start_code();
95
    code = Get_Bits32();
96
 
97
  }
98
 
99
100
101
102