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
47a0d393
Commit
47a0d393
authored
Jan 17, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: move mb_skip_run into the per-slice context
parent
9951907f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
h264.h
libavcodec/h264.h
+2
-1
h264_cavlc.c
libavcodec/h264_cavlc.c
+4
-4
h264_slice.c
libavcodec/h264_slice.c
+2
-2
svq3.c
libavcodec/svq3.c
+2
-2
No files found.
libavcodec/h264.h
View file @
47a0d393
...
...
@@ -356,6 +356,8 @@ typedef struct H264SliceContext {
ptrdiff_t
mb_linesize
;
///< may be equal to s->linesize or s->linesize * 2, for mbaff
ptrdiff_t
mb_uvlinesize
;
int
mb_skip_run
;
int
redundant_pic_count
;
/**
...
...
@@ -525,7 +527,6 @@ typedef struct H264Context {
int
mb_x
,
mb_y
;
int
resync_mb_x
;
int
resync_mb_y
;
int
mb_skip_run
;
int
mb_height
,
mb_width
;
int
mb_stride
;
int
mb_num
;
...
...
libavcodec/h264_cavlc.c
View file @
47a0d393
...
...
@@ -709,12 +709,12 @@ int ff_h264_decode_mb_cavlc(H264Context *h, H264SliceContext *sl)
cbp
=
0
;
/* avoid warning. FIXME: find a solution without slowing
down the code */
if
(
sl
->
slice_type_nos
!=
AV_PICTURE_TYPE_I
)
{
if
(
h
->
mb_skip_run
==
-
1
)
h
->
mb_skip_run
=
get_ue_golomb
(
&
h
->
gb
);
if
(
sl
->
mb_skip_run
==
-
1
)
sl
->
mb_skip_run
=
get_ue_golomb
(
&
h
->
gb
);
if
(
h
->
mb_skip_run
--
)
{
if
(
sl
->
mb_skip_run
--
)
{
if
(
FRAME_MBAFF
(
h
)
&&
(
h
->
mb_y
&
1
)
==
0
){
if
(
h
->
mb_skip_run
==
0
)
if
(
sl
->
mb_skip_run
==
0
)
h
->
mb_mbaff
=
h
->
mb_field_decoding_flag
=
get_bits1
(
&
h
->
gb
);
}
decode_mb_skip
(
h
,
sl
);
...
...
libavcodec/h264_slice.c
View file @
47a0d393
...
...
@@ -2183,7 +2183,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
H264Context
*
h
=
sl
->
h264
;
int
lf_x_start
=
h
->
mb_x
;
h
->
mb_skip_run
=
-
1
;
sl
->
mb_skip_run
=
-
1
;
h
->
is_complex
=
FRAME_MBAFF
(
h
)
||
h
->
picture_structure
!=
PICT_FRAME
||
avctx
->
codec_id
!=
AV_CODEC_ID_H264
||
...
...
@@ -2314,7 +2314,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
}
}
if
(
get_bits_left
(
&
h
->
gb
)
<=
0
&&
h
->
mb_skip_run
<=
0
)
{
if
(
get_bits_left
(
&
h
->
gb
)
<=
0
&&
sl
->
mb_skip_run
<=
0
)
{
tprintf
(
h
->
avctx
,
"slice end %d %d
\n
"
,
get_bits_count
(
&
h
->
gb
),
h
->
gb
.
size_in_bits
);
...
...
libavcodec/svq3.c
View file @
47a0d393
...
...
@@ -821,11 +821,11 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
if
((
header
&
0x9F
)
==
2
)
{
i
=
(
h
->
mb_num
<
64
)
?
6
:
(
1
+
av_log2
(
h
->
mb_num
-
1
));
h
->
mb_skip_run
=
get_bits
(
&
h
->
gb
,
i
)
-
sl
->
mb_skip_run
=
get_bits
(
&
h
->
gb
,
i
)
-
(
h
->
mb_y
*
h
->
mb_width
+
h
->
mb_x
);
}
else
{
skip_bits1
(
&
h
->
gb
);
h
->
mb_skip_run
=
0
;
sl
->
mb_skip_run
=
0
;
}
sl
->
slice_num
=
get_bits
(
&
h
->
gb
,
8
);
...
...
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