From patchwork Sun Oct 15 15:04:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 5574 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp2782507jah; Sun, 15 Oct 2017 08:06:27 -0700 (PDT) X-Received: by 10.223.196.164 with SMTP id m33mr6086554wrf.258.1508079987083; Sun, 15 Oct 2017 08:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508079987; cv=none; d=google.com; s=arc-20160816; b=R2ucLLbXOy9T4OpKxMPEkCoDYO6pzwvgxN07hcVbW2mpxo57FZiN0yUZGYv2AHYez+ 2iqJPYSqiCc8skobOrRdLiOdIjN4ImUBmkajBc61SNuLkN6ftGgHieas0CW5CaSPJFkH r/82GC55PLUOmOH3IppW/L1BxJU9ZH2NO7c7OVESKm6ATXS+oLfsI23QKY4A1KnA0yfW j3R/ThaWinztUf1NvFULyY5eEsoGjG1NKcco471UTyvnLC3s9EdWABwf+FtIX+EjIfG5 OwrRZtSpPoWGZwxUB+azR43WYLfMvY0ksqxeQEY1aznu+dxAYjLOdCf79sXd5sSDy1NI Gejg== 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:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=RiDwdIFq1QaL5nJflR8WYhtlctcDzZcAgm+Xo93dpTw=; b=EQLI8o7jC6z6dXCxgK8M0MbKhHYjqTAEE9CqUDuCIPC7lbsYXCMUHzTO78LeGipGf0 tCFjfVAjy+GMJylTCucMnq6xfNabKRLa617ZZ4cHhr1naLeaoScOuNA0Q8iG+FHVZeax Zd2IjG+mCsrw0DZiGDgrpeWOL0LLkl0vlf1n/RXX76QPT+jb3pAHUEIM6CfjuC67i9Fn lUnkC4rOLVQGiEo6/j0kdL6Hdw1n0HsQuhDvLROk24CZhrxYVUiWPxCGJBsOHgV7JmHU s9jVO36RDLIPg64EN1oKsL9elt7sKkJgTzqYkxsci7EMvkrPB0Ug2XWVIJsC8sHu5b9I nF1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@jkqxz-net.20150623.gappssmtp.com header.s=20150623 header.b=U75/jqln; 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 v2si4205658wra.381.2017.10.15.08.06.26; Sun, 15 Oct 2017 08:06:27 -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=@jkqxz-net.20150623.gappssmtp.com header.s=20150623 header.b=U75/jqln; 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 9E8F668A1F2; Sun, 15 Oct 2017 18:05:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E5ED168A1E7 for ; Sun, 15 Oct 2017 18:05:04 +0300 (EEST) Received: by mail-wm0-f46.google.com with SMTP id u138so29764599wmu.4 for ; Sun, 15 Oct 2017 08:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=HO2K5GzMjSSL4n8li3IkC4dE27xX7lZO1n4BeQP8ITE=; b=U75/jqlnWBqDe/jrL6DlsdWFEOFd3BoEqRbgR+8x5NJOHmyRpQtPAnNd9JzG0V9xnq sgbA/iSeyiV3B4g7p09FiPgU2e1alKULqCv1ok9XLu5CAZvoCaEWc8d7bhJAhs8+1wV0 T7Dc4hZhiEFytSQVr+lqX1c9EJdQZYTJYQnXdoOHNv6dQo92WPNqzotsk7jf02mT5Ayj /6X8Fvd905uMVrhn5pQQS3r9Jm3bXj+fd1aEy3Eny4pKW1dXAj3pYWddCEjBuQ07z9KJ yGV+HikGKFQTMQtqeLZ/G701JIFDG5kJGiVPQYYbmTE4UDAv0v4fZx/bnW1kfNgmP71v 3ruA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=HO2K5GzMjSSL4n8li3IkC4dE27xX7lZO1n4BeQP8ITE=; b=nb8//OI15hZQSprwCBKWOfKsACbkayBollnMLt8X9XjgGJDGsSx4t+YUmPXV0OQRPo bLgXPfmaW3t/I1hJRLt4kpbN/JvD+MBu3gJ5IUaqNNRwndUCW3uP/tzYJfoZLAJ+Yoc4 OrX0/xNTHK3jDfkXLIcTDVYpxYQU1sibaFxRB3jSeexr3Yg7sloZHLbi9PPBD6PyQ2DQ aAEfnrCfs99z6ZRAr+bpG3XGg+YQE6Z6AsDCNAJ+K9Wq9RFlKVybDcG8EadMbpNSz45L xhkecWJcPwD29+VR7VQxUM6GC+RvToN8L9q6JO5yUmjPPmP7XuBJn7u4Q6XAvmRpYJY7 luXg== X-Gm-Message-State: AMCzsaXx9nOAs0BmXbNdc7fPzcUVdH5isgVhpifQCdYG3PHceWWz6W0F xbdhUYWuQKjq3kfNIjOCmDCbwimo X-Google-Smtp-Source: ABhQp+T8DZO7rA1VlJS6/mo2kCZ4LK6Jub51yyJcKBNRkI2P+0n04afQ5mRn0VEUHqU57epdYYtNyA== X-Received: by 10.28.183.67 with SMTP id h64mr5269080wmf.76.1508079908453; Sun, 15 Oct 2017 08:05:08 -0700 (PDT) Received: from rywe.jkqxz.net (cpc91242-cmbg18-2-0-cust650.5-4.cable.virginm.net. [82.8.130.139]) by smtp.gmail.com with ESMTPSA id h4sm2080508wre.13.2017.10.15.08.05.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Oct 2017 08:05:07 -0700 (PDT) From: Mark Thompson To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Oct 2017 16:04:43 +0100 Message-Id: <20171015150447.18058-17-sw@jkqxz.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171015150447.18058-1-sw@jkqxz.net> References: <20171015150447.18058-1-sw@jkqxz.net> Subject: [FFmpeg-devel] [PATCH 16/20] vaapi_h264: Fix CPB/DPB delays 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This should be ticks, not time_scale steps - it was wrong for all framerates not a multiple of 1/2. (cherry picked from commit 30645174e333c7db1946ab09be769db9be9d7481) --- libavcodec/vaapi_encode_h264.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 201e94a8ce..46950772a9 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -616,10 +616,8 @@ static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx, if (opt->sei & SEI_TIMING) { memset(&priv->pic_timing, 0, sizeof(priv->pic_timing)); - priv->pic_timing.cpb_removal_delay = - 2 * sps->vui.num_units_in_tick * priv->cpb_delay; - priv->pic_timing.dpb_output_delay = - 2 * sps->vui.num_units_in_tick * priv->dpb_delay; + priv->pic_timing.cpb_removal_delay = 2 * priv->cpb_delay; + priv->pic_timing.dpb_output_delay = 2 * priv->dpb_delay; priv->sei_needed = 1; }