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
83bf40f3
Commit
83bf40f3
authored
Sep 28, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/8bps: Fix 32bit output of 24bit video.
Regression since / partial revert of
ba3bb53b
parent
58776ccb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
8bps.c
libavcodec/8bps.c
+8
-5
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/8bps.c
View file @
83bf40f3
...
...
@@ -41,7 +41,7 @@
static
const
enum
AVPixelFormat
pixfmt_rgb24
[]
=
{
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_RGB32
,
AV_PIX_FMT_NONE
};
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_
0
RGB32
,
AV_PIX_FMT_NONE
};
typedef
struct
EightBpsContext
{
AVCodecContext
*
avctx
;
...
...
@@ -65,6 +65,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
unsigned
int
dlen
,
p
,
row
;
const
unsigned
char
*
lp
,
*
dp
,
*
ep
;
unsigned
char
count
;
unsigned
int
px_inc
;
unsigned
int
planes
=
c
->
planes
;
unsigned
char
*
planemap
=
c
->
planemap
;
int
ret
;
...
...
@@ -77,6 +78,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
/* Set data pointer after line lengths */
dp
=
encoded
+
planes
*
(
height
<<
1
);
px_inc
=
planes
+
(
avctx
->
pix_fmt
==
AV_PIX_FMT_0RGB32
);
for
(
p
=
0
;
p
<
planes
;
p
++
)
{
/* Lines length pointer for this plane */
lp
=
encoded
+
p
*
(
height
<<
1
);
...
...
@@ -95,21 +98,21 @@ static int decode_frame(AVCodecContext *avctx, void *data,
if
((
count
=
*
dp
++
)
<=
127
)
{
count
++
;
dlen
-=
count
+
1
;
if
(
pixptr_end
-
pixptr
<
count
*
p
lanes
)
if
(
pixptr_end
-
pixptr
<
count
*
p
x_inc
)
break
;
if
(
ep
-
dp
<
count
)
return
AVERROR_INVALIDDATA
;
while
(
count
--
)
{
*
pixptr
=
*
dp
++
;
pixptr
+=
p
lanes
;
pixptr
+=
p
x_inc
;
}
}
else
{
count
=
257
-
count
;
if
(
pixptr_end
-
pixptr
<
count
*
p
lanes
)
if
(
pixptr_end
-
pixptr
<
count
*
p
x_inc
)
break
;
while
(
count
--
)
{
*
pixptr
=
*
dp
;
pixptr
+=
p
lanes
;
pixptr
+=
p
x_inc
;
}
dp
++
;
dlen
-=
2
;
...
...
libavcodec/version.h
View file @
83bf40f3
...
...
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 58
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_MICRO 10
2
#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