Skip to content

Commit b4870fd

Browse files
pldrcXinfengZhang
authored andcommitted
jpeg: add support for crop and partial decode
add interface to support jpeg crop and partial decode. v2: remove redundant macro for bit position and use crop bit-field (Carl Zhang) v3: rename variables to crop instead of roi (Carl Zhang) Signed-off-by: Sathishkumar S <[email protected]>
1 parent 7d6c7d4 commit b4870fd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

va/va.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,10 @@ typedef union _VAConfigAttribValDecJPEG {
11511151
struct {
11521152
/** \brief Set to (1 << VA_ROTATION_xxx) for supported rotation angles. */
11531153
uint32_t rotation : 4;
1154+
/** \brief set to 1 for crop and partial decode support, 0 if not supported */
1155+
uint32_t crop : 1;
11541156
/** \brief Reserved for future use. */
1155-
uint32_t reserved : 28;
1157+
uint32_t reserved : 27;
11561158
} bits;
11571159
uint32_t value;
11581160
} VAConfigAttribValDecJPEG;

va/va_dec_jpeg.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ typedef struct _VAPictureParameterBufferJPEGBaseline {
7575
uint8_t color_space;
7676
/** \brief Set to VA_ROTATION_* for a single rotation angle reported by VAConfigAttribDecJPEG. */
7777
uint32_t rotation;
78+
/** \brief crop rectangle boundary in pixels */
79+
VARectangle crop_rectangle;
7880
/** \brief Reserved bytes for future use, must be zero */
79-
uint32_t va_reserved[VA_PADDING_MEDIUM - 1];
81+
uint32_t va_reserved[VA_PADDING_MEDIUM - 3];
8082
} VAPictureParameterBufferJPEGBaseline;
8183

8284
/**

0 commit comments

Comments
 (0)