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
5f0f7713
Commit
5f0f7713
authored
Mar 05, 2004
by
Zdenek Kabelac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* more consts
Originally committed as revision 2847 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
49a37411
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
mpeg12.c
libavcodec/mpeg12.c
+11
-10
No files found.
libavcodec/mpeg12.c
View file @
5f0f7713
...
@@ -1768,9 +1768,9 @@ static int mpeg_decode_init(AVCodecContext *avctx)
...
@@ -1768,9 +1768,9 @@ static int mpeg_decode_init(AVCodecContext *avctx)
/* 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_start_code
(
uint8_t
**
pbuf_ptr
,
uint8_t
*
buf_end
)
static
int
find_start_code
(
const
uint8_t
**
pbuf_ptr
,
const
uint8_t
*
buf_end
)
{
{
uint8_t
*
buf_ptr
;
const
uint8_t
*
buf_ptr
;
unsigned
int
state
=
0xFFFFFFFF
,
v
;
unsigned
int
state
=
0xFFFFFFFF
,
v
;
int
val
;
int
val
;
...
@@ -1791,7 +1791,7 @@ static int find_start_code(uint8_t **pbuf_ptr, uint8_t *buf_end)
...
@@ -1791,7 +1791,7 @@ static int find_start_code(uint8_t **pbuf_ptr, uint8_t *buf_end)
}
}
static
int
mpeg1_decode_picture
(
AVCodecContext
*
avctx
,
static
int
mpeg1_decode_picture
(
AVCodecContext
*
avctx
,
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
...
@@ -2019,7 +2019,7 @@ static void mpeg_decode_picture_coding_extension(MpegEncContext *s)
...
@@ -2019,7 +2019,7 @@ static void mpeg_decode_picture_coding_extension(MpegEncContext *s)
}
}
static
void
mpeg_decode_extension
(
AVCodecContext
*
avctx
,
static
void
mpeg_decode_extension
(
AVCodecContext
*
avctx
,
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
...
@@ -2114,7 +2114,7 @@ static int mpeg_field_start(MpegEncContext *s){
...
@@ -2114,7 +2114,7 @@ static int mpeg_field_start(MpegEncContext *s){
* DECODE_SLICE_OK if this slice is ok<br>
* DECODE_SLICE_OK if this slice is ok<br>
*/
*/
static
int
mpeg_decode_slice
(
Mpeg1Context
*
s1
,
int
mb_y
,
static
int
mpeg_decode_slice
(
Mpeg1Context
*
s1
,
int
mb_y
,
uint8_t
**
buf
,
int
buf_size
)
const
uint8_t
**
buf
,
int
buf_size
)
{
{
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
AVCodecContext
*
avctx
=
s
->
avctx
;
AVCodecContext
*
avctx
=
s
->
avctx
;
...
@@ -2365,7 +2365,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
...
@@ -2365,7 +2365,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
}
}
static
int
mpeg1_decode_sequence
(
AVCodecContext
*
avctx
,
static
int
mpeg1_decode_sequence
(
AVCodecContext
*
avctx
,
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
...
@@ -2584,7 +2584,7 @@ static void mpeg_decode_user_data(AVCodecContext *avctx,
...
@@ -2584,7 +2584,7 @@ static void mpeg_decode_user_data(AVCodecContext *avctx,
}
}
static
void
mpeg_decode_gop
(
AVCodecContext
*
avctx
,
static
void
mpeg_decode_gop
(
AVCodecContext
*
avctx
,
uint8_t
*
buf
,
int
buf_size
){
const
uint8_t
*
buf
,
int
buf_size
){
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
...
@@ -2659,7 +2659,8 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
...
@@ -2659,7 +2659,8 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
uint8_t
*
buf
,
int
buf_size
)
uint8_t
*
buf
,
int
buf_size
)
{
{
Mpeg1Context
*
s
=
avctx
->
priv_data
;
Mpeg1Context
*
s
=
avctx
->
priv_data
;
uint8_t
*
buf_end
,
*
buf_ptr
;
const
uint8_t
*
buf_end
;
const
uint8_t
*
buf_ptr
;
int
ret
,
start_code
,
input_size
;
int
ret
,
start_code
,
input_size
;
AVFrame
*
picture
=
data
;
AVFrame
*
picture
=
data
;
MpegEncContext
*
s2
=
&
s
->
mpeg_enc_ctx
;
MpegEncContext
*
s2
=
&
s
->
mpeg_enc_ctx
;
...
@@ -2733,13 +2734,13 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
...
@@ -2733,13 +2734,13 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
switch
(
start_code
)
{
switch
(
start_code
)
{
case
SEQ_START_CODE
:
case
SEQ_START_CODE
:
mpeg1_decode_sequence
(
avctx
,
buf_ptr
,
mpeg1_decode_sequence
(
avctx
,
buf_ptr
,
input_size
);
input_size
);
break
;
break
;
case
PICTURE_START_CODE
:
case
PICTURE_START_CODE
:
/* we have a complete image : we try to decompress it */
/* we have a complete image : we try to decompress it */
mpeg1_decode_picture
(
avctx
,
mpeg1_decode_picture
(
avctx
,
buf_ptr
,
input_size
);
buf_ptr
,
input_size
);
break
;
break
;
case
EXT_START_CODE
:
case
EXT_START_CODE
:
mpeg_decode_extension
(
avctx
,
mpeg_decode_extension
(
avctx
,
...
...
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