From patchwork Thu Oct 14 13:08:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31112 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7144744ioa; Thu, 14 Oct 2021 06:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY+vOC4d/gnyMDcYPO8UHGr1YRpYre/GjkEqfp4Kw9vTFohIQz+lhFmJdhhqbqKWA8XlXW X-Received: by 2002:a17:906:ae53:: with SMTP id lf19mr3725540ejb.97.1634216960469; Thu, 14 Oct 2021 06:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634216960; cv=none; d=google.com; s=arc-20160816; b=YvZYzgSYLxqvGaifLWv/z2Zu3N/noSCoR6WuBRqFmzZSFO7pgTZhft2bct+dwZZ8p4 0VUGJLC+vca+L0Zsdx1tpHDH+4ZCbhwy4JgNjbp5j+frY4H4uw007Cb7eZjmpa0It+eU dhWQ6o+ljOJ9UbQ+rqERzSa2kCeyCHfS/x8U3vpcbZ3gzz2gs+FIy2iI9/klhgL3ehE2 lq4TqodJrhfv0sUXdzY9mBKEwvfC1ByP0YFGPjPWNQvyqHrLM7Jk19hT91rDwyio8OTw Mzt6jeG7hSZKFtSn8Tk404whom0aCs/C5Gq9UshZ1h/K05Nyk7OqvDfK/IJBPsVY4V7v UCwg== 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; bh=qoXTq58iq7ZwE+ZEDRA5qiAQvrenF63j3SyzucPKHUk=; b=eFQvCehHLC61YEurVbKCAZ9vAUk6d4P2o92VOov0p2xDy8ZucSNJOR232nzfZdjQ1W /PSoDsWgHDxlRWZOFaXQZcrsSkKTq7O4fx663W13w/yh+t8wkVrvxKcGhG0xfN7k4I7E h1IWcOVwbXud1TwqL0B6eDmBRtg7TXuqC0hSBOhEo2Zj46MPqP2BtuaUaroluPBO7UYF 4RhfSTOUjTwUi46BBkAQYazOAF6W88BvIVwBzsY+EPXPOIEcVLmn2CjK9P31q4d+ntMz aV83R21hgunF3bKsNhAebY1Mh43go2iyN0S30NBZv4KD0R7EuluokYskrRHmlxSpFdoR Ssog== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=HHEzQWG3; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h5si3482335ejo.265.2021.10.14.06.09.19; Thu, 14 Oct 2021 06:09:20 -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=@gmail.com header.s=20210112 header.b=HHEzQWG3; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D8BDD68A9C4; Thu, 14 Oct 2021 16:09:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C43B268A12D for ; Thu, 14 Oct 2021 16:09:10 +0300 (EEST) Received: by mail-pf1-f178.google.com with SMTP id c29so5428639pfp.2 for ; Thu, 14 Oct 2021 06:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=viNUFRCmJUE84juwwl+bH8DWx2Jq+bbXeOSPl0dg0zE=; b=HHEzQWG3Nc8KFCP1DjFpJ9pHHcvOxArG9aJSAI8998WheKD9AcI1I8dz9YOTa9wdJs 4BlzY2nEFkFyQjk8OPpltfSAJuPfyn8Jy4aRiUgMvNaamBDcZSJ35XZW1QtWDdRaXA33 E7VMBSRns4C0wihMMjjz87K3lSob1Kd4wB1d0rG0axlRCcZiXdkNsjqMYkDttWX0VtQA oqXLut6XBbIxDTnLVhhsBSZygpWslMp6koHhKh84Cs6zJp53xQIacQVE2swF87mJJTY1 nXgaMZl+QuTH4XHt4F+IR0rkxwDMWb3x5pJxg93RxWSyVP7yKQJ1VEMsiJBBhbg4wXZn F3Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=viNUFRCmJUE84juwwl+bH8DWx2Jq+bbXeOSPl0dg0zE=; b=LVBX4g1sS+ueUMJ2rCQe+AXAeH/3eBc7X9MREtGNUKWtUCfzlZOr1j4mF/hFPXb9Ix G+nAAQ/zA5AFlNR4RqW7N270R8T47I8LJcQKwo2ldjj7k+0qmg4vwN1xIM/G+VfsHbaN 1Lpz4PnO/2FOYas59pzGnOpE149cqZ77jEPVAWVvXuSPXkyIclGj/uQBhrgQO25S2Hlj hdkf1v7QJXIlW81cPiF0QvCznuOzZrz0HTYrLWkgfa2Pw14O/C8z2yOVr50NNzhI1xnm cgUs4ddwbyJ1bQPrl7VIRZWgC2JaQHmcUc+vS/jeRE0bkMHxecXUwKJkjjJ41s7xc5v+ Pt7w== X-Gm-Message-State: AOAM532F6RJjL/PPRMKJBWA52uguC2N9edzkZ8T9/Ib2zUVLIgZcPuTp UBb9+inRw9QOsZGPJMXn5xYKNuHOjiM= X-Received: by 2002:a63:561a:: with SMTP id k26mr4276878pgb.144.1634216948437; Thu, 14 Oct 2021 06:09:08 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:08 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:08:55 +0800 Message-Id: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH 1/8] avfilter/af_replaygain: use fabsf() instead of fabs() 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: QLe9VTvELfwG From: Limin Wang Signed-off-by: Limin Wang --- libavfilter/af_replaygain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_replaygain.c b/libavfilter/af_replaygain.c index 4bf2763..da5c196 100644 --- a/libavfilter/af_replaygain.c +++ b/libavfilter/af_replaygain.c @@ -428,7 +428,7 @@ static void butter_filter_stereo_samples(ReplayGainContext *s, // (slowing us down). for (j = -4; j < 0; ++j) - if (fabs(hist_a[i + j]) > 1e-10 || fabs(hist_b[i + j]) > 1e-10) + if (fabsf(hist_a[i + j]) > 1e-10 || fabsf(hist_b[i + j]) > 1e-10) break; if (!j) { @@ -477,7 +477,7 @@ static void yule_filter_stereo_samples(ReplayGainContext *s, const float *src, // (slowing us down). for (j = -20; j < 0; ++j) - if (fabs(hist_a[i + j]) > 1e-10 || fabs(hist_b[i + j]) > 1e-10) + if (fabsf(hist_a[i + j]) > 1e-10 || fabsf(hist_b[i + j]) > 1e-10) break; if (!j) { From patchwork Thu Oct 14 13:08:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31109 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7144932ioa; Thu, 14 Oct 2021 06:09:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8AIUJfovVCTGroa2qOxm2TSIZ+eTfPg8Y0nvHEI8YBDxE5AasqqEDlm68f1YqpbM0B9Fq X-Received: by 2002:a17:907:2bdf:: with SMTP id gv31mr3618967ejc.521.1634216972008; Thu, 14 Oct 2021 06:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634216972; cv=none; d=google.com; s=arc-20160816; b=DVJOnLkx/saOz09emfznQgGev4hqG6ElrZWyZxxxGrHJhJTPdqLnxoUTSgzM0rixqs usAX+a1TzKcVojN8CK7tPuYDAThLWtRAHN9w8ADZ/QhC+Py8PRvVVe9xmxfTPJW+0U8/ QPekx8EcHjn1rtqe3r5UMWKDR5aHp57IogvnblUQTLfnFzv3EgikcJ+nEhXnXK0jg4HM /wyezLE8teXN+Ni0BvhqRsAv62Ej1eFuswQl+nde7fAre7uN/nHAotzFAOeybV40CInH X0aVrewcNFIO9TViXHMO/o0Q8+aPO9eOPYK58rIfwfAPEmpL5eDk84nbIodfESveXQfd exoQ== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=aSeX7E/5eDZfF8dzWz4Y34w9B5etwU5r93BL4RtXHxg=; b=0SAGuOFYKs67LLbcybIhKp6KK6rSlprbRRfF+oZBPA4VgeEpQ+xQevcH8hswIpLKJ8 xB9dTUWiaukYrQqDDbtZtHANEo3DqGYREcGlQQMfNyaZnQqs6vYGDEXPyJXuBPvV1Isv cCD/s60Df0+QECy0Eq345g7+CYq/GdAwGc+jsMkxA1xnzCQFxgsm7yyRltTE84bYQ3an 0J/wM5vKZ7vVh7viP1nhACOI4DvLwsqwSIeEAsEZjDT1DdaJxdSOny2lhyQ8WWFaAsV1 /zgnqT6m6WWZbjlTId1bH0S7YdGIoklHjRLGr6EAfO12yQSFzdNzyTm7b2ToKWPh5rlL isbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Qc4Gq3rB; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k5si4005110ejo.440.2021.10.14.06.09.31; Thu, 14 Oct 2021 06:09:31 -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=@gmail.com header.s=20210112 header.b=Qc4Gq3rB; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 099E568AA16; Thu, 14 Oct 2021 16:09:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9143768A9C4 for ; Thu, 14 Oct 2021 16:09:11 +0300 (EEST) Received: by mail-pg1-f179.google.com with SMTP id r2so5477577pgl.10 for ; Thu, 14 Oct 2021 06:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qlcJsVVQtboQE57m3B73K4D71FM9/s3qn5WDg9NbMxI=; b=Qc4Gq3rBJNe3tqE5hTO+WsxUky0u324uwga9AHWTUpA1HfBZZaUTMItgg998oswZLj kO4CBhNTidH4hz8cfK2MeQaIL6EyPPtxrrdVPAAToIZAma4Z0p9COM/lAnrCBqA0wife pyNAntnOdhdtQFKsCjAyY6MIALCAFmI0lUV7pgJFCX10LvcHUi5fmumGy0n50uSR6zw6 xv+qadRook4VRbTj+vmRHa0YV3xuoKVTixeiziFSvu1yg9x196m1CxfqYMjTAXva7NUr sUN/U9wt6rbiT0aqWVThx2eEuspI4p9j4hH+HIfHzMkKPXSmenXSf5OkLYBHJGQdE0Ds HXTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qlcJsVVQtboQE57m3B73K4D71FM9/s3qn5WDg9NbMxI=; b=ISRxLIFb4LwL/fi/u5Jyu9B7fPb1Jc8h8jNGVvO+VIhLDNK6yXd7EC1xKs/8ios+WX xYEWIcMPIj+vxEFUUiRe+TBbTiqwgvRNavyZlQ5c9mzeKs2qQRq6X8lS1KfUAt7PIkXp da7I0+wgZ6iYcWiFGxSLlgCoyY/E6h6okhJP+uxXhpTCqBsIi87kOL2mdb1h2dbgk1nw ryXcr9iMoDOX8YGn7iXEvUmsXOdZkuVDZOZbH5qzWK+e+CTB+i4XsifqTdDFbP+vteQU zU/acOgUzAMFqFsWJllrQKhb840YKxnhjOsC23dgxCwAYOSBogX5O4rWkN0pUNhJRsIL SXLA== X-Gm-Message-State: AOAM532N+U69EBl32R7Qc267TfUWNNBCYSxxKrVltILfQGD5GnnxOU4P eMlG8n4r84Llv9uTZMquqwx8ADHeQy4= X-Received: by 2002:a63:5544:: with SMTP id f4mr4163653pgm.431.1634216949734; Thu, 14 Oct 2021 06:09:09 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:09 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:08:56 +0800 Message-Id: <1634216942-20329-2-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/8] avfilter/vf_showinfo: small adjustments for the HDR10+ dump 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LzQnG1PKz9Td From: Limin Wang summary for the adjustments: 1, remove the extra "," in the ,} ...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,} to ...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013} 2, add "," between the } and new field } fraction_bright_pixels to }, fraction_bright_pixels 3, remove the extra space between "} }" ...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,} } to ...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,}} Signed-off-by: Limin Wang --- libavfilter/vf_showinfo.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index c8c7b98..ff438e7 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -221,7 +221,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) av_log(ctx, AV_LOG_INFO, "num_windows: %d, ", hdr_plus->num_windows); for (int w = 1; w < hdr_plus->num_windows; w++) { AVHDRPlusColorTransformParams *params = &hdr_plus->params[w]; - av_log(ctx, AV_LOG_INFO, "window %d { ", w); + av_log(ctx, AV_LOG_INFO, w > 1 ? ", window %d { " : "window %d { ", w); av_log(ctx, AV_LOG_INFO, "window_upper_left_corner: (%5.4f,%5.4f),", av_q2d(params->window_upper_left_corner_x), av_q2d(params->window_upper_left_corner_y)); @@ -242,7 +242,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) params->semimajor_axis_external_ellipse); av_log(ctx, AV_LOG_INFO, "semiminor_axis_external_ellipse: %d, ", params->semiminor_axis_external_ellipse); - av_log(ctx, AV_LOG_INFO, "overlap_process_option: %d}, ", + av_log(ctx, AV_LOG_INFO, "overlap_process_option: %d}", params->overlap_process_option); } av_log(ctx, AV_LOG_INFO, "targeted_system_display_maximum_luminance: %9.4f, ", @@ -252,7 +252,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) for (int i = 0; i < hdr_plus->num_rows_targeted_system_display_actual_peak_luminance; i++) { av_log(ctx, AV_LOG_INFO, "("); for (int j = 0; j < hdr_plus->num_cols_targeted_system_display_actual_peak_luminance; j++) { - av_log(ctx, AV_LOG_INFO, "%5.4f,", + av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f", av_q2d(hdr_plus->targeted_system_display_actual_peak_luminance[i][j])); } av_log(ctx, AV_LOG_INFO, ")"); @@ -264,9 +264,9 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) AVHDRPlusColorTransformParams *params = &hdr_plus->params[w]; av_log(ctx, AV_LOG_INFO, "window %d {maxscl: {", w); for (int i = 0; i < 3; i++) { - av_log(ctx, AV_LOG_INFO, "%5.4f,",av_q2d(params->maxscl[i])); + av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",av_q2d(params->maxscl[i])); } - av_log(ctx, AV_LOG_INFO, "} average_maxrgb: %5.4f, ", + av_log(ctx, AV_LOG_INFO, "}, average_maxrgb: %5.4f, ", av_q2d(params->average_maxrgb)); av_log(ctx, AV_LOG_INFO, "distribution_maxrgb: {"); for (int i = 0; i < params->num_distribution_maxrgb_percentiles; i++) { @@ -274,35 +274,35 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) params->distribution_maxrgb[i].percentage, av_q2d(params->distribution_maxrgb[i].percentile)); } - av_log(ctx, AV_LOG_INFO, "} fraction_bright_pixels: %5.4f, ", + av_log(ctx, AV_LOG_INFO, "}, fraction_bright_pixels: %5.4f", av_q2d(params->fraction_bright_pixels)); if (params->tone_mapping_flag) { - av_log(ctx, AV_LOG_INFO, "knee_point: (%5.4f,%5.4f), ", av_q2d(params->knee_point_x), av_q2d(params->knee_point_y)); + av_log(ctx, AV_LOG_INFO, ", knee_point: (%5.4f,%5.4f), ", av_q2d(params->knee_point_x), av_q2d(params->knee_point_y)); av_log(ctx, AV_LOG_INFO, "bezier_curve_anchors: {"); for (int i = 0; i < params->num_bezier_curve_anchors; i++) { - av_log(ctx, AV_LOG_INFO, "%5.4f,", + av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f", av_q2d(params->bezier_curve_anchors[i])); } - av_log(ctx, AV_LOG_INFO, "} "); + av_log(ctx, AV_LOG_INFO, "}"); } if (params->color_saturation_mapping_flag) { - av_log(ctx, AV_LOG_INFO, "color_saturation_weight: %5.4f", + av_log(ctx, AV_LOG_INFO, ", color_saturation_weight: %5.4f", av_q2d(params->color_saturation_weight)); } - av_log(ctx, AV_LOG_INFO, "} "); + av_log(ctx, AV_LOG_INFO, "}"); } if (hdr_plus->mastering_display_actual_peak_luminance_flag) { - av_log(ctx, AV_LOG_INFO, "mastering_display_actual_peak_luminance: {"); + av_log(ctx, AV_LOG_INFO, ", mastering_display_actual_peak_luminance: {"); for (int i = 0; i < hdr_plus->num_rows_mastering_display_actual_peak_luminance; i++) { av_log(ctx, AV_LOG_INFO, "("); for (int j = 0; j < hdr_plus->num_cols_mastering_display_actual_peak_luminance; j++) { - av_log(ctx, AV_LOG_INFO, " %5.4f,", + av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f", av_q2d(hdr_plus->mastering_display_actual_peak_luminance[i][j])); } av_log(ctx, AV_LOG_INFO, ")"); } - av_log(ctx, AV_LOG_INFO, "} "); + av_log(ctx, AV_LOG_INFO, "}"); } } From patchwork Thu Oct 14 13:08:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31116 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7145144ioa; Thu, 14 Oct 2021 06:09:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaMZ+hCPZIeqVKDSEmiU+naM5ozDXNVGNKpKCv9yg0EV9aAUksUZfgXVR1iDnXFX3devcI X-Received: by 2002:a17:906:35cc:: with SMTP id p12mr3776988ejb.351.1634216984216; Thu, 14 Oct 2021 06:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634216984; cv=none; d=google.com; s=arc-20160816; b=AaON/Gyt9M1zebAdH81iK0n4u9qcTk1+mWmBkwewLElihaQInFxvdZgpViPDD3HCHS akJw7sr2gzUZc+HltCQwYBwuci0kSc3zstXIpBFkDn5rb6yEILMgg25+xId8udMWhFNS jJsJVLGbHpQ515vGjRGpPH4vMABqBIrp240KVq0kQ9QK9M9uhWngeee/D1KXZcedjdnr JI2OmiB2GZU+/GD92W1G3rYiDiD3aCSk7ezX1ja8sLPdKFfVQPv3ZV2E6yNb3sy9tCZ3 9ZR6/BbTnwtB78V42/dSTNMAQm+wqQ2Vl+C48W3KXzU+D5xMtCJLErRUnCZwDL4iIBUL HIIw== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=SbEJ5ZlYIDtwpjSi7HRjcDQYMkd57l0dmJZMLhij3BM=; b=jpn4GqYBJ4J+mwigtZPfzbnrSZznBX+fatWXo/d573Ajmp2Ys+Ab77xSQRw3xyNvY7 +IwYUZ9kjVBWER1WHSdlRkzkMjdp3UmFFLSwFLhjf5tX0RyA1U298wp6lZ4dcONP6xAp ypwgqcOS0Ux7xnqj1XFzrtereiqW6hlhF2t+2r/CKfWcT1ONvb9VWcQCejo4qC9btDMC txgcZvZWcsjc8WezU/wBPAPj/LogL4EekHjd2JeephcggSijYe21exHpgh7UWv1gLiE4 /+0iWj9m570SjufMvjLUeQiHsTXpKDxX4ssvXIRJKkaoGAz48S92SY4KlnZeua+k+kTs drzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=jvkdU9n1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w7si3298496edq.616.2021.10.14.06.09.43; Thu, 14 Oct 2021 06:09:44 -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=@gmail.com header.s=20210112 header.b=jvkdU9n1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2619368AA26; Thu, 14 Oct 2021 16:09:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B49D168818E for ; Thu, 14 Oct 2021 16:09:12 +0300 (EEST) Received: by mail-pg1-f180.google.com with SMTP id e65so3104113pgc.5 for ; Thu, 14 Oct 2021 06:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0Z9u/6tYzpUzbaxuSk7Wy2qxOy8F2Pvp9vHwnNJ4ozc=; b=jvkdU9n1LuvMNj96NGrwCy8WwwwF1WWlIG8u22WmU9DKjHeMxsvGm9Su4CFWFFNpFo SW4Pdmk3LQwxHFM8P9aujRdw1YeZGIxGOrnzeRr7bgoYGClREsFCUTJgyWu/p0O08CKV 2YIXVjmG8DRcr8F7T1oVCOG66jKY23VOB/aRzXHWTcCOmm6IYf6VXsgCPRa867PnKUXq f1OOtgm9q5Qyf86T4XGuvZAhGUqPI+GGc+PWRIQYjwrAhCHiSW7rhhBJdtqK/XSSi1ZS Sgn31wJxan8XwS3jArecnDrYmv5VBi1QvPXT7KPyyhdbYVQyA5T0RAuA2+5n9heE64lH 8enA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0Z9u/6tYzpUzbaxuSk7Wy2qxOy8F2Pvp9vHwnNJ4ozc=; b=apJZH2OvPp/IGseFb86UpHwX7mPj5xxP6+JG8TA2RdY/u1B9DcJpESwZTHtnm5xtn6 rrsrjGR/+WbLVJgpzGVdw7cZLmZHtYboKlZzsdnPLFOF8NKddhND7HL1efIxfP+B+5ML oxryHqf/E/+IcSi3LJtLPzSLmGKY7gChTMNc+SRwXGoeqkE7YQV5Ez9xw0UUVZH/8jng F4qGBifBXiudrQOWr1b6rb6PvjuMJAsVyRvdzNTgTXKyMi/7M4nYWN+3XTxHk9nc704r GpiBb2IOgYgZ1c2RvWbkhFlxJyN6YFkrWqSnV9gpGMawqRn2XApLtVAk4wdpo33/8wxg QQBA== X-Gm-Message-State: AOAM533mFOYBxgsrO0iNgi1kEwW8U1tJaTTuAZukWZNTlaVKlDfxBd+Y AJcSnuGFUjWUFaBaxNFD9mY0ZFu2Q9E= X-Received: by 2002:a62:7cd8:0:b0:44d:4574:ea8a with SMTP id x207-20020a627cd8000000b0044d4574ea8amr5318932pfc.80.1634216950968; Thu, 14 Oct 2021 06:09:10 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:10 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:08:57 +0800 Message-Id: <1634216942-20329-3-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 3/8] avcodec/hevc_sei: remove the duplicate check 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: c6eeKVxKAwr0 From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/hevc_sei.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c index 29d0346..7fd8226 100644 --- a/libavcodec/hevc_sei.c +++ b/libavcodec/hevc_sei.c @@ -181,9 +181,6 @@ static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetB { int ret; - if (size < 3) - return AVERROR_INVALIDDATA; - ret = ff_parse_a53_cc(&s->buf_ref, gb->buffer + get_bits_count(gb) / 8, size); if (ret < 0) From patchwork Thu Oct 14 13:08:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31110 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7145283ioa; Thu, 14 Oct 2021 06:09:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1Qm7TNaTobHmCyemGteNxKV7gVjiwZ3NfV7CGSvcTccclEZKvf+Mrl2V9M0/FPdorOKk9 X-Received: by 2002:a50:cfcb:: with SMTP id i11mr8494041edk.347.1634216995142; Thu, 14 Oct 2021 06:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634216995; cv=none; d=google.com; s=arc-20160816; b=IX7gDfbEg30Sn6TIjFlPUGrmKWfgHLJ2XVZDHtsaSYcopF8zQhEW7Z3dijm4fq16or y65ZBnAo+1WICgSMOwLOvQJMayOepii/2JoIsAKb/GDjx7h0Lirutgxa4qP7aAQfwVNd hN+D1QR8mqRJD+RXAOpiJIT6ehxMv3cMV37jr/YgTNkvvH52SLZsFx81Pv9+mN5bUXzo yh870FrnRrMYwVbXevD9vARoUKjs8ROdL1zjBavXDq+0YCAaIujOoj4CgD8J4O+TrUff +q9iJU3CcQpVabT52dPiyTmurj1xOoQop+BM6RrxyxXZl5ubSViD30wirTTejiGFoFPO c4ag== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=pQP1/GIAYVVYjVyPAzqRQS2li6oQxssodRVuR5woZcQ=; b=p8iyn5JibJEsrklZfcMY4XPWvbzR16tKiaEMEePrCIcEXjhcymZtbZB0PYaDgLkI+g Fl08CBM0hODNmVCuV3C9rHCLzsg5NKiLCb+SJEyTltSlkfv+jtWXfreHxkfnq+LlJp8R jmV3Mxf9/NlOx3qEcgCX+RaurIi3yz9XuuKwS01hKBLZtO9IBug1+9lp4lKjKQ0lWmeH fH5+Cnpu2Q+6it88Zi4wRwJhhS8ZlF0ujqF44Sb/vvxnnBhtPZlmTh4TGK8MccVv9PA+ T5tKHha+KmluwgXHB8FIFwZEQutiatbss2rb+p1TGiByUA8WYkZ2CwgH3swvS4A5lpxK 9krA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=DUuRq6rY; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f4si3617568edr.20.2021.10.14.06.09.54; Thu, 14 Oct 2021 06:09:55 -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=@gmail.com header.s=20210112 header.b=DUuRq6rY; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 589CE68AA3E; Thu, 14 Oct 2021 16:09:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A81268818E for ; Thu, 14 Oct 2021 16:09:14 +0300 (EEST) Received: by mail-pf1-f174.google.com with SMTP id q19so5423225pfl.4 for ; Thu, 14 Oct 2021 06:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LoAFE63y5oLP9+ASpEqX1f0i1Ez8j62NDMMrrlKTpKc=; b=DUuRq6rY8k7k7Cn8Z45yWhCNja0HjqPcu/KgbL0hwnPDnWNLWMx1H2NQvhN0BICPS7 mwee/NZa6ykYtrOg+W2QEgaNqmrPgsE+or8WKIvHHjbtu56GRuFfb1BYELHdH4BmC5G2 Kre5PkxZoDw/PAC2Zg3Yda5hN6x5Y/1F8U88Xxc7JMEi/zhGaSo3zY4QqgKHxkry1PA2 ipEt2SV5PlxV0LPC1Ci3CDC6MxuUZ4TqRejNjEpkP0L16vuCWjaX/WEF7qKMxX8gErbZ xUHB3taOMCjLQCQFws7fxqw5EDTyoOWIP2whkb7p2h+IArekRBa4limoSviI6ezadIRe cF0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LoAFE63y5oLP9+ASpEqX1f0i1Ez8j62NDMMrrlKTpKc=; b=ceMfyKOk/PbzUNqdCMd7fnIroXpmeITtZbUHQqaLHkM8gRfFTalLVsrZz4im/5Aw/s rVX/By+7MLvakjhSfjFZ4UQOZkb+St74vIJo6UAPP1T1/MxuDZAfXHdylS1kCzl2aWo2 zNxgyqfEdpB3TegBUN48RRBuCJQoJcKmGQny/IPm8PPa2hhSb0OwgEcVp0Yblr0JqD4c 6rG6rdTisXFzaT3l2uC47GQaPCWnAXqwe6Ea6pWYpIKTDsKelik8KA3giCVRYy0HsCZt gWnUdNVUZN5nt3GQzVgFwUsd2iv+/JzPaOtH+Fddp9fAFMmqkeJbLzkB8wpSgWEbNa24 X8lw== X-Gm-Message-State: AOAM532fixQh4p1ZkPSviwTssXCr2nwlqkw4moEiksFNPhnJztTmRCFC ccjs+Izl2v3hy/UJxgNizbRdjo60C3M= X-Received: by 2002:a63:4917:: with SMTP id w23mr4131756pga.344.1634216952259; Thu, 14 Oct 2021 06:09:12 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:11 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:08:58 +0800 Message-Id: <1634216942-20329-4-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 4/8] avcodec/atsc_a53: use AVERROR_INVALIDDATA 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qJxl7r6cJaD2 From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/atsc_a53.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/atsc_a53.c b/libavcodec/atsc_a53.c index 2d89ef5..29ec71b 100644 --- a/libavcodec/atsc_a53.c +++ b/libavcodec/atsc_a53.c @@ -73,7 +73,7 @@ int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size) int ret, cc_count; if (size < 3) - return AVERROR(EINVAL); + return AVERROR_INVALIDDATA; ret = init_get_bits8(&gb, data, size); if (ret < 0) @@ -95,12 +95,12 @@ int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size) /* 3 bytes per CC plus one byte marker_bits at the end */ if (cc_count * 3 >= (get_bits_left(&gb) >> 3)) - return AVERROR(EINVAL); + return AVERROR_INVALIDDATA; new_size = (old_size + cc_count * 3); if (new_size > INT_MAX) - return AVERROR(EINVAL); + return AVERROR_INVALIDDATA; /* Allow merging of the cc data from two fields. */ ret = av_buffer_realloc(pbuf, new_size); From patchwork Thu Oct 14 13:08:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31114 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7145526ioa; Thu, 14 Oct 2021 06:10:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypqMooIfaucLKiDbkPjyrSeD5HZpZkevQ5058AvAyEXFsAlqG3miFw2mMZHDuRdrYbPTGl X-Received: by 2002:a17:906:17d5:: with SMTP id u21mr3738977eje.16.1634217007450; Thu, 14 Oct 2021 06:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634217007; cv=none; d=google.com; s=arc-20160816; b=pz2nU06i4SQgaeeBhRwLcAyNWJEUbSx8uMkgePoZONvd4w/tgCpY31bUOnCfRd6g+7 F6LdCTF4xDklbb07eSTnJHy/KqTb+YGmwMNjls6VPnB1WElJ2MYVAk49ahEjnB/hqRHG Poi3p9F4S2qWQnmlZtSGlIf3jNd5ztdiz1flzdWFWnP5HRfb3l8QZyonJM/AKaAQfmV3 pX99KIiZdV9E39VMXSxorBd17QngaYCCtsNcVDlOwzZayxg7OpP3ex+ykyOt/t/Wrp0n HfOz6z+/ctWHr95BSfqCjJ5bNPnSBEawjcz3nVZ6T99iJqxvNYa7NUdzs1VNP/LTeAa6 RAsQ== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=t/wUO+PQI8VYSitliIfJnlpvDF4FAJPqBVD20E5TT5o=; b=ap6JG1Z7Sk9AhxFvrbm3IsLEf3rnwP9N0lTxmugwAkO0Noac4UettJjyOxq3uBRNc/ 6CYsAHvy1dJfPumS+Ctl3HGK/uyLExojxp0wAEcJLZ3YPWceiVzP+Ci2Zgq1/lw9B7/T vr3EF1smkJy2axy3XOKgBTzXqh9TF5EVk+yk5ITJObOHNdLp1oQ8nwM79IilVDVkyO+J /khdyCNw5M8RJrUMDtQAEmwvoRXG7vcHboxF5Mh31cz6pOxjmlt1Rw02Vh7avKzu12PQ hC94ZglfB3GIHwchjBphEQWFYVKbQ8ez0nerhywqcXHo3JzVusVzshU0SKgHxpngnIjt 129g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="o/USJFxs"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gb38si4769937ejc.684.2021.10.14.06.10.06; Thu, 14 Oct 2021 06:10:07 -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=@gmail.com header.s=20210112 header.b="o/USJFxs"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 740A268AA35; Thu, 14 Oct 2021 16:09:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3FD3F68AA33 for ; Thu, 14 Oct 2021 16:09:15 +0300 (EEST) Received: by mail-pj1-f48.google.com with SMTP id lk8-20020a17090b33c800b001a0a284fcc2so6921582pjb.2 for ; Thu, 14 Oct 2021 06:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nUYGWk0OYHn26LWvrBAUyPeUQXBEtGC6LsbtXpEMGow=; b=o/USJFxs9EIc4a8U9lkACKYb8HWriki2m/av/YS9kZyDbe1nVa3omuHtJkcnzn5SLj 6w7FnFBi5hJ+xrH5A3Q/vtGy88lxpBD1RZUh/zU//qfgh4tZL2mAnQY+Iyxjt2SsRi1X RUjCAmqS3QCjCtGt7FNXkDSYJgggZNvuAkqHGI2kdg8JjapFipba/7RgrqqFcwrR8Z5x gKr7ACePCr86pNelNPbF95sHfCHFsUOMK+cGPp8ZIZY+yE4OL8oJH4CBAKRSuf8yns1i mlzKGX639ks4VCpOIbcoa7YoGQfiaLm7gvqhex+XLcbCopPTLISvCevZWXMRfkh1vbfx YG0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nUYGWk0OYHn26LWvrBAUyPeUQXBEtGC6LsbtXpEMGow=; b=MfcOQ2hZR5HIDjxmfBlAq8b9pCwzNuKrupnXfLN+4NTqZsDp8rkoPJnylMf09DFOEz EMwMjUMjLVT4MjK/1ZX6nGsLiVdp6yHz9Z4PsfIY+9f7uGH8qnnPZzaHE3o1VPHkQeQM LoHu3lVr4Hk3mBIoJ6QGuSizaXb25eRMsMZ557J2kqPeJo25BvOUZ/He2nmHHfJWVmsZ cwAVu5Tp7Ay5FuK0TdpsamlOUSPYvX71JbWdSW3BPjNkW+CHJFs76FrWLylFoAyEywhA 1lFpLNMWcCfRO/K5T2Y0ASa+16bOaoag0Mcw/9L0K4EwKwAovZNb3AmIG5Jsk6uBHcW3 4khw== X-Gm-Message-State: AOAM533rR1EKMThdJOfAepJ7Z+7Ojs0qeZVYGBg2gwzUt9d9yfOsrKCg BBCLWYTBZpz6n0tMmQOKmnOlqmlldfc= X-Received: by 2002:a17:90b:390d:: with SMTP id ob13mr6037545pjb.49.1634216953522; Thu, 14 Oct 2021 06:09:13 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:13 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:08:59 +0800 Message-Id: <1634216942-20329-5-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 5/8] avformat/mov: support dvwC box for Dolby Vision 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: e5daln5iJHaB From: Limin Wang By <> Signed-off-by: Limin Wang --- libavformat/mov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 57c67e3..49a8c27 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7074,7 +7074,7 @@ static int mov_read_dvcc_dvvc(MOVContext *c, AVIOContext *pb, MOVAtom atom) return ret; } - av_log(c, AV_LOG_TRACE, "DOVI in dvcC/dvvC box, version: %d.%d, profile: %d, level: %d, " + av_log(c, AV_LOG_TRACE, "DOVI in dvcC/dvvC/dvwC box, version: %d.%d, profile: %d, level: %d, " "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\n", dovi->dv_version_major, dovi->dv_version_minor, dovi->dv_profile, dovi->dv_level, @@ -7273,6 +7273,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { { MKTAG('c','l','l','i'), mov_read_clli }, { MKTAG('d','v','c','C'), mov_read_dvcc_dvvc }, { MKTAG('d','v','v','C'), mov_read_dvcc_dvvc }, +{ MKTAG('d','v','w','C'), mov_read_dvcc_dvvc }, { MKTAG('k','i','n','d'), mov_read_kind }, { 0, NULL } }; From patchwork Thu Oct 14 13:09:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31111 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7145830ioa; Thu, 14 Oct 2021 06:10:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKH9yB7WZN78pN9idoop5UTWgmekZAMu1AAlX/ZrYE57X6cKcn3Sk21rjkARAcBMpRkjtP X-Received: by 2002:a50:bf4a:: with SMTP id g10mr8723168edk.11.1634217020917; Thu, 14 Oct 2021 06:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634217020; cv=none; d=google.com; s=arc-20160816; b=DNeQKUNW6skrwSuHiTvJMI5a+TA8kN9yD//7ZzrZn0bEhegO9aCYkrdZ1iQKmRdoTQ ztfxL0o3Pw4nHhrF2I/LVWY66XAThIfHHMSNzY4lXjccNa56jW8ITQBv/lJ/hZExuCUs yJI96eLAfa6SRuk51pPoDJbnXqdXmpjDeMW1TGrQu34H9EURpKDKRJzjwOOFg/p6Vo+F Jb5foTxiK5tvPki4pguCleu0q3Epj/o8vDMTj9iiajaPNE2YKeKrCvz87QGiWUv+DoLY C8p4hDVqOcV4imrNyikaoWaa4npGORi0E+0fBLVR1xETk7bFhyPpASEmdF6+t19L1e9/ HuYQ== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=HoDOwaR/R3P+L3Fk7wUWJkRy3dpBs/8a2LBOIvXLznA=; b=x2+IEz/LMS8V7pSFfr4x/c/JlJijGHUTCO33k13S9joJuCb4SEtu/nEvBh7+caHJKU hi1Wg0f6A0P6xGCsEjrwawolngIKXg1BnK5Msk/GG9YYyMG/mPXc3KobfNqPwDzHd9bz yy0zPm8uJYi2+wE0+t+8Z3YqqhPDnDrPiYjJ2f+FeHLaaPLcoytTqzrnXys1fX+USdP5 QPYccw+C57g7NJu+ijHGgGDfyyD58u78aBuTVyJk5eBTXDnXfpHFZSsKtS9xzgDYlA35 0zxMwv/0B8oUv5xUEecAfwGzCtS+1dZNnraSEHq7Y3NC8pR0QuXpRYQBqSfsyBiR2zUb zUVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=l0pE3Hub; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y17si3244244edv.613.2021.10.14.06.10.20; Thu, 14 Oct 2021 06:10:20 -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=@gmail.com header.s=20210112 header.b=l0pE3Hub; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 65C3E68AA6E; Thu, 14 Oct 2021 16:09:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7A27568AA25 for ; Thu, 14 Oct 2021 16:09:16 +0300 (EEST) Received: by mail-pg1-f180.google.com with SMTP id m21so5468653pgu.13 for ; Thu, 14 Oct 2021 06:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PhRQf5TLYg/YMHlPxkhe/avrHlSM9qcofqgL4Ivp7n8=; b=l0pE3HubRXKdQ1mtdzkkHuSt0vLcjQgAUFfz6qKYigPlG8npaQDRw/k1mjPyB1UYMS b1UttS9fTbFBYN3MMBlyBH3mWBiNALDU7WP2hSiuAoxGnY3Ihdz/aHtfoaXahz/7/Se3 YlztCfenkKJkBop5koJwd/XasKYy9DedxNf+DZsfA4wt4f8I17j5hQOCna4UHPlRPYRA AnTTWHMMtHfby+fg++Et6Mtz34DIempvYloFa8CULYbtVVEwDy7XPc4uTL13qKi1NSWy cqjf05HEGeHfubMnin+3WsINIpVnqr/T3tVcGrdGxXnfQn0J7mv24ytbbZZuhdfI1eqx bhMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PhRQf5TLYg/YMHlPxkhe/avrHlSM9qcofqgL4Ivp7n8=; b=5eTeurxjXWcetQ+6rP+KZnlna22f+AJIWVXnvTbt9oP3g6gh6O25rqL3unbhVLdcZz fHilfrzJO6FzRAvmOxSJHIBf5jplHd0PvLdNE0FAUdx6VRYcUY4K/4hsHm3Jxf1FXTzW 5+S/ktVshdSanGKtdbjhbFIP5IaIxUTomuLXB+NIFlJy1Vz/wnq+UKa/+axvse9ekbAz moDIk+gyBw515YY2Gdte5IHwFiRoQnuxVEBRo5EU7+RAICfF96gHY6ljU6bGagTcjL44 cQsafjUmUGm0mDWn9ThcArY1rKS/R1SWKF/8ofC97o9G/5EC0YwU8rYOwhskYfmWyaSn HJ+g== X-Gm-Message-State: AOAM532FNP23vyBSaEw0mLkESxKdj1rBICcWqXpz5ccd6TeuUGXzmTCe s3oLhpTancjbxkWmf5g9hM7at6zHOlE= X-Received: by 2002:a63:d14:: with SMTP id c20mr4248461pgl.118.1634216954758; Thu, 14 Oct 2021 06:09:14 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:14 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:09:00 +0800 Message-Id: <1634216942-20329-6-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 6/8] avformat/movenc: support dvwC box for Dolby Vision 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ZXFj4R4asRcF From: Limin Wang By <> Signed-off-by: Limin Wang --- libavformat/movenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index d43a086..37d4403 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1912,7 +1912,9 @@ static int mov_write_sv3d_tag(AVFormatContext *s, AVIOContext *pb, AVSphericalMa static int mov_write_dvcc_dvvc_tag(AVFormatContext *s, AVIOContext *pb, AVDOVIDecoderConfigurationRecord *dovi) { avio_wb32(pb, 32); /* size = 8 + 24 */ - if (dovi->dv_profile > 7) + if (dovi->dv_profile > 10) + ffio_wfourcc(pb, "dvwC"); + else if (dovi->dv_profile > 7) ffio_wfourcc(pb, "dvvC"); else ffio_wfourcc(pb, "dvcC"); @@ -1926,7 +1928,7 @@ static int mov_write_dvcc_dvvc_tag(AVFormatContext *s, AVIOContext *pb, AVDOVIDe ffio_fill(pb, 0, 4 * 4); /* reserved */ av_log(s, AV_LOG_DEBUG, "DOVI in %s box, version: %d.%d, profile: %d, level: %d, " "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\n", - dovi->dv_profile > 7 ? "dvvC" : "dvcC", + dovi->dv_profile > 10 ? "dvwC" : (dovi->dv_profile > 7 ? "dvvC" : "dvcC"), dovi->dv_version_major, dovi->dv_version_minor, dovi->dv_profile, dovi->dv_level, dovi->rpu_present_flag, From patchwork Thu Oct 14 13:09:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31115 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7146117ioa; Thu, 14 Oct 2021 06:10:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxGi5aFT0w9nmi/46O2cW/Sop702GdPKq2u5rudJgtUcs2PZnKdOyA2ew6mjKaj1pRw9B0 X-Received: by 2002:a17:906:ce45:: with SMTP id se5mr3789188ejb.386.1634217035184; Thu, 14 Oct 2021 06:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634217035; cv=none; d=google.com; s=arc-20160816; b=UnrpWMqCqJfgQUYmXpxiZ6SBeILLblh2Ssadedswe7ZVwP7NFVLEwj19CwL7Uns/K6 drHu6khID+QnsRYTVfkCQeHaGXHrKOI0H/tDRiv4FgSpVEKHXN02FgxX0O1YpOEAahfH kIeeydHBPkoMaePV40cdwBqGOM1+YtbZYqHOAEAqf4RM5ND3GjwcCEHziebIW/KEhmrr BQGdkDea6MJQORMiDta587oN5zxKKz4ORrd9AfbxE8K5WuMWB1QjVkc9m/7yZFSwxbGC msijpw1jIG60TITsCH2kT6aKMOElYizvqr42WZYLoC7jYE7Xy6IoGgKsVYb181NXnPKr CEww== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=Fv790C6DfebQgshqVggFusgO4eAHuV5FcbxRBVb+nOY=; b=KyoH5AFOMm3Sda+SF1JpkVNuCTMOQqXciIjDkMD3DyTOArOqcYKngXKjKobjBDZf/P AanogmB/HSs2r90l/mITPstG0zVhRd84Jg7kyonwroD7u0L1/aeTFqOWlcgJyYUCSBW3 1DaCg9zxrJPtzkPAEkbNO0QtsUOc8OjE1D9AIsR539h6DSD/bm+L/wC3C7YDtBndfx+V 7LrdJt163g5gK3SnyXVMiZFOAtq9VzsW4OrKYoe6NhhLTQ30OLBk5ZPVEPMit9JXF9vR 4Q6+oKH3VyVSyur0DMxtFD+W+4PeA235IcV+x7jR9sjsJW0q3KxFOxPkcil0B5P6BWXm LXGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=FZHPLCAs; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q15si3043660edi.437.2021.10.14.06.10.34; Thu, 14 Oct 2021 06:10:35 -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=@gmail.com header.s=20210112 header.b=FZHPLCAs; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 687F668AA3C; Thu, 14 Oct 2021 16:09:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B0C4168AA4D for ; Thu, 14 Oct 2021 16:09:17 +0300 (EEST) Received: by mail-pg1-f179.google.com with SMTP id 133so5519694pgb.1 for ; Thu, 14 Oct 2021 06:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vjGHxLZ0Fe8itfwiUTNBpfhSVKit/HIAUQ+cZ3nayKE=; b=FZHPLCAsSwIYNLYLNzL7QLyA3B9PfgUX4dgfsEDFwdEWlYsiQg6HFOUTHzoS0i2/FK UzOe7RrTYgHnSxliEg1IoHgGPhZQ8eb4adDpYQpcat3/UEAWh3EIsI1b+mPJBCvinyqG h0fC71tgVk3dQn+IB72/3Tv5nBBURuV9MXCujwg0D5rHw+cBvvkBGGeif4dGUThBOCW8 Nj1ZgRW8/kjtwsYNXtYKkaBZaIFfqSCGWslVspA+WTMUSZN4/YW6xgoozKEvD0hcnm8e L7eXToFNZtxWRDgYCKvVd6OTD5OEqdviY2mfcFDLHKVZ3d9cEHHMNKk7/zFcXxyRpFZh cdtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vjGHxLZ0Fe8itfwiUTNBpfhSVKit/HIAUQ+cZ3nayKE=; b=WiQZ2EvAqgfmDcxclT8JOzkxdpiJdqPghp2a0o5GQYorlcYAPA/eXS8U9p5+bjhK3G LVP7e9FzD99UUf01za4Pm4DDC26LrgzOvXoi4a2u67Fqvda+uNpJfxXQNSq7UTtAkhPK HKi7fqAWaLV61fUUx4ml3BS0quWcItWAo0WTJv0zMvlVEkxFcGisXtzZHNk9/rv3UX+p +VuSbmo8hb9vitdzBrFlqHQso4WhNfq6VmerlWg4Jcuvbh6D+bGrBk2v+G6OpZlTpkh6 Qr8H5Ff3bAr6abVP1pee6LCgddWDFdEBdwXJOqbEyUrfl5/yE73+MA12qREIE05r6GBI 5rcw== X-Gm-Message-State: AOAM5309UnlSI7h2RdRzal+ZTm6dDembshesi/zcSqt9YkBjOsxLhgLR Y96NYdtmFt5pv0PAZe513gsW73SEJfo= X-Received: by 2002:a63:c:: with SMTP id 12mr4176474pga.477.1634216956076; Thu, 14 Oct 2021 06:09:16 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:15 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:09:01 +0800 Message-Id: <1634216942-20329-7-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 7/8] avformat/mpegts: Fix for the DOVI video stream descriptor 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 0duz8tQ8jn15 From: Limin Wang By <> Signed-off-by: Limin Wang --- libavformat/mpegts.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 44d9298..774964d 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2178,6 +2178,8 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type AVDOVIDecoderConfigurationRecord *dovi; size_t dovi_size; int ret; + int dependency_pid; + if (desc_end - *pp < 4) // (8 + 8 + 7 + 6 + 1 + 1 + 1) / 8 return AVERROR_INVALIDDATA; @@ -2193,7 +2195,11 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type dovi->rpu_present_flag = (buf >> 2) & 0x01; // 1 bit dovi->el_present_flag = (buf >> 1) & 0x01; // 1 bit dovi->bl_present_flag = buf & 0x01; // 1 bit - if (desc_end - *pp >= 20) { // 4 + 4 * 4 + if (!dovi->bl_present_flag && desc_end - *pp >= 2) { + buf = get16(pp, desc_end); + dependency_pid = buf >> 3; // 13 bits + } + if (desc_end - *pp >= 1) { // 8 bits buf = get8(pp, desc_end); dovi->dv_bl_signal_compatibility_id = (buf >> 4) & 0x0f; // 4 bits } else { @@ -2210,12 +2216,13 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type } av_log(fc, AV_LOG_TRACE, "DOVI, version: %d.%d, profile: %d, level: %d, " - "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\n", + "rpu flag: %d, el flag: %d, bl flag: %d, dependency_pid: %d, compatibility id: %d\n", dovi->dv_version_major, dovi->dv_version_minor, dovi->dv_profile, dovi->dv_level, dovi->rpu_present_flag, dovi->el_present_flag, dovi->bl_present_flag, + dependency_pid, dovi->dv_bl_signal_compatibility_id); } break; From patchwork Thu Oct 14 13:09:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31113 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7146351ioa; Thu, 14 Oct 2021 06:10:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAAraPTnSAflU8osQ5onNtm+8TXKHwvQX3FgV0lIpVOVwbJzgDvOuYovNjjjPx9GK0LuJF X-Received: by 2002:a17:906:dc8:: with SMTP id p8mr3756396eji.167.1634217049187; Thu, 14 Oct 2021 06:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634217049; cv=none; d=google.com; s=arc-20160816; b=P4IpLG+zN5KTIWj1TWUB12rUTzY/4Crrrtmxyyv5++u4KDHfPvTHEtxoGgpd2QeaSL 87OC1oUWBfTd2JXxj35hD08YdrZHHI0TzkKlWCKZDH+e1Zmh/Xy8fVqOghsoMFT21VjK D+QSqlJeWSIb88Z4CUiyT76HMjqNx2wMb07tIGqOmBHX5A3oxigvboPkL8xyDo1xE1TF 1WOgJkEQ1fljsEqUZWTbI0UNgNCje1Q+85QXMbsZgjGr6VM8rKICYSu+ucdWHEZbNl/E TzqOa4QU6vHpKsTrC1XOUgDSRqIumwS85TzFqCJMMcPrinPF1bLCUe3q195jD6kd8PPO uPeQ== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=gZdtGvEBPIWQi+TIzcrqekUt4aoBtbYnNRtLbmUz0es=; b=mGXuhWSGgG8ex+3J3kC3dtGQar5so/t1ZzTdmYqMGMOsohQvMePJMVhCxSGgYzgH6i YOJhzrYr7dZm3FGb/2iAkC4cwa+R0EGbFf+PKnp4N/FP1sVpHzrUAMJmtGbSES9MUHV9 6qJqDwvwqZhYjKPmgn4Ym4gtAV/ZVIhkvnNksu7kdw0WrT6vxj2oBr0/vt6AUzCMjAy+ G83jW0dtceq+Pfap6AuTPfVIJFhajPb5CvfWhO/ZWAraN7VFuknHlvrHO4EKUTNAXG0J nJl9pF/RTImknrk+MlYh7lsViGygu948n0DpMi7D9+D5F+1WcX7Gbp+c5LHBo9tWDsAP QdRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=TDc4D9Dp; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l12si3450684ejx.146.2021.10.14.06.10.48; Thu, 14 Oct 2021 06:10:49 -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=@gmail.com header.s=20210112 header.b=TDc4D9Dp; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 71EBD68AA42; Thu, 14 Oct 2021 16:09:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1E98168AA3C for ; Thu, 14 Oct 2021 16:09:19 +0300 (EEST) Received: by mail-pj1-f52.google.com with SMTP id pf6-20020a17090b1d8600b0019fa884ab85so6905161pjb.5 for ; Thu, 14 Oct 2021 06:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PND8GIr9FfOqDAep22/pkHrf8c1AYVicZudzQOf/rBY=; b=TDc4D9DpEHgpEeV28vGKTesAgKxQ1krZcljDZN5gTsA0bqRw9+rvNnYx8TaknrU2cz Ki8QYRsDyloWs1Wnes3fRpnm9v+rCReSfy+N5E8f/Um7FoEN1jqkxn9hqOoV3tguBGbl uIQmk4rXbv6mo6/eie+gqzN+vFcihQ4OGTSZLY54teiRZvWVclOyXhl8R11PfNhJNRjs ICLO6BKBTzIgVg3ANtXFbBLJiVr+LkWoU+zdjC7OvSCRhtly0rqWfKfkGRzDOT2Uz1o5 Ad3sGwiy521n/k4A8DY0Vzh0li2NEiaRJ9HNcVX5EpXLfIZT/Xh8HQfpPReC80KgfH5K 1fIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PND8GIr9FfOqDAep22/pkHrf8c1AYVicZudzQOf/rBY=; b=J6WOTdNcZf+HQXtsDtaR5gxKMgakBnpBCSG4qTs0t1VIHNf2AZfZ1ylYCaOvMEHMXZ vOmHc+Z/MfY9++uoyaZ+TftyIqSqyFqFvcHHr0MKJNSdolMcOdH24Thp8oYI8gjYP67G JVJgKz3IEH7hnRhdmn+bAwEvvGxLBE64LPRQ+/tSGLjiscZUD+dXuGriSD7U84slZa7s S9tf+XznmSIZ9x8qUFUGc6lBbXr0NTCsVQUNdjci3CpxRGsf7actJltW+B4SXlX9o0Vc d1pnc6reJAak+sdO44lE0eEtugUGYyj0MV1YlUiepjzANy0tTxQMISrMBCB8D992KxP/ qYug== X-Gm-Message-State: AOAM530hjkdKwQGdiHXSSpoqvTuGxy5gZgNJw0/KcN0BstrntdQNld4I EK+dY3YN1HsNHPyQZ5wsoHyd43yvF8Y= X-Received: by 2002:a17:90a:9297:: with SMTP id n23mr20585824pjo.199.1634216957360; Thu, 14 Oct 2021 06:09:17 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:17 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:09:02 +0800 Message-Id: <1634216942-20329-8-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 8/8] avformat/mpegts: return proper error codes 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4Qjz9AA0mhUc From: Limin Wang Signed-off-by: Limin Wang --- libavformat/mpegts.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 774964d..3157e3a 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2270,22 +2270,22 @@ static int parse_stream_identifier_desc(const uint8_t *p, const uint8_t *p_end) desc_list_len = get16(pp, p_end); if (desc_list_len < 0) - return -1; + return AVERROR_INVALIDDATA; desc_list_len &= 0xfff; desc_list_end = p + desc_list_len; if (desc_list_end > p_end) - return -1; + return AVERROR_INVALIDDATA; while (1) { desc_tag = get8(pp, desc_list_end); if (desc_tag < 0) - return -1; + return AVERROR_INVALIDDATA; desc_len = get8(pp, desc_list_end); if (desc_len < 0) - return -1; + return AVERROR_INVALIDDATA; desc_end = *pp + desc_len; if (desc_end > desc_list_end) - return -1; + return AVERROR_INVALIDDATA; if (desc_tag == 0x52) { return get8(pp, desc_end); @@ -2293,7 +2293,7 @@ static int parse_stream_identifier_desc(const uint8_t *p, const uint8_t *p_end) *pp = desc_end; } - return -1; + return AVERROR_INVALIDDATA; } static int is_pes_stream(int stream_type, uint32_t prog_reg_desc)