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
ee33eb40
Commit
ee33eb40
authored
Jan 17, 2012
by
Michael Bradshaw
Committed by
Carl Eugen Hoyos
Jan 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libopenjpegenc: Rename four conversion functions.
parent
7e62315c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
libopenjpegenc.c
libavcodec/libopenjpegenc.c
+12
-12
No files found.
libavcodec/libopenjpegenc.c
View file @
ee33eb40
...
@@ -197,7 +197,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
...
@@ -197,7 +197,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
return
0
;
return
0
;
}
}
static
int
libopenjpeg_copy_
rgba
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
,
int
numcomps
)
static
int
libopenjpeg_copy_
packed8
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
,
int
numcomps
)
{
{
int
compno
;
int
compno
;
int
x
;
int
x
;
...
@@ -222,7 +222,7 @@ static int libopenjpeg_copy_rgba(AVCodecContext *avctx, AVFrame *frame, opj_imag
...
@@ -222,7 +222,7 @@ static int libopenjpeg_copy_rgba(AVCodecContext *avctx, AVFrame *frame, opj_imag
return
1
;
return
1
;
}
}
static
int
libopenjpeg_copy_
rgb
16
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
,
int
numcomps
)
static
int
libopenjpeg_copy_
packed
16
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
,
int
numcomps
)
{
{
int
compno
;
int
compno
;
int
x
;
int
x
;
...
@@ -248,7 +248,7 @@ static int libopenjpeg_copy_rgb16(AVCodecContext *avctx, AVFrame *frame, opj_ima
...
@@ -248,7 +248,7 @@ static int libopenjpeg_copy_rgb16(AVCodecContext *avctx, AVFrame *frame, opj_ima
return
1
;
return
1
;
}
}
static
int
libopenjpeg_copy_
yuv
8
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
)
static
int
libopenjpeg_copy_
unpacked
8
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
)
{
{
int
compno
;
int
compno
;
int
x
;
int
x
;
...
@@ -276,7 +276,7 @@ static int libopenjpeg_copy_yuv8(AVCodecContext *avctx, AVFrame *frame, opj_imag
...
@@ -276,7 +276,7 @@ static int libopenjpeg_copy_yuv8(AVCodecContext *avctx, AVFrame *frame, opj_imag
return
1
;
return
1
;
}
}
static
int
libopenjpeg_copy_
yuv
16
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
)
static
int
libopenjpeg_copy_
unpacked
16
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
)
{
{
int
compno
;
int
compno
;
int
x
;
int
x
;
...
@@ -325,29 +325,29 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf
...
@@ -325,29 +325,29 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf
switch
(
avctx
->
pix_fmt
)
{
switch
(
avctx
->
pix_fmt
)
{
case
PIX_FMT_GRAY8
:
case
PIX_FMT_GRAY8
:
cpyresult
=
libopenjpeg_copy_
rgba
(
avctx
,
frame
,
image
,
1
);
cpyresult
=
libopenjpeg_copy_
packed8
(
avctx
,
frame
,
image
,
1
);
break
;
break
;
case
PIX_FMT_GRAY16
:
case
PIX_FMT_GRAY16
:
cpyresult
=
libopenjpeg_copy_
rgb
16
(
avctx
,
frame
,
image
,
1
);
cpyresult
=
libopenjpeg_copy_
packed
16
(
avctx
,
frame
,
image
,
1
);
break
;
break
;
case
PIX_FMT_RGB24
:
case
PIX_FMT_RGB24
:
cpyresult
=
libopenjpeg_copy_
rgba
(
avctx
,
frame
,
image
,
3
);
cpyresult
=
libopenjpeg_copy_
packed8
(
avctx
,
frame
,
image
,
3
);
break
;
break
;
case
PIX_FMT_RGBA
:
case
PIX_FMT_RGBA
:
cpyresult
=
libopenjpeg_copy_
rgba
(
avctx
,
frame
,
image
,
4
);
cpyresult
=
libopenjpeg_copy_
packed8
(
avctx
,
frame
,
image
,
4
);
break
;
break
;
case
PIX_FMT_RGB48
:
case
PIX_FMT_RGB48
:
cpyresult
=
libopenjpeg_copy_
rgb
16
(
avctx
,
frame
,
image
,
3
);
cpyresult
=
libopenjpeg_copy_
packed
16
(
avctx
,
frame
,
image
,
3
);
break
;
break
;
case
PIX_FMT_RGBA64
:
case
PIX_FMT_RGBA64
:
cpyresult
=
libopenjpeg_copy_
rgb
16
(
avctx
,
frame
,
image
,
4
);
cpyresult
=
libopenjpeg_copy_
packed
16
(
avctx
,
frame
,
image
,
4
);
break
;
break
;
case
PIX_FMT_YUV420P
:
case
PIX_FMT_YUV420P
:
case
PIX_FMT_YUV422P
:
case
PIX_FMT_YUV422P
:
case
PIX_FMT_YUV440P
:
case
PIX_FMT_YUV440P
:
case
PIX_FMT_YUV444P
:
case
PIX_FMT_YUV444P
:
case
PIX_FMT_YUVA420P
:
case
PIX_FMT_YUVA420P
:
cpyresult
=
libopenjpeg_copy_
yuv
8
(
avctx
,
frame
,
image
);
cpyresult
=
libopenjpeg_copy_
unpacked
8
(
avctx
,
frame
,
image
);
break
;
break
;
case
PIX_FMT_YUV420P9
:
case
PIX_FMT_YUV420P9
:
case
PIX_FMT_YUV420P10
:
case
PIX_FMT_YUV420P10
:
...
@@ -358,7 +358,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf
...
@@ -358,7 +358,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf
case
PIX_FMT_YUV444P9
:
case
PIX_FMT_YUV444P9
:
case
PIX_FMT_YUV444P10
:
case
PIX_FMT_YUV444P10
:
case
PIX_FMT_YUV444P16
:
case
PIX_FMT_YUV444P16
:
cpyresult
=
libopenjpeg_copy_
yuv
16
(
avctx
,
frame
,
image
);
cpyresult
=
libopenjpeg_copy_
unpacked
16
(
avctx
,
frame
,
image
);
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"The frame's pixel format '%s' is not supported
\n
"
,
av_get_pix_fmt_name
(
avctx
->
pix_fmt
));
av_log
(
avctx
,
AV_LOG_ERROR
,
"The frame's pixel format '%s' is not supported
\n
"
,
av_get_pix_fmt_name
(
avctx
->
pix_fmt
));
...
...
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