diff options
author | XuGuangxin <Guangxin.Xu@intel.com> | 2015-08-24 04:18:52 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-08-24 21:21:29 +0300 |
commit | 26e350f0bf865594315f7af194d2a5a980e00f41 (patch) | |
tree | 36fed346dc8d734c3b0c453ad212f47f3c4f4b5b /gst-libs | |
parent | 54fc1ed5f4c5ee682799dcb4b7953a7607d87964 (diff) | |
download | gstreamer-plugins-bad-26e350f0bf865594315f7af194d2a5a980e00f41.tar.gz |
codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
Being more strict on specification, According to 7.4.7.3,
delta_chroma_log2_weight_denom should be in the range of
[(0 - luma_log2_weight_denom), (7 - luma_log2_weight_denom)]
https://bugzilla.gnome.org/show_bug.cgi?id=754024
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/codecparsers/gsth265parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c index 51d8b9933..841f430e7 100644 --- a/gst-libs/gst/codecparsers/gsth265parser.c +++ b/gst-libs/gst/codecparsers/gsth265parser.c @@ -933,8 +933,10 @@ gst_h265_slice_parse_pred_weight_table (GstH265SliceHdr * slice, NalReader * nr) } } - if (sps->chroma_format_idc != 0) - READ_SE_ALLOWED (nr, p->delta_chroma_log2_weight_denom, -7, 7); + if (sps->chroma_format_idc != 0) { + READ_SE_ALLOWED (nr, p->delta_chroma_log2_weight_denom, + (0 - p->luma_log2_weight_denom), (7 - p->luma_log2_weight_denom)); + } for (i = 0; i <= slice->num_ref_idx_l0_active_minus1; i++) READ_UINT8 (nr, p->luma_weight_l0_flag[i], 1); |