Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
28f36dce
Commit
28f36dce
authored
Jan 31, 2013
by
Michael Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libopenjpegenc: simplify switch statement
Signed-off-by:
Michael Bradshaw
<
mjbshaw@gmail.com
>
parent
c58c6739
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
libopenjpegenc.c
libavcodec/libopenjpegenc.c
+5
-10
No files found.
libavcodec/libopenjpegenc.c
View file @
28f36dce
...
@@ -377,15 +377,6 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -377,15 +377,6 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
cpyresult
=
libopenjpeg_copy_packed16
(
avctx
,
frame
,
image
);
cpyresult
=
libopenjpeg_copy_packed16
(
avctx
,
frame
,
image
);
break
;
break
;
case
AV_PIX_FMT_GBR24P
:
case
AV_PIX_FMT_GBR24P
:
gbrframe
=
*
frame
;
gbrframe
.
data
[
0
]
=
frame
->
data
[
2
];
// swap to be rgb
gbrframe
.
data
[
1
]
=
frame
->
data
[
0
];
gbrframe
.
data
[
2
]
=
frame
->
data
[
1
];
gbrframe
.
linesize
[
0
]
=
frame
->
linesize
[
2
];
gbrframe
.
linesize
[
1
]
=
frame
->
linesize
[
0
];
gbrframe
.
linesize
[
2
]
=
frame
->
linesize
[
1
];
cpyresult
=
libopenjpeg_copy_unpacked8
(
avctx
,
&
gbrframe
,
image
);
break
;
case
AV_PIX_FMT_GBRP9
:
case
AV_PIX_FMT_GBRP9
:
case
AV_PIX_FMT_GBRP10
:
case
AV_PIX_FMT_GBRP10
:
case
AV_PIX_FMT_GBRP12
:
case
AV_PIX_FMT_GBRP12
:
...
@@ -398,7 +389,11 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -398,7 +389,11 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
gbrframe
.
linesize
[
0
]
=
frame
->
linesize
[
2
];
gbrframe
.
linesize
[
0
]
=
frame
->
linesize
[
2
];
gbrframe
.
linesize
[
1
]
=
frame
->
linesize
[
0
];
gbrframe
.
linesize
[
1
]
=
frame
->
linesize
[
0
];
gbrframe
.
linesize
[
2
]
=
frame
->
linesize
[
1
];
gbrframe
.
linesize
[
2
]
=
frame
->
linesize
[
1
];
cpyresult
=
libopenjpeg_copy_unpacked16
(
avctx
,
&
gbrframe
,
image
);
if
(
avctx
->
pix_fmt
==
AV_PIX_FMT_GBR24P
)
{
cpyresult
=
libopenjpeg_copy_unpacked8
(
avctx
,
&
gbrframe
,
image
);
}
else
{
cpyresult
=
libopenjpeg_copy_unpacked16
(
avctx
,
&
gbrframe
,
image
);
}
break
;
break
;
case
AV_PIX_FMT_GRAY8
:
case
AV_PIX_FMT_GRAY8
:
case
AV_PIX_FMT_YUV410P
:
case
AV_PIX_FMT_YUV410P
:
...
...
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