1 /* 2 * gstvaapiutils_h264.h - H.264 related utilities 3 * 4 * Copyright (C) 2011-2014 Intel Corporation 5 * Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> 6 * 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. 11 * 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. 16 * 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 21 */ 22 23 #ifndef GST_VAAPI_UTILS_H264_H 24 #define GST_VAAPI_UTILS_H264_H 25 26 #include <gst/vaapi/gstvaapiprofile.h> 27 28 G_BEGIN_DECLS 29 30 /** 31 * GstVaapiLevelH264: 32 * @GST_VAAPI_LEVEL_H264_L1: H.264 level 1. 33 * @GST_VAAPI_LEVEL_H264_L1_1: H.264 level 1.1. 34 * @GST_VAAPI_LEVEL_H264_L1_2: H.264 level 1.2. 35 * @GST_VAAPI_LEVEL_H264_L1_3: H.264 level 1.3. 36 * @GST_VAAPI_LEVEL_H264_L2: H.264 level 2. 37 * @GST_VAAPI_LEVEL_H264_L2_1: H.264 level 2.1. 38 * @GST_VAAPI_LEVEL_H264_L2_2: H.264 level 2.2. 39 * @GST_VAAPI_LEVEL_H264_L3: H.264 level 3. 40 * @GST_VAAPI_LEVEL_H264_L3_1: H.264 level 3.1. 41 * @GST_VAAPI_LEVEL_H264_L3_2: H.264 level 3.2. 42 * @GST_VAAPI_LEVEL_H264_L4: H.264 level 4. 43 * @GST_VAAPI_LEVEL_H264_L4_1: H.264 level 4.1. 44 * @GST_VAAPI_LEVEL_H264_L4_2: H.264 level 4.2. 45 * @GST_VAAPI_LEVEL_H264_L5: H.264 level 5. 46 * @GST_VAAPI_LEVEL_H264_L5_1: H.264 level 5.1. 47 * @GST_VAAPI_LEVEL_H264_L5_2: H.264 level 5.2. 48 * @GST_VAAPI_LEVEL_H264_L6: H.264 level 6. 49 * @GST_VAAPI_LEVEL_H264_L6_1: H.264 level 6.1. 50 * @GST_VAAPI_LEVEL_H264_L6_2: H.264 level 6.2. 51 * 52 * The set of all levels for #GstVaapiLevelH264. 53 */ 54 typedef enum { 55 GST_VAAPI_LEVEL_H264_L1 = 1, 56 GST_VAAPI_LEVEL_H264_L1b, 57 GST_VAAPI_LEVEL_H264_L1_1, 58 GST_VAAPI_LEVEL_H264_L1_2, 59 GST_VAAPI_LEVEL_H264_L1_3, 60 GST_VAAPI_LEVEL_H264_L2, 61 GST_VAAPI_LEVEL_H264_L2_1, 62 GST_VAAPI_LEVEL_H264_L2_2, 63 GST_VAAPI_LEVEL_H264_L3, 64 GST_VAAPI_LEVEL_H264_L3_1, 65 GST_VAAPI_LEVEL_H264_L3_2, 66 GST_VAAPI_LEVEL_H264_L4, 67 GST_VAAPI_LEVEL_H264_L4_1, 68 GST_VAAPI_LEVEL_H264_L4_2, 69 GST_VAAPI_LEVEL_H264_L5, 70 GST_VAAPI_LEVEL_H264_L5_1, 71 GST_VAAPI_LEVEL_H264_L5_2, 72 GST_VAAPI_LEVEL_H264_L6, 73 GST_VAAPI_LEVEL_H264_L6_1, 74 GST_VAAPI_LEVEL_H264_L6_2, 75 } GstVaapiLevelH264; 76 77 /* Returns a relative score for the supplied GstVaapiProfile */ 78 guint 79 gst_vaapi_utils_h264_get_profile_score (GstVaapiProfile profile); 80 81 /* Returns GstVaapiProfile from a string representation */ 82 GstVaapiProfile 83 gst_vaapi_utils_h264_get_profile_from_string (const gchar * str); 84 85 /* Returns a string representation for the supplied H.264 profile */ 86 const gchar * 87 gst_vaapi_utils_h264_get_profile_string (GstVaapiProfile profile); 88 89 /* Returns GstVaapiLevelH264 from a string representation */ 90 GstVaapiLevelH264 91 gst_vaapi_utils_h264_get_level_from_string (const gchar * str); 92 93 /* Returns a string representation for the supplied H.264 level */ 94 const gchar * 95 gst_vaapi_utils_h264_get_level_string (GstVaapiLevelH264 level); 96 97 G_END_DECLS 98 99 #endif /* GST_VAAPI_UTILS_H264_H */ 100