From patchwork Mon Nov 2 09:37:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 23323 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 AC3D2449970 for ; Mon, 2 Nov 2020 11:38:10 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7E3C668810D; Mon, 2 Nov 2020 11:38:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-40136.protonmail.ch (mail-40136.protonmail.ch [185.70.40.136]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1CC9F68810D for ; Mon, 2 Nov 2020 11:38:03 +0200 (EET) Date: Mon, 02 Nov 2020 09:37:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=protonmail2; t=1604309882; bh=FnowOuyoopRXl5pgwHrGgV6SxhHfAG1x8gaOqw+mKA8=; h=Date:To:From:Cc:Reply-To:Subject:From; b=VLMLeTlTD8kbwA+PFRQs0MDLsmKPHfkjfl+EajwenTRUusOaOsjlGBDZDBz0G1t0l ZalrmclZqAbLFJzTp9qOW2EXLhxalIRPfJiipC6M+cAauepBwFdXQ7bPsBRCBB2Fw0 3TLcm35WCzpy6vY5Jf3s6Vono2/J3XH/8bTQravBjswCK013RPtsuDvGtROxFGowe8 x8XRujBsbRJTwQEg/j0ylhcSXbd2VSOSBpE5gcWKSA6+UC8gLCWzHc3U0V9jYacaKO TvOygyU50WzMr3DP7Pxv/5gHrx4hLKK/l3fqPSPs1lpt43M7ODD6CirR3vicbZrKdT Bx9qDSF7it7dw== To: ffmpeg-devel@ffmpeg.org From: Zane van Iperen Message-ID: <20201102093738.12430-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Subject: [FFmpeg-devel] [PATCH 0/5] AMV muxing and adpcm_ima_amv encoding support 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: Zane van Iperen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Adds support for encoding to adpcm_ima_amv and muxing to AMV. Things to note: - AMV is a hard-coded (and broken) subset of AVI. It's not worth sullying the existing AVI muxer with its filth. - The muxer is extremely pedantic about its streams, this is to not break certain software players. - The sizes of certain tags are deliberately set to 0 as some players break when they're set correctly. Ditto with some header fields. - Players can be **very** sensitive to the frame order and sizes. - Frames must be strictly interleaved as V-A, any V-V or A-A will cause crashes. - Variable audio frame sizes cause crashes. - If audio is shorter than video, it's padded with silence. - If video is shorter than audio, the most recent frame is repeated. Zane van Iperen (5): avcodec/adpcm_ima_amv: restrict to 1 channel avcodec/adpcm_ima_amv: handle odd sample counts avcodec/adpcm_ima_amv: document header format avcodec: add adpcm_ima_amv encoder avformat: add amv muxer MAINTAINERS | 1 + doc/general_contents.texi | 2 +- libavcodec/adpcm.c | 40 +++- libavcodec/adpcmenc.c | 58 ++++- libavcodec/allcodecs.c | 1 + libavcodec/utils.c | 3 +- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/amvenc.c | 408 +++++++++++++++++++++++++++++++++++ tests/ref/fate/adpcm-ima-amv | 312 +++++++++++++-------------- 10 files changed, 666 insertions(+), 161 deletions(-) create mode 100644 libavformat/amvenc.c