|
const char * | lqt_colormodel_to_string (int colormodel) |
| Convert a colormodel to a human readable string.
|
|
int | lqt_string_to_colormodel (const char *str) |
| Convert a description string to a colormodel.
|
|
int | lqt_colormodel_is_planar (int colormodel) |
| Check if a colormodel is planar.
|
|
int | lqt_colormodel_has_alpha (int colormodel) |
| Check if a colormodel has an alpha (transperency) channel.
|
|
int | lqt_colormodel_is_rgb (int colormodel) |
| Check, if a colormodel is RGB based.
|
|
int | lqt_colormodel_is_yuv (int colormodel) |
| Check, if a colormodel is YUV based.
|
|
void | lqt_colormodel_get_chroma_sub (int colormodel, int *sub_h, int *sub_v) |
| Get the chroma subsampling factors.
|
|
int | lqt_colormodel_is_video_range (int colormodel) |
| Check, if a colormodel is video range or full range.
|
|
void | lqt_get_default_rowspan (int colormodel, int width, int *rowspan, int *rowspan_uv) |
| Get the default row span for a colormodel and an image width.
|
|
int | lqt_colormodel_has_conversion (int in_cmodel, int out_cmodel) |
| Check if a colormodel conversion is supported by libquicktime.
|
|
int | lqt_num_colormodels () |
| Get number of supported colormodels.
|
|
const char * | lqt_get_colormodel_string (int index) |
| Get a colormodel string.
|
|
int | lqt_get_colormodel (int index) |
| Get a colormodel.
|
|
int | lqt_get_best_source_colormodel (int const *source_options, int target) |
| Select a source colormodel from a provided list that is best for conversion into a specified target colormodel.
|
|
int | lqt_get_best_target_colormodel (int source, int const *target_options) |
| Select a target colormodel from a provided list that is best for conversion from a specified source colormodel.
|
|
Libquicktime has a built in colormodel converter, which can do implicit colormodel conversions while en-/decoding. It is, however, far from perfect: It is incomplete (i.e. not all conversions are present), slow and sometimes inaccurate. Therefore, there is a possibility to bypass internal colormodel conversions.
◆ BC_RGB565
16 bit RGB. Each pixel is a uint16_t in native byte order. Color masks are: for red: 0xf800, for green: 0x07e0, for blue: 0x001f
◆ BC_BGR565
16 bit BGR. Each pixel is a uint16_t in native byte order. Color masks are: for red: 0x001f, for green: 0x07e0, for blue: 0xf800
◆ BC_BGR888
24 bit BGR. Each color is an uint8_t. Color order is BGR
◆ BC_BGR8888
32 bit BGR. Each color is an uint8_t. Color order is BGRXBGRX, where X is unused
◆ BC_RGB888
24 bit RGB. Each color is an uint8_t. Color order is RGB
◆ BC_RGBA8888
32 bit RGBA. Each color is an uint8_t. Color order is RGBARGBA
◆ BC_RGB161616
48 bit RGB. Each color is an uint16_t in native byte order. Color order is RGB
◆ BC_RGBA16161616
#define BC_RGBA16161616 9 |
64 bit RGBA. Each color is an uint16_t in native byte order. Color order is RGBA
◆ BC_YUVA8888
Packed YCbCrA 4:4:4:4. Each component is an uint8_t. Component order is YUVA
◆ BC_YUV422
Packed YCbCr 4:2:2. Each component is an uint8_t. Component order is Y1 U1 Y2 V1
◆ BC_YUV420P
◆ BC_YUV422P
Planar YCbCr 4:2:2. Each component is an uint8_t
◆ BC_YUV444P
Planar YCbCr 4:4:4. Each component is an uint8_t
◆ BC_YUV411P
Planar YCbCr 4:1:1. Each component is an uint8_t
◆ BC_YUVJ420P
Planar YCbCr 4:2:0. Each component is an uint8_t, luma and chroma values are full range (0x00 .. 0xff)
◆ BC_YUVJ422P
Planar YCbCr 4:2:2. Each component is an uint8_t, luma and chroma values are full range (0x00 .. 0xff)
◆ BC_YUVJ444P
Planar YCbCr 4:4:4. Each component is an uint8_t, luma and chroma values are full range (0x00 .. 0xff)
◆ BC_YUV422P16
16 bit Planar YCbCr 4:2:2. Each component is an uint16_t in native byte order.
◆ BC_YUV444P16
16 bit Planar YCbCr 4:4:4. Each component is an uint16_t in native byte order.
◆ BC_YUV422P10
10 bit values in uint16_t native byte order containers, planar YCbCr 4:2:2.
◆ BC_YUVJ422P10
10 bit values in uint16_t native byte order containers, planar YCbCr 4:2:2. Luma and chroma values are full range (0 .. 1023)
◆ LQT_COLORMODEL_NONE
#define LQT_COLORMODEL_NONE -1 |
This value is used for termination of colormodel arrays
◆ lqt_colormodel_to_string()
const char * lqt_colormodel_to_string |
( |
int | colormodel | ) |
|
Convert a colormodel to a human readable string.
- Parameters
-
- Returns
- A description of the colormodel
◆ lqt_string_to_colormodel()
int lqt_string_to_colormodel |
( |
const char * | str | ) |
|
Convert a description string to a colormodel.
- Parameters
-
- Returns
- The corresponding colormodel or LQT_COLORMODEL_NONE
◆ lqt_colormodel_is_planar()
int lqt_colormodel_is_planar |
( |
int | colormodel | ) |
|
Check if a colormodel is planar.
- Parameters
-
- Returns
- 1 if the colormodel is planar, 0 else
◆ lqt_colormodel_has_alpha()
int lqt_colormodel_has_alpha |
( |
int | colormodel | ) |
|
Check if a colormodel has an alpha (transperency) channel.
- Parameters
-
- Returns
- 1 if the colormodel has an alpha channel, 0 else
◆ lqt_colormodel_is_rgb()
int lqt_colormodel_is_rgb |
( |
int | colormodel | ) |
|
Check, if a colormodel is RGB based.
- Parameters
-
- Returns
- 1 if the colormodel is RGB based, 0 else
◆ lqt_colormodel_is_yuv()
int lqt_colormodel_is_yuv |
( |
int | colormodel | ) |
|
Check, if a colormodel is YUV based.
- Parameters
-
- Returns
- 1 if the colormodel is YUV based, 0 else
◆ lqt_colormodel_get_chroma_sub()
void lqt_colormodel_get_chroma_sub |
( |
int | colormodel, |
|
|
int * | sub_h, |
|
|
int * | sub_v ) |
Get the chroma subsampling factors.
- Parameters
-
colormodel | A colormodel |
sub_h | Returns the horizontal subsampling factor |
sub_v | Returns the vertical subsampling factor |
◆ lqt_colormodel_is_video_range()
int lqt_colormodel_is_video_range |
( |
int | colormodel | ) |
|
Check, if a colormodel is video range or full range.
- Parameters
-
- Returns
- 1 if the colormodel is video range, 0 else
◆ lqt_get_default_rowspan()
void lqt_get_default_rowspan |
( |
int | colormodel, |
|
|
int | width, |
|
|
int * | rowspan, |
|
|
int * | rowspan_uv ) |
Get the default row span for a colormodel and an image width.
- Parameters
-
colormodel | A colormodel |
width | Image width |
rowspan | Returns the rowspan for the luminance (Y) plane |
rowspan_uv | Returns the rowspan for the chrominance (U/V) planes |
The rowspan is the byte offset between scanlines. It can be calculated from the colormodel and the image width. Some APIs however, padd the scanlines to certain boundaries, so the rowspans might become larger here (see lqt_set_row_span and lqt_set_row_span_uv).
◆ lqt_colormodel_has_conversion()
int lqt_colormodel_has_conversion |
( |
int | in_cmodel, |
|
|
int | out_cmodel ) |
Check if a colormodel conversion is supported by libquicktime.
- Parameters
-
in_cmodel | Input colormodel |
out_cmodel | Output colormodel |
- Returns
- 1 if the requested conversion is possible, 0 else
As noted before, the colormodel converter is not complete, and this function checks it. As a fallback, conversions from and to BC_RGB888 are always supported. If you need a converison, which is not present, contact the authors for hints how to write it :)
◆ lqt_num_colormodels()
int lqt_num_colormodels |
( |
| ) |
|
Get number of supported colormodels.
- Returns
- The number of colormodels known to your version of libquicktime
◆ lqt_get_colormodel_string()
const char * lqt_get_colormodel_string |
( |
int | index | ) |
|
Get a colormodel string.
- Parameters
-
- Returns
- A description of the colormodel according to index or NULL.
◆ lqt_get_colormodel()
int lqt_get_colormodel |
( |
int | index | ) |
|
◆ lqt_get_best_source_colormodel()
int lqt_get_best_source_colormodel |
( |
int const * | source_options, |
|
|
int | target ) |
Select a source colormodel from a provided list that is best for conversion into a specified target colormodel.
- Parameters
-
source_options | An array of source colormodels to select from. Must be terminated with LQT_COLORMODEL_NODE. |
target | The target colormodel. |
- Returns
- A colormodel from
source_options
or LQT_COLORMODEL_NONE, if none of the source colormodels can be converted to the target one.
◆ lqt_get_best_target_colormodel()
int lqt_get_best_target_colormodel |
( |
int | source, |
|
|
int const * | target_options ) |
Select a target colormodel from a provided list that is best for conversion from a specified source colormodel.
- Parameters
-
source | The source colormodel. |
target_options | An array of target colormodels to select from. Must be terminated with LQT_COLORMODEL_NODE. |
- Returns
- A colormodel from
target_options
or LQT_COLORMODEL_NONE, if the source colormodel can't be converted to any of the target ones.