From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 228774D744 for <ffmpegdev@gitmailbox.com>; Sat, 19 Apr 2025 19:07:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E1A92687CAD; Sat, 19 Apr 2025 22:07:23 +0300 (EEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A1AE7687CAD for <ffmpeg-devel@ffmpeg.org>; Sat, 19 Apr 2025 22:07:17 +0300 (EEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-43ce71582e9so22357205e9.1 for <ffmpeg-devel@ffmpeg.org>; Sat, 19 Apr 2025 12:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1745089637; x=1745694437; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=KFnXgTMLiwTTlTFS9FrQqEPpMuGYzerkUcP8DcdxfiU=; b=3ZrR6kPB/VFzxIGi9qKhdv5zV5GeMTEPZnXC0iSZinkLy1BvdUXeFriJ4nF7Lb6+k9 FQYSjohP7bv3pnLXtopN45/akGVgKlzkfCnyGfR7/LpwCfOsrJ/J5ra+KLL/f8uJeum0 MR1BWybgPcNC/XGTghkMafA3fkCaP/tWYy5cTwb7K2gpFDv3VUp1bdl+PwQqWQ8bxxxs J7jW/fhw4gtEWB7wZbeojczptEbJ0AxggCd+TSa1i55U1JIwyqpf8SpjfTS9P7qP8VE5 SH3uPEWi6wLfnw5UNIcrIEUcHKiI9Z4ee1mpKbk3+VzGo/iEXVzWGM8KDHgKSr0Zxsvj 4LXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745089637; x=1745694437; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KFnXgTMLiwTTlTFS9FrQqEPpMuGYzerkUcP8DcdxfiU=; b=BnIH858a9nAMjDQ/fSIqFZzvr6EBkQyUKjXIZKsa9Y1dkiBll08VHj5ML/o7XYNeX2 X0DSireob0LyCTHiZ1fyOPR8eSt1MM+FLZ6l6MxR9zusInqMHdHPGh05olafYZmqgh1n whdBDgpC9asdL+1Ink6BNG7dEgN4oZZnrYbyUWdjnEDqACu59xtE1gHalJmFJY0dHXM/ 6nT1xsCK4nwd/gbv/mZ3RYTrwAGRWLyaCAll78y4yo7zPMtX0GDIHEJeTe9/GlgqGSBY tsKgOhhKiuMtJMWxLzoqACRsYP+lHMCnuM4KdNVLx5T798Q4OUI87SypejpY9OQAA2n6 L8cA== X-Gm-Message-State: AOJu0Yx/ScphxmUwTFo30PUCkmu38om9Ggbard/JexuztqnzhtLfc3QY 7H52BakimSVTKQvaRxEheDaNKNO5/TyD+4gnlANFJ1kjUNIuvXKERaQATz7JDwT3AiRpJF3w1bv R X-Gm-Gg: ASbGncurLbUmuQTDkV6SKw66VMCanCCLKPWE1oSezl+8/RFTJqdTcSSnrrYznXCk0+i ec3D3v9lt5tckxhhBhEUdAoED27SitefB5dE/biGjdaxXescHVH2hiXd9mdGrJH2bXB2AngGXAU 4+FX9XuXLqX7JiYD0sdOJEvhdLMjxfRA5XHOw/zD28Oq8Bm87PaWGHqlhLEr4yJWP60uf1BQ0gJ colu2Ju6btRGnCBaJp+jOKQ9A7ly3ccmqAFt/44YrWQFtzdgfvHhL6QS/RzWfcVPyhieJpONipS WY7TgPDQAGFSjozbrLnO3rwHPK2LRNYhT3Z+QUqg25LXEntJGxf9ooUvkzQzmxh8sBuBzv+GTge HAZNuxm3h+gn9EhY3HyFRL2E= X-Google-Smtp-Source: AGHT+IHgjo+D/wLOQfT+lOGushvuOOzfRABqcfNdBPUUSDIuDKDwdmhtbyaSFGhopUpjslDAmylN1Q== X-Received: by 2002:a05:600c:54c2:b0:43d:77c5:9c1a with SMTP id 5b1f17b1804b1-4406b928b57mr44679465e9.4.1745089636617; Sat, 19 Apr 2025 12:07:16 -0700 (PDT) Received: from localhost.localdomain (cpc92320-cmbg19-2-0-cust719.5-4.cable.virginm.net. [82.13.66.208]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39efa420821sm6792519f8f.14.2025.04.19.12.07.15 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Apr 2025 12:07:16 -0700 (PDT) From: Mark Thompson <sw@jkqxz.net> To: ffmpeg-devel@ffmpeg.org Date: Sat, 19 Apr 2025 20:06:58 +0100 Message-ID: <20250419190712.1265201-1-sw@jkqxz.net> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/6] APV support X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250419190712.1265201-1-sw@jkqxz.net/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> Hi all, This set implements some support for APV. APV is "Advanced Professional Video", yet another JPEG knockoff codec being promoted by Samsung for professional applications. It seems to have some adoption for Android devices, though it's unclear to what degree that will succeed. Spec: <https://www.ietf.org/archive/id/draft-lim-apv-03.html> Reference codec: <https://github.com/AcademySoftwareFoundation/openapv> Included is: * Demuxer for flat files as defined in the spec. * CBS support for read/write, including all of the metadata. * Decoder. * AVX2 asm for the decoder to make it faster on all recent x86-64 devices. * Metadata filer, since that comes pretty much for free with the CBS support. This decoder is slightly faster than the reference decoder for single-thread and much faster for many-thread (mostly because of frame threading support). Test coverage on this is all rather spotty: the decoder is bit-exact with the reference decoder output and I've tried to test the components standalone, but lack of a good suite of test inputs means there is probably something missing. Further things which I am currently thinking about: * Encoder - bad encoder is trivial, but I'd like to do better than that. * Better AVX asm - the transform has useful substructure which I am currently ignoring in favour of a brute force matrix multiply, there is probably some gain to be had there. * Transformation BSF - the format allows some lossless transformations like rotate which would make a cute BSF. Other things which I am not currently doing which other people may be interested in: * Non-AVX asm. SSE is possible but will be bitten by lack of registers given all the 8-wide 32-bit intermediates. Haven't thought at all about non-x86. * ISOBMFF: <https://github.com/AcademySoftwareFoundation/openapv/blob/main/readme/apv_isobmff.md>. * MKV/WebM is presumably going to be a thing since this seems to be adopted by Android things? * RTP if you really want it <https://www.ietf.org/archive/id/draft-lim-rtp-apv-01.html>. Thanks, - Mark Mark Thompson (6): lavc: APV codec ID and descriptor lavf: APV demuxer lavc/cbs: APV support lavc: APV decoder lavc/apv: AVX2 transquant for x86-64 lavc: APV metadata bitstream filter configure | 2 + libavcodec/Makefile | 2 + libavcodec/allcodecs.c | 1 + libavcodec/apv.h | 86 ++++ libavcodec/apv_decode.c | 327 +++++++++++++++ libavcodec/apv_decode.h | 80 ++++ libavcodec/apv_dsp.c | 140 +++++++ libavcodec/apv_dsp.h | 39 ++ libavcodec/apv_entropy.c | 200 +++++++++ libavcodec/bitstream_filters.c | 1 + libavcodec/bsf/Makefile | 1 + libavcodec/bsf/apv_metadata.c | 134 ++++++ libavcodec/cbs.c | 6 + libavcodec/cbs_apv.c | 395 ++++++++++++++++++ libavcodec/cbs_apv.h | 209 ++++++++++ libavcodec/cbs_apv_syntax_template.c | 598 +++++++++++++++++++++++++++ libavcodec/cbs_internal.h | 4 + libavcodec/codec_desc.c | 7 + libavcodec/codec_id.h | 1 + libavcodec/x86/Makefile | 2 + libavcodec/x86/apv_dsp.asm | 243 +++++++++++ libavcodec/x86/apv_dsp_init.c | 41 ++ libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apvdec.c | 245 +++++++++++ libavformat/cbs.h | 1 + tests/checkasm/Makefile | 1 + tests/checkasm/apv_dsp.c | 113 +++++ tests/checkasm/checkasm.c | 3 + tests/checkasm/checkasm.h | 1 + 30 files changed, 2885 insertions(+) create mode 100644 libavcodec/apv.h create mode 100644 libavcodec/apv_decode.c create mode 100644 libavcodec/apv_decode.h create mode 100644 libavcodec/apv_dsp.c create mode 100644 libavcodec/apv_dsp.h create mode 100644 libavcodec/apv_entropy.c create mode 100644 libavcodec/bsf/apv_metadata.c create mode 100644 libavcodec/cbs_apv.c create mode 100644 libavcodec/cbs_apv.h create mode 100644 libavcodec/cbs_apv_syntax_template.c create mode 100644 libavcodec/x86/apv_dsp.asm create mode 100644 libavcodec/x86/apv_dsp_init.c create mode 100644 libavformat/apvdec.c create mode 100644 tests/checkasm/apv_dsp.c -- 2.47.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".