1 /*************************************************************************** 2 \fn libvaEnc_plugin 3 \brief Plugin to use libva hw encoder (intel mostly) 4 ------------------- 5 6 copyright : (C) 2018 by mean 7 email : fixounet@free.fr 8 ***************************************************************************/ 9 10 /*************************************************************************** 11 * * 12 * This program is free software; you can redistribute it and/or modify * 13 * it under the terms of the GNU General Public License as published by * 14 * the Free Software Foundation; either version 2 of the License, or * 15 * (at your option) any later version. * 16 * * 17 ***************************************************************************/ 18 /***************************************************************************/ 19 /* Derived from libva sample code */ 20 /* 21 * Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved. 22 * 23 * Permission is hereby granted, free of charge, to any person obtaining a 24 * copy of this software and associated documentation files (the 25 * "Software"), to deal in the Software without restriction, including 26 * without limitation the rights to use, copy, modify, merge, publish, 27 * distribute, sub license, and/or sell copies of the Software, and to 28 * permit persons to whom the Software is furnished to do so, subject to 29 * the following conditions: 30 * 31 * The above copyright notice and this permission notice (including the 32 * next paragraph) shall be included in all copies or substantial portions 33 * of the Software. 34 * 35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 36 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 37 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 38 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 39 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 40 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 41 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 42 */ 43 /*************************************************************************** 44 * * 45 * This program is free software; you can redistribute it and/or modify * 46 * it under the terms of the GNU General Public License as published by * 47 * the Free Software Foundation; either version 2 of the License, or * 48 * (at your option) any later version. * 49 * * 50 ***************************************************************************/ 51 #pragma once 52 /** 53 */ 54 #define SURFACE_NUM 16 55 56 enum vaFrameType 57 { 58 FRAME_P=0, 59 FRAME_B=1, 60 FRAME_I=2, 61 FRAME_IDR=7 62 }; 63 /** 64 */ 65 enum vaSliceType 66 { 67 SLICE_TYPE_P = 0, 68 SLICE_TYPE_B = 1, 69 SLICE_TYPE_I = 2, 70 }; 71 #define IS_P_SLICE(type) (SLICE_TYPE_P == (type)) 72 #define IS_B_SLICE(type) (SLICE_TYPE_B == (type)) 73 #define IS_I_SLICE(type) (SLICE_TYPE_I == (type)) 74 75 #define NAL_REF_IDC_NONE 0 76 #define NAL_REF_IDC_LOW 1 77 #define NAL_REF_IDC_MEDIUM 2 78 #define NAL_REF_IDC_HIGH 3 79 80 81 82 83 #define PROFILE_IDC_BASELINE 66 84 #define PROFILE_IDC_MAIN 77 85 #define PROFILE_IDC_HIGH 100 86 87 88 89