From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AF01B45FC9 for ; Thu, 27 Apr 2023 19:44:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D5F1268BEB5; Thu, 27 Apr 2023 22:44:25 +0300 (EEST) Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 50D3A6808D8 for ; Thu, 27 Apr 2023 22:44:19 +0300 (EEST) Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-541f2112f82so3060673eaf.1 for ; Thu, 27 Apr 2023 12:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682624657; x=1685216657; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ImLAIFzeQNel1OxoyJ9plzFlqi9tSd19OTEk6L4poQI=; b=jH0tZy1N1rfU5MKP5aIYq74cZDTEqNDwxj4ftW3VAUU8IB4UpiHy69rNqGdT7FNQYb FwHxAqfgf60lZA8fPLY/26pJ+2exOq4SSckkO+7q+iedXhwLLAMFwHoH+v0Uws0fMK1N 4JEVIfXcOveZPSY40XGd5xL6LYjnPuhg0ygHBEEsXb3Oj6uGPZBGX7yoQEb8vlGooyoA 6FDH7nIM8fXMVIFxHLYRQO2sbq6xwlehTEHiBLThLlXaHxYdd5lOZYGWHlS8efKRdFcc TFLr9ssDi19ah+wCuVSBkO/fqreErAWGYCbDqqBtB1Iiy61vlmwkSSM7Dboj640i4lt4 gAXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682624657; x=1685216657; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ImLAIFzeQNel1OxoyJ9plzFlqi9tSd19OTEk6L4poQI=; b=QwtGQ+zrOUweJPrATRS9Vobquoq5HMXUaidKom/oPCrZvFAE3Lm7qoNmL6X3RlcFgz HmPQRHEvHKzr1M51jdMZ86lFpV+cDHORO04A3X9w12j+yaDS2KNParoS78CMb5LGHo4g kxnOcaJxDYfmlOcwBAMPVu1fejpTPkVo3okt0F8P9G2i4SdhgUy2iM1TwKfjGKaGr9o+ ynM2Pz2iUlWJ6kCeqFkzqePuTvrS1j0ayLSIS+wbo28ThGh2kqu19rLTpLB9r2uSepBm +WgCWe/VnU8VH9eecqG1xBxxIXRtrnK7+K3tia0a2h9pEwtXZAp39gl6DlraTaTqq1Wy TX0g== X-Gm-Message-State: AC+VfDytfbadxy3/jZxmlsTZbKrgAYaPgBTdzhlMjGAmiX3MfwDA5qtJ Iac1k7zEBQb24NVVRVCKAY9kc2EC58M= X-Google-Smtp-Source: ACHHUZ7b73dn2niMhZiEdJernmMEDtx19sZe68i2Pv+6YRYZwd2WNCstFq7wCWYga2fll/op4UtlGw== X-Received: by 2002:a4a:52c4:0:b0:54b:ce85:490a with SMTP id d187-20020a4a52c4000000b0054bce85490amr1273388oob.0.1682624656797; Thu, 27 Apr 2023 12:44:16 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id h3-20020a056870d24300b001843c39b65esm8013208oac.21.2023.04.27.12.44.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 12:44:16 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 27 Apr 2023 16:44:06 -0300 Message-Id: <20230427194406.51661-1-jamrial@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230427192206.50108-1-jamrial@gmail.com> References: <20230427192206.50108-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/hevc_ps: use get_{ue, se}_golomb() for some PPS Range extension fields X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: James Almer --- libavcodec/hevc_ps.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 289b8f7d95..585b095073 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1478,33 +1478,33 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps, HEVCSPS *sps) { if (pps->transform_skip_enabled_flag) { - pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2; + pps->log2_max_transform_skip_block_size = get_ue_golomb_31(gb) + 2; } pps->cross_component_prediction_enabled_flag = get_bits1(gb); pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb); if (pps->chroma_qp_offset_list_enabled_flag) { - pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb); - pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb); + pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_31(gb); + pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_31(gb); if (pps->chroma_qp_offset_list_len_minus1 > 5) { av_log(avctx, AV_LOG_ERROR, "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n"); return AVERROR_INVALIDDATA; } for (int i = 0; i <= pps->chroma_qp_offset_list_len_minus1; i++) { - pps->cb_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cb_qp_offset_list[i] = get_se_golomb(gb); if (pps->cb_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } - pps->cr_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cr_qp_offset_list[i] = get_se_golomb(gb); if (pps->cr_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } } } - pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb); - pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb); + pps->log2_sao_offset_scale_luma = get_ue_golomb_31(gb); + pps->log2_sao_offset_scale_chroma = get_ue_golomb_31(gb); if ( pps->log2_sao_offset_scale_luma > FFMAX(sps->bit_depth - 10, 0) || pps->log2_sao_offset_scale_chroma > FFMAX(sps->bit_depth_chroma - 10, 0) -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".