summaryrefslogtreecommitdiff
path: root/libavcodec/pgssubdec.c
Commit message (Collapse)AuthorAge
* Add option forced_subs_only for Bluray subtitles.Carl Eugen Hoyos2012-01-30
|
* Improve support for PGS subtitles.David Mitchell2012-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation assumed that a new picture would always supersede the previous picture. Similarly, presentation segments were assumed to pertain to the most-recently-read picture. However, each presentation segment may refer to 0 or more pictures by their ID. Picture IDs may repeat, and a repeated picture ID indicates that the old picture for that ID is no longer needed and may be discarded. The new implementation allocates a buffer with one slot for each possible picture ID (the picture ID is a 16-bit field) and properly decodes presentation segments so that all relevant pictures are output upon encountering a display segment. Given that most PGS streams are unlikely to use more than a small fraction of the available picture IDs, it would probably be better to use a more memory-efficient data structure. I'm lazy though, so I leave this to a more motivated individual. I've tested the code with MKV files in VLC (a recent revision from their git repo) and with HandBrake (a version that I hacked up to use ffmpeg's PGS subtitle decoder). Review-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata. H.264: tweak some other x86 asm for Atom probe: Fix insane flow control. mpegts: remove invalid error check s302m: use nondeprecated audio sample format API lavc: use designated initialisers for all codecs. x86: cabac: add operand size suffixes missing from 6c32576 Conflicts: libavcodec/ac3enc_float.c libavcodec/flacenc.c libavcodec/frwu.c libavcodec/pictordec.c libavcodec/qtrleenc.c libavcodec/v210enc.c libavcodec/wmv2dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use designated initialisers for all codecs.Anton Khirnov2011-07-29
| | | | | | | | It's more readable and less prone to breakage.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cosmetics: fix some then/than typos doxygen: Include libavcodec and libavformat examples into the documentation avutil: elaborate documentation for av_get_random_seed Add support for aac streams in mp4/mov without extradata. aes: whitespace cosmetics adler32: whitespace cosmetics swscale: fix another yuv range conversion overflow in 16bit scaling. Fix cpu flags test program opt-test: Add missing braces to silence compiler warnings. build: Eliminate obsolete test targets. udp: Fix a compilation warning swscale: Unbreak build with --enable-small base64: add fate test aes: improve test program and add fate test adler32: make test program more useful and add fate test swscale: fix yuv range correction when using 16-bit scaling. aacenc: Make chan_map const correct Conflicts: Makefile doc/examples/muxing-example.c libavformat/udp.c libavutil/random_seed.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: fix some then/than typosDiego Biurrun2011-06-30
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (28 commits) Remove some non-compiling debug messages. ffplay: Fix non-compiling debug printf and replace it by av_dlog. H264: x86 predict init cosmetics. ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder. Move E-AC-3 encoder functions to a separate eac3enc.c file. ac3enc: remove convenience macro, #define DEBUG ac3enc: remove unused #define vc1: re-initialize tables after width/height change. APIchanges: fill-in git commit hash for av_get_bytes_per_sample() addition samplefmt: add av_get_bytes_per_sample() iirfilter: fix biquad filter coefficients. swscale: remove duplicate conversion routine in swScale(). swscale: add yuv2planar/packed function typedefs. swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers. swscale: reindent x86 init code. swscale: extract SWS_FULL_CHR_H_INT conditional into init code. swscale: cosmetics. swscale: remove alp/chr/lumSrcOffset. swscale: un-special-case yuv2yuvX16_c(). shorten: Remove stray DEBUG #define and corresponding av_dlog statement. ... Conflicts: doc/APIchanges libavcodec/ac3enc.c libavutil/avutil.h libavutil/samplefmt.c libswscale/swscale.c libswscale/swscale_internal.h libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace some av_log/printf + #ifdef combinations by av_dlog.Diego Biurrun2011-06-07
| |
| * pgssubdec: fix incorrect colors.Alexandre Colucci2011-05-24
| | | | | | | | | | | | | | | | | | On Blu-ray colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications: see System Description Blu-ray Disc Read-Only Format, 9.14.4.2.2.1 Palette Definition Segment When decoding a Blu-ray subtitle, the colors were incorrectly set. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Merge libavcore into libavutilReinhard Tartler2011-02-15
| | | | | | | | | | | | | | | | | | | | | | | | It is pretty hopeless that other considerable projects will adopt libavutil alone in other projects. Projects that need small footprint are better off with more specialized libraries such as gnulib or rather just copy the necessary parts that they need. With this in mind, nobody is helped by having libavutil and libavcore split. In order to ease maintenance inside and around FFmpeg and to reduce confusion where to put common code, avcore's functionality is merged (back) to avutil. Signed-off-by: Reinhard Tartler <siretart@tauware.de>
| * Replace dprintf with av_dlogLuca Barbato2011-01-29
| | | | | | | | dprintf clashes with POSIX.1-2008
| * Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-26
| | | | | | | | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | add avcodec_get_subtitle_defaults() to initialize AVSubtitle structAurelien Jacobs2011-04-11
| | | | | | | | | | | | | | | | Call this new function before decode() to replace the custom and inconsistant initialization in various decoders. This function is equivalent to avcodec_get_frame_defaults() for AVFrame. Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
* | Fix incorrect colors when decoding Blu-ray subtitlesAlexandre Colucci2011-03-25
| | | | | | | | | | | | | | On Blu-ray colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications: see System Description Blu-ray Disc Read-Only Format, 9.14.4.2.2.1 Palette Definition Segment When decoding a Blu-ray subtitle, the colors were incorrectly set.
* | Merge libavcore into libavutilReinhard Tartler2011-02-16
| | | | | | | | Done to keep ABI compatible. Otherwise this is just silly
* | Replace dprintf with av_dlogLuca Barbato2011-01-30
| | | | | | | | | | dprintf clashes with POSIX.1-2008 (cherry picked from commit dfd2a005eb29e4b9f2fdb97036eb7d5c38ae4bd4)
* | Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-28
|/ | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit d36beb3f6902b1217beda576aa18abf7eb72b03c)
* 100l, fix missing decrement on split PGS packets.Reimar Döffinger2010-11-23
| | | | Originally committed as revision 25810 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fail RLE decoding if insufficient data for a complete bitmap was decoded.Reimar Döffinger2010-11-22
| | | | Originally committed as revision 25797 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Support PGS subtitles with RLE data split over mutiple packets.Mark Goodman2010-11-22
| | | | | | Patch by Mark Goodman [mark goodman gmail com] with some modifications by me. Originally committed as revision 25796 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix indentation.Reimar Döffinger2010-11-06
| | | | Originally committed as revision 25683 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Improve PGS parsing: the "state" field is not relevant to us,Reimar Döffinger2010-11-06
| | | | | | | | | the object number is, it determines whether we should continue parsing the presentation description and whether we should clear the subtitles on the next display command. Based on patch by Mark Goodman [mark goodman gmail com] Originally committed as revision 25682 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use new imgutils.h API names, fix deprecation warnings.Stefano Sabatini2010-09-07
| | | | Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Export the presentation video dimensions as avctx->width/avctx->height.Reimar Döffinger2010-08-21
| | | | Originally committed as revision 24858 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Set pix_fmt to the correct value for the format the PGS decoder actually uses.Reimar Döffinger2010-07-11
| | | | Originally committed as revision 24187 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move colorspace.h from libavcodec to libavutil.Stefano Sabatini2010-07-01
| | | | | | Avoid a compile-time dependency of the pad filter on libavcodec. Originally committed as revision 23940 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix grammar errors in documentationMåns Rullgård2010-06-30
| | | | Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Always allocate a buffer of AVPALETTE_SIZE for palette in theStephen Backway2009-08-26
| | | | | | | | | | Bluray subtitle decoder instead of as small as possible. This avoids completely unnecessary issues with e.g. libswscale. (See r19673) Patch by Stephen Backway, stev391 A exemail D com D au Originally committed as revision 19714 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Reindent.Reimar Döffinger2009-08-26
| | | | Originally committed as revision 19708 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove now dead code.Reimar Döffinger2009-08-26
| | | | Originally committed as revision 19707 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Apply r19642 also pgssubdec:Reimar Döffinger2009-08-26
| | | | | | Make sure AVSubtitle is initialized, memset it to 0. Originally committed as revision 19706 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add Bluray Subtitle SupportStephen Backway2009-08-25
Patch by Stephen Backway, stev391 A exemail D com D au Originally committed as revision 19699 to svn://svn.ffmpeg.org/ffmpeg/trunk