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
bd3e460b
Commit
bd3e460b
authored
Jan 17, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: move direct_cache into the per-slice context
parent
6479c79f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
h264.h
libavcodec/h264.h
+1
-1
h264_cabac.c
libavcodec/h264_cabac.c
+3
-3
h264_mvpred.h
libavcodec/h264_mvpred.h
+1
-1
No files found.
libavcodec/h264.h
View file @
bd3e460b
...
...
@@ -393,6 +393,7 @@ typedef struct H264SliceContext {
DECLARE_ALIGNED
(
16
,
int16_t
,
mv_cache
)[
2
][
5
*
8
][
2
];
DECLARE_ALIGNED
(
8
,
int8_t
,
ref_cache
)[
2
][
5
*
8
];
DECLARE_ALIGNED
(
16
,
uint8_t
,
mvd_cache
)[
2
][
5
*
8
][
2
];
uint8_t
direct_cache
[
5
*
8
];
DECLARE_ALIGNED
(
8
,
uint16_t
,
sub_mb_type
)[
4
];
...
...
@@ -497,7 +498,6 @@ typedef struct H264Context {
uint8_t
*
chroma_pred_mode_table
;
uint8_t
(
*
mvd_table
[
2
])[
2
];
uint8_t
*
direct_table
;
uint8_t
direct_cache
[
5
*
8
];
uint8_t
zigzag_scan
[
16
];
uint8_t
zigzag_scan8x8
[
64
];
...
...
libavcodec/h264_cabac.c
View file @
bd3e460b
...
...
@@ -1475,9 +1475,9 @@ static int decode_cabac_mb_ref(H264Context *h, H264SliceContext *sl, int list, i
int
ctx
=
0
;
if
(
sl
->
slice_type_nos
==
AV_PICTURE_TYPE_B
)
{
if
(
refa
>
0
&&
!
(
h
->
direct_cache
[
scan8
[
n
]
-
1
]
&
(
MB_TYPE_DIRECT2
>>
1
))
)
if
(
refa
>
0
&&
!
(
sl
->
direct_cache
[
scan8
[
n
]
-
1
]
&
(
MB_TYPE_DIRECT2
>>
1
))
)
ctx
++
;
if
(
refb
>
0
&&
!
(
h
->
direct_cache
[
scan8
[
n
]
-
8
]
&
(
MB_TYPE_DIRECT2
>>
1
))
)
if
(
refb
>
0
&&
!
(
sl
->
direct_cache
[
scan8
[
n
]
-
8
]
&
(
MB_TYPE_DIRECT2
>>
1
))
)
ctx
+=
2
;
}
else
{
if
(
refa
>
0
)
...
...
@@ -2108,7 +2108,7 @@ decode_intra_mb:
sl
->
ref_cache
[
0
][
scan8
[
12
]]
=
sl
->
ref_cache
[
1
][
scan8
[
12
]]
=
PART_NOT_AVAILABLE
;
for
(
i
=
0
;
i
<
4
;
i
++
)
fill_rectangle
(
&
h
->
direct_cache
[
scan8
[
4
*
i
]],
2
,
2
,
8
,
(
sl
->
sub_mb_type
[
i
]
>>
1
)
&
0xFF
,
1
);
fill_rectangle
(
&
sl
->
direct_cache
[
scan8
[
4
*
i
]],
2
,
2
,
8
,
(
sl
->
sub_mb_type
[
i
]
>>
1
)
&
0xFF
,
1
);
}
}
else
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
...
...
libavcodec/h264_mvpred.h
View file @
bd3e460b
...
...
@@ -721,7 +721,7 @@ static void fill_decode_caches(H264Context *h, H264SliceContext *sl, int mb_type
AV_ZERO16
(
mvd_cache
[
2
+
8
*
0
]);
AV_ZERO16
(
mvd_cache
[
2
+
8
*
2
]);
if
(
sl
->
slice_type_nos
==
AV_PICTURE_TYPE_B
)
{
uint8_t
*
direct_cache
=
&
h
->
direct_cache
[
scan8
[
0
]];
uint8_t
*
direct_cache
=
&
sl
->
direct_cache
[
scan8
[
0
]];
uint8_t
*
direct_table
=
h
->
direct_table
;
fill_rectangle
(
direct_cache
,
4
,
4
,
8
,
MB_TYPE_16x16
>>
1
,
1
);
...
...
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