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
8c02adc6
Commit
8c02adc6
authored
May 30, 2014
by
wm4
Committed by
Anton Khirnov
Jun 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu: add all color-related enums to AVFrame
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
d2ef708c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
68 deletions
+118
-68
APIchanges
doc/APIchanges
+5
-0
avcodec.h
libavcodec/avcodec.h
+0
-67
frame.c
libavutil/frame.c
+14
-0
frame.h
libavutil/frame.h
+13
-0
pixfmt.h
libavutil/pixfmt.h
+81
-0
version.h
libavutil/version.h
+5
-1
No files found.
doc/APIchanges
View file @
8c02adc6
...
@@ -13,6 +13,11 @@ libavutil: 2013-12-xx
...
@@ -13,6 +13,11 @@ libavutil: 2013-12-xx
API changes, most recent first:
API changes, most recent first:
2014-xx-xx - xxxxxxx - lavu 53.16.0 - frame.h, pixfmt.h
Move all color-related enums (AVColorPrimaries, AVColorSpace, AVColorRange,
AVColorTransferCharacteristic, and AVChromaLocation) inside lavu.
Add AVFrame fields for them on the next lavu major bump.
2014-04-xx - xxxxxxx - lavr 1.3.0 - avresample.h
2014-04-xx - xxxxxxx - lavr 1.3.0 - avresample.h
Add avresample_max_output_samples
Add avresample_max_output_samples
...
...
libavcodec/avcodec.h
View file @
8c02adc6
...
@@ -558,73 +558,6 @@ enum AVDiscard{
...
@@ -558,73 +558,6 @@ enum AVDiscard{
AVDISCARD_ALL
=
48
,
///< discard all
AVDISCARD_ALL
=
48
,
///< discard all
};
};
enum
AVColorPrimaries
{
AVCOL_PRI_BT709
=
1
,
///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
AVCOL_PRI_UNSPECIFIED
=
2
,
AVCOL_PRI_BT470M
=
4
,
AVCOL_PRI_BT470BG
=
5
,
///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
AVCOL_PRI_SMPTE170M
=
6
,
///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
AVCOL_PRI_SMPTE240M
=
7
,
///< functionally identical to above
AVCOL_PRI_FILM
=
8
,
AVCOL_PRI_BT2020
=
9
,
///< ITU-R BT2020
AVCOL_PRI_NB
,
///< Not part of ABI
};
enum
AVColorTransferCharacteristic
{
AVCOL_TRC_BT709
=
1
,
///< also ITU-R BT1361
AVCOL_TRC_UNSPECIFIED
=
2
,
AVCOL_TRC_GAMMA22
=
4
,
///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
AVCOL_TRC_GAMMA28
=
5
,
///< also ITU-R BT470BG
AVCOL_TRC_SMPTE170M
=
6
,
///< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
AVCOL_TRC_SMPTE240M
=
7
,
AVCOL_TRC_LINEAR
=
8
,
///< "Linear transfer characteristics"
AVCOL_TRC_LOG
=
9
,
///< "Logarithmic transfer characteristic (100:1 range)"
AVCOL_TRC_LOG_SQRT
=
10
,
///< "Logarithmic transfer characteristic (100 * Sqrt( 10 ) : 1 range)"
AVCOL_TRC_IEC61966_2_4
=
11
,
///< IEC 61966-2-4
AVCOL_TRC_BT1361_ECG
=
12
,
///< ITU-R BT1361 Extended Colour Gamut
AVCOL_TRC_IEC61966_2_1
=
13
,
///< IEC 61966-2-1 (sRGB or sYCC)
AVCOL_TRC_BT2020_10
=
14
,
///< ITU-R BT2020 for 10 bit system
AVCOL_TRC_BT2020_12
=
15
,
///< ITU-R BT2020 for 12 bit system
AVCOL_TRC_NB
,
///< Not part of ABI
};
enum
AVColorSpace
{
AVCOL_SPC_RGB
=
0
,
AVCOL_SPC_BT709
=
1
,
///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
AVCOL_SPC_UNSPECIFIED
=
2
,
AVCOL_SPC_FCC
=
4
,
AVCOL_SPC_BT470BG
=
5
,
///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
AVCOL_SPC_SMPTE170M
=
6
,
///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
AVCOL_SPC_SMPTE240M
=
7
,
AVCOL_SPC_YCOCG
=
8
,
///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
AVCOL_SPC_BT2020_NCL
=
9
,
///< ITU-R BT2020 non-constant luminance system
AVCOL_SPC_BT2020_CL
=
10
,
///< ITU-R BT2020 constant luminance system
AVCOL_SPC_NB
,
///< Not part of ABI
};
enum
AVColorRange
{
AVCOL_RANGE_UNSPECIFIED
=
0
,
AVCOL_RANGE_MPEG
=
1
,
///< the normal 219*2^(n-8) "MPEG" YUV ranges
AVCOL_RANGE_JPEG
=
2
,
///< the normal 2^n-1 "JPEG" YUV ranges
AVCOL_RANGE_NB
,
///< Not part of ABI
};
/**
* X X 3 4 X X are luma samples,
* 1 2 1-6 are possible chroma positions
* X X 5 6 X 0 is undefined/unknown position
*/
enum
AVChromaLocation
{
AVCHROMA_LOC_UNSPECIFIED
=
0
,
AVCHROMA_LOC_LEFT
=
1
,
///< mpeg2/4, h264 default
AVCHROMA_LOC_CENTER
=
2
,
///< mpeg1, jpeg, h263
AVCHROMA_LOC_TOPLEFT
=
3
,
///< DV
AVCHROMA_LOC_TOP
=
4
,
AVCHROMA_LOC_BOTTOMLEFT
=
5
,
AVCHROMA_LOC_BOTTOM
=
6
,
AVCHROMA_LOC_NB
,
///< Not part of ABI
};
enum
AVAudioServiceType
{
enum
AVAudioServiceType
{
AV_AUDIO_SERVICE_TYPE_MAIN
=
0
,
AV_AUDIO_SERVICE_TYPE_MAIN
=
0
,
AV_AUDIO_SERVICE_TYPE_EFFECTS
=
1
,
AV_AUDIO_SERVICE_TYPE_EFFECTS
=
1
,
...
...
libavutil/frame.c
View file @
8c02adc6
...
@@ -38,6 +38,13 @@ static void get_frame_defaults(AVFrame *frame)
...
@@ -38,6 +38,13 @@ static void get_frame_defaults(AVFrame *frame)
frame
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
frame
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
frame
->
format
=
-
1
;
/* unknown */
frame
->
format
=
-
1
;
/* unknown */
frame
->
extended_data
=
frame
->
data
;
frame
->
extended_data
=
frame
->
data
;
#if FF_API_AVFRAME_COLORSPACE
frame
->
color_primaries
=
AVCOL_PRI_UNSPECIFIED
;
frame
->
color_trc
=
AVCOL_TRC_UNSPECIFIED
;
frame
->
colorspace
=
AVCOL_SPC_UNSPECIFIED
;
frame
->
color_range
=
AVCOL_RANGE_UNSPECIFIED
;
frame
->
chroma_location
=
AVCHROMA_LOC_UNSPECIFIED
;
#endif
}
}
AVFrame
*
av_frame_alloc
(
void
)
AVFrame
*
av_frame_alloc
(
void
)
...
@@ -373,6 +380,13 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
...
@@ -373,6 +380,13 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
dst
->
coded_picture_number
=
src
->
coded_picture_number
;
dst
->
coded_picture_number
=
src
->
coded_picture_number
;
dst
->
display_picture_number
=
src
->
display_picture_number
;
dst
->
display_picture_number
=
src
->
display_picture_number
;
dst
->
flags
=
src
->
flags
;
dst
->
flags
=
src
->
flags
;
#if FF_API_AVFRAME_COLORSPACE
dst
->
color_primaries
=
src
->
color_primaries
;
dst
->
color_trc
=
src
->
color_trc
;
dst
->
colorspace
=
src
->
colorspace
;
dst
->
color_range
=
src
->
color_range
;
dst
->
chroma_location
=
src
->
chroma_location
;
#endif
memcpy
(
dst
->
error
,
src
->
error
,
sizeof
(
dst
->
error
));
memcpy
(
dst
->
error
,
src
->
error
,
sizeof
(
dst
->
error
));
...
...
libavutil/frame.h
View file @
8c02adc6
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include "dict.h"
#include "dict.h"
#include "rational.h"
#include "rational.h"
#include "samplefmt.h"
#include "samplefmt.h"
#include "pixfmt.h"
#include "version.h"
#include "version.h"
...
@@ -416,6 +417,18 @@ typedef struct AVFrame {
...
@@ -416,6 +417,18 @@ typedef struct AVFrame {
* Frame flags, a combination of @ref lavu_frame_flags
* Frame flags, a combination of @ref lavu_frame_flags
*/
*/
int
flags
;
int
flags
;
#if FF_API_AVFRAME_COLORSPACE
enum
AVColorRange
color_range
;
enum
AVColorPrimaries
color_primaries
;
enum
AVColorTransferCharacteristic
color_trc
;
enum
AVColorSpace
colorspace
;
enum
AVChromaLocation
chroma_location
;
#endif
}
AVFrame
;
}
AVFrame
;
/**
/**
...
...
libavutil/pixfmt.h
View file @
8c02adc6
...
@@ -292,4 +292,85 @@ enum AVPixelFormat {
...
@@ -292,4 +292,85 @@ enum AVPixelFormat {
#define PIX_FMT_GBRP16 AV_PIX_FMT_GBRP16
#define PIX_FMT_GBRP16 AV_PIX_FMT_GBRP16
#endif
#endif
/**
* Chromaticity coordinates of the source primaries.
*/
enum
AVColorPrimaries
{
AVCOL_PRI_BT709
=
1
,
///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
AVCOL_PRI_UNSPECIFIED
=
2
,
AVCOL_PRI_BT470M
=
4
,
AVCOL_PRI_BT470BG
=
5
,
///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
AVCOL_PRI_SMPTE170M
=
6
,
///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
AVCOL_PRI_SMPTE240M
=
7
,
///< functionally identical to above
AVCOL_PRI_FILM
=
8
,
AVCOL_PRI_BT2020
=
9
,
///< ITU-R BT2020
AVCOL_PRI_NB
,
///< Not part of ABI
};
/**
* Color Transfer Characteristic.
*/
enum
AVColorTransferCharacteristic
{
AVCOL_TRC_BT709
=
1
,
///< also ITU-R BT1361
AVCOL_TRC_UNSPECIFIED
=
2
,
AVCOL_TRC_GAMMA22
=
4
,
///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
AVCOL_TRC_GAMMA28
=
5
,
///< also ITU-R BT470BG
AVCOL_TRC_SMPTE170M
=
6
,
///< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
AVCOL_TRC_SMPTE240M
=
7
,
AVCOL_TRC_LINEAR
=
8
,
///< "Linear transfer characteristics"
AVCOL_TRC_LOG
=
9
,
///< "Logarithmic transfer characteristic (100:1 range)"
AVCOL_TRC_LOG_SQRT
=
10
,
///< "Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
AVCOL_TRC_IEC61966_2_4
=
11
,
///< IEC 61966-2-4
AVCOL_TRC_BT1361_ECG
=
12
,
///< ITU-R BT1361 Extended Colour Gamut
AVCOL_TRC_IEC61966_2_1
=
13
,
///< IEC 61966-2-1 (sRGB or sYCC)
AVCOL_TRC_BT2020_10
=
14
,
///< ITU-R BT2020 for 10 bit system
AVCOL_TRC_BT2020_12
=
15
,
///< ITU-R BT2020 for 12 bit system
AVCOL_TRC_NB
,
///< Not part of ABI
};
/**
* YUV colorspace type.
*/
enum
AVColorSpace
{
AVCOL_SPC_RGB
=
0
,
AVCOL_SPC_BT709
=
1
,
///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
AVCOL_SPC_UNSPECIFIED
=
2
,
AVCOL_SPC_FCC
=
4
,
AVCOL_SPC_BT470BG
=
5
,
///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
AVCOL_SPC_SMPTE170M
=
6
,
///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
AVCOL_SPC_SMPTE240M
=
7
,
AVCOL_SPC_YCOCG
=
8
,
///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
AVCOL_SPC_BT2020_NCL
=
9
,
///< ITU-R BT2020 non-constant luminance system
AVCOL_SPC_BT2020_CL
=
10
,
///< ITU-R BT2020 constant luminance system
AVCOL_SPC_NB
,
///< Not part of ABI
};
/**
* MPEG vs JPEG YUV range.
*/
enum
AVColorRange
{
AVCOL_RANGE_UNSPECIFIED
=
0
,
AVCOL_RANGE_MPEG
=
1
,
///< the normal 219*2^(n-8) "MPEG" YUV ranges
AVCOL_RANGE_JPEG
=
2
,
///< the normal 2^n-1 "JPEG" YUV ranges
AVCOL_RANGE_NB
,
///< Not part of ABI
};
/**
* Location of chroma samples.
*
* X X 3 4 X X are luma samples,
* 1 2 1-6 are possible chroma positions
* X X 5 6 X 0 is undefined/unknown position
*/
enum
AVChromaLocation
{
AVCHROMA_LOC_UNSPECIFIED
=
0
,
AVCHROMA_LOC_LEFT
=
1
,
///< mpeg2/4, h264 default
AVCHROMA_LOC_CENTER
=
2
,
///< mpeg1, jpeg, h263
AVCHROMA_LOC_TOPLEFT
=
3
,
///< DV
AVCHROMA_LOC_TOP
=
4
,
AVCHROMA_LOC_BOTTOMLEFT
=
5
,
AVCHROMA_LOC_BOTTOM
=
6
,
AVCHROMA_LOC_NB
,
///< Not part of ABI
};
#endif
/* AVUTIL_PIXFMT_H */
#endif
/* AVUTIL_PIXFMT_H */
libavutil/version.h
View file @
8c02adc6
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
*/
*/
#define LIBAVUTIL_VERSION_MAJOR 53
#define LIBAVUTIL_VERSION_MAJOR 53
#define LIBAVUTIL_VERSION_MINOR 1
5
#define LIBAVUTIL_VERSION_MINOR 1
6
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
@@ -111,6 +111,10 @@
...
@@ -111,6 +111,10 @@
#ifndef FF_API_OPT_TYPE_METADATA
#ifndef FF_API_OPT_TYPE_METADATA
#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 54)
#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 54)
#endif
#endif
#ifndef FF_API_AVFRAME_COLORSPACE
#define FF_API_AVFRAME_COLORSPACE (LIBAVUTIL_VERSION_MAJOR >= 54)
#endif
/**
/**
* @}
* @}
...
...
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