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
2b3c8f8a
Commit
2b3c8f8a
authored
Feb 01, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const
Originally committed as revision 11712 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b5777b94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
mjpegdec.c
libavcodec/mjpegdec.c
+6
-6
mjpegdec.h
libavcodec/mjpegdec.h
+1
-1
No files found.
libavcodec/mjpegdec.c
View file @
2b3c8f8a
...
@@ -1073,9 +1073,9 @@ static int valid_marker_list[] =
...
@@ -1073,9 +1073,9 @@ static int valid_marker_list[] =
/* return the 8 bit start code value and update the search
/* return the 8 bit start code value and update the search
state. Return -1 if no start code found */
state. Return -1 if no start code found */
static
int
find_marker
(
uint8_t
**
pbuf_ptr
,
uint8_t
*
buf_end
)
static
int
find_marker
(
const
uint8_t
**
pbuf_ptr
,
const
uint8_t
*
buf_end
)
{
{
uint8_t
*
buf_ptr
;
const
uint8_t
*
buf_ptr
;
unsigned
int
v
,
v2
;
unsigned
int
v
,
v2
;
int
val
;
int
val
;
#ifdef DEBUG
#ifdef DEBUG
...
@@ -1105,10 +1105,10 @@ found:
...
@@ -1105,10 +1105,10 @@ found:
int
ff_mjpeg_decode_frame
(
AVCodecContext
*
avctx
,
int
ff_mjpeg_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
void
*
data
,
int
*
data_size
,
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
MJpegDecodeContext
*
s
=
avctx
->
priv_data
;
MJpegDecodeContext
*
s
=
avctx
->
priv_data
;
uint8_t
*
buf_end
,
*
buf_ptr
;
const
uint8_t
*
buf_end
,
*
buf_ptr
;
int
start_code
;
int
start_code
;
AVFrame
*
picture
=
data
;
AVFrame
*
picture
=
data
;
...
@@ -1136,7 +1136,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
...
@@ -1136,7 +1136,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
/* unescape buffer of SOS, use special treatment for JPEG-LS */
/* unescape buffer of SOS, use special treatment for JPEG-LS */
if
(
start_code
==
SOS
&&
!
s
->
ls
)
if
(
start_code
==
SOS
&&
!
s
->
ls
)
{
{
uint8_t
*
src
=
buf_ptr
;
const
uint8_t
*
src
=
buf_ptr
;
uint8_t
*
dst
=
s
->
buffer
;
uint8_t
*
dst
=
s
->
buffer
;
while
(
src
<
buf_end
)
while
(
src
<
buf_end
)
...
@@ -1163,7 +1163,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
...
@@ -1163,7 +1163,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
(
buf_end
-
buf_ptr
)
-
(
dst
-
s
->
buffer
));
(
buf_end
-
buf_ptr
)
-
(
dst
-
s
->
buffer
));
}
}
else
if
(
start_code
==
SOS
&&
s
->
ls
){
else
if
(
start_code
==
SOS
&&
s
->
ls
){
uint8_t
*
src
=
buf_ptr
;
const
uint8_t
*
src
=
buf_ptr
;
uint8_t
*
dst
=
s
->
buffer
;
uint8_t
*
dst
=
s
->
buffer
;
int
bit_count
=
0
;
int
bit_count
=
0
;
int
t
=
0
,
b
=
0
;
int
t
=
0
,
b
=
0
;
...
...
libavcodec/mjpegdec.h
View file @
2b3c8f8a
...
@@ -103,7 +103,7 @@ int ff_mjpeg_decode_init(AVCodecContext *avctx);
...
@@ -103,7 +103,7 @@ int ff_mjpeg_decode_init(AVCodecContext *avctx);
int
ff_mjpeg_decode_end
(
AVCodecContext
*
avctx
);
int
ff_mjpeg_decode_end
(
AVCodecContext
*
avctx
);
int
ff_mjpeg_decode_frame
(
AVCodecContext
*
avctx
,
int
ff_mjpeg_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
void
*
data
,
int
*
data_size
,
uint8_t
*
buf
,
int
buf_size
);
const
uint8_t
*
buf
,
int
buf_size
);
int
ff_mjpeg_decode_dqt
(
MJpegDecodeContext
*
s
);
int
ff_mjpeg_decode_dqt
(
MJpegDecodeContext
*
s
);
int
ff_mjpeg_decode_dht
(
MJpegDecodeContext
*
s
);
int
ff_mjpeg_decode_dht
(
MJpegDecodeContext
*
s
);
int
ff_mjpeg_decode_sof
(
MJpegDecodeContext
*
s
);
int
ff_mjpeg_decode_sof
(
MJpegDecodeContext
*
s
);
...
...
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