FFmpeg git repo
Go to file
Devin Heitmueller b2c82b23b9 avcodec/bitpacked_dec: optimize bitpacked_decode_yuv422p10
Rework the code a bit to speed up the 10-bit bitpacked decoding
routine.  This is probably about as fast as I can get it without
switching to assembly language.

Demonstratable with:

./ffmpeg -f lavfi -i "smptehdbars=size=3840x2160" -c bitpacked -f image2 -frames:v 1 source.yuv
./ffmpeg -f bitpacked -pix_fmt yuv422p10le -s 3840x2160 -c:v bitpacked -i source.yuv -pix_fmt yuv422p10le out.yuv

On my development system, it went from 80ms for a 2160p frame
down to 20ms (i.e. a 4X speedup).  Good enough for now, I hope...

Comments from Marton:

Originally on my system better performance could be achieved by simply
switching to the cached bitstream reader, but for Devin it was slower than
his direct byte operations.

I changed the order of writing output from u/y/v/y to u/v/y/y, and that made
the code faster than the cached bitstream reader on my system as well.

TIMER measurement of the decode loop on Ryzen 5 3600 with command line:

./ffmpeg -stream_loop 256 -threads 1 -f bitpacked -pix_fmt yuv422p10le -s 3840x2160 -c:v bitpacked -i source.yuv -pix_fmt yuv422p10le -f null none -loglevel error

Before: 823204127 decicycles in YUV,     256 runs,      0 skips
After:  315070524 decicycles in YUV,     256 runs,      0 skips

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-12-28 23:56:14 +01:00
compat configure: Set WIN32_LEAN_AND_MEAN at configure time 2023-08-14 22:57:28 +03:00
doc avfilter/vf_showinfo: add udu_sei_as_ascii option 2023-12-28 21:22:54 +08:00
ffbuild riscv: test for assembler support 2023-12-08 17:21:09 +02:00
fftools all: Don't set AVClass.item_name to its default value 2023-12-22 15:12:33 +01:00
libavcodec avcodec/bitpacked_dec: optimize bitpacked_decode_yuv422p10 2023-12-28 23:56:14 +01:00
libavdevice all: Don't set AVClass.item_name to its default value 2023-12-22 15:12:33 +01:00
libavfilter avfilter/vf_showinfo: add udu_sei_as_ascii option 2023-12-28 21:22:54 +08:00
libavformat avformat/riffenc: don't force WAVEFORMATEXTENSIBLE for flt/dbl LPCM 2023-12-28 11:11:33 +05:30
libavutil all: Don't set AVClass.item_name to its default value 2023-12-22 15:12:33 +01:00
libpostproc Bump versions after 6.1 2023-10-29 16:19:14 +01:00
libswresample swr/swresample: avoid reapplication of firstpts 2023-12-18 15:47:04 +05:30
libswscale riscv: test for assembler support 2023-12-08 17:21:09 +02:00
presets
tests tests/dca: remove usage of deprecated request_channel_layout option 2023-12-28 15:31:50 -03:00
tools tools/target_dec_fuzzer: Adjust threshold for VMIX 2023-12-14 23:34:46 +01:00
.gitattributes
.gitignore
.mailmap mailmap: remap my email accounts 2023-11-03 20:57:49 +08:00
.travis.yml
Changelog Add new vf_tiltandshift filter 2023-12-21 17:16:16 -05:00
configure configure: Enable section_data_rel_ro for FreeBSD and NetBSD aarch64 / arm 2023-12-25 23:52:37 +01:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS Use https for repository links 2023-03-01 21:59:10 +01:00
INSTALL.md
LICENSE.md
MAINTAINERS Remove myself from maintainers. 2023-12-23 23:15:55 +11:00
Makefile configure: Add a --disable-version-tracking option 2023-12-21 11:00:34 +02:00
README.md
RELEASE

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides means to alter decoded audio and video through a directed graph of connected filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.