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
5355ed6b
Commit
5355ed6b
authored
Jan 17, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: move {prev,next}_mb_skipped into the per-slice context
parent
06789ad3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
h264.h
libavcodec/h264.h
+3
-3
h264_cabac.c
libavcodec/h264_cabac.c
+5
-5
h264_cavlc.c
libavcodec/h264_cavlc.c
+1
-1
h264_mvpred.h
libavcodec/h264_mvpred.h
+1
-1
No files found.
libavcodec/h264.h
View file @
5355ed6b
...
@@ -314,6 +314,9 @@ typedef struct H264SliceContext {
...
@@ -314,6 +314,9 @@ typedef struct H264SliceContext {
int
luma_weight
[
48
][
2
][
2
];
int
luma_weight
[
48
][
2
][
2
];
int
chroma_weight
[
48
][
2
][
2
][
2
];
int
chroma_weight
[
48
][
2
][
2
][
2
];
int
implicit_weight
[
48
][
48
][
2
];
int
implicit_weight
[
48
][
48
][
2
];
int
prev_mb_skipped
;
int
next_mb_skipped
;
}
H264SliceContext
;
}
H264SliceContext
;
/**
/**
...
@@ -350,9 +353,6 @@ typedef struct H264Context {
...
@@ -350,9 +353,6 @@ typedef struct H264Context {
int
flags
;
int
flags
;
int
workaround_bugs
;
int
workaround_bugs
;
int
prev_mb_skipped
;
int
next_mb_skipped
;
// prediction stuff
// prediction stuff
int
chroma_pred_mode
;
int
chroma_pred_mode
;
int
intra16x16_pred_mode
;
int
intra16x16_pred_mode
;
...
...
libavcodec/h264_cabac.c
View file @
5355ed6b
...
@@ -1897,16 +1897,16 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl)
...
@@ -1897,16 +1897,16 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl)
if
(
h
->
slice_type_nos
!=
AV_PICTURE_TYPE_I
)
{
if
(
h
->
slice_type_nos
!=
AV_PICTURE_TYPE_I
)
{
int
skip
;
int
skip
;
/* a skipped mb needs the aff flag from the following mb */
/* a skipped mb needs the aff flag from the following mb */
if
(
FRAME_MBAFF
(
h
)
&&
(
h
->
mb_y
&
1
)
==
1
&&
h
->
prev_mb_skipped
)
if
(
FRAME_MBAFF
(
h
)
&&
(
h
->
mb_y
&
1
)
==
1
&&
sl
->
prev_mb_skipped
)
skip
=
h
->
next_mb_skipped
;
skip
=
sl
->
next_mb_skipped
;
else
else
skip
=
decode_cabac_mb_skip
(
h
,
h
->
mb_x
,
h
->
mb_y
);
skip
=
decode_cabac_mb_skip
(
h
,
h
->
mb_x
,
h
->
mb_y
);
/* read skip flags */
/* read skip flags */
if
(
skip
)
{
if
(
skip
)
{
if
(
FRAME_MBAFF
(
h
)
&&
(
h
->
mb_y
&
1
)
==
0
)
{
if
(
FRAME_MBAFF
(
h
)
&&
(
h
->
mb_y
&
1
)
==
0
)
{
h
->
cur_pic
.
mb_type
[
mb_xy
]
=
MB_TYPE_SKIP
;
h
->
cur_pic
.
mb_type
[
mb_xy
]
=
MB_TYPE_SKIP
;
h
->
next_mb_skipped
=
decode_cabac_mb_skip
(
h
,
h
->
mb_x
,
h
->
mb_y
+
1
);
sl
->
next_mb_skipped
=
decode_cabac_mb_skip
(
h
,
h
->
mb_x
,
h
->
mb_y
+
1
);
if
(
!
h
->
next_mb_skipped
)
if
(
!
sl
->
next_mb_skipped
)
h
->
mb_mbaff
=
h
->
mb_field_decoding_flag
=
decode_cabac_field_decoding_flag
(
h
);
h
->
mb_mbaff
=
h
->
mb_field_decoding_flag
=
decode_cabac_field_decoding_flag
(
h
);
}
}
...
@@ -1926,7 +1926,7 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl)
...
@@ -1926,7 +1926,7 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl)
h
->
mb_field_decoding_flag
=
decode_cabac_field_decoding_flag
(
h
);
h
->
mb_field_decoding_flag
=
decode_cabac_field_decoding_flag
(
h
);
}
}
h
->
prev_mb_skipped
=
0
;
sl
->
prev_mb_skipped
=
0
;
fill_decode_neighbors
(
h
,
-
(
MB_FIELD
(
h
)));
fill_decode_neighbors
(
h
,
-
(
MB_FIELD
(
h
)));
...
...
libavcodec/h264_cavlc.c
View file @
5355ed6b
...
@@ -721,7 +721,7 @@ int ff_h264_decode_mb_cavlc(H264Context *h, H264SliceContext *sl)
...
@@ -721,7 +721,7 @@ int ff_h264_decode_mb_cavlc(H264Context *h, H264SliceContext *sl)
h
->
mb_mbaff
=
h
->
mb_field_decoding_flag
=
get_bits1
(
&
h
->
gb
);
h
->
mb_mbaff
=
h
->
mb_field_decoding_flag
=
get_bits1
(
&
h
->
gb
);
}
}
h
->
prev_mb_skipped
=
0
;
sl
->
prev_mb_skipped
=
0
;
mb_type
=
get_ue_golomb
(
&
h
->
gb
);
mb_type
=
get_ue_golomb
(
&
h
->
gb
);
if
(
h
->
slice_type_nos
==
AV_PICTURE_TYPE_B
){
if
(
h
->
slice_type_nos
==
AV_PICTURE_TYPE_B
){
...
...
libavcodec/h264_mvpred.h
View file @
5355ed6b
...
@@ -824,7 +824,7 @@ static void av_unused decode_mb_skip(H264Context *h, H264SliceContext *sl)
...
@@ -824,7 +824,7 @@ static void av_unused decode_mb_skip(H264Context *h, H264SliceContext *sl)
h
->
cur_pic
.
mb_type
[
mb_xy
]
=
mb_type
;
h
->
cur_pic
.
mb_type
[
mb_xy
]
=
mb_type
;
h
->
cur_pic
.
qscale_table
[
mb_xy
]
=
sl
->
qscale
;
h
->
cur_pic
.
qscale_table
[
mb_xy
]
=
sl
->
qscale
;
h
->
slice_table
[
mb_xy
]
=
h
->
slice_num
;
h
->
slice_table
[
mb_xy
]
=
h
->
slice_num
;
h
->
prev_mb_skipped
=
1
;
sl
->
prev_mb_skipped
=
1
;
}
}
#endif
/* AVCODEC_H264_MVPRED_H */
#endif
/* AVCODEC_H264_MVPRED_H */
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