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
51d7cd35
Commit
51d7cd35
authored
Dec 08, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decode RGB ljpeg to RGB24.
No alpha channel is decoded, the output used to be completely transparent.
parent
9608e3a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
mjpegdec.c
libavcodec/mjpegdec.c
+10
-10
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/mjpegdec.c
View file @
51d7cd35
...
...
@@ -324,7 +324,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
switch
(
pix_fmt_id
){
case
0x11111100
:
if
(
s
->
rgb
){
s
->
avctx
->
pix_fmt
=
PIX_FMT_BGR
A
;
s
->
avctx
->
pix_fmt
=
PIX_FMT_BGR
24
;
}
else
{
if
(
s
->
component_id
[
0
]
==
'Q'
&&
s
->
component_id
[
1
]
==
'F'
&&
s
->
component_id
[
2
]
==
'A'
){
s
->
avctx
->
pix_fmt
=
PIX_FMT_GBR24P
;
...
...
@@ -687,21 +687,21 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int predictor, int point
if
(
s
->
rct
){
for
(
mb_x
=
0
;
mb_x
<
s
->
mb_width
;
mb_x
++
)
{
ptr
[
4
*
mb_x
+
1
]
=
buffer
[
mb_x
][
0
]
-
((
buffer
[
mb_x
][
1
]
+
buffer
[
mb_x
][
2
]
-
0x200
)
>>
2
);
ptr
[
4
*
mb_x
+
0
]
=
buffer
[
mb_x
][
1
]
+
ptr
[
4
*
mb_x
+
1
];
ptr
[
4
*
mb_x
+
2
]
=
buffer
[
mb_x
][
2
]
+
ptr
[
4
*
mb_x
+
1
];
ptr
[
3
*
mb_x
+
1
]
=
buffer
[
mb_x
][
0
]
-
((
buffer
[
mb_x
][
1
]
+
buffer
[
mb_x
][
2
]
-
0x200
)
>>
2
);
ptr
[
3
*
mb_x
+
0
]
=
buffer
[
mb_x
][
1
]
+
ptr
[
3
*
mb_x
+
1
];
ptr
[
3
*
mb_x
+
2
]
=
buffer
[
mb_x
][
2
]
+
ptr
[
3
*
mb_x
+
1
];
}
}
else
if
(
s
->
pegasus_rct
){
for
(
mb_x
=
0
;
mb_x
<
s
->
mb_width
;
mb_x
++
)
{
ptr
[
4
*
mb_x
+
1
]
=
buffer
[
mb_x
][
0
]
-
((
buffer
[
mb_x
][
1
]
+
buffer
[
mb_x
][
2
])
>>
2
);
ptr
[
4
*
mb_x
+
0
]
=
buffer
[
mb_x
][
1
]
+
ptr
[
4
*
mb_x
+
1
];
ptr
[
4
*
mb_x
+
2
]
=
buffer
[
mb_x
][
2
]
+
ptr
[
4
*
mb_x
+
1
];
ptr
[
3
*
mb_x
+
1
]
=
buffer
[
mb_x
][
0
]
-
((
buffer
[
mb_x
][
1
]
+
buffer
[
mb_x
][
2
])
>>
2
);
ptr
[
3
*
mb_x
+
0
]
=
buffer
[
mb_x
][
1
]
+
ptr
[
3
*
mb_x
+
1
];
ptr
[
3
*
mb_x
+
2
]
=
buffer
[
mb_x
][
2
]
+
ptr
[
3
*
mb_x
+
1
];
}
}
else
{
for
(
mb_x
=
0
;
mb_x
<
s
->
mb_width
;
mb_x
++
)
{
ptr
[
4
*
mb_x
+
0
]
=
buffer
[
mb_x
][
2
];
ptr
[
4
*
mb_x
+
1
]
=
buffer
[
mb_x
][
1
];
ptr
[
4
*
mb_x
+
2
]
=
buffer
[
mb_x
][
0
];
ptr
[
3
*
mb_x
+
0
]
=
buffer
[
mb_x
][
2
];
ptr
[
3
*
mb_x
+
1
]
=
buffer
[
mb_x
][
1
];
ptr
[
3
*
mb_x
+
2
]
=
buffer
[
mb_x
][
0
];
}
}
}
...
...
libavcodec/version.h
View file @
51d7cd35
...
...
@@ -22,7 +22,7 @@
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 41
#define LIBAVCODEC_VERSION_MICRO
0
#define LIBAVCODEC_VERSION_MICRO
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
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