diff options
author | Chen, Jason K <jason.k.chen@intel.com> | 2018-12-06 17:14:01 +0800 |
---|---|---|
committer | XinfengZhang <carl.zhang@intel.com> | 2019-05-14 23:19:20 -0700 |
commit | 520b9e54f95d722654ccf034f01a7f5bc043d338 (patch) | |
tree | fe8e5bd05b7b7ea7add5248a220959b1c896c992 | |
parent | 87dcca01a57a2c1b486c0b3ca108a0b349649510 (diff) | |
download | libva-520b9e54f95d722654ccf034f01a7f5bc043d338.tar.gz |
Add new definition for input/output surface flag2.5.0.pre3
The added bits in input_surface_flag/output_surface_flag are used to specify the sample type for scaling of interlaced content.
Signed-off-by: Chen, Jason K <jason.k.chen@intel.com>
-rw-r--r-- | va/va.h | 10 | ||||
-rwxr-xr-x | va/va_vpp.h | 49 |
2 files changed, 54 insertions, 5 deletions
@@ -214,10 +214,18 @@ typedef int VAStatus; /** Return status type from functions */ #define VA_STATUS_ERROR_NOT_ENOUGH_BUFFER 0x00000025 #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF -/** De-interlacing flags for vaPutSurface() */ +/** + * 1. De-interlacing flags for vaPutSurface() + * 2. Surface sample type for input/output surface flag + * - Progressive: VA_FRAME_PICTURE + * - Interleaved: VA_TOP_FIELD_FIRST, VA_BOTTOM_FIELD_FIRST + * - Field: VA_TOP_FIELD, VA_BOTTOM_FIELD +*/ #define VA_FRAME_PICTURE 0x00000000 #define VA_TOP_FIELD 0x00000001 #define VA_BOTTOM_FIELD 0x00000002 +#define VA_TOP_FIELD_FIRST 0x00000004 +#define VA_BOTTOM_FIELD_FIRST 0x00000008 /** * Enabled the positioning/cropping/blending feature: diff --git a/va/va_vpp.h b/va/va_vpp.h index 673ddc7..4de27ee 100755 --- a/va/va_vpp.h +++ b/va/va_vpp.h @@ -1012,15 +1012,56 @@ typedef struct _VAProcPipelineParameterBuffer { /** * \brief Flag to indicate the input surface flag * - * bit0: 0 non-protected 1: protected - * bit 1~31 for future + * bit0~3: Surface sample type + * - 0000: Progressive --> VA_FRAME_PICTURE + * - 0001: Single Top Field --> VA_TOP_FIELD + * - 0010: Single Bottom Field --> VA_BOTTOM_FIELD + * - 0100: Interleaved Top Field First --> VA_TOP_FIELD_FIRST + * - 1000: Interleaved Bottom Field First --> VA_BOTTOM_FIELD_FIRST + * + * For interlaced scaling, examples as follow: + * - 1. Interleaved to Interleaved (Suppose input is top field first) + * -- set input_surface_flag as VA_TOP_FIELD_FIRST + * -- set output_surface_flag as VA_TOP_FIELD_FIRST + * - 2. Interleaved to Field (Suppose input is top field first) + * An interleaved frame need to be passed twice. + * First cycle to get the first field: + * -- set input_surface_flag as VA_TOP_FIELD_FIRST + * -- set output_surface_flag as VA_TOP_FIELD + * Second cycle to get the second field: + * -- set input_surface_flag as VA_TOP_FIELD_FIRST + * -- set output_surface_flag as VA_BOTTOM_FIELD + * - 3. Field to Interleaved (Suppose first field is top field) + * -- create two surfaces, one for top field, the other for bottom field + * -- set surface with the first field surface id + * -- set backward_reference with the second field surface id + * -- set input_surface_flag as VA_TOP_FIELD + * -- set output_surface_flag as VA_TOP_FIELD_FIRST + * - 4. Field to Field: + * -- set flag according to each frame. + * + * bit31: Surface encryption + * - 0: non-protected + * - 1: protected + * + * bit4~30 for future */ uint32_t input_surface_flag; /** * \brief Flag to indicate the output surface flag * - * bit0: 0 non-protected 1: protected - * bit 1~31 for future + * bit0~3: Surface sample type + * - 0000: Progressive --> VA_FRAME_PICTURE + * - 0001: Top Field --> VA_TOP_FIELD + * - 0010: Bottom Field --> VA_BOTTOM_FIELD + * - 0100: Top Field First --> VA_TOP_FIELD_FIRST + * - 1000: Bottom Field First --> VA_BOTTOM_FIELD_FIRST + * + * bit31: Surface encryption + * - 0: non-protected + * - 1: protected + * + * bit4~30 for future */ uint32_t output_surface_flag; /** |