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 40A1543E5D for ; Thu, 15 Sep 2022 16:22:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A6CA968BB78; Thu, 15 Sep 2022 19:22:04 +0300 (EEST) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF16E68B8EC for ; Thu, 15 Sep 2022 19:21:56 +0300 (EEST) Received: by mail-ej1-f45.google.com with SMTP id a26so14607469ejc.4 for ; Thu, 15 Sep 2022 09:21:56 -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=g4jA688uE/84wqFgvC5zIIxxyny6X2pGwmi3afLIdcw=; b=niybkSd0ibzRFjt46EXsL8i2PuftcQj648molQU7t1fBx9CVQUhlYNSrE4MwFGvNer z5pVR23eJW0L2465Iuc1c99UnBHOr/mKUears+K14fAHY2CrnC+sYN5JNLK1k9aN3OKn XNMWjwwQVyBMOVYLOrmw8XrcqHhq70JrTFynUdUSqOeE7vnGV71JRuVnQM3TpDJlwUnz yTZMhebR1mH1vX8/HBmp402BybsZQPy9U1irwZNDOrgRSi2/g0ZlYrSjYQB+pbBNVBRv ak44Qg6jJ3wNwXQ4qGit9I+sLc7nlVwzSOo5FxbU0obOC40HEtg1tbCfi1nNVYOK6qno lCkA== 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=g4jA688uE/84wqFgvC5zIIxxyny6X2pGwmi3afLIdcw=; b=Fz7w7bEG6U6QWnlSXRF5vwV1eyu7jL4c3x8fwL3tbP7d5/hv3oXzG0YXS/w0Ju02OA tm1H7qkgwIMzvxMJXmLXL6Yf7aoVDcl9T98IjhwXIjqWV8o9Yqm0xzYb1MoxEoLtcCf8 H3zGaStX7JnRjtw04Z9WwrECddsH4ouCZLElAtSqixyHRdv45XLBPcKqpY0FDg8WeK1s gBn2d89JFo70ze+g3YN8kJcYGn/lDDR+1A4RvnYMOV60iSlpV7GwfhzYY0YYOLxq+CQ5 n4jAssrL4bGOynVaAYlx4IdNQbWDweEnTa55BqHGHNV/Fc6xakcUKidOM9T7lFUjQlin LgjQ== X-Gm-Message-State: ACrzQf0F0zqONQOCogq67SB4jKZyx9D6E3nPjR5HBKhpw/06whOn4Jia gVrbOA4R0Kxhhac/WLSrKOYiIafg19uHWA== X-Google-Smtp-Source: AMsMyM7C80UpMkUy+1O7mXIklgBhTCSwaNau62BL86da2kx20ECSl8VQpp5VAik/qwZS7c+m/Q06kQ== X-Received: by 2002:a17:907:9620:b0:77d:4f86:2e66 with SMTP id gb32-20020a170907962000b0077d4f862e66mr482022ejc.751.1663258915029; Thu, 15 Sep 2022 09:21:55 -0700 (PDT) Received: from localhost.localdomain (92-64-99-37.biz.kpn.net. [92.64.99.37]) by smtp.googlemail.com with ESMTPSA id g11-20020a170906538b00b0073ddd36ba8csm9411542ejo.145.2022.09.15.09.21.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Sep 2022 09:21:54 -0700 (PDT) From: Martijn van Beurden To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Sep 2022 18:21:42 +0200 Message-Id: <20220915162145.2284957-1-mvanb1@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 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 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 | 519 ++++++++++++++++++++++++++++++++-------- libavcodec/get_bits.h | 12 + libavcodec/mathops.h | 9 + libavcodec/put_bits.h | 7 + libavcodec/put_golomb.h | 14 -- tests/fate/flac.mak | 9 + 8 files changed, 684 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".