Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Mark Thompson <sw@jkqxz.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 0/6] APV support
Date: Sat, 19 Apr 2025 20:06:58 +0100
Message-ID: <20250419190712.1265201-1-sw@jkqxz.net> (raw)

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".

             reply	other threads:[~2025-04-19 19:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-19 19:06 Mark Thompson [this message]
2025-04-19 19:06 ` [FFmpeg-devel] [PATCH 1/6] lavc: APV codec ID and descriptor Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 2/6] lavf: APV demuxer Mark Thompson
2025-04-20 16:07   ` Derek Buitenhuis
2025-04-20 16:20     ` James Almer
2025-04-20 16:57       ` Mark Thompson
2025-04-20 18:59         ` James Almer
2025-04-21  0:54   ` Michael Niedermayer
2025-04-21 14:59     ` Mark Thompson
2025-04-21 15:22       ` Andreas Rheinhardt
2025-04-21 21:30   ` Michael Niedermayer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 3/6] lavc/cbs: APV support Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 4/6] lavc: APV decoder Mark Thompson
2025-04-21 14:09   ` James Almer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 5/6] lavc/apv: AVX2 transquant for x86-64 Mark Thompson
2025-04-19 20:34   ` Mark Thompson
2025-04-19 21:16   ` James Almer
2025-04-20  1:48   ` James Almer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 6/6] lavc: APV metadata bitstream filter Mark Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250419190712.1265201-1-sw@jkqxz.net \
    --to=sw@jkqxz.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git