From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0739F445B1 for ; Fri, 16 Sep 2022 20:14:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4C1ED68BC43; Fri, 16 Sep 2022 23:14:49 +0300 (EEST) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B91D668BBE7 for ; Fri, 16 Sep 2022 23:14:42 +0300 (EEST) Received: by mail-ej1-f52.google.com with SMTP id dv25so51840082ejb.12 for ; Fri, 16 Sep 2022 13:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=iu3tuInJk7/L+Ns+WM3XnR2Ub+48WQjm2shv08czjuE=; b=Y5kkFU04E3zikIakH/VR5t/QppUS7T7uKkDrPM0BkfedXm5MHJOvJbvgO2Y4n8IpDD 0Fl3NDsjpdKTWaNCAHAvWum38f+bL5Hc/XAr/ydTy0zJOFKyowg1iTNRdL2SXSTvwEnN 6vOorG36cHLJa05D2SDwDsG6Di2bqyxm/qTfzRoY36Pfqtegl5AkAFXUALfbmMs2sInv 2y/kp4xKR6mPdEDNC/VEQ5qq2l2Cn+n3DdyEoG9aeBmX2LrnqpN1fpF1nAjAVXo2c/iZ T2vMITYLGxICJCpSrkmcPrI7GlAQh0QLxGbxcCMTQQJEy9jD16sfUQucUxZG4WRSaNRt DGWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=iu3tuInJk7/L+Ns+WM3XnR2Ub+48WQjm2shv08czjuE=; b=Uuhi/Lixsd9iFvJLNPkf21cwW8PoPUJS8NA3TDn8O5GocdIkgP2QO1gHGSyP+5Y8DD YOPckoDL5VcTD+MASL8x77WhAnbI9fq1JmnnHBDsOUpSMS9v9KdZE5qiSmarEo/HpQB+ wL86JY1CsxWKfLeY2tRFpGHSNcVvlislLg15D1U8eLKoM4ibXndfX0WA/AUNMSaek3JI 5Pr4tqXMWm3q3P9FFNwyaDtTzRp6FsowBqNFZpTKtsysTd6p7v1SkKe6FiZyWTvDaE2u YnQ9EjBZU/1iRrndLE7VUxriB/Wx2CdOr8dlG5Hq6o09MPvNFp6EZJMiyy7x+7S6V11C 0tXQ== X-Gm-Message-State: ACrzQf0j9RqXfPzXuWKPCI1TrIG2hGf58J1SQ4XIaS2sSLT6tLSG68XP CX0ibVUHefRYWia+td30yq9BOcSXs9lRTA== X-Google-Smtp-Source: AMsMyM6u5HY1XaYJojoQy22MHCl954VCxjBTG1TzwRGobxH/d/uXxuCFCTqr7iJKG14oP+wips8ruA== X-Received: by 2002:a17:907:2c75:b0:77c:2b6a:6b63 with SMTP id ib21-20020a1709072c7500b0077c2b6a6b63mr4892374ejc.702.1663359281874; Fri, 16 Sep 2022 13:14:41 -0700 (PDT) Received: from localhost.localdomain (92-64-99-37.biz.kpn.net. [92.64.99.37]) by smtp.googlemail.com with ESMTPSA id kw4-20020a170907770400b0073dcdf9b0bcsm11112433ejc.17.2022.09.16.13.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 13:14:41 -0700 (PDT) From: Martijn van Beurden To: ffmpeg-devel@ffmpeg.org Date: Fri, 16 Sep 2022 22:14:12 +0200 Message-Id: <20220916201415.2583646-1-mvanb1@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v6 0/3] 32bps FLAC patches 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: Martijn van Beurden Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Recently libFLAC gained the ability (first released in FLAC 1.4.0) to create FLAC files containing 32-bit int PCM samples. To keep complexity reasonable, the choice was made to limit residuals to 32-bit integers, which the encoder must make sure of. In case the encoder cannot find any predictor of which the residuals fit this limit, it must default to using a verbatim subframe. Tests have shown that this does not happen often (<0.1% of subframes on a music corpus of various styles). See also discussion here: https://github.com/ietf-wg-cellar/flac-specification/pull/148 These two patches implement decoding and encoding following this format. Changes since v1: fix copy-paste error in encoder, several invocations of lpc_encode_choose_datapath used wrong parameters, making FATE fail as compression was less than it should be Changes since v2: Rebased decoder part as it didn't apply anymore Changes since v3: Moved put_golomb part to flacenc.c (as it is now quite specific to FLAC) and renamed put_sbits64 to put_sbits63 (and changed assert accordingly) Changes since v4: Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits for 33bps subframe. Add fate test Changes since v5: Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced -strict -2 with -strict experimental in fate and encoder warning. Martijn van Beurden (3): libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM fate/flac: Add test of 32 bps encoding/decoding libavcodec/flac.c | 4 +- libavcodec/flacdec.c | 250 +++++++++++++++++-- libavcodec/flacenc.c | 518 ++++++++++++++++++++++++++++++++-------- libavcodec/get_bits.h | 12 + libavcodec/mathops.h | 9 + libavcodec/put_bits.h | 7 + libavcodec/put_golomb.h | 14 -- tests/fate/flac.mak | 4 + 8 files changed, 678 insertions(+), 140 deletions(-) -- 2.30.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".