1 /* GStreamer H.263 Parser
2 * Copyright (C) <2010> Arun Raghavan <arun.raghavan@collabora.co.uk>
3 * Copyright (C) <2010> Edward Hervey <edward.hervey@collabora.co.uk>
4 * Copyright (C) <2010> Collabora Multimedia
5 * Copyright (C) <2010> Nokia Corporation
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef __GST_H263_PARAMS_H__
24 #define __GST_H263_PARAMS_H__
27 #include <gst/base/gstadapter.h>
38 /* H263 Optional Features */
41 /* Optional Unrestricted Motion Vector (UMV) mode (see Annex D) */
42 H263_OPTION_UMV_MODE = 1 << 0,
43 /* Optional Syntax-based Arithmetic Coding (SAC) mode (see Annex E) */
44 H263_OPTION_SAC_MODE = 1 << 1,
45 /* Optional Advanced Prediction mode (AP) (see Annex F) */
46 H263_OPTION_AP_MODE = 1 << 2,
47 /* Optional PB-frames mode (see Annex G) */
48 H263_OPTION_PB_MODE = 1 << 3,
49 /* Optional Advanced INTRA Coding (AIC) mode (see Annex I) */
50 H263_OPTION_AIC_MODE = 1 << 4,
51 /* Optional Deblocking Filter (DF) mode (see Annex J) */
52 H263_OPTION_DF_MODE = 1 << 5,
53 /* Optional Slice Structured (SS) mode (see Annex K) */
54 H263_OPTION_SS_MODE = 1 << 6,
55 /* Optional Reference Picture Selection (RPS) mode (see Annex N) */
56 H263_OPTION_RPS_MODE = 1 << 7,
57 /* Optional Independent Segment Decoding (ISD) mode (see Annex R) */
58 H263_OPTION_ISD_MODE = 1 << 8,
59 /* Optional Alternative INTER VLC (AIV) mode (see Annex S) */
60 H263_OPTION_AIV_MODE = 1 << 9,
61 /* Optional Modified Quantization (MQ) mode (see Annex T) */
62 H263_OPTION_MQ_MODE = 1 << 10,
63 /* Optional Reference Picture Resampling (RPR) mode (see Annex P) */
64 H263_OPTION_RPR_MODE = 1 << 11,
65 /* Optional Reduced-Resolution Update (RRU) mode (see Annex Q) */
66 H263_OPTION_RRU_MODE = 1 << 12,
67 /* Optional Enhanced Reference Picture Selection (ERPS) mode (see Annex U) */
68 H263_OPTION_ERPS_MODE = 1 << 13,
69 /* Optional Data Partitioned Slices (DPS) mode (see Annex V) */
70 H263_OPTION_DPS_MODE = 1 << 14
71 } H263OptionalFeatures;
73 /* H263 Picture Types */
76 PICTURE_I = 0, /* I-picture (INTRA) Baseline */
77 PICTURE_P, /* P-picture (INTER) Baseline */
78 PICTURE_IMPROVED_PB, /* Improved PB-frame (Annex M) */
79 PICTURE_B, /* B-picture (Annex O) */
80 PICTURE_EI, /* EI-picture (Annex O) */
81 PICTURE_EP, /* EP-picture (Annex O) */
84 PICTURE_PB /* PB-frame (See Annex G) */
87 /* H263 Picture Format */
90 PICTURE_FMT_FORBIDDEN_0 = 0,
96 PICTURE_FMT_RESERVED1,
97 PICTURE_FMT_EXTENDEDPTYPE
108 typedef struct _H263Params H263Params;
112 guint32 temporal_ref;
114 H263OptionalFeatures features;
116 gboolean splitscreen;
117 gboolean documentcamera;
118 gboolean fullpicturefreezerelease;
119 gboolean custompcfpresent;
123 H263PictureFormat format;
125 H263PictureType type;
129 guint8 parnum, pardenom;
130 gint32 pcfnum, pcfdenom;
133 gboolean gst_h263_parse_is_delta_unit (const H263Params * params);
135 GstFlowReturn gst_h263_parse_get_params (H263Params * params_p,
138 H263ParseState * state);
140 void gst_h263_parse_get_framerate (const H263Params * params,
144 gint gst_h263_parse_get_profile (const H263Params * params);
146 gint gst_h263_parse_get_level (const H263Params * params,