From: Sreerenj Balachandran Date: Thu, 13 Aug 2015 01:09:44 +0000 (+0300) Subject: decoder: hevc: Fix ChromaOffsetL0/ChromaOffsetL1 calculation X-Git-Tag: 1.19.3~503^2~1680 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f287dc71c104b30050379a4558ba007d02446ed;p=platform%2Fupstream%2Fgstreamer.git decoder: hevc: Fix ChromaOffsetL0/ChromaOffsetL1 calculation Based on ITU-T rec H265(4/2015): 7-56 This was a wrong equation in rec H265 (4/2013): 7-44... Signed-off-by: Sreerenj Balachandran --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c index 4616fa7..eec156c 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c @@ -2377,9 +2377,9 @@ fill_pred_weight_table (GstVaapiDecoderH265 * decoder, /* Find ChromaWeightL0 */ chroma_weight = (1 << chroma_log2_weight_denom) + w->delta_chroma_weight_l0[i][j]; - /* 7-44 */ + /* 7-56 */ slice_param->ChromaOffsetL0[i][j] = CLAMP ( - (w->delta_chroma_offset_l0[i][j] - + (127 + w->delta_chroma_offset_l0[i][j] - ((128 * chroma_weight) >> chroma_log2_weight_denom)), -128, 127); } @@ -2401,7 +2401,7 @@ fill_pred_weight_table (GstVaapiDecoderH265 * decoder, (1 << chroma_log2_weight_denom) + w->delta_chroma_weight_l1[i][j]; slice_param->ChromaOffsetL1[i][j] = - CLAMP ((w->delta_chroma_offset_l1[i][j] - + CLAMP ((127 + w->delta_chroma_offset_l1[i][j] - ((128 * chroma_weight) >> chroma_log2_weight_denom)), -128, 127); }