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
7b50d604
Commit
7b50d604
authored
Apr 15, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list
There is no real reason to call it separately.
parent
b16e9b9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
h264.h
libavcodec/h264.h
+0
-1
h264_refs.c
libavcodec/h264_refs.c
+28
-25
h264_slice.c
libavcodec/h264_slice.c
+0
-2
No files found.
libavcodec/h264.h
View file @
7b50d604
...
...
@@ -657,7 +657,6 @@ int ff_h264_get_slice_type(const H264SliceContext *sl);
int
ff_h264_alloc_tables
(
H264Context
*
h
);
int
ff_h264_decode_ref_pic_list_reordering
(
const
H264Context
*
h
,
H264SliceContext
*
sl
);
void
ff_h264_fill_mbaff_ref_list
(
H264SliceContext
*
sl
);
void
ff_h264_remove_all_refs
(
H264Context
*
h
);
/**
...
...
libavcodec/h264_refs.c
View file @
7b50d604
...
...
@@ -227,6 +227,31 @@ static int pic_num_extract(const H264Context *h, int pic_num, int *structure)
return
pic_num
;
}
static
void
h264_fill_mbaff_ref_list
(
H264SliceContext
*
sl
)
{
int
list
,
i
,
j
;
for
(
list
=
0
;
list
<
sl
->
list_count
;
list
++
)
{
for
(
i
=
0
;
i
<
sl
->
ref_count
[
list
];
i
++
)
{
H264Ref
*
frame
=
&
sl
->
ref_list
[
list
][
i
];
H264Ref
*
field
=
&
sl
->
ref_list
[
list
][
16
+
2
*
i
];
field
[
0
]
=
*
frame
;
for
(
j
=
0
;
j
<
3
;
j
++
)
field
[
0
].
linesize
[
j
]
<<=
1
;
field
[
0
].
reference
=
PICT_TOP_FIELD
;
field
[
0
].
poc
=
field
[
0
].
parent
->
field_poc
[
0
];
field
[
1
]
=
field
[
0
];
for
(
j
=
0
;
j
<
3
;
j
++
)
field
[
1
].
data
[
j
]
+=
frame
->
parent
->
f
->
linesize
[
j
];
field
[
1
].
reference
=
PICT_BOTTOM_FIELD
;
field
[
1
].
poc
=
field
[
1
].
parent
->
field_poc
[
1
];
}
}
}
int
ff_h264_decode_ref_pic_list_reordering
(
const
H264Context
*
h
,
H264SliceContext
*
sl
)
{
int
list
,
index
,
pic_structure
;
...
...
@@ -349,32 +374,10 @@ int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContex
}
}
return
0
;
}
void
ff_h264_fill_mbaff_ref_list
(
H264SliceContext
*
sl
)
{
int
list
,
i
,
j
;
for
(
list
=
0
;
list
<
sl
->
list_count
;
list
++
)
{
for
(
i
=
0
;
i
<
sl
->
ref_count
[
list
];
i
++
)
{
H264Ref
*
frame
=
&
sl
->
ref_list
[
list
][
i
];
H264Ref
*
field
=
&
sl
->
ref_list
[
list
][
16
+
2
*
i
];
field
[
0
]
=
*
frame
;
for
(
j
=
0
;
j
<
3
;
j
++
)
field
[
0
].
linesize
[
j
]
<<=
1
;
field
[
0
].
reference
=
PICT_TOP_FIELD
;
field
[
0
].
poc
=
field
[
0
].
parent
->
field_poc
[
0
];
if
(
FRAME_MBAFF
(
h
))
h264_fill_mbaff_ref_list
(
sl
);
field
[
1
]
=
field
[
0
];
for
(
j
=
0
;
j
<
3
;
j
++
)
field
[
1
].
data
[
j
]
+=
frame
->
parent
->
f
->
linesize
[
j
];
field
[
1
].
reference
=
PICT_BOTTOM_FIELD
;
field
[
1
].
poc
=
field
[
1
].
parent
->
field_poc
[
1
];
}
}
return
0
;
}
/**
...
...
libavcodec/h264_slice.c
View file @
7b50d604
...
...
@@ -1379,8 +1379,6 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
}
if
(
FRAME_MBAFF
(
h
))
{
ff_h264_fill_mbaff_ref_list
(
sl
);
if
(
pps
->
weighted_bipred_idc
==
2
&&
sl
->
slice_type_nos
==
AV_PICTURE_TYPE_B
)
{
implicit_weight_table
(
h
,
sl
,
0
);
implicit_weight_table
(
h
,
sl
,
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