Skip to content

Commit

Permalink
jpeg: add support for crop and partial decode
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pldrc authored and XinfengZhang committed Aug 24, 2023
1 parent 7d6c7d4 commit b4870fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion va/va.h
Original file line number Diff line number Diff line change
Expand Up @@ -1151,8 +1151,10 @@ typedef union _VAConfigAttribValDecJPEG {
struct {
/** \brief Set to (1 << VA_ROTATION_xxx) for supported rotation angles. */
uint32_t rotation : 4;
/** \brief set to 1 for crop and partial decode support, 0 if not supported */
uint32_t crop : 1;
/** \brief Reserved for future use. */
uint32_t reserved : 28;
uint32_t reserved : 27;
} bits;
uint32_t value;
} VAConfigAttribValDecJPEG;
Expand Down
4 changes: 3 additions & 1 deletion va/va_dec_jpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ typedef struct _VAPictureParameterBufferJPEGBaseline {
uint8_t color_space;
/** \brief Set to VA_ROTATION_* for a single rotation angle reported by VAConfigAttribDecJPEG. */
uint32_t rotation;
/** \brief crop rectangle boundary in pixels */
VARectangle crop_rectangle;
/** \brief Reserved bytes for future use, must be zero */
uint32_t va_reserved[VA_PADDING_MEDIUM - 1];
uint32_t va_reserved[VA_PADDING_MEDIUM - 3];
} VAPictureParameterBufferJPEGBaseline;

/**
Expand Down

0 comments on commit b4870fd

Please sign in to comment.