From patchwork Wed Sep 19 22:05:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 10419 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp1185502jap; Wed, 19 Sep 2018 15:06:40 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda8cfd2WPYE9/5LSbC8WHzv1W/skyPcdlT3VJvs6za7/J9NdE8DQuG6XsFazESyXyGgu1VN X-Received: by 2002:a1c:3411:: with SMTP id b17-v6mr22861792wma.85.1537394800414; Wed, 19 Sep 2018 15:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537394800; cv=none; d=google.com; s=arc-20160816; b=sbA4Q6uZuqQd7CkjOP69sx1bPkTel/swy1VXgaqUdxAkYekuvbrWDUiPt5vaXMTG7x T1vXVIT6qd/Q/H86uiNQB0JTyNHYIqypolJ8AxNS1uB6p0bY/WncwueNggNBbR2RDD8l DoHyegAhrqdjhQjA7Fr+y7apBBXqTPQIFwpikGAJYb/dDSy19NC5SWjtCqEgzjpdiu+a FxwSDqTj2Szou9fVqeCHHiXx1UIAnhft4XGZk81J0aty95jq0M5wuEaE6+PC9FA4wCg3 8qaZzjHr1rANUswxRMVSWE8irltsmNJIjwXuyypUcu+izVCSEB7T0Kl24UbvovpmWTkM +sww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=BkpX9sMkaIjXvW0COYKagIWiRsU7eMIOQuFMeLeQuuM=; b=PiyIgSItMNLYnxRz0mnHZM2X6QUcAElWtqejbopu/v0u1v8p0RjoUww8oGi20h+0iD VjTdb8eAc+lJsfPRiAlHmohQ8wqIWWeB0Z/pnEzenRQyesDHy/GSkEduAH1Ke+iqRvnA ErklE8/vOp5exvG/v8H4LEuKJ0GoVr91GVrf8TfEvfuj8LudextypdPkgEAEsQGjVd8O xbQbKTeOTO4XXFL1LGCNsnCIC5Tm6TWLyzd9XdMKwdnXYz6oAD2O7aaRN0VIrUDamh1E OKRjvUDii1fhDzjPWeOAolaqNW1jul5C5y+jE856CgvcYqdIPwHV9samen7wbzjUYcsv PWdg== ARC-Authentication-Results: i=1; mx.google.com; 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 m16-v6si24942wmd.3.2018.09.19.15.06.39; Wed, 19 Sep 2018 15:06:40 -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; 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 639AC68A56A; Thu, 20 Sep 2018 01:06:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-2.mx.upcmail.net (vie01a-dmta-pe06-2.mx.upcmail.net [84.116.36.15]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6518C689E98 for ; Thu, 20 Sep 2018 01:06:17 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g2kcA-0007rH-Kq for ffmpeg-devel@ffmpeg.org; Thu, 20 Sep 2018 00:06:30 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id da6M1y00U0S5wYM01a6NYj; Thu, 20 Sep 2018 00:06:22 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 20 Sep 2018 00:05:38 +0200 Message-Id: <20180919220538.9684-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/unary: Improve get_unary() docs 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Found-by: kierank Signed-off-by: Michael Niedermayer --- libavcodec/unary.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/unary.h b/libavcodec/unary.h index 908dc93507..e7541a7604 100644 --- a/libavcodec/unary.h +++ b/libavcodec/unary.h @@ -28,7 +28,12 @@ * @param gb GetBitContext * @param[in] stop The bitstop value (unary code of 1's or 0's) * @param[in] len Maximum length - * @return Unary length/index + * @return Unary length - 1 or length for the stop code (all 1 or all 0 of len). + * (in case len=3) + * 1 0 + * 01 1 + * 001 2 + * 000 3 */ static inline int get_unary(GetBitContext *gb, int stop, int len) {