diff options
author | Penne <penne.y.lee@intel.com> | 2014-09-26 20:58:05 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-09-27 10:29:12 +0800 |
commit | 2f24ac524b2b5f672a05dba5fdbc68cffd4dbd71 (patch) | |
tree | dc6ce83c7eb3b410fe68d529199e9c4d09dbb8d5 | |
parent | 0606e47166ce504c370bc640c01ec1bc6a22bf19 (diff) | |
download | libva-2f24ac524b2b5f672a05dba5fdbc68cffd4dbd71.tar.gz |
Move common HEVE structure/flags to va.h
In addition, rename VAPictureHEVC::PicOrderCnt to VAPictureHEVC::pic_order_cnt
Signed-off-by: Penne <penne.y.lee@intel.com>
Signed-off-by: Wang, Ce <ce.wang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r-- | va/va.h | 66 | ||||
-rw-r--r-- | va/va_dec_hevc.h | 73 | ||||
-rw-r--r-- | va/va_trace.c | 4 |
3 files changed, 68 insertions, 75 deletions
@@ -3558,6 +3558,72 @@ VAStatus vaSetDisplayAttributes ( int num_attributes ); +/**************************** + * HEVC data structures + ****************************/ +/** + * \brief Description of picture properties of those in DPB surfaces. + * + * If only progressive scan is supported, each surface contains one whole + * frame picture. + * Otherwise, each surface contains two fields of whole picture. + * In this case, two entries of ReferenceFrames[] may share same picture_id + * value. + */ +typedef struct _VAPictureHEVC +{ + /** \brief reconstructed picture buffer surface index + * invalid when taking value VA_INVALID_SURFACE. + */ + VASurfaceID picture_id; + /** \brief picture order count. + * in HEVC, POCs for top and bottom fields of same picture should + * take different values. + */ + int32_t pic_order_cnt; + /* described below */ + uint32_t flags; +} VAPictureHEVC; + +/* flags in VAPictureHEVC could be OR of the following */ +#define VA_PICTURE_HEVC_INVALID 0x00000001 +/** \brief indication of interlace scan picture. + * should take same value for all the pictures in sequence. + */ +#define VA_PICTURE_HEVC_FIELD_PIC 0x00000002 +/** \brief polarity of the field picture. + * top field takes even lines of buffer surface. + * bottom field takes odd lines of buffer surface. + */ +#define VA_PICTURE_HEVC_BOTTOM_FIELD 0x00000004 +/** \brief Long term reference picture */ +#define VA_PICTURE_HEVC_LONG_TERM_REFERENCE 0x00000008 +/** + * VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE, VA_PICTURE_HEVC_RPS_ST_CURR_AFTER + * and VA_PICTURE_HEVC_RPS_LT_CURR of any picture in ReferenceFrames[] should + * be exclusive. No more than one of them can be set for any picture. + * Sum of NumPocStCurrBefore, NumPocStCurrAfter and NumPocLtCurr + * equals NumPocTotalCurr, which should be equal to or smaller than 8. + * Application should provide valid values for both short format and long format. + * The pictures in DPB with any of these three flags turned on are referred by + * the current picture. + */ +/** \brief RefPicSetStCurrBefore of HEVC spec variable + * Number of ReferenceFrames[] entries with this bit set equals + * NumPocStCurrBefore. + */ +#define VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE 0x00000010 +/** \brief RefPicSetStCurrAfter of HEVC spec variable + * Number of ReferenceFrames[] entries with this bit set equals + * NumPocStCurrAfter. + */ +#define VA_PICTURE_HEVC_RPS_ST_CURR_AFTER 0x00000020 +/** \brief RefPicSetLtCurr of HEVC spec variable + * Number of ReferenceFrames[] entries with this bit set equals + * NumPocLtCurr. + */ +#define VA_PICTURE_HEVC_RPS_LT_CURR 0x00000040 + /**@}*/ #ifdef __cplusplus diff --git a/va/va_dec_hevc.h b/va/va_dec_hevc.h index 87847d2..27715b7 100644 --- a/va/va_dec_hevc.h +++ b/va/va_dec_hevc.h @@ -47,79 +47,6 @@ extern "C" { * @{ */ - - -/**************************** - * HEVC data structures - ****************************/ - -/** - * \brief Description of picture properties of those in DPB surfaces. - * - * If only progressive scan is supported, each surface contains one whole - * frame picture. - * Otherwise, each surface contains two fields of whole picture. - * In this case, two entries of ReferenceFrames[] may share same picture_id - * value. - */ -typedef struct _VAPictureHEVC -{ - /** \brief reconstructed picture buffer surface index - * invalid when taking value VA_INVALID_SURFACE. - */ - VASurfaceID picture_id; - /** \brief picture order count. - * in HEVC, POCs for top and bottom fields of same picture should - * take different values. - */ - int32_t PicOrderCnt; - /* described below */ - uint32_t flags; -} VAPictureHEVC; - -/** flags in VAPictureHEVC could be OR of the following */ -#define VA_PICTURE_HEVC_INVALID 0x00000001 -/** \brief indication of interlace scan picture. - * should take same value for all the pictures in sequence. - */ -#define VA_PICTURE_HEVC_FIELD_PIC 0x00000002 -/** \brief polarity of the field picture. - * top field takes even lines of buffer surface. - * bottom field takes odd lines of buffer surface. - */ -#define VA_PICTURE_HEVC_BOTTOM_FIELD 0x00000004 -/** \brief Long term reference picture */ -#define VA_PICTURE_HEVC_LONG_TERM_REFERENCE 0x00000008 -/** \brief RefPicSetStCurrBefore of HEVC spec variable - * Number of ReferenceFrames[] entries with this bit set equals - * NumPocStCurrBefore. - */ -#define VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE 0x00000010 -/** \brief RefPicSetStCurrAfter of HEVC spec variable - * Number of ReferenceFrames[] entries with this bit set equals - * NumPocStCurrAfter. - */ -#define VA_PICTURE_HEVC_RPS_ST_CURR_AFTER 0x00000020 -/** \brief RefPicSetLtCurr of HEVC spec variable - * Number of ReferenceFrames[] entries with this bit set equals - * NumPocLtCurr. - */ -#define VA_PICTURE_HEVC_RPS_LT_CURR 0x00000040 -/** - * VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE, VA_PICTURE_HEVC_RPS_ST_CURR_AFTER - * and VA_PICTURE_HEVC_RPS_LT_CURR of any picture in ReferenceFrames[] should - * be exclusive. No more than one of them can be set for any picture. - * Sum of NumPocStCurrBefore, NumPocStCurrAfter and NumPocLtCurr - * equals NumPocTotalCurr, which should be equal to or smaller than 8. - * Application should provide valid values for both short format and long format. - * The pictures in DPB with any of these three flags turned on are referred by - * the current picture. - */ - - - - - /** * \brief HEVC Decoding Picture Parameter Buffer Structure * diff --git a/va/va_trace.c b/va/va_trace.c index 73d8ed7..7461467 100644 --- a/va/va_trace.c +++ b/va/va_trace.c @@ -1223,7 +1223,7 @@ static void va_TraceVAPictureParameterBufferHEVC( va_TraceMsg(trace_ctx, "VAPictureParameterBufferHEVC\n"); va_TraceMsg(trace_ctx, "\tCurrPic.picture_id = 0x%08x\n", p->CurrPic.picture_id); - va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.PicOrderCnt); + va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.pic_order_cnt); va_TraceMsg(trace_ctx, "\tCurrPic.flags = %d\n", p->CurrPic.flags); va_TraceMsg(trace_ctx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags:\n"); @@ -1233,7 +1233,7 @@ static void va_TraceVAPictureParameterBufferHEVC( ((p->ReferenceFrames[i].flags & VA_PICTURE_HEVC_INVALID) == 0)) { va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x\n", p->ReferenceFrames[i].picture_id, - p->ReferenceFrames[i].PicOrderCnt, + p->ReferenceFrames[i].pic_order_cnt, p->ReferenceFrames[i].flags); } else va_TraceMsg(trace_ctx, "\t\tinv-inv-inv-inv-inv\n"); |