1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
Go to file
Aman Gupta 259dc4e013 libavcodec/videotoolbox: fix decoding of h264 streams with minor SPS changes
Previously the codec kept an entire copy of the SPS, and restarted the VT decoder
session whenever it changed. This fixed decoding errors in [1], as
described in 9519983c. On further inspection, that sample features an SPS change
from High/4.0 to High/3.2 while moving from one scene to another.

Yesterday I received [2], which contains minor SPS changes where the
profile and level do not change. These occur frequently and are not associated with
scene changes. After 9519983c, the VT decoder session is recreated unnecessarily when
these are encountered causing visual glitches.

This commit simplifies the state kept in the VTContext to include just the first three
bytes of the SPS, containing the profile and level details. This is populated initially
when the VT decoder session is created, and used to detect changes and force a restart.

This means minor SPS changes are fed directly into the existing decoder, whereas
profile/level changes force the decoder session to be recreated with the new parameters.

After this commit, both samples [1] and [2] playback as expected.

[1] https://s3.amazonaws.com/tmm1/videotoolbox/spschange.ts
[2] https://s3.amazonaws.com/tmm1/videotoolbox/spschange2.ts

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-20 10:23:43 -08:00
compat compat/cuda: Pass a logging context to load functions 2017-11-20 15:47:05 +00:00
doc avformat/hlsenc: creation of hls master playlist file 2017-11-20 10:04:34 +08:00
ffbuild Merge commit '17b6c7efb471e8ff1b8a7271f6531ba1d52bf69c' 2017-11-12 01:02:02 -03:00
fftools ffmpeg: add ui64 type to SpecifierOpt 2017-11-20 02:40:30 +01:00
libavcodec libavcodec/videotoolbox: fix decoding of h264 streams with minor SPS changes 2017-11-20 10:23:43 -08:00
libavdevice Merge commit 'b586903ae1b89e2d8b99c79f33cabe9b3ca03784' 2017-11-11 16:19:50 -03:00
libavfilter lavf/qsv_vpp: check the return value of ff_formats_ref() 2017-11-20 15:47:05 +00:00
libavformat lavf/mov: Do not mix variable declaration and code. 2017-11-20 13:48:28 +01:00
libavresample Merge commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5' 2017-10-21 14:57:53 -03:00
libavutil compat/cuda: Pass a logging context to load functions 2017-11-20 15:47:05 +00:00
libpostproc postproc: Drop deprecated qp typedef 2017-10-22 00:35:23 -03:00
libswresample lswr/rematrix: Support s32p. 2017-11-01 01:04:43 +01:00
libswscale Fix missing used attribute for inline assembly variables 2017-11-13 03:58:34 +01:00
presets presets: remove moldering iPod presets 2014-06-17 16:15:04 -08:00
tests Revert "tests/fate: addition of test case for hls variant stream creation with master playlist" 2017-11-21 00:22:25 +08:00
tools Merge commit 'f19fbfbdc637e08ad5c980807ede2d023f20c049' 2017-11-11 13:55:35 -03:00
.gitattributes fate: add SCC test 2017-01-27 17:06:42 +01:00
.gitignore build: add support for building .cu files via nvcc 2017-05-15 11:46:50 +02:00
.travis.yml Merge commit '4809781586d1c956005f72946a2aab5915eab350' 2017-10-28 15:08:31 -03:00
Changelog avcodec: Implement mpeg4 nvdec hwaccel 2017-11-20 07:21:41 -08:00
configure avcodec: Implement mpeg4 nvdec hwaccel 2017-11-20 07:21:41 -08:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md
LICENSE.md Merge commit '4fef648d10bf3bcfd4b8fa5755c1128966a2427c' 2017-03-15 22:07:47 +01:00
MAINTAINERS MAINTAINERS: add myself as videotoolbox* maintainer 2017-11-13 19:54:20 +01:00
Makefile Makefile: fix distclean target 2017-11-13 17:37:56 -03:00
README.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
RELEASE RELEASE: update for git after 3.4 branchpoint 2017-10-11 02:46:23 +02:00

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 and will be ignored.