From patchwork Thu May 10 10:23:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Rothenpieler X-Patchwork-Id: 8906 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp884991jad; Thu, 10 May 2018 03:29:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoWlttAG1OWENwZKo2ZShbgUWCTveDSBv3QScA0JuYOIdUDn6De+UOzlewX0NULlO1iWuue X-Received: by 2002:adf:adf0:: with SMTP id w103-v6mr871002wrc.101.1525948146126; Thu, 10 May 2018 03:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525948146; cv=none; d=google.com; s=arc-20160816; b=SNj9AN9boLGAJGdAlDYdN1Zkhdb1iyBZptATQP4OgZc6balXW2XnuZUtCSXXg/fE/K GUS+GB08LOO2YA0c0651trkIdpqZ4VrkNr8f1myr9iHYB1/UOLlsqWbjvRDkrC8g0wLl XGkCLkGB3fAoYjx7F85hxuaYXBCFYomeLC4bPLF17pjRVz4/2IcuT+TK1wnILiS7uqYl /TWUWU2G0nVuO0e+n9qcTXi+1Mi2/l8sjADDwpCy+BMvndNddgTvmZJ8RtxVwgOL0Uus uYtP9YgaKg43SjNQOyEfyW5n2l40PtIjWiaS5QRZ7sQJJHc4nrGG53LG1VeERO2dVZar hIbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=+UMjTl7D8WH0jZFA/FgRqDC2aCRRlmJBzGxh0CajDGg=; b=RR6DMOnV7tt/spKzl+SSgUqwSBorhNaOb7mX8QkxMnL0nVPKuhZQe/WeDyC3jR6ZUh WYI1UB/Ortpd4zz7/L6waRDDV3PxMlXRjyOwsFguJitTBd4hn2+VutE7anysWrfDQXx9 ZoKfYIRU01HsvjHcD2c4OOKitC0ot7gmq58fVYdM/pUWI4OW1sxIWMpWNpZojHYfDFr3 WN91PJw31p+hfH1mfLVbVUzlxvgK968Lfx6BobA4sj4Oll0qr8+ziRDwyi1i7UwPrscB t9K1KkxqRgIgnkkB+D/Xby17CMWLCggbmwmWdBCMIb7e+fW/VH/Cxm1mi1rrLcZtJ6zA 7xVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rothenpieler.org header.s=mail header.b=k6hSUHVU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c130-v6si626771wma.107.2018.05.10.03.29.05; Thu, 10 May 2018 03:29:06 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rothenpieler.org header.s=mail header.b=k6hSUHVU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E094768A0D3; Thu, 10 May 2018 13:28:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from btbn.de (btbn.de [5.9.118.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 441FD689FBB for ; Thu, 10 May 2018 13:28:21 +0300 (EEST) Received: from localhost.localdomain (200116b8645c1d00383cfc9c2ec9cc2f.dip.versatel-1u1.de [IPv6:2001:16b8:645c:1d00:383c:fc9c:2ec9:cc2f]) by btbn.de (Postfix) with ESMTPSA id F13D876DEB; Thu, 10 May 2018 12:23:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rothenpieler.org; s=mail; t=1525947794; bh=0QM/DfnaBltDorpShelgcAy4hDw93W6o0g9lBMRz9Sw=; h=From:To:Cc:Subject:Date; b=k6hSUHVUP8udMxhGthTODQNP3IP7pDhR74j0sGURfcSeRiC9WTg7kyJ19MctVH3SO BmTfC8meNKINjhaDkSevMqOhf8rj9IFoXtllnHVn8GkrQNBy8EWPb8diDMcBWEmycv 0aLRx+DTmgMP78C7MOpXo0E1TP1kdnIMWLhod0Ig= From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Thu, 10 May 2018 12:23:01 +0200 Message-Id: <20180510102301.10028-1-timo@rothenpieler.org> X-Mailer: git-send-email 2.17.0 Subject: [FFmpeg-devel] [PATCH] avcodec/hevcdec: make ff_hevc_frame_nb_refs take a const pointer X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Timo Rothenpieler MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavcodec/hevc_refs.c | 4 ++-- libavcodec/hevcdec.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c index 68c730edcc..7cf3a55725 100644 --- a/libavcodec/hevc_refs.c +++ b/libavcodec/hevc_refs.c @@ -508,12 +508,12 @@ fail: return ret; } -int ff_hevc_frame_nb_refs(HEVCContext *s) +int ff_hevc_frame_nb_refs(const HEVCContext *s) { int ret = 0; int i; const ShortTermRPS *rps = s->sh.short_term_rps; - LongTermRPS *long_rps = &s->sh.long_term_rps; + const LongTermRPS *long_rps = &s->sh.long_term_rps; if (rps) { for (i = 0; i < rps->num_negative_pics; i++) diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index b311edc8ae..f0f588f2b8 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h @@ -544,7 +544,7 @@ int ff_hevc_res_scale_sign_flag(HEVCContext *s, int idx); /** * Get the number of candidate references for the current frame. */ -int ff_hevc_frame_nb_refs(HEVCContext *s); +int ff_hevc_frame_nb_refs(const HEVCContext *s); int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc);