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
94ee6c10
Commit
94ee6c10
authored
Nov 02, 2010
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indent
Originally committed as revision 25630 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0422af7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
msrledec.c
libavcodec/msrledec.c
+26
-26
No files found.
libavcodec/msrledec.c
View file @
94ee6c10
...
...
@@ -70,34 +70,34 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
pixel_ptr
+=
stream_byte
;
FETCH_NEXT_STREAM_BYTE
();
row_ptr
-=
stream_byte
*
row_dec
;
}
else
{
// copy pixels from encoded stream
odd_pixel
=
stream_byte
&
1
;
rle_code
=
(
stream_byte
+
1
)
/
2
;
extra_byte
=
rle_code
&
0x01
;
if
((
row_ptr
+
pixel_ptr
+
stream_byte
>
frame_size
)
||
(
row_ptr
<
0
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
" MS RLE: frame ptr just went out of bounds (1)
\n
"
);
return
-
1
;
}
}
else
{
// copy pixels from encoded stream
odd_pixel
=
stream_byte
&
1
;
rle_code
=
(
stream_byte
+
1
)
/
2
;
extra_byte
=
rle_code
&
0x01
;
if
((
row_ptr
+
pixel_ptr
+
stream_byte
>
frame_size
)
||
(
row_ptr
<
0
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
" MS RLE: frame ptr just went out of bounds (1)
\n
"
);
return
-
1
;
}
for
(
i
=
0
;
i
<
rle_code
;
i
++
)
{
if
(
pixel_ptr
>=
avctx
->
width
)
break
;
FETCH_NEXT_STREAM_BYTE
();
pic
->
data
[
0
][
row_ptr
+
pixel_ptr
]
=
stream_byte
>>
4
;
pixel_ptr
++
;
if
(
i
+
1
==
rle_code
&&
odd_pixel
)
break
;
if
(
pixel_ptr
>=
avctx
->
width
)
break
;
pic
->
data
[
0
][
row_ptr
+
pixel_ptr
]
=
stream_byte
&
0x0F
;
pixel_ptr
++
;
}
for
(
i
=
0
;
i
<
rle_code
;
i
++
)
{
if
(
pixel_ptr
>=
avctx
->
width
)
break
;
FETCH_NEXT_STREAM_BYTE
();
pic
->
data
[
0
][
row_ptr
+
pixel_ptr
]
=
stream_byte
>>
4
;
pixel_ptr
++
;
if
(
i
+
1
==
rle_code
&&
odd_pixel
)
break
;
if
(
pixel_ptr
>=
avctx
->
width
)
break
;
pic
->
data
[
0
][
row_ptr
+
pixel_ptr
]
=
stream_byte
&
0x0F
;
pixel_ptr
++
;
}
// if the RLE code is odd, skip a byte in the stream
if
(
extra_byte
)
stream_ptr
++
;
// if the RLE code is odd, skip a byte in the stream
if
(
extra_byte
)
stream_ptr
++
;
}
}
else
{
// decode a run of data
...
...
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