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
b5d496f3
Commit
b5d496f3
authored
Nov 04, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support new transparency colour-spaces with libopenjpeg.
Reviewed-by: Michael Bradshaw
parent
b0428741
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
libopenjpegdec.c
libavcodec/libopenjpegdec.c
+4
-1
libopenjpegenc.c
libavcodec/libopenjpegenc.c
+21
-0
No files found.
libavcodec/libopenjpegdec.c
View file @
b5d496f3
...
...
@@ -46,10 +46,13 @@
AV_PIX_FMT_YUV420P,AV_PIX_FMT_YUV422P,AV_PIX_FMT_YUVA422P, \
AV_PIX_FMT_YUV440P,AV_PIX_FMT_YUV444P,AV_PIX_FMT_YUVA444P, \
AV_PIX_FMT_YUV420P9,AV_PIX_FMT_YUV422P9,AV_PIX_FMT_YUV444P9, \
AV_PIX_FMT_YUVA420P9,AV_PIX_FMT_YUVA422P9,AV_PIX_FMT_YUVA444P9, \
AV_PIX_FMT_YUV420P10,AV_PIX_FMT_YUV422P10,AV_PIX_FMT_YUV444P10, \
AV_PIX_FMT_YUVA420P10,AV_PIX_FMT_YUVA422P10,AV_PIX_FMT_YUVA444P10, \
AV_PIX_FMT_YUV420P12,AV_PIX_FMT_YUV422P12,AV_PIX_FMT_YUV444P12, \
AV_PIX_FMT_YUV420P14,AV_PIX_FMT_YUV422P14,AV_PIX_FMT_YUV444P14, \
AV_PIX_FMT_YUV420P16,AV_PIX_FMT_YUV422P16,AV_PIX_FMT_YUV444P16
AV_PIX_FMT_YUV420P16,AV_PIX_FMT_YUV422P16,AV_PIX_FMT_YUV444P16, \
AV_PIX_FMT_YUVA420P16,AV_PIX_FMT_YUVA422P16,AV_PIX_FMT_YUVA444P16
static
const
enum
AVPixelFormat
libopenjpeg_rgb_pix_fmts
[]
=
{
RGB_PIXEL_FORMATS
};
static
const
enum
AVPixelFormat
libopenjpeg_gray_pix_fmts
[]
=
{
GRAY_PIXEL_FORMATS
};
...
...
libavcodec/libopenjpegenc.c
View file @
b5d496f3
...
...
@@ -109,9 +109,15 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p
case
AV_PIX_FMT_YUV420P9
:
case
AV_PIX_FMT_YUV422P9
:
case
AV_PIX_FMT_YUV444P9
:
case
AV_PIX_FMT_YUVA420P9
:
case
AV_PIX_FMT_YUVA422P9
:
case
AV_PIX_FMT_YUVA444P9
:
case
AV_PIX_FMT_YUV420P10
:
case
AV_PIX_FMT_YUV422P10
:
case
AV_PIX_FMT_YUV444P10
:
case
AV_PIX_FMT_YUVA420P10
:
case
AV_PIX_FMT_YUVA422P10
:
case
AV_PIX_FMT_YUVA444P10
:
case
AV_PIX_FMT_YUV420P12
:
case
AV_PIX_FMT_YUV422P12
:
case
AV_PIX_FMT_YUV444P12
:
...
...
@@ -121,6 +127,9 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p
case
AV_PIX_FMT_YUV420P16
:
case
AV_PIX_FMT_YUV422P16
:
case
AV_PIX_FMT_YUV444P16
:
case
AV_PIX_FMT_YUVA420P16
:
case
AV_PIX_FMT_YUVA422P16
:
case
AV_PIX_FMT_YUVA444P16
:
color_space
=
CLRSPC_SYCC
;
break
;
default:
...
...
@@ -371,9 +380,15 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
case
AV_PIX_FMT_YUV420P9
:
case
AV_PIX_FMT_YUV422P9
:
case
AV_PIX_FMT_YUV444P9
:
case
AV_PIX_FMT_YUVA420P9
:
case
AV_PIX_FMT_YUVA422P9
:
case
AV_PIX_FMT_YUVA444P9
:
case
AV_PIX_FMT_YUV444P10
:
case
AV_PIX_FMT_YUV422P10
:
case
AV_PIX_FMT_YUV420P10
:
case
AV_PIX_FMT_YUVA444P10
:
case
AV_PIX_FMT_YUVA422P10
:
case
AV_PIX_FMT_YUVA420P10
:
case
AV_PIX_FMT_YUV420P12
:
case
AV_PIX_FMT_YUV422P12
:
case
AV_PIX_FMT_YUV444P12
:
...
...
@@ -383,6 +398,9 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
case
AV_PIX_FMT_YUV444P16
:
case
AV_PIX_FMT_YUV422P16
:
case
AV_PIX_FMT_YUV420P16
:
case
AV_PIX_FMT_YUVA444P16
:
case
AV_PIX_FMT_YUVA422P16
:
case
AV_PIX_FMT_YUVA420P16
:
cpyresult
=
libopenjpeg_copy_unpacked16
(
avctx
,
frame
,
image
);
break
;
default:
...
...
@@ -487,10 +505,13 @@ AVCodec ff_libopenjpeg_encoder = {
AV_PIX_FMT_YUV440P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUVA422P
,
AV_PIX_FMT_YUV411P
,
AV_PIX_FMT_YUV410P
,
AV_PIX_FMT_YUVA444P
,
AV_PIX_FMT_YUV420P9
,
AV_PIX_FMT_YUV422P9
,
AV_PIX_FMT_YUV444P9
,
AV_PIX_FMT_YUVA420P9
,
AV_PIX_FMT_YUVA422P9
,
AV_PIX_FMT_YUVA444P9
,
AV_PIX_FMT_YUV420P10
,
AV_PIX_FMT_YUV422P10
,
AV_PIX_FMT_YUV444P10
,
AV_PIX_FMT_YUVA420P10
,
AV_PIX_FMT_YUVA422P10
,
AV_PIX_FMT_YUVA444P10
,
AV_PIX_FMT_YUV420P12
,
AV_PIX_FMT_YUV422P12
,
AV_PIX_FMT_YUV444P12
,
AV_PIX_FMT_YUV420P14
,
AV_PIX_FMT_YUV422P14
,
AV_PIX_FMT_YUV444P14
,
AV_PIX_FMT_YUV420P16
,
AV_PIX_FMT_YUV422P16
,
AV_PIX_FMT_YUV444P16
,
AV_PIX_FMT_YUVA420P16
,
AV_PIX_FMT_YUVA422P16
,
AV_PIX_FMT_YUVA444P16
,
AV_PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"OpenJPEG JPEG 2000"
),
...
...
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