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
b3eda694
Commit
b3eda694
authored
Mar 31, 2016
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: add bt2020 yuv2rgb coefficients.
parent
98038e2e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
swscale.h
libswscale/swscale.h
+1
-0
swscale_internal.h
libswscale/swscale_internal.h
+1
-1
version.h
libswscale/version.h
+1
-1
yuv2rgb.c
libswscale/yuv2rgb.c
+6
-3
No files found.
libswscale/swscale.h
View file @
b3eda694
...
...
@@ -91,6 +91,7 @@ const char *swscale_license(void);
#define SWS_CS_SMPTE170M 5
#define SWS_CS_SMPTE240M 7
#define SWS_CS_DEFAULT 5
#define SWS_CS_BT2020 9
/**
* Return a pointer to yuv<->rgb coefficients for the given colorspace
...
...
libswscale/swscale_internal.h
View file @
b3eda694
...
...
@@ -861,7 +861,7 @@ extern const uint8_t ff_dither_8x8_73[9][8];
extern
const
uint8_t
ff_dither_8x8_128
[
9
][
8
];
extern
const
uint8_t
ff_dither_8x8_220
[
9
][
8
];
extern
const
int32_t
ff_yuv2rgb_coeffs
[
8
][
4
];
extern
const
int32_t
ff_yuv2rgb_coeffs
[
11
][
4
];
extern
const
AVClass
ff_sws_context_class
;
...
...
libswscale/version.h
View file @
b3eda694
...
...
@@ -27,7 +27,7 @@
#include "libavutil/version.h"
#define LIBSWSCALE_VERSION_MAJOR 4
#define LIBSWSCALE_VERSION_MINOR
0
#define LIBSWSCALE_VERSION_MINOR
1
#define LIBSWSCALE_VERSION_MICRO 100
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
...
...
libswscale/yuv2rgb.c
View file @
b3eda694
...
...
@@ -46,7 +46,7 @@
*
* where Y = cr * R + cg * G + cb * B and cr + cg + cb = 1.
*/
const
int32_t
ff_yuv2rgb_coeffs
[
8
][
4
]
=
{
const
int32_t
ff_yuv2rgb_coeffs
[
11
][
4
]
=
{
{
117489
,
138438
,
13975
,
34925
},
/* no sequence_display_extension */
{
117489
,
138438
,
13975
,
34925
},
/* ITU-R Rec. 709 (1990) */
{
104597
,
132201
,
25675
,
53279
},
/* unspecified */
...
...
@@ -54,12 +54,15 @@ const int32_t ff_yuv2rgb_coeffs[8][4] = {
{
104448
,
132798
,
24759
,
53109
},
/* FCC */
{
104597
,
132201
,
25675
,
53279
},
/* ITU-R Rec. 624-4 System B, G */
{
104597
,
132201
,
25675
,
53279
},
/* SMPTE 170M */
{
117579
,
136230
,
16907
,
35559
}
/* SMPTE 240M (1987) */
{
117579
,
136230
,
16907
,
35559
},
/* SMPTE 240M (1987) */
{
0
},
/* YCgCo */
{
110013
,
140363
,
12277
,
42626
},
/* Bt-2020-NCL */
{
110013
,
140363
,
12277
,
42626
},
/* Bt-2020-CL */
};
const
int
*
sws_getCoefficients
(
int
colorspace
)
{
if
(
colorspace
>
7
||
colorspace
<
0
)
if
(
colorspace
>
10
||
colorspace
<
0
||
colorspace
==
8
)
colorspace
=
SWS_CS_DEFAULT
;
return
ff_yuv2rgb_coeffs
[
colorspace
];
}
...
...
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