Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5a419b2d
Commit
5a419b2d
authored
Sep 26, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pixdesc: return color properties names
parent
04ccd584
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
2 deletions
+88
-2
APIchanges
doc/APIchanges
+3
-0
pixdesc.c
libavutil/pixdesc.c
+58
-0
pixdesc.h
libavutil/pixdesc.h
+25
-0
version.h
libavutil/version.h
+2
-2
No files found.
doc/APIchanges
View file @
5a419b2d
...
...
@@ -13,6 +13,9 @@ libavutil: 2014-08-09
API changes, most recent first:
2014-09-xx - xxxxxxx - lavu 54.04.0 - pixdesc.h
Add API to return the name of frame and context color properties.
2014-09-xx - xxxxxxx - lavc 56.2.0 - vdpau.h
Add av_vdpau_bind_context(). This function should now be used for creating
(or resetting) a AVVDPAUContext instead of av_vdpau_alloc_context().
...
...
libavutil/pixdesc.c
View file @
5a419b2d
...
...
@@ -1523,6 +1523,33 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
};
static
const
char
*
color_range_names
[
AVCOL_RANGE_NB
]
=
{
"unknown"
,
"tv"
,
"pc"
,
};
static
const
char
*
color_primaries_names
[
AVCOL_PRI_NB
]
=
{
"reserved"
,
"bt709"
,
"unknown"
,
"reserved"
,
"bt470m"
,
"bt470bg"
,
"smpte170m"
,
"smpte240m"
,
"film"
,
"bt2020"
,
};
static
const
char
*
color_transfer_names
[
AVCOL_TRC_NB
]
=
{
"reserved"
,
"bt709"
,
"unknown"
,
"reserved"
,
"bt470m"
,
"bt470bg"
,
"smpte170m"
,
"smpte240m"
,
"linear"
,
"log100"
,
"log316"
,
"iec61966-2-4"
,
"bt1361e"
,
"iec61966-2-1"
,
"bt2020-10"
,
"bt2020-20"
,
};
static
const
char
*
color_space_names
[
AVCOL_SPC_NB
]
=
{
"gbr"
,
"bt709"
,
"unknown"
,
"reserved"
,
"fcc"
,
"bt470bg"
,
"smpte170m"
,
"smpte240m"
,
"ycgco"
,
"bt2020nc"
,
"bt2020c"
,
};
static
const
char
*
chroma_location_names
[
AVCHROMA_LOC_NB
]
=
{
"unspecified"
,
"left"
,
"center"
,
"topleft"
,
"top"
,
"bottomleft"
,
"bottom"
,
};
FF_DISABLE_DEPRECATION_WARNINGS
static
enum
AVPixelFormat
get_pix_fmt_internal
(
const
char
*
name
)
{
...
...
@@ -1700,3 +1727,34 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
}
#undef PIX_FMT_SWAP_ENDIANNESS
}
const
char
*
av_color_range_name
(
enum
AVColorRange
range
)
{
return
(
unsigned
)
range
<
AVCOL_RANGE_NB
?
color_range_names
[
range
]
:
NULL
;
}
const
char
*
av_color_primaries_name
(
enum
AVColorPrimaries
primaries
)
{
return
(
unsigned
)
primaries
<
AVCOL_PRI_NB
?
color_primaries_names
[
primaries
]
:
NULL
;
}
const
char
*
av_color_transfer_name
(
enum
AVColorTransferCharacteristic
transfer
)
{
return
(
unsigned
)
transfer
<
AVCOL_TRC_NB
?
color_transfer_names
[
transfer
]
:
NULL
;
}
const
char
*
av_color_space_name
(
enum
AVColorSpace
space
)
{
return
(
unsigned
)
space
<
AVCOL_SPC_NB
?
color_space_names
[
space
]
:
NULL
;
}
const
char
*
av_chroma_location_name
(
enum
AVChromaLocation
location
)
{
return
(
unsigned
)
location
<
AVCHROMA_LOC_NB
?
chroma_location_names
[
location
]
:
NULL
;
}
libavutil/pixdesc.h
View file @
5a419b2d
...
...
@@ -291,4 +291,29 @@ int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt);
*/
enum
AVPixelFormat
av_pix_fmt_swap_endianness
(
enum
AVPixelFormat
pix_fmt
);
/**
* @return the name for provided color range or NULL if unknown.
*/
const
char
*
av_color_range_name
(
enum
AVColorRange
range
);
/**
* @return the name for provided color primaries or NULL if unknown.
*/
const
char
*
av_color_primaries_name
(
enum
AVColorPrimaries
primaries
);
/**
* @return the name for provided color transfer or NULL if unknown.
*/
const
char
*
av_color_transfer_name
(
enum
AVColorTransferCharacteristic
transfer
);
/**
* @return the name for provided color space or NULL if unknown.
*/
const
char
*
av_color_space_name
(
enum
AVColorSpace
space
);
/**
* @return the name for provided chroma location or NULL if unknown.
*/
const
char
*
av_chroma_location_name
(
enum
AVChromaLocation
location
);
#endif
/* AVUTIL_PIXDESC_H */
libavutil/version.h
View file @
5a419b2d
...
...
@@ -54,8 +54,8 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 54
#define LIBAVUTIL_VERSION_MINOR
3
#define LIBAVUTIL_VERSION_MICRO
1
#define LIBAVUTIL_VERSION_MINOR
4
#define LIBAVUTIL_VERSION_MICRO
0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment