From patchwork Tue Jul 19 11:27:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 36826 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp1682764pzb; Tue, 19 Jul 2022 04:28:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uRMa5nAXwKxTbLsiWlvCweu+Q08MUp62TnI/VUqByWcZr5HoYs3LdKe4k8r3HMUTElfWQf X-Received: by 2002:a05:6402:1cc8:b0:437:a61a:5713 with SMTP id ds8-20020a0564021cc800b00437a61a5713mr43934143edb.340.1658230099087; Tue, 19 Jul 2022 04:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658230099; cv=none; d=google.com; s=arc-20160816; b=X5QcnoB/dha2kNoVzp4NCvy7qUvYkNILAYlmGWUcG2vQXlzVfH4vA6nhx4X4Ac2zt1 QzK0HfEhbGBEcGmt8cMG3ckfXmuN3LoKkI6s1Z3/RCcP2bOYYhEvwf7WJ/2PHmj00cm3 RFql8qMDlctLe/vdtiO0upFGFHWHvLhqRJLDtMdfahKONjjSacDKYZpIGW6v5yY6QpIF vBOV7WKrQKVlK8gu5s534ovNG5mWsyCCbEIkUBbIg2sPieaf0T2UvkNMOWXWFRS493fb VlO/xXw00e3WVZTFhMQanhWn+v332/K4GgXPJlmilI40btswYZGVoVndC786G5puZDZK 9img== 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 :dkim-signature:delivered-to; bh=KzIjo7arwoG2iQ+kjDMdCZoaPnkyfFfwa/hM37zEvVA=; b=ILxFz/SuYzlzF41MYuXs38JJjK3SjaJVwSFPpLaKWKxmgZkJ2K+aOc5VyaHEYg47Fs bsQY5gyDOAGPt2vN2x9q2aRyTgyZ7PGpLUoRahUhRfPZQSbbZb/5etr105n+hT9+8T71 3EOAz/MpNErB01Tsmr/j2RT2aOlHP+ch5xPGPfabkhw9QUTyp/4Vv6LzX//KFLwFSaia 0F7COFic5HlhTUR25RVR2R7E/DIXc4HVMOxcxTozroiLFkMlnxre6lOS2qcLYt9KBzI/ FrJEJqvsXCA8nOBs01nx+NAePJAqhOlC3HV/q+HuhCecvu92QrL9jTqqER0i0KknhZ8s hoMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=JRlG1yMt; 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 dm11-20020a05640222cb00b0043a88f44efasi17341263edb.411.2022.07.19.04.28.16; Tue, 19 Jul 2022 04:28:19 -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=JRlG1yMt; 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 A385268B586; Tue, 19 Jul 2022 14:28:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1C53568B30F for ; Tue, 19 Jul 2022 14:28:05 +0300 (EEST) Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-10bec750eedso31183018fac.8 for ; Tue, 19 Jul 2022 04:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=6RJSk3PybDyt3ONj8QCw++YRT2B8LtVSeY/bGFq8KWE=; b=JRlG1yMteunNJszLl+mOaqjnHJHkw/9Zh+Et40e4LbdfD4HRilxXIXxqM7ajz6qs7E WN2o4kGEdDQIUVgkfjfu6SFyIqKG02ybC/EHJDRBqMwILkZggWgAoRSS3v1yr3jwpQUC gjVJ+xmIT5UelRn1BSg1ORAy2et6xqF9yypWI6k1bPiFNexWGbqD9Ic2YHWiHrw3uCsk rZ8X+1LD4Wsg/JuiZiBtnFkzTCJqG9i9E2VWC8ZdJBi0KLI3FQbWrgD4FjRxcEsv1z9w xsHly8tZFKkad7xD0d18VaaBx/mEN42qWiewiKdba+1C/lquRmwdXgkPOW+Syhv0Tpg2 RTmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=6RJSk3PybDyt3ONj8QCw++YRT2B8LtVSeY/bGFq8KWE=; b=TXFb3n4HYv53V/y1e0YzSNFTNDOwNdTRcayIadIFVnOeE2QF/gMocy21sxekpXFM4H gXH6mH/zgZgUky6vUNkt8hQZQaM5UVCW0Ik1ONo6dTJpFQ4je+LoVEYrnAQIlOhqmm4z mTONrlhTe2pexLEW1HsVbHr/xBT9nhef00Zkv8bzs7c/gBbPcNV0wg8624u689VCE1+d U2Hqbty9DmMz/KuLMwU3RiaQc3PUXAqTQCm0cxT7acX0QPmKsOYvBXlD2qfErgGKDl8/ d/ml2C3mrv4Gh3pwZe4Yt/mArvy+zCzASNC6f/MBGIv4BuvTk1IsCywIjLmrYzZlCDjc 0tIg== X-Gm-Message-State: AJIora8i/1f2vxqUsvvKe66A5nLHIxGuESYJGZ4Ms255FCT4/uyfVkVT x6WfAxfUS+Q3/TZiIpHj9HcBO/QMHa4xBA== X-Received: by 2002:a05:6808:23cb:b0:335:2987:1209 with SMTP id bq11-20020a05680823cb00b0033529871209mr15929049oib.69.1658230082688; Tue, 19 Jul 2022 04:28:02 -0700 (PDT) Received: from localhost.localdomain ([186.136.131.204]) by smtp.gmail.com with ESMTPSA id 16-20020a9d0e90000000b0061c309b1dc2sm6103820otj.39.2022.07.19.04.28.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 04:28:01 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Jul 2022 08:27:48 -0300 Message-Id: <20220719112748.374-1-jamrial@gmail.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/aacdec: remove skip samples multiplier 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: CpB/hJHoLFE+ The amount of padding samples reported by containers take into account the extended samplerate in HE-AAC. Fixes ticket #9671. Signed-off-by: James Almer --- libavcodec/aacdec_template.c | 3 --- tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a | 2 +- tests/ref/fate/audiomatch-nero-16000-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a | 2 +- tests/ref/fate/audiomatch-nero-44100-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a | 2 +- 13 files changed, 12 insertions(+), 15 deletions(-) diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 10fba3d3b2..119976aa19 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -3418,9 +3418,6 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, ac->oc[1].status = OC_LOCKED; } - if (multiplier) - avctx->internal->skip_samples_multiplier = 2; - if (!ac->frame->data[0] && samples) { av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); err = AVERROR_INVALIDDATA; diff --git a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a index f6f8df5e00..b8fd03942c 100644 --- a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a @@ -1 +1 @@ -presig: 481 postsig:223 c: 0.9835 lenerr:704 +presig: 1537 postsig:223 c: 0.9835 lenerr:1760 diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a index 9ba0ef2338..b0381bfa0f 100644 --- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a @@ -1 +1 @@ -presig: 962 postsig:446 c: 0.9895 lenerr:1408 +presig: 3074 postsig:446 c: 0.9895 lenerr:3520 diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a index d4fc21bda5..0b16a523f7 100644 --- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a @@ -1 +1 @@ -presig: 962 postsig:446 c: 0.9839 lenerr:1408 +presig: 3074 postsig:446 c: 0.9839 lenerr:3520 diff --git a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a index 0ad4911ff8..34921ed8b5 100644 --- a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a @@ -1 +1 @@ -presig: 962 postsig:822 c: 0.9911 lenerr:1784 +presig: 3074 postsig:822 c: 0.9911 lenerr:3896 diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a index ff5540b572..3bab086939 100644 --- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a @@ -1 +1 @@ -presig: 1924 postsig:1644 c: 0.9890 lenerr:3568 +presig: 6148 postsig:1644 c: 0.9890 lenerr:7792 diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a index f8214cfbdc..27341f54e2 100644 --- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a @@ -1 +1 @@ -presig: 1924 postsig:1644 c: 0.9909 lenerr:3568 +presig: 6148 postsig:1644 c: 0.9909 lenerr:7792 diff --git a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a index 4ee764e967..fb62ae0c36 100644 --- a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a +++ b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a @@ -1 +1 @@ -presig: -4 postsig:196 c: 0.9736 lenerr:192 +presig: 2332 postsig:196 c: 0.9736 lenerr:2528 diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a index cdc31c12ef..4a30beca9d 100644 --- a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a @@ -1 +1 @@ -presig: -8 postsig:392 c: 0.9777 lenerr:384 +presig: 4664 postsig:392 c: 0.9777 lenerr:5056 diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a index 74d549780d..22aed2aa03 100644 --- a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a @@ -1 +1 @@ -presig: 2 postsig:2590 c: 0.9934 lenerr:2592 +presig: 5618 postsig:2590 c: 0.9934 lenerr:8208 diff --git a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a index b5dcd9daeb..66ebd92730 100644 --- a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a +++ b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a @@ -1 +1 @@ -presig: 0 postsig:1336 c: 0.9973 lenerr:1336 +presig: 2336 postsig:1336 c: 0.9973 lenerr:3672 diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a index 42a87c08e3..a7d1d9f249 100644 --- a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a @@ -1 +1 @@ -presig: -2 postsig:2674 c: 0.9986 lenerr:2672 +presig: 4670 postsig:2674 c: 0.9986 lenerr:7344 diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a index 3fa2cdba2b..4da8519ee7 100644 --- a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a @@ -1 +1 @@ -presig: 2 postsig:782 c: 0.9980 lenerr:784 +presig: 5618 postsig:782 c: 0.9980 lenerr:6400