diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-09-20 13:27:10 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-09-21 13:33:29 +0200 |
commit | 6f15f1cdc85350b7adcfb7c50eedb5ecde6a384a (patch) | |
tree | 7486faddbeeae90685460f8276fd7d0bd458bbb4 /libavutil/pixdesc.h | |
parent | bba9c1c6bb17529ffbf44fe96984408ebb89dae0 (diff) | |
download | ffmpeg-6f15f1cdc85350b7adcfb7c50eedb5ecde6a384a.tar.gz |
pixdesc: Add API to map color property names to enum values
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavutil/pixdesc.h')
-rw-r--r-- | libavutil/pixdesc.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index b0ec81b81b..fc3737c4ad 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -251,26 +251,51 @@ int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt); const char *av_color_range_name(enum AVColorRange range); /** + * @return the AVColorRange value for name or an AVError if not found. + */ +int av_color_range_from_name(const char *name); + +/** * @return the name for provided color primaries or NULL if unknown. */ const char *av_color_primaries_name(enum AVColorPrimaries primaries); /** + * @return the AVColorPrimaries value for name or an AVError if not found. + */ +int av_color_primaries_from_name(const char *name); + +/** * @return the name for provided color transfer or NULL if unknown. */ const char *av_color_transfer_name(enum AVColorTransferCharacteristic transfer); /** + * @return the AVColorTransferCharacteristic value for name or an AVError if not found. + */ +int av_color_transfer_from_name(const char *name); + +/** * @return the name for provided color space or NULL if unknown. */ const char *av_color_space_name(enum AVColorSpace space); /** + * @return the AVColorSpace value for name or an AVError if not found. + */ +int av_color_space_from_name(const char *name); + +/** * @return the name for provided chroma location or NULL if unknown. */ const char *av_chroma_location_name(enum AVChromaLocation location); /** + * @return the AVChromaLocation value for name or an AVError if not found. + */ +int av_chroma_location_from_name(const char *name); + +/** * Return the pixel format corresponding to name. * * If there is no pixel format with name name, then looks for a |