From patchwork Tue Sep 1 22:57:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liushuyu@aosc.io X-Patchwork-Id: 22056 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id B2A1444AD58 for ; Wed, 2 Sep 2020 01:57:59 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8CEAA68A5A8; Wed, 2 Sep 2020 01:57:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay2.mymailcheap.com (relay2.mymailcheap.com [217.182.113.132]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C6B996802C0 for ; Wed, 2 Sep 2020 01:57:52 +0300 (EEST) Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay2.mymailcheap.com (Postfix) with ESMTPS id 03B843EDFC for ; Wed, 2 Sep 2020 00:57:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 4A1962A3BE for ; Tue, 1 Sep 2020 18:57:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1599001071; bh=l0czEZMF4r+3nCBF3Z07+T5eUVKUjkgFJsSwbghbTEY=; h=From:To:Cc:Subject:Date:From; b=uLEZKa7FQw8Dli8n5nCKKh2n0PUpdeMSIl/nRDqVnuKOQOI0upXDnw53PS0umI9E/ bT0QY6N9cMAkm5cISP9igURzbYngWddu+82vqjbtFoRfsTmv4Ny6RCYkw1oQipTyDb xpAZSt1AFgCw7ZTDlwIZQLpxz0vriSFXt9uCQOEI= X-Virus-Scanned: Debian amavisd-new at filter1.mymailcheap.com Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9D2rCDjl6OEQ for ; Tue, 1 Sep 2020 18:57:50 -0400 (EDT) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS for ; Tue, 1 Sep 2020 18:57:49 -0400 (EDT) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 787FE41081; Tue, 1 Sep 2020 22:57:47 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=aosc.io header.i=@aosc.io header.b="Zk8uTTb2"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from liushuyu.lan (d50-99-10-89.abhsia.telus.net [50.99.10.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id B382A41081; Tue, 1 Sep 2020 22:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default; t=1599001060; bh=l0czEZMF4r+3nCBF3Z07+T5eUVKUjkgFJsSwbghbTEY=; h=From:To:Cc:Subject:Date:From; b=Zk8uTTb24JbJz0KMA4NAboguwv7zDFuhJCras8asV8fMn/HI67ZkFOQ1BAF5Qog1T UJdTL1Pz2S4klvPap5JcVJu3q9DOh5RHQidrYD+8SzOAIpo6BrBwinnrG6RgP811MY wlLZDBqMlJiysit9uHOHXMI2KIaHlsq9lLdoU7yQ= From: liushuyu@aosc.io To: ffmpeg-devel@ffmpeg.org Date: Tue, 1 Sep 2020 16:57:00 -0600 Message-Id: <20200901225701.453905-1-liushuyu@aosc.io> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 787FE41081 X-Spamd-Result: default: False [4.90 / 20.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[aosc.io:s=default]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[aosc.io]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[aosc.io:+]; RCPT_COUNT_TWO(0.00)[2]; FROM_NO_DN(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Server: mail20.mymailcheap.com Subject: [FFmpeg-devel] [PATCH 0/1] avformat: add mca demuxer 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 Cc: Zixing Liu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Zixing Liu This patch adds the MCA demuxer to FFmpeg. MCA is a format used by Capcom in some of their games, the audio format is always ADPCM_THP_LE in these files. This MCA demuxer implementation currently supports MCA version 1-5 and can partially handle some of the version 5 files with minor damages to the file header. There are some sample files I have prepared that you can try: * (version 4) https://streams.videolan.org/ffmpeg/incoming/bgm18_1632b.mca * (version 5) https://streams.videolan.org/ffmpeg/incoming/bgm020_1632.mca N.B. Files using version 1 to 3 are harder to find, I don't seem to find any to test. As required by https://ffmpeg.org/developer.html#New-codecs-or-formats-checklist, the minor version of libavformat is updated to 52. Zixing Liu (1): avformat: add mca demuxer Changelog | 1 + doc/general.texi | 2 + libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/mca.c | 228 +++++++++++++++++++++++++++++++++++++++ libavformat/version.h | 4 +- 6 files changed, 235 insertions(+), 2 deletions(-) create mode 100644 libavformat/mca.c