Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/6] APV support
@ 2025-04-19 19:06 Mark Thompson
  2025-04-19 19:06 ` [FFmpeg-devel] [PATCH 1/6] lavc: APV codec ID and descriptor Mark Thompson
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Mark Thompson @ 2025-04-19 19:06 UTC (permalink / raw)
  To: ffmpeg-devel

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-04-21 21:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-19 19:06 [FFmpeg-devel] [PATCH 0/6] APV support Mark Thompson
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

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