veu_colorspace.h File Reference

Image/Video processing: Scale, rotate, crop, color conversion. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  ren_vid_rect
 Bounding rectange. More...
struct  ren_vid_surface
 Surface. More...
struct  format_info

Enumerations

enum  ren_vid_format_t {
  REN_UNKNOWN, REN_NV12, REN_NV16, REN_RGB565,
  REN_RGB24, REN_BGR24, REN_RGB32, REN_ARGB32
}
 

Surface formats.

More...
enum  shveu_rotation_t { SHVEU_NO_ROT = 0, SHVEU_ROT_90 }
 

Rotation.

More...

Functions

int shveu_setup (SHVEU *veu, const struct ren_vid_surface *src_surface, const struct ren_vid_surface *dst_surface, shveu_rotation_t rotate)
 Setup a (scale|rotate) & crop between YCbCr & RGB surfaces The scaling factor is calculated from the surface sizes.
void shveu_set_src (SHVEU *veu, void *src_py, void *src_pc)
 Set the source addresses.
void shveu_set_dst (SHVEU *veu, void *dst_py, void *dst_pc)
 Set the destination addresses.
void shveu_set_src_phys (SHVEU *veu, uint32_t src_py, uint32_t src_pc)
 Set the source addresses.
void shveu_set_dst_phys (SHVEU *veu, uint32_t dst_py, uint32_t dst_pc)
 Set the destination addresses.
void shveu_set_color_conversion (SHVEU *veu, int bt709, int full_range)
 Set the colour space conversion attributes.
void shveu_start (SHVEU *veu)
 Start a VEU operation (non-bundle mode).
void shveu_start_bundle (SHVEU *veu, int bundle_lines)
 Start a VEU operation (bundle mode).
int shveu_wait (SHVEU *veu)
 Wait for a VEU operation to complete.
int shveu_resize (SHVEU *veu, const struct ren_vid_surface *src_surface, const struct ren_vid_surface *dst_surface)
 Perform scale between YCbCr & RGB surfaces.
int shveu_rotate (SHVEU *veu, const struct ren_vid_surface *src_surface, const struct ren_vid_surface *dst_surface, shveu_rotation_t rotate)
 Perform rotate between YCbCr & RGB surfaces This operates on entire surfaces and blocks until completion.

Detailed Description

Image/Video processing: Scale, rotate, crop, color conversion.


Enumeration Type Documentation

Surface formats.

Enumerator:
REN_NV12 

YCbCr420: Y plane, packed CbCr plane, optional alpha plane.

REN_NV16 

YCbCr422: Y plane, packed CbCr plane, optional alpha plane.

REN_RGB565 

Packed RGB565.

REN_RGB24 

Packed RGB888.

REN_BGR24 

Packed BGR888.

REN_RGB32 

Packed XRGB8888 (most significant byte ignored).

REN_ARGB32 

Packed ARGB8888.

Rotation.

Enumerator:
SHVEU_NO_ROT 

No rotation.

SHVEU_ROT_90 

Rotate 90 degrees clockwise.


Function Documentation

int shveu_resize ( SHVEU *  veu,
const struct ren_vid_surface src_surface,
const struct ren_vid_surface dst_surface 
)

Perform scale between YCbCr & RGB surfaces.

This operates on entire surfaces and blocks until completion.

Parameters:
veu VEU handle
src_surface Input surface
dst_surface Output surface
Return values:
0 Success
-1 Error: Unsupported parameters
int shveu_rotate ( SHVEU *  veu,
const struct ren_vid_surface src_surface,
const struct ren_vid_surface dst_surface,
shveu_rotation_t  rotate 
)

Perform rotate between YCbCr & RGB surfaces This operates on entire surfaces and blocks until completion.

Parameters:
veu VEU handle
src_surface Input surface
dst_surface Output surface
rotate Rotation to apply
Return values:
0 Success
-1 Error: Unsupported parameters
void shveu_set_color_conversion ( SHVEU *  veu,
int  bt709,
int  full_range 
)

Set the colour space conversion attributes.

Parameters:
veu VEU handle
bt709 If true use ITU-R BT709, otherwise use ITU-R BT.601 (default)
full_range If true use YCbCr[0,255], otherwise use Y[16,235], CbCr[16,240] (default)
void shveu_set_dst ( SHVEU *  veu,
void *  dst_py,
void *  dst_pc 
)

Set the destination addresses.

This is typically used for bundle mode.

Parameters:
veu VEU handle
dst_py Address of Y or RGB plane of destination image
dst_pc Address of CbCr plane of destination image (ignored for RGB)
void shveu_set_dst_phys ( SHVEU *  veu,
uint32_t  dst_py,
uint32_t  dst_pc 
)

Set the destination addresses.

This is typically used for bundle mode.

Parameters:
veu VEU handle
dst_py Address of Y or RGB plane of destination image
dst_pc Address of CbCr plane of destination image (ignored for RGB)
void shveu_set_src ( SHVEU *  veu,
void *  src_py,
void *  src_pc 
)

Set the source addresses.

This is typically used for bundle mode.

Parameters:
veu VEU handle
src_py Address of Y or RGB plane of source image
src_pc Address of CbCr plane of source image (ignored for RGB)
void shveu_set_src_phys ( SHVEU *  veu,
uint32_t  src_py,
uint32_t  src_pc 
)

Set the source addresses.

This is typically used for bundle mode.

Parameters:
veu VEU handle
src_py Address of Y or RGB plane of source image
src_pc Address of CbCr plane of source image (ignored for RGB)
int shveu_setup ( SHVEU *  veu,
const struct ren_vid_surface src_surface,
const struct ren_vid_surface dst_surface,
shveu_rotation_t  rotate 
)

Setup a (scale|rotate) & crop between YCbCr & RGB surfaces The scaling factor is calculated from the surface sizes.

Parameters:
veu VEU handle
src_surface Input surface
dst_surface Output surface
rotate Rotation to apply
Return values:
0 Success
-1 Error: Attempt to perform simultaneous scaling and rotation
void shveu_start ( SHVEU *  veu  ) 

Start a VEU operation (non-bundle mode).

Parameters:
veu VEU handle
void shveu_start_bundle ( SHVEU *  veu,
int  bundle_lines 
)

Start a VEU operation (bundle mode).

Parameters:
veu VEU handle
bundle_lines Number of lines to process
int shveu_wait ( SHVEU *  veu  ) 

Wait for a VEU operation to complete.

The operation is started by a call to shveu_start.

Parameters:
veu VEU handle
Generated on Fri Aug 26 14:08:36 2011 for libshveu by  doxygen 1.6.3