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
4fdea02d
Commit
4fdea02d
authored
Jun 20, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h264: add a logging ctx to ff_h264_pred_weight_table()
parent
432891a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
h264_parse.c
libavcodec/h264_parse.c
+3
-3
h264_parse.h
libavcodec/h264_parse.h
+1
-1
h264_parser.c
libavcodec/h264_parser.c
+1
-1
h264_slice.c
libavcodec/h264_slice.c
+1
-1
No files found.
libavcodec/h264_parse.c
View file @
4fdea02d
...
...
@@ -24,7 +24,7 @@
int
ff_h264_pred_weight_table
(
GetBitContext
*
gb
,
const
SPS
*
sps
,
const
int
*
ref_count
,
int
slice_type_nos
,
H264PredWeightTable
*
pwt
)
H264PredWeightTable
*
pwt
,
void
*
logctx
)
{
int
list
,
i
;
int
luma_def
,
chroma_def
;
...
...
@@ -36,11 +36,11 @@ int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
pwt
->
chroma_log2_weight_denom
=
get_ue_golomb
(
gb
);
if
(
pwt
->
luma_log2_weight_denom
>
7U
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"luma_log2_weight_denom %d is out of range
\n
"
,
pwt
->
luma_log2_weight_denom
);
av_log
(
logctx
,
AV_LOG_ERROR
,
"luma_log2_weight_denom %d is out of range
\n
"
,
pwt
->
luma_log2_weight_denom
);
pwt
->
luma_log2_weight_denom
=
0
;
}
if
(
pwt
->
chroma_log2_weight_denom
>
7U
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"chroma_log2_weight_denom %d is out of range
\n
"
,
pwt
->
chroma_log2_weight_denom
);
av_log
(
logctx
,
AV_LOG_ERROR
,
"chroma_log2_weight_denom %d is out of range
\n
"
,
pwt
->
chroma_log2_weight_denom
);
pwt
->
chroma_log2_weight_denom
=
0
;
}
...
...
libavcodec/h264_parse.h
View file @
4fdea02d
...
...
@@ -58,7 +58,7 @@ struct H264ParamSets;
int
ff_h264_pred_weight_table
(
GetBitContext
*
gb
,
const
struct
SPS
*
sps
,
const
int
*
ref_count
,
int
slice_type_nos
,
H264PredWeightTable
*
pwt
);
H264PredWeightTable
*
pwt
,
void
*
logctx
);
/**
* Check if the top & left blocks are available if needed & change the
...
...
libavcodec/h264_parser.c
View file @
4fdea02d
...
...
@@ -198,7 +198,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
if
((
p
->
ps
.
pps
->
weighted_pred
&&
slice_type_nos
==
AV_PICTURE_TYPE_P
)
||
(
p
->
ps
.
pps
->
weighted_bipred_idc
==
1
&&
slice_type_nos
==
AV_PICTURE_TYPE_B
))
ff_h264_pred_weight_table
(
gb
,
p
->
ps
.
sps
,
ref_count
,
slice_type_nos
,
&
pwt
);
&
pwt
,
avctx
);
if
(
get_bits1
(
gb
))
{
// adaptive_ref_pic_marking_mode_flag
int
i
;
...
...
libavcodec/h264_slice.c
View file @
4fdea02d
...
...
@@ -1654,7 +1654,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
(
pps
->
weighted_bipred_idc
==
1
&&
sl
->
slice_type_nos
==
AV_PICTURE_TYPE_B
))
ff_h264_pred_weight_table
(
&
sl
->
gb
,
sps
,
sl
->
ref_count
,
sl
->
slice_type_nos
,
&
sl
->
pwt
);
sl
->
slice_type_nos
,
&
sl
->
pwt
,
h
->
avctx
);
else
if
(
pps
->
weighted_bipred_idc
==
2
&&
sl
->
slice_type_nos
==
AV_PICTURE_TYPE_B
)
{
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