Signed-off-by: Li Xiaowei <xiaowei.a...@intel.com> --- va/Makefile.am | 1 + va/va_enc_mvc.h | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 va/va_enc_mvc.h
diff --git a/va/Makefile.am b/va/Makefile.am index 425225c..af4f86f 100644 --- a/va/Makefile.am +++ b/va/Makefile.am @@ -49,6 +49,7 @@ libva_source_h = \ va_drmcommon.h \ va_enc.h \ va_enc_h264.h \ + va_enc_mvc.h \ va_enc_jpeg.h \ va_enc_vp8.h \ va_enc_mpeg2.h \ diff --git a/va/va_enc_mvc.h b/va/va_enc_mvc.h new file mode 100644 index 0000000..33dfef1 --- /dev/null +++ b/va/va_enc_mvc.h @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file va_enc_mvc.h + * \brief MVC(Multiview video coding) encoding API + * + * This file contains the \ref api_enc_mvc "mvc encoding API". + */ + +#ifndef VA_ENC_MVC_H +#define VA_ENC_MVC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "va_enc_h264.h" + +/* In order to minimize the overhead payload of the structure, + * we limit the max number for view and other parameters here, + * although the actual view number and applicable operation point + * number can be up to 1024, and level value can be up to 64 + * according to H264 MVC specification. + */ + +#define VA_MVC_MAX_VIEW_NUM 2 +#define VA_MVC_MAX_LEVEL_VALUE_NUM 2 +#define VA_MVC_MAX_APPLICABLE_OP_NUM 1 + +/** + * \defgroup api_enc_mvc MVC encoding API + * + * @{ + */ + +/**************************** + * H.264/MVC data structures + ****************************/ + +/** + * \brief H.264/MVC Sequence Parameter Buffer + * + */ +typedef struct _VAEncSequenceParameterBufferMVC { + + VAEncSequenceParameterBufferH264 base; + + /* plus 1 specifies the max number of views + * coded in the video sequence */ + unsigned short num_views_minus1; + + /*inter-view dependency relationships for the coded video sequence*/ + struct { + /* The view identifier */ + unsigned short view_id; + /* specifies the number of view components for inter-view + * prediction in the initialized RefPicList0 in decoding + * anchor views. + */ + unsigned char num_anchor_refs_l0; + /* specifies the view_id for inter-view prediction in + * the initialized RefPicList0 in decoding anchor views. + */ + unsigned short anchor_ref_l0[15]; + /* specifies the number of view components for inter-view + * prediction in the initialized RefPicList0 in decoding + * anchor views + */ + unsigned char num_anchor_refs_l1; + /* specifies the view_id for inter-view prediction in + * the initialized RefPicList1 in decoding anchor views. + */ + unsigned short anchor_ref_l1[15]; + /* specifies the number of view components for inter-view + * prediction in the initialized RefPicList0 in decoding + * non-anchor views. + */ + unsigned char num_non_anchor_refs_l0; + /* specifies the view_id for inter-view prediction in + * the initialized RefPicList0 in decoding non-anchor views. + */ + unsigned short non_anchor_ref_l0[15]; + /* specifies the number of view components for inter-view + * prediction in the initialized RefPicList1 in decoding + * non-anchor view. + */ + unsigned char num_non_anchor_refs_l1; + /* specifies the view_id for inter-view prediction in + * the initialized RefPicList1 in decoding non-anchor views. + */ + unsigned short non_anchor_ref_l1[15]; + } view[VA_MVC_MAX_VIEW_NUM]; + + /* plus 1 specifies the number of level values + * signalled for the coded video sequence. + */ + unsigned char num_level_values_signalled_minus1; + + /* level values for a subset of the operation points for + * the coded video sequence + */ + struct { + /* specifies the level value signalled for the coded video sequence */ + unsigned char level_idc; + + /* plus 1 specifies the number of operation points to + * which the level indicated by level_idc applies + */ + unsigned short num_applicable_ops_minus1; + + /* Represent the operation points for the coded + * video sequence + */ + struct { + unsigned char temporal_id; + unsigned short num_target_views_minus1; + unsigned short target_view_id[VA_MVC_MAX_VIEW_NUM]; + unsigned short num_views_minus1; + } applicable_op[VA_MVC_MAX_APPLICABLE_OP_NUM]; + + } level_value[VA_MVC_MAX_LEVEL_VALUE_NUM]; + +} VAEncSequenceParameterBufferMVC; + +/** + * \brief H.264/MVC Picture Parameter Buffer + * + */ +typedef struct _VAEncPictureParameterBufferMVC +{ + VAEncPictureParameterBufferH264 base; + + /* specifes the view id for current picture */ + unsigned short view_id; + + /* specifes current picture is one anchor picture */ + unsigned char anchor_pic_flag; + + /* specifes whether inter view reference frame + * is used to encode current picture. + */ + unsigned char inter_view_flag; +} VAEncPictureParameterBufferMVC; + +#ifdef __cplusplus +} +#endif + +#endif /* VA_ENC_MVC_H */ -- 1.7.9.5 _______________________________________________ Libva mailing list Libva@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libva