mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avutil/pixdesc: Add av_chroma_location_(enum_to_pos|pos_to_enum)
They are intended as replacements for avcodec_enum_to_chroma_pos() and avcodec_chroma_pos_to_enum(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
cf856d8957
commit
8be6552aa4
4 changed files with 50 additions and 2 deletions
|
|
@ -264,6 +264,28 @@ const char *av_chroma_location_name(enum AVChromaLocation location);
|
|||
*/
|
||||
int av_chroma_location_from_name(const char *name);
|
||||
|
||||
/**
|
||||
* Converts AVChromaLocation to swscale x/y chroma position.
|
||||
*
|
||||
* The positions represent the chroma (0,0) position in a coordinates system
|
||||
* with luma (0,0) representing the origin and luma(1,1) representing 256,256
|
||||
*
|
||||
* @param xpos horizontal chroma sample position
|
||||
* @param ypos vertical chroma sample position
|
||||
*/
|
||||
int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
|
||||
|
||||
/**
|
||||
* Converts swscale x/y chroma position to AVChromaLocation.
|
||||
*
|
||||
* The positions represent the chroma (0,0) position in a coordinates system
|
||||
* with luma (0,0) representing the origin and luma(1,1) representing 256,256
|
||||
*
|
||||
* @param xpos horizontal chroma sample position
|
||||
* @param ypos vertical chroma sample position
|
||||
*/
|
||||
enum AVChromaLocation av_chroma_location_pos_to_enum(int xpos, int ypos);
|
||||
|
||||
/**
|
||||
* Return the pixel format corresponding to name.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue