Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
bf538638
Commit
bf538638
authored
Jul 09, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12: switch to av_assert
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cdb3f2f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
mpeg12.c
libavcodec/mpeg12.c
+7
-10
No files found.
libavcodec/mpeg12.c
View file @
bf538638
...
...
@@ -43,9 +43,6 @@
#include "xvmc_internal.h"
#include "thread.h"
//#undef NDEBUG
//#include <assert.h>
#define MV_VLC_BITS 9
#define MBINCR_VLC_BITS 9
...
...
@@ -745,7 +742,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
av_dlog
(
s
->
avctx
,
"decode_mb: x=%d y=%d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
a
ssert
(
s
->
mb_skipped
==
0
);
a
v_assert2
(
s
->
mb_skipped
==
0
);
if
(
s
->
mb_skip_run
--
!=
0
)
{
if
(
s
->
pict_type
==
AV_PICTURE_TYPE_P
)
{
...
...
@@ -762,7 +759,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
return
-
1
;
s
->
current_picture
.
f
.
mb_type
[
s
->
mb_x
+
s
->
mb_y
*
s
->
mb_stride
]
=
mb_type
|
MB_TYPE_SKIP
;
// a
ssert
(s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1] & (MB_TYPE_16x16 | MB_TYPE_16x8));
// a
v_assert2
(s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1] & (MB_TYPE_16x16 | MB_TYPE_16x8));
if
((
s
->
mv
[
0
][
0
][
0
]
|
s
->
mv
[
0
][
0
][
1
]
|
s
->
mv
[
1
][
0
][
0
]
|
s
->
mv
[
1
][
0
][
1
])
==
0
)
s
->
mb_skipped
=
1
;
...
...
@@ -860,7 +857,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
}
}
else
{
if
(
mb_type
&
MB_TYPE_ZERO_MV
)
{
a
ssert
(
mb_type
&
MB_TYPE_CBP
);
a
v_assert2
(
mb_type
&
MB_TYPE_CBP
);
s
->
mv_dir
=
MV_DIR_FORWARD
;
if
(
s
->
picture_structure
==
PICT_FRAME
)
{
...
...
@@ -883,7 +880,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
s
->
mv
[
0
][
0
][
0
]
=
0
;
s
->
mv
[
0
][
0
][
1
]
=
0
;
}
else
{
a
ssert
(
mb_type
&
MB_TYPE_L0L1
);
a
v_assert2
(
mb_type
&
MB_TYPE_L0L1
);
// FIXME decide if MBs in field pictures are MB_TYPE_INTERLACED
/* get additional motion vector type */
if
(
s
->
frame_pred_frame_dct
)
...
...
@@ -1682,7 +1679,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
s
->
resync_mb_x
=
s
->
resync_mb_y
=
-
1
;
a
ssert
(
mb_y
<
s
->
mb_height
);
a
v_assert0
(
mb_y
<
s
->
mb_height
);
init_get_bits
(
&
s
->
gb
,
*
buf
,
buf_size
*
8
);
if
(
s
->
codec_id
!=
CODEC_ID_MPEG1VIDEO
&&
s
->
mb_height
>
2800
/
16
)
...
...
@@ -1792,7 +1789,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
s
->
current_picture
.
f
.
motion_val
[
dir
][
xy
+
1
][
1
]
=
motion_y
;
s
->
current_picture
.
f
.
ref_index
[
dir
][
b8_xy
]
=
s
->
current_picture
.
f
.
ref_index
[
dir
][
b8_xy
+
1
]
=
s
->
field_select
[
dir
][
i
];
a
ssert
(
s
->
field_select
[
dir
][
i
]
==
0
||
s
->
field_select
[
dir
][
i
]
==
1
);
a
v_assert2
(
s
->
field_select
[
dir
][
i
]
==
0
||
s
->
field_select
[
dir
][
i
]
==
1
);
}
xy
+=
wrap
;
b8_xy
+=
2
;
...
...
@@ -2208,7 +2205,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
*/
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
a
ssert
(
pc
->
frame_start_found
>=
0
&&
pc
->
frame_start_found
<=
4
);
a
v_assert1
(
pc
->
frame_start_found
>=
0
&&
pc
->
frame_start_found
<=
4
);
if
(
pc
->
frame_start_found
&
1
)
{
if
(
state
==
EXT_START_CODE
&&
(
buf
[
i
]
&
0xF0
)
!=
0x80
)
pc
->
frame_start_found
--
;
...
...
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