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
a67f8ae9
Commit
a67f8ae9
authored
Jan 17, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: move mvd_table into the per-slice context
parent
5c8280c3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
h264.c
libavcodec/h264.c
+3
-0
h264.h
libavcodec/h264.h
+3
-1
h264_mvpred.h
libavcodec/h264_mvpred.h
+1
-1
h264_slice.c
libavcodec/h264_slice.c
+2
-2
No files found.
libavcodec/h264.c
View file @
a67f8ae9
...
...
@@ -426,6 +426,9 @@ int ff_h264_alloc_tables(H264Context *h)
16
*
row_mb_num
*
sizeof
(
uint8_t
),
fail
);
FF_ALLOCZ_OR_GOTO
(
h
->
avctx
,
h
->
mvd_table
[
1
],
16
*
row_mb_num
*
sizeof
(
uint8_t
),
fail
);
h
->
slice_ctx
[
0
].
mvd_table
[
0
]
=
h
->
mvd_table
[
0
];
h
->
slice_ctx
[
0
].
mvd_table
[
1
]
=
h
->
mvd_table
[
1
];
FF_ALLOCZ_OR_GOTO
(
h
->
avctx
,
h
->
direct_table
,
4
*
big_mb_num
*
sizeof
(
uint8_t
),
fail
);
FF_ALLOCZ_OR_GOTO
(
h
->
avctx
,
h
->
list_counts
,
...
...
libavcodec/h264.h
View file @
a67f8ae9
...
...
@@ -402,6 +402,8 @@ typedef struct H264SliceContext {
///< check that i is not too large or ensure that there is some unused stuff after mb
int16_t
mb_padding
[
256
*
2
];
uint8_t
(
*
mvd_table
[
2
])[
2
];
/**
* Cabac
*/
...
...
@@ -991,7 +993,7 @@ static av_always_inline void write_back_motion_list(H264Context *h,
AV_COPY128
(
mv_dst
+
2
*
b_stride
,
mv_src
+
8
*
2
);
AV_COPY128
(
mv_dst
+
3
*
b_stride
,
mv_src
+
8
*
3
);
if
(
CABAC
(
h
))
{
uint8_t
(
*
mvd_dst
)[
2
]
=
&
h
->
mvd_table
[
list
][
FMO
?
8
*
h
->
mb_xy
uint8_t
(
*
mvd_dst
)[
2
]
=
&
sl
->
mvd_table
[
list
][
FMO
?
8
*
h
->
mb_xy
:
h
->
mb2br_xy
[
h
->
mb_xy
]];
uint8_t
(
*
mvd_src
)[
2
]
=
&
h
->
mvd_cache
[
list
][
scan8
[
0
]];
if
(
IS_SKIP
(
mb_type
))
{
...
...
libavcodec/h264_mvpred.h
View file @
a67f8ae9
...
...
@@ -689,7 +689,7 @@ static void fill_decode_caches(H264Context *h, H264SliceContext *sl, int mb_type
if
(
!
(
mb_type
&
(
MB_TYPE_SKIP
|
MB_TYPE_DIRECT2
)))
{
uint8_t
(
*
mvd_cache
)[
2
]
=
&
h
->
mvd_cache
[
list
][
scan8
[
0
]];
uint8_t
(
*
mvd
)[
2
]
=
h
->
mvd_table
[
list
];
uint8_t
(
*
mvd
)[
2
]
=
sl
->
mvd_table
[
list
];
ref_cache
[
2
+
8
*
0
]
=
ref_cache
[
2
+
8
*
2
]
=
PART_NOT_AVAILABLE
;
AV_ZERO32
(
mv_cache
[
2
+
8
*
0
]);
...
...
libavcodec/h264_slice.c
View file @
a67f8ae9
...
...
@@ -367,6 +367,8 @@ static void clone_tables(H264Context *dst, H264SliceContext *sl,
H264Context
*
src
,
int
i
)
{
sl
->
intra4x4_pred_mode
=
src
->
intra4x4_pred_mode
+
i
*
8
*
2
*
src
->
mb_stride
;
sl
->
mvd_table
[
0
]
=
src
->
mvd_table
[
0
]
+
i
*
8
*
2
*
src
->
mb_stride
;
sl
->
mvd_table
[
1
]
=
src
->
mvd_table
[
1
]
+
i
*
8
*
2
*
src
->
mb_stride
;
dst
->
non_zero_count
=
src
->
non_zero_count
;
dst
->
slice_table
=
src
->
slice_table
;
...
...
@@ -374,8 +376,6 @@ static void clone_tables(H264Context *dst, H264SliceContext *sl,
dst
->
mb2b_xy
=
src
->
mb2b_xy
;
dst
->
mb2br_xy
=
src
->
mb2br_xy
;
dst
->
chroma_pred_mode_table
=
src
->
chroma_pred_mode_table
;
dst
->
mvd_table
[
0
]
=
src
->
mvd_table
[
0
]
+
i
*
8
*
2
*
src
->
mb_stride
;
dst
->
mvd_table
[
1
]
=
src
->
mvd_table
[
1
]
+
i
*
8
*
2
*
src
->
mb_stride
;
dst
->
direct_table
=
src
->
direct_table
;
dst
->
list_counts
=
src
->
list_counts
;
dst
->
DPB
=
src
->
DPB
;
...
...
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