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 99DAD448D5 for ; Thu, 1 Dec 2022 08:15:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 119BA68B95E; Thu, 1 Dec 2022 10:14:57 +0200 (EET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EB1F268B91B for ; Thu, 1 Dec 2022 10:14:49 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669882495; x=1701418495; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lG4KkFKx6Z7LUXmYOa4gde41HIhoYgBQCyJQ8B0eOmg=; b=km41VSp9fI2V6Bi6ZcMKIdrk5g99AfdNRSqeVpABxEaoDNm/sInnsYaK G/x+m/Dr6OO15XD17It9Vw12BBRYJU9cjGrpftFJe8imu64xB3Q4h+IOg c+UoUhk7fiKhVY2zLixk5RnKaPt1AX+egwA2iZ9W3e2+XBwX52zoVKdA/ 4C4e7hhi5Bai43VlL9d+qK4Ljpno4F4VfX8iLJmkU37/CiehfjR5sdU3r Ck51qT7/KaQbZ/J9+ju3pU4MwLsM5AJnsQFKIwqqEHBCCdWfmfPHIkJJO Kiu4tmG+RARqmFzgmk1zZJgeX7tFisDxXzQwJA7nIO+ARLVLik4z6jvXI A==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="298989828" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="298989828" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2022 00:14:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="675341744" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="675341744" Received: from t.sh.intel.com ([10.239.159.159]) by orsmga008.jf.intel.com with ESMTP; 01 Dec 2022 00:14:45 -0800 From: Fei Wang To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Dec 2022 16:14:00 +0800 Message-Id: <20221201081408.2194579-5-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221201081408.2194579-1-fei.w.wang@intel.com> References: <20221201081408.2194579-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 05/13] lavc/hevcdec: Fix the parsing for use_integer_mv_flag 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 Cc: Linjie Fu , Fei Wang , Linjie Fu 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: From: Linjie Fu According to 7.3.6.1, use_integer_mv_flag should be parsed if motion_vector_resolution_control_idc equals to 2. If not present, it equals to motion_vector_resolution_control_idc. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/hevcdec.c | 8 ++++++++ libavcodec/hevcdec.h | 1 + 2 files changed, 9 insertions(+) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index edf3a2b134..50e7fd4465 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -840,6 +840,14 @@ static int hls_slice_header(HEVCContext *s) sh->max_num_merge_cand); return AVERROR_INVALIDDATA; } + + // Syntax in 7.3.6.1 + if (s->ps.sps->motion_vector_resolution_control_idc == 2) + sh->use_integer_mv_flag = get_bits1(gb); + else + // Inferred to be equal to motion_vector_resolution_control_idc if not present + sh->use_integer_mv_flag = s->ps.sps->motion_vector_resolution_control_idc; + } sh->slice_qp_delta = get_se_golomb(gb); diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index 7841ba8565..a7fc669bcb 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h @@ -305,6 +305,7 @@ typedef struct SliceHeader { int tc_offset; ///< tc_offset_div2 * 2 unsigned int max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand + uint8_t use_integer_mv_flag; unsigned *entry_point_offset; int * offset; -- 2.25.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".