Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
e27bef9a
Commit
e27bef9a
authored
Nov 03, 2022
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/serdec: fix BE/LE format handling
parent
0957d62f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
serdec.c
libavformat/serdec.c
+7
-7
No files found.
libavformat/serdec.c
View file @
e27bef9a
...
@@ -68,13 +68,13 @@ static int ser_read_header(AVFormatContext *s)
...
@@ -68,13 +68,13 @@ static int ser_read_header(AVFormatContext *s)
avio_skip
(
s
->
pb
,
8
);
avio_skip
(
s
->
pb
,
8
);
switch
(
color_id
)
{
switch
(
color_id
)
{
case
0
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_GRAY8
:
endian
?
AV_PIX_FMT_GRAY16
LE
:
AV_PIX_FMT_GRAY16B
E
;
break
;
case
0
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_GRAY8
:
endian
?
AV_PIX_FMT_GRAY16
BE
:
AV_PIX_FMT_GRAY16L
E
;
break
;
case
8
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_RGGB8
:
endian
?
AV_PIX_FMT_BAYER_RGGB16
LE
:
AV_PIX_FMT_BAYER_RGGB16B
E
;
break
;
case
8
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_RGGB8
:
endian
?
AV_PIX_FMT_BAYER_RGGB16
BE
:
AV_PIX_FMT_BAYER_RGGB16L
E
;
break
;
case
9
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_GRBG8
:
endian
?
AV_PIX_FMT_BAYER_GRBG16
LE
:
AV_PIX_FMT_BAYER_GRBG16B
E
;
break
;
case
9
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_GRBG8
:
endian
?
AV_PIX_FMT_BAYER_GRBG16
BE
:
AV_PIX_FMT_BAYER_GRBG16L
E
;
break
;
case
10
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_GBRG8
:
endian
?
AV_PIX_FMT_BAYER_GBRG16
LE
:
AV_PIX_FMT_BAYER_GBRG16B
E
;
break
;
case
10
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_GBRG8
:
endian
?
AV_PIX_FMT_BAYER_GBRG16
BE
:
AV_PIX_FMT_BAYER_GBRG16L
E
;
break
;
case
11
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_BGGR8
:
endian
?
AV_PIX_FMT_BAYER_BGGR16
LE
:
AV_PIX_FMT_BAYER_BGGR16B
E
;
break
;
case
11
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BAYER_BGGR8
:
endian
?
AV_PIX_FMT_BAYER_BGGR16
BE
:
AV_PIX_FMT_BAYER_BGGR16L
E
;
break
;
case
100
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_RGB24
:
endian
?
AV_PIX_FMT_RGB48
LE
:
AV_PIX_FMT_RGB48B
E
;
break
;
case
100
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_RGB24
:
endian
?
AV_PIX_FMT_RGB48
BE
:
AV_PIX_FMT_RGB48L
E
;
break
;
case
101
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BGR24
:
endian
?
AV_PIX_FMT_BGR48
LE
:
AV_PIX_FMT_BGR48B
E
;
break
;
case
101
:
pix_fmt
=
depth
<=
8
?
AV_PIX_FMT_BGR24
:
endian
?
AV_PIX_FMT_BGR48
BE
:
AV_PIX_FMT_BGR48L
E
;
break
;
default:
default:
return
AVERROR_PATCHWELCOME
;
return
AVERROR_PATCHWELCOME
;
}
}
...
...
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