summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec: remove FF_API_FLAG_TRUNCATEDJames Almer2023-02-091-9/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpeg12: Move ff_mpeg1_clean_buffers decl to a new headerAndreas Rheinhardt2022-10-041-3/+7
| | | | | | It allows to avoid including mpegvideo.h when including mpeg12.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12: Inline ff_mpeg12_common_init() into mpeg12enc.cAndreas Rheinhardt2022-10-041-2/+0
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12.h: Move encoder-only stuff into a new headerAndreas Rheinhardt2022-02-131-8/+0
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12.h: Move decoder-only stuff to a new headerAndreas Rheinhardt2022-02-131-31/+0
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/(h263|mpeg4?video)_parser: Make *_find_frame_end() staticAndreas Rheinhardt2021-09-201-0/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move startcodes to mpeg12.hAndreas Rheinhardt2021-09-201-0/+10
| | | | | | | And remove the MPEG-4-specific SLICE_START_CODE, which duplicates SLICE_STARTCODE. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12: Don't initialize encoder-only parts of RLTableAndreas Rheinhardt2020-12-311-2/+0
| | | | | | | | | | | ff_mpeg12_init_vlcs() currently initializes index_run, max_level and max_run of ff_rl_mpeg1/2; yet the only user of these fields is the MPEG-1/2 encoder which already initializes these tables on its own. So remove the initializations in ff_mpeg12_init_vlcs(); this also simplifies making ff_mpeg12_init_vlcs() thread-safe. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhqenc: Call correct functionAndreas Rheinhardt2020-12-111-0/+1
| | | | | | | | | | | | | | | | | | | Up until now, the SpeedHQ encoder called a wrong function for init: void ff_init_uni_ac_vlc(const uint8_t huff_size_ac[256], uint8_t *uni_ac_vlc_len); Yet the first argument actually used is of type RLTable; the size of said struct is less than 256 if the size of a pointer is four, leading to an access beyond the end of the RLTable. This commit fixes this by calling the actually intended function: init_uni_ac_vlc() from mpeg12enc.c. It was intended to use this function [1], yet doing so was forgotten when the patch was actually applied. [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-July/266187.html Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12: Don't pretend reading dct_dc_size_* VLCs can failAndreas Rheinhardt2020-10-121-4/+0
| | | | | | | | | | It can't because the corresponding trees don't have any loose ends. Removing the checks also removed an instance of av_log(NULL (with a nonsense message) from the codebase. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* mpeg12: Add a common function to find the best frame rateMark Thompson2017-10-171-0/+4
| | | | | | | This will be used later in both the mpeg2_metadata filter and the VAAPI MPEG-2 encoder. Also adds a unit test. (cherry picked from commit b5859e0b04bdbe12c97cb12ac10a45d51d2d73c9)
* avcodec: add Newtek SpeedHQ decoderSteinar H. Gunderson2017-01-111-0/+9
| | | | | | | | | | | | | | This decoder can decode all existing SpeedHQ formats (SHQ0–5, 7, and 9), including correct decoding of the alpha channel. 1080p is decoded in 142 fps on one core of my i7-4600U (2.1 GHz Haswell), about evenly split between bitstream reader and IDCT. There is currently no attempt at slice or frame threading, even though the format trivially supports both. NewTek very helpfully provided a full set of SHQ samples, as well as source code for an SHQ2 encoder (not included) and assistance with understanding some details of the format.
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/mpeg12: Remove duplicate block_last_index setting codeMichael Niedermayer2016-02-161-2/+1
| | | | | | | | | | | | Based on 7c25ffe070c286874a8c3513f7504b90e1626b0c and 58dd885f9ae7feee002773253e345e11e7142739 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '7c25ffe070c286874a8c3513f7504b90e1626b0c'Derek Buitenhuis2016-02-161-1/+6
|\ \ | |/ | | | | | | | | | | * commit '7c25ffe070c286874a8c3513f7504b90e1626b0c': mpeg1: Make intra-block decoding independent of MpegEncContext Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mpeg1: Make intra-block decoding independent of MpegEncContextVittorio Giovara2016-02-091-1/+5
| | | | | | | | | | | | | | This allows untangling the eatqi decoder from the MPEG-1 decoder. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '8606e881b02bec2ac24943d22c8afe11d641fac8'Michael Niedermayer2015-06-121-18/+1
|\ \ | |/ | | | | | | | | | | * commit '8606e881b02bec2ac24943d22c8afe11d641fac8': mpeg12: Move the vlc bits to a stand alone file Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg12: Move the vlc bits to a stand alone fileLuca Barbato2015-06-121-18/+1
| |
* | Merge commit 'b2b766914a49c4e3537df3a585e97b98d432edd2'Michael Niedermayer2015-06-011-0/+6
|\ \ | |/ | | | | | | | | | | * commit 'b2b766914a49c4e3537df3a585e97b98d432edd2': mpegvideo: mpeg12: Move function declarations Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: mpeg12: Move function declarationsVittorio Giovara2015-05-311-0/+6
| |
* | Merge commit 'e557584aa7df6ac9f52af7ee7e5c963437da2e2f'Michael Niedermayer2013-03-281-15/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'e557584aa7df6ac9f52af7ee7e5c963437da2e2f': mpeg12: Move Mpeg1Context declaration to the only place it is used Conflicts: libavcodec/mpeg12.h libavcodec/mpeg12dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg12: Move Mpeg1Context declaration to the only place it is usedDiego Biurrun2013-03-271-15/+0
| |
* | Merge commit '1b6d66745ac1768adb387c2227cdcf4452271149'Michael Niedermayer2013-03-281-0/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '1b6d66745ac1768adb387c2227cdcf4452271149': Split MPEG-1/2 decoder code off from MPEG-1/2 common code Conflicts: libavcodec/Makefile libavcodec/mpeg12.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Split MPEG-1/2 decoder code off from MPEG-1/2 common codeDiego Biurrun2013-03-271-0/+11
| |
* | Merge commit 'eee2000b41234ae9465c314e18bfec1700181f32'Michael Niedermayer2013-03-281-0/+2
|\ \ | |/ | | | | | | | | | | * commit 'eee2000b41234ae9465c314e18bfec1700181f32': mpeg12: Move some ff_mpeg1_* function declarations to a more suitable place Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg12: Move some ff_mpeg1_* function declarations to a more suitable placeDiego Biurrun2013-03-271-0/+2
| |
* | Merge commit 'b6649ab5037fb55f78c2606f3d23cea0867cdeaa'Michael Niedermayer2013-03-281-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'b6649ab5037fb55f78c2606f3d23cea0867cdeaa': cosmetics: Remove unnecessary extern keywords from function declarations Conflicts: libswscale/x86/swscale.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Remove unnecessary extern keywords from function declarationsDiego Biurrun2013-03-271-1/+1
| |
* | Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'Michael Niedermayer2013-01-231-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f': Drop DCTELEM typedef Conflicts: libavcodec/alpha/dsputil_alpha.h libavcodec/alpha/motion_est_alpha.c libavcodec/arm/dsputil_init_armv6.c libavcodec/bfin/dsputil_bfin.h libavcodec/bfin/pixels_bfin.S libavcodec/cavs.c libavcodec/cavsdec.c libavcodec/dct-test.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/dsputil_template.c libavcodec/eamad.c libavcodec/h264_cavlc.c libavcodec/h264idct_template.c libavcodec/mpeg12.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/ppc/dsputil_altivec.c libavcodec/proresdsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Drop DCTELEM typedefDiego Biurrun2013-01-221-1/+1
| | | | | | | | | | | | It does not help as an abstraction and adds dsputil dependencies. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-12-201-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * qatar/master: lavr: add option for dithering during sample format conversion to s16 mpeg12: do not decode extradata more than once. Conflicts: libavcodec/mpeg12.c libavcodec/mpeg12.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg12: do not decode extradata more than once.Anton Khirnov2012-12-191-0/+1
| | | | | | | | | | | | Fixes CVE-2012-2803. CC: libav-stable@libav.org
| * Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"Janne Grunau2011-10-241-1/+0
| | | | | | | | | | | | | | | | This reverts commit da22ba7df461c13bf0b0eabc953303803a285d91 since it broke slice threading. Slice threading just duplicates MpegEncContext so every value used during mpeg_decode_slice has to be in it. A second patch will fix the illusion that Mpeg1Context is available in mpeg_decode_slice.
* | mpeg12: fix logic that prevents extradata from being parsed twice.Michael Niedermayer2012-05-111-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"Michael Niedermayer2011-10-241-1/+0
| | | | | | | | | | | | | | | | | | This reverts commit da22ba7df461c13bf0b0eabc953303803a285d91. Conflicts: libavcodec/mpeg12.c libavcodec/mpeg12.h
* | Revert "mpeg12: move closed_gop from MpegEncContext to Mpeg1Context"Michael Niedermayer2011-10-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 3fc08304322ce3ed0e4a71efde78ae5e0d5c910c. The revert is done because the reasoning behind the commit was flawed, closed_gop is not mpeg1/2 specific. Conflicts: libavcodec/mpeg12.c libavcodec/mpeg12.h
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-241-0/+16
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Move id3v2 tag writing to a separate file. swscale: add missing colons to x86 assembly yuv2planeX. g722: split decoder and encoder into separate files cosmetics: remove extra spaces before end-of-statement semi-colons vorbisdec: check output buffer size before writing output wavpack: calculate bpp using av_get_bytes_per_sample() ac3enc: Set max value for mode options correctly lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c mpeg12: move closed_gop from MpegEncContext to Mpeg1Context mpeg12: move full_pel from MpegEncContext to Mpeg1Context mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h mpegvideo: remove some unused variables from MpegEncContext. Conflicts: libavcodec/mpeg12.c libavformat/mp3enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg12: move closed_gop from MpegEncContext to Mpeg1ContextAnton Khirnov2011-10-231-0/+1
| | | | | | | | It's MPEG-1/2 specific.
| * mpeg12: move full_pel from MpegEncContext to Mpeg1ContextAnton Khirnov2011-10-231-0/+1
| | | | | | | | It's MPEG-1 specific.
| * mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.hAnton Khirnov2011-10-231-0/+13
| | | | | | | | It will be used in vdpau code.
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Make dc_lum_vlc and dc_chroma_vlc non-static symbols,Vitor Sessak2011-01-051-4/+4
| | | | | | this fixed the decoding of version 3 PSX MDEC files. Originally committed as revision 26230 to svn://svn.ffmpeg.org/ffmpeg/trunk
* mpeg12: fix non-standard use of "extern inline"Måns Rullgård2009-05-171-1/+1
| | | | | | | | Rename ff_mpeg1_decode_block_intra to mpeg1_decode_block_intra and make it static. Add ff_mpeg1_decode_block_intra as plain extern function calling mpeg1_decode_block_intra. Originally committed as revision 18859 to svn://svn.ffmpeg.org/ffmpeg/trunk
* convert mpeg1_decode_block_intra() to inline globalPeter Ross2009-02-051-0/+2
| | | | Originally committed as revision 17000 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Globally rename the header inclusion guard names.Stefano Sabatini2008-08-311-3/+3
| | | | | | | | | Consistently apply this rule: the guard name is obtained from the filename by stripping the leading "lib", converting '/' and '.' to '_' and uppercasing the resulting name. Guard names in the root directory have to be prefixed by "FFMPEG_". Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ff_init_vlcs function to the more descriptive name ff_mpeg12_init_vlcs.Diego Biurrun2008-08-201-1/+1
| | | | | | Now that it is exported, this should avoid confusion and name clashes. Originally committed as revision 14867 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Untangle mpeg12.c and mdec.c so that mdec.c can be compiled separately.Diego Biurrun2008-08-191-0/+28
| | | | Originally committed as revision 14851 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add FFMPEG_ prefix to all multiple inclusion guards.Diego Biurrun2007-10-171-3/+3
| | | | Originally committed as revision 10765 to svn://svn.ffmpeg.org/ffmpeg/trunk
* forgot to svn add mpeg12.h in r9477Aurelien Jacobs2007-07-051-0/+31
Originally committed as revision 9487 to svn://svn.ffmpeg.org/ffmpeg/trunk