1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Go to file
Rostislav Pehlivanov ec9e87c922 avcodec: add a native SMPTE VC-2 HQ encoder
This commit adds a new encoder capable of creating BBC/SMPTE Dirac/VC-2 HQ
profile files.

Dirac is a wavelet based codec created by the BBC a little more than 10
years ago. Since then, wavelets have mostly gone out of style as they
did not provide adequate encoding gains at lower bitrates. Dirac was a
fully featured video codec equipped with perceptual masking, support for
most popular pixel formats, interlacing, overlapped-block motion
compensation, and other features. It found new life after being stripped
of various features and standardized as the VC-2 codec by the SMPTE with
an extra profile, the HQ profile that this encoder supports, added.

The HQ profile was based off of the Low-Delay profile previously
existing in Dirac. The profile forbids DC prediction and arithmetic
coding to focus on high performance and low delay at higher bitrates.
The standard bitrates for this profile vary but generally 1:4
compression is expected (~525 Mbps vs the 2200 Mbps for uncompressed
1080p50). The codec only supports I-frames, hence the high bitrates.

The structure of this encoder is simple: do a DWT transform on the
entire image, split it into multiple slices (specified by the user) and
encode them in parallel. All of the slices are of the same size, making
rate control and threading very trivial. Although only in C, this encoder
is capable of 30 frames per second on an 4 core 8 threads Ivy Bridge.
A lookup table is used to encode most of the coefficients.

No code was used from the GSoC encoder from 2007 except for the 2
transform functions in diracenc_transforms.c. All other code was written
from scratch.

This encoder outperforms any other encoders in quality, usability and in
features. Other existing implementations do not support 4 level
transforms or 64x64 blocks (slices), which greatly increase compression.

As previously said, the codec is meant for broadcasting, hence support
for non-broadcasting image widths, heights, bit depths, aspect ratios,
etc. are limited by the "level". Although this codec supports a few
chroma subsamplings (420, 422, 444), signalling those is generally
outside the specifications of the level used (3) and the reference
decoder will outright refuse to read any image with such a flag
signalled (it only supports 1920x1080 yuv422p10). However, most
implementations will happily read files with alternate dimensions,
framerates and formats signalled.

Therefore, in order to encode files other than 1080p50 yuv422p10le, you
need to provide an "-strict -2" argument to the command line. The FFmpeg
decoder will happily read any files made with non-standard parameters,
dimensions and subsamplings, and so will other implementations. IMO this
should be "-strict -1", but I'll leave that up for discussion.

There are still plenty of stuff to implement, for instance 5 more
wavelet transforms are still in the specs and supported by the decoder.

The encoder can be lossless, given a high enough bitrate.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-10 17:15:59 +00:00
compat all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
doc Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610' 2016-02-10 14:42:41 +00:00
libavcodec avcodec: add a native SMPTE VC-2 HQ encoder 2016-02-10 17:15:59 +00:00
libavdevice x11grab: fixed next frame capture time calculation 2016-02-05 01:11:17 +01:00
libavfilter avfilter/f_metadata: fix few logic errors 2016-02-10 11:47:52 +01:00
libavformat avformat/segment: Fix header_filename handling 2016-02-10 17:59:58 +01:00
libavresample
libavutil x86/cpu: set avxslow cpuflag on btver2 CPUs 2016-02-07 16:39:21 -03:00
libpostproc all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
libswresample all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
libswscale sws/output: fix ordered dither threshold for mono output 2016-02-10 17:22:26 +01:00
presets
tests sws/output: fix ordered dither threshold for mono output 2016-02-10 17:22:26 +01:00
tools
.gitattributes
.gitignore build: use a link instead of changing current directory when compiling 2016-01-25 20:43:34 +01:00
.travis.yml
arch.mak
Changelog avfilter: add metadata filters 2016-02-10 09:55:39 +01:00
cmdutils_common_opts.h
cmdutils_opencl.c
cmdutils.c cmdutils: realign for some additional filters with very long name 2016-02-06 12:48:51 +01:00
cmdutils.h
common.mak build: use a link instead of changing current directory when compiling 2016-01-25 20:43:34 +01:00
configure configure: Enable GCC vectorization on ≥4.9 on x86 2016-02-08 16:25:44 -08:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_dxva2.c
ffmpeg_filter.c ffmpeg_filter: Factor get_compliance_unofficial_pix_fmts() out 2016-02-10 13:28:23 +01:00
ffmpeg_opt.c ffmpeg_opt: Fix memleaks in "manually set programs" loop 2016-02-08 15:57:24 +01:00
ffmpeg_qsv.c
ffmpeg_vdpau.c
ffmpeg_videotoolbox.c
ffmpeg.c ffmpeg: replace "flush Media" with "flush_media" in benchmark_all output 2016-01-29 10:58:18 +01:00
ffmpeg.h
ffplay.c
ffprobe.c ffprobe: Deprecate stream timecode field and add frame side data timecode field 2016-02-01 18:19:30 +00:00
ffserver_config.c
ffserver_config.h
ffserver.c
INSTALL.md
library.mak build: use a link instead of changing current directory when compiling 2016-01-25 20:43:34 +01:00
LICENSE.md avcodec: Remove libaacplus 2016-01-29 17:14:37 -08:00
MAINTAINERS
Makefile build: use intermediate lcov coverage file 2016-02-06 15:42:09 +01:00
README.md
RELEASE
version.sh

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 a mean to alter decoded Audio and Video through chain of 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.
  • ffserver is a multimedia streaming server for live broadcasts.
  • 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. Few developers follow pull requests so they will likely be ignored.