1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
Go to file
Philip Langdale d20df2601f avcodec/nvenc: De-compensate aspect ratio compensation of DVD-like content.
For reasons we are not privy to, nvidia decided that the nvenc encoder
should apply aspect ratio compensation to 'DVD like' content, assuming that
the content is not bt.601 compliant, but needs to be bt.601 compliant. In
this context, that means that they make the following, questionable,
assumptions:

1) If the input dimensions are 720x480 or 720x576, assume the content has
an active area of 704x480 or 704x576.

2) Assume that whatever the input sample aspect ratio is, it does not account
for the difference between 'physical' and 'active' dimensions.

From, these assumptions, they then conclude that they can 'help', by adjusting
the sample aspect ratio by a factor of 45/44. And indeed, if you wanted to
display only the 704 wide active area with the same aspect ratio as the full
720 wide image - this would be the correct adjustment factor, but what if you
don't? And more importantly, what if you're used to ffmpeg not making this kind
of adjustment at encode time - because none of the other encoders do this!

And, what if you had already accounted for bt.601 and your input had the
correct attributes? Well, it's going to apply the compensation anyway!
So, if you take some content, and feed it through nvenc repeatedly, it
will keep scaling the aspect ratio every time, stretching your video out
more and more and more.

So, clearly, regardless of whether you want to apply bt.601 aspect ratio
adjustments or not, this is not the way to do it. With any other ffmpeg
encoder, you would do it as part of defining your input paramters or
do the adjustment at playback time, and there's no reason by nvenc
should be any different.

This change adds some logic to undo the compensation that nvenc would
otherwise do.

nvidia engineers have told us that they will work to make this
compensation mechanism optional in a future release of the nvenc
SDK. At that point, we can adapt accordingly.

Signed-off-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-05 02:32:33 +01:00
compat
doc doc/muxers/image2: remove the non-negative number requirement for start_number 2015-02-04 13:17:30 +01:00
libavcodec avcodec/nvenc: De-compensate aspect ratio compensation of DVD-like content. 2015-02-05 02:32:33 +01:00
libavdevice lavd/libcdio: add more paranoia mode constants 2015-01-31 11:32:05 +01:00
libavfilter avfilter/vf_fps: Do not drop a random subset of frames 2015-02-04 18:52:14 +01:00
libavformat avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior 2015-02-04 14:55:42 +01:00
libavresample
libavutil x86: lavu/x264asm: fix ymm register instantiation 2015-02-04 00:18:29 +01:00
libpostproc
libswresample swresample: Use int instead of enum for fields which are accessed through AVOptions as int 2015-02-02 23:27:26 +01:00
libswscale swscale/utils: Limit filter shifting so as not to read from prior the array 2015-02-05 00:33:50 +01:00
presets
tests tests/utils: Remove unneeded L suffix 2015-02-01 22:38:11 +01:00
tools
.gitattributes
.gitignore Merge commit '11e05533170485b593974cf90916425a0188e7bd' 2015-02-02 21:16:15 +01:00
arch.mak
Changelog remove libmpcodecs 2015-01-31 12:01:54 +00:00
cmdutils_common_opts.h
cmdutils_opencl.c
cmdutils.c stop embedding the build date 2015-02-02 05:04:14 +01:00
cmdutils.h
common.mak
configure Merge commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e' 2015-02-04 13:49:17 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_dxva2.c
ffmpeg_filter.c
ffmpeg_opt.c ffmpeg: Make CFR frame drop threshold user adjustable 2015-02-04 02:40:41 +01:00
ffmpeg_vda.c
ffmpeg_vdpau.c
ffmpeg.c ffmpeg: Make CFR frame drop threshold user adjustable 2015-02-04 02:40:41 +01:00
ffmpeg.h ffmpeg: Make CFR frame drop threshold user adjustable 2015-02-04 02:40:41 +01:00
ffplay.c ffplay: Fallback to dts if pts is unavailable in pkt_in_play_range calculation 2015-02-02 02:50:33 +01:00
ffprobe.c stop embedding the build date 2015-02-02 05:04:14 +01:00
ffserver_config.c
ffserver_config.h
ffserver.c
INSTALL.md
library.mak
LICENSE.md remove libmpcodecs 2015-01-31 12:01:54 +00:00
MAINTAINERS
Makefile
README.md
RELEASE
RELEASE_NOTES
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 analisys 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.