2 * gstvaapiutils_mpeg2_priv.h - MPEG-2 related utilities
4 * Copyright (C) 2011-2014 Intel Corporation
5 * Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * as published by the Free Software Foundation; either version 2.1
10 * 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 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA
23 #ifndef GST_VAAPI_UTILS_MPEG2_PRIV_H
24 #define GST_VAAPI_UTILS_MPEG2_PRIV_H
26 #include "gstvaapiutils_mpeg2.h"
27 #include "libgstvaapi_priv_check.h"
32 * GstVaapiMPEG2LevelLimits:
33 * @level: the #GstVaapiLevelMPEG2
34 * @level_idc: the MPEG-2 level indication value
35 * @horizontal_size_value: the maximum number of samples per line
36 * @vertical_size_value: the maximum number of lines per frame
37 * @frame_rate_value: the maximum number of frames per second
38 * @sample_rate: the maximum number of samples per second (for luminance)
39 * @bit_rate: the maximum bit rate (kbps)
40 * @vbv_buffer_size: the VBV buffer size requirements (bits)
42 * The data structure that describes the limits of an MPEG-2 level.
45 GstVaapiLevelMPEG2 level;
47 guint16 horizontal_size_value;
48 guint16 vertical_size_value;
49 guint32 frame_rate_value;
52 guint32 vbv_buffer_size;
53 } GstVaapiMPEG2LevelLimits;
55 /* Returns GstVaapiProfile from MPEG-2 profile_idc value */
58 gst_vaapi_utils_mpeg2_get_profile (guint8 profile_idc);
60 /* Returns MPEG-2 profile_idc value from GstVaapiProfile */
63 gst_vaapi_utils_mpeg2_get_profile_idc (GstVaapiProfile profile);
65 /* Returns GstVaapiLevelMPEG2 from MPEG-2 level_idc value */
68 gst_vaapi_utils_mpeg2_get_level (guint8 level_idc);
70 /* Returns MPEG-2 level_idc value from GstVaapiLevelMPEG2 */
73 gst_vaapi_utils_mpeg2_get_level_idc (GstVaapiLevelMPEG2 level);
75 /* Returns level limits as specified in Table A-1 of the MPEG-2 standard */
77 const GstVaapiMPEG2LevelLimits *
78 gst_vaapi_utils_mpeg2_get_level_limits (GstVaapiLevelMPEG2 level);
80 /* Returns the Table A-1 specification */
82 const GstVaapiMPEG2LevelLimits *
83 gst_vaapi_utils_mpeg2_get_level_limits_table (guint * out_length_ptr);
85 /* Returns GstVaapiChromaType from MPEG-2 chroma_format_idc value */
88 gst_vaapi_utils_mpeg2_get_chroma_type (guint chroma_format_idc);
90 /* Returns MPEG-2 chroma_format_idc value from GstVaapiChromaType */
93 gst_vaapi_utils_mpeg2_get_chroma_format_idc (GstVaapiChromaType chroma_type);
97 #endif /* GST_VAAPI_UTILS_MPEG2_PRIV_H */