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 00B1C4527C for ; Thu, 16 Feb 2023 01:35:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0B76A68BEC9; Thu, 16 Feb 2023 03:35:29 +0200 (EET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D4E8868BEAE for ; Thu, 16 Feb 2023 03:35:21 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676511327; x=1708047327; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=L0fAowE8Rj3D3/ekpvujoRAjdJaOCWU8raZDLJN3GcM=; b=Zruyz6rzQ3JhVxJGPo4NrQRQ49xKlg9wFWaxeDQUcUQQD4yIqLlDOFyl NnVD3EghS9CGb6jZqdvfhk2HHN6GUXJPF1EIExSnVwuyX5ABIcZuHSPC2 8llBr2OmMmK7e1meMFiVuE+IRTrlPcLpMd99fNFZ5TIhiwI1lbBC375yj fbs7hUsIk3xjL/SnIGOROKif/HeHz+MVrcRIA/8scoXd93CJVLoRTrdjf Xev1rRfIs3VQdX23i9h6lPdIKqkkStGTpa07XbGXX/rrow3SchCOru0FO lxkoPdFO7zqIWV8DYNYqOlLzqNbEdmWhMxpT6FiD30XL5J1rNUHQ8cvlz w==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="311223802" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="311223802" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 17:35:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="779168804" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="779168804" Received: from t.sh.intel.com ([10.239.159.159]) by fmsmga002.fm.intel.com with ESMTP; 15 Feb 2023 17:35:15 -0800 From: Fei Wang To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Feb 2023 09:32:42 +0800 Message-Id: <20230216013248.23044-4-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230216013248.23044-1-fei.w.wang@intel.com> References: <20230216013248.23044-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v6 04/10] 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 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 f9a97ac7f5..52fa627133 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -839,6 +839,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".