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
56af084c
Commit
56af084c
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: Remove two redundant function parameters.
parent
a02694c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
libopenjpegenc.c
libavcodec/libopenjpegenc.c
+6
-12
No files found.
libavcodec/libopenjpegenc.c
View file @
56af084c
...
...
@@ -197,13 +197,12 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
return
0
;
}
static
int
libopenjpeg_copy_packed8
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
,
int
numcomps
)
static
int
libopenjpeg_copy_packed8
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
)
{
int
compno
;
int
x
;
int
y
;
av_assert0
(
numcomps
==
1
||
numcomps
==
3
||
numcomps
==
4
);
const
int
numcomps
=
image
->
numcomps
;
for
(
compno
=
0
;
compno
<
numcomps
;
++
compno
)
{
if
(
image
->
comps
[
compno
].
w
>
frame
->
linesize
[
0
]
/
numcomps
)
{
...
...
@@ -223,15 +222,14 @@ static int libopenjpeg_copy_packed8(AVCodecContext *avctx, AVFrame *frame, opj_i
return
1
;
}
static
int
libopenjpeg_copy_packed16
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
,
int
numcomps
)
static
int
libopenjpeg_copy_packed16
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
opj_image_t
*
image
)
{
int
compno
;
int
x
;
int
y
;
const
int
numcomps
=
image
->
numcomps
;
uint16_t
*
frame_ptr
=
(
uint16_t
*
)
frame
->
data
[
0
];
av_assert0
(
numcomps
==
1
||
numcomps
==
3
||
numcomps
==
4
);
for
(
compno
=
0
;
compno
<
numcomps
;
++
compno
)
{
if
(
image
->
comps
[
compno
].
w
>
frame
->
linesize
[
0
]
/
numcomps
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error: frame's linesize is too small for the image
\n
"
);
...
...
@@ -329,16 +327,12 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf
switch
(
avctx
->
pix_fmt
)
{
case
PIX_FMT_RGB24
:
cpyresult
=
libopenjpeg_copy_packed8
(
avctx
,
frame
,
image
,
3
);
break
;
case
PIX_FMT_RGBA
:
cpyresult
=
libopenjpeg_copy_packed8
(
avctx
,
frame
,
image
,
4
);
cpyresult
=
libopenjpeg_copy_packed8
(
avctx
,
frame
,
image
);
break
;
case
PIX_FMT_RGB48
:
cpyresult
=
libopenjpeg_copy_packed16
(
avctx
,
frame
,
image
,
3
);
break
;
case
PIX_FMT_RGBA64
:
cpyresult
=
libopenjpeg_copy_packed16
(
avctx
,
frame
,
image
,
4
);
cpyresult
=
libopenjpeg_copy_packed16
(
avctx
,
frame
,
image
);
break
;
case
PIX_FMT_GRAY8
:
case
PIX_FMT_YUV420P
:
...
...
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