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 1720144210 for ; Fri, 2 Dec 2022 01:22:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B6A7368BA53; Fri, 2 Dec 2022 03:22:44 +0200 (EET) Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A4A0868B049 for ; Fri, 2 Dec 2022 03:22:38 +0200 (EET) Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-1441d7d40c6so4150272fac.8 for ; Thu, 01 Dec 2022 17:22:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=w9dEDXK062ArroR/rSnIhXRLuDrqfYDVCq/u/R7uhhs=; b=bpneYhNwmuo62EXjY2fHJfH79G1mzUKux5ReC6FntZoeR4jjP70ztHXCWw8MAcoYF1 Mg6eX9DcP6uhxPbkxfnZBChVETUEKGi20stvwOaxFMa/Oq3hTUWjcHS0/Mq9GNUmnIIx lZXbvioEbQhECiKB4BJsq/wtUhXAN05iUHD+pdhy/1J0Q83dTf8XdC0x+AxgqGBgQQqk Uy3JHduDRcKZzydXKCrPU87KN7Cl3H0p+riOXJt1z6kV54cnCA1DmzKvNaYZl7S8FShD 9LrXTvCrSwmk1mOT4ZZSOQPWn0JrCeDFxK3z9npx0KOk30Tu9VbuKf1XkkyeZkkKSywe pLKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w9dEDXK062ArroR/rSnIhXRLuDrqfYDVCq/u/R7uhhs=; b=M/90SVLUlwt2H8tux5cuMDsW+Dd963QIB4gWd5jUa0dxgVRqgkhqrkI35/z38sDCEG WY+iKgSUfv0jKtwO+1HNfrMR7RYnCALu2pOd3ul5124xhFfpXa93oEBa7VoH/jwiXjVZ a2GzOV0DWIZApm1FnWjOFF20789hMjAReW41Z5FtJ/IpNNHm/XSQPT+JtVvDm8R9Yecr /uX6yWFQTAPWPr6UG7tbz6IPeLd8C3WnJQQ562fACGMHb4M4AwH8BSJpILhT/ZF5aIi4 L8MIaNd+oiUO36pkicNhMcDe3Zl+DPTHb3dl+/C+Xi1XMetfSI04yuFDsMGeWZ/WmSFj MUuw== X-Gm-Message-State: ANoB5pm2RY9qLc07eubkJLnCRJkVZVbxkULkP+dRbpLApFPhgcUQS1Vq JGvNiWtn/izUJhfkzolxiBnxPmBomDg= X-Google-Smtp-Source: AA0mqf6yumkjf0rj/uwUO9WpcHh6QBN4Opq6TxkqU/FNd7UFiyoK/WAoXI3AJqMjlfHgneyFVOjRWg== X-Received: by 2002:a05:6870:c98f:b0:143:8809:90ba with SMTP id hi15-20020a056870c98f00b00143880990bamr16293887oab.16.1669944156707; Thu, 01 Dec 2022 17:22:36 -0800 (PST) Received: from [192.168.0.15] ([181.85.72.69]) by smtp.gmail.com with ESMTPSA id y204-20020aca32d5000000b00359b83e3df1sm2476452oiy.9.2022.12.01.17.22.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Dec 2022 17:22:35 -0800 (PST) Message-ID: <4f80073c-c925-a1d1-75d0-3f697982bc47@gmail.com> Date: Thu, 1 Dec 2022 22:22:36 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 To: ffmpeg-devel@ffmpeg.org References: <20221201081408.2194579-1-fei.w.wang@intel.com> <20221201081408.2194579-3-fei.w.wang@intel.com> Content-Language: en-US From: James Almer In-Reply-To: <20221201081408.2194579-3-fei.w.wang@intel.com> Subject: Re: [FFmpeg-devel] [PATCH v1 03/13] lavc/hevc_ps: Add SPS/PPS parse support for HEVC extension syntax 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 12/1/2022 5:13 AM, Fei Wang wrote: > +static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_depth, > + int idx_y, int idx_cb, int idx_cr, int inp_length) > +{ > + uint8_t split_octant_flag, coded_res_flag; > + uint16_t part_num_y, res_coeff_q, res_coeff_r; > + int bit_depth_cm_input_y, bit_depth_cm_output_y, cm_res_bits; > + int k, m, n, c, i, j; > + > + part_num_y = 1 << pps->cm_y_part_num_log2; > + > + if (inp_depth < pps->cm_octant_depth) > + split_octant_flag = get_bits1(gb); > + > + if (split_octant_flag) > + for (k = 0; k < 2; k++) > + for (m = 0; m < 2; m++) > + for (n = 0; n < 2; n++) > + colour_mapping_octants(gb, pps, inp_depth + 1, > + idx_y + part_num_y * k * inp_length / 2, > + idx_cb + m * inp_length / 2, > + idx_cr + n * inp_length / 2, > + inp_length / 2); > + else > + for (i = 0; i < part_num_y; i++) { > + for (j = 0; j < 4; j++) { > + coded_res_flag = get_bits1(gb); > + if (coded_res_flag) > + for (c = 0; c < 3; c++) { > + res_coeff_q = get_ue_golomb_long(gb); > + bit_depth_cm_input_y = 8 + pps->luma_bit_depth_cm_input_minus8; > + bit_depth_cm_output_y = 8 + pps->luma_bit_depth_cm_output_minus8; > + cm_res_bits = FFMAX(0, 10 + bit_depth_cm_input_y - bit_depth_cm_output_y - > + pps->cm_res_quant_bits - (pps->cm_delta_flc_bits_minus1 + 1)); > + res_coeff_r = get_bits(gb, cm_res_bits); cm_res_bits can be zero, and you can't call get_bits() to read zero bits. I can't say if that will fix the issue Michael mentioned, but it still needs to be fixed. > + if (res_coeff_q || res_coeff_r) > + skip_bits1(gb); > + } > + } > + } > +} _______________________________________________ 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".