summaryrefslogtreecommitdiff
path: root/libavformat/ipmovie.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/utils: Move ff_add_param_change to demux_utils.cAndreas Rheinhardt2022-05-101-0/+1
| | | | | | Only demuxers have a need to add side-data to a packet. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* ipmovie: convert to new channel layout APIVittorio Giovara2022-03-151-5/+3
| | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Avoid allocation for AVFormatInternalAndreas Rheinhardt2021-09-171-1/+1
| | | | | | | | | | | | | Do this by allocating AVFormatContext together with the data that is currently in AVFormatInternal; or rather: Put AVFormatContext at the beginning of a new structure called FFFormatContext (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVFormatInternal altogether. The biggest simplifications occured in avformat_alloc_context(), where one can now simply call avformat_free_context() in case of errors. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/ipmovie: Avoid stack packetAndreas Rheinhardt2021-03-241-3/+1
| | | | | | | Replace it in ipmovie_read_header() by AVFormatInternal.parse_pkt which is unused when reading the header. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/ipmovie: Remove redundant initializationsAndreas Rheinhardt2021-03-241-7/+0
| | | | | | The demuxer's context has already been zeroed generically. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/ipmovie: Fix indentationAndreas Rheinhardt2021-03-241-17/+17
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/ipmovie: Deduplicate parsing video data opcodesAndreas Rheinhardt2021-03-241-20/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/ipmovie: Avoid reading packets during read_headerAndreas Rheinhardt2021-03-241-9/+9
| | | | | | | | | | They will be discarded anyway because this can only happen for invalid data. This already implies that the pkt won't be used at all when parsing the very first chunk when reading the header, so one can use NULL as argument and remove the av_packet_unref() on error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/ipmovie: Remove redundant av_packet_unref()Andreas Rheinhardt2021-03-241-3/+0
| | | | | | | | | When one of these errors happens during ipmovie_read_packet(), an error is returned and the packet is cleaned up generically. And since 712d3ac539f30239b764d8621829dc9dc913da61 the same happens in ipmovie_read_header(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/ipmovie: Free packets allocated in header readingMichael Niedermayer2021-03-151-2/+6
| | | | | | | | Fixes: memleaks Fixes: 29905/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5679700745781248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-211-1/+1
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* Interplay MVE: Implement frame format 0x10Hein-Pieter van Braam2017-06-271-16/+52
| | | | | | | | | | | | | | | | | | | | This implements the 0x10 frame format for Interplay MVE movies. The format is a variation on the 0x06 format with some changes. In addition to the decoding map there's also a skip map. This skip map is used to determine what 8x8 blocks can change in a particular frame. This format expects to be able to copy an 8x8 block from before the last time it was changed. This can be an arbitrary time in the past. In order to implement this this decoder allocates two additional AVFrames where actual decoding happens. At the end of a frame decoding changed blocks are copied to a finished frame based on the skip map. The skip map's encoding is a little convulted, I'll refer to the code for details. Values in the decoding map are the same as in format 0x06. Signed-off-by: Hein-Pieter van Braam <hp@tmm.cx>
* Interplay MVE: Implement frame format 0x06Hein-Pieter van Braam2017-06-271-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This implements the 0x06 frame format for Interplay MVE movies. The format is relatively simple. The video data consists of two parts: 16 bits per 8x8 block movement data a number of 8x8 blocks of pixel data For each 8x8 block of pixel data the movement data is consulted. There are 3 possible meanings of the movement data: * zero : copy the 8x8 block from the pixel data * negative : copy the 8x8 block from the previous frame from an offset determined by the actual value of the entry -0xC000. * positive : copy the 8x8 block from the current frame from an offset determined by the actual value of the entry -0x4000 Decoding happens in two passes, in the fist pass only new pixeldata is copied, during the second pass data is copied from the previous and current frames. The codec expects that the current frame being decoded to still has the data from 2 frames ago on it when decoding starts. Signed-off-by: Hein-Pieter van Braam <hp@tmm.cx>
* Interplay MVE: Refactor IP packet formatHein-Pieter van Braam2017-06-271-17/+29
| | | | | | | | Interplay MVE can contain up to three different frame formats. They require different streams of information to render a frame. This patch changes the IP packet format to prepare for the extra frame formats. Signed-off-by: Hein-Pieter van Braam <hp@tmm.cx>
* Interplay MVE: Implement MVE SEND_BUFFER operationHein-Pieter van Braam2017-06-271-5/+11
| | | | | | | | | | | Interplay MVE movies have a SEND_BUFFER operation. Only after this command does the current decoding buffer get displayed. This is required for the other frame formats. They are fixed-size and can't always encode a full frame worth of pixeldata. This code prevents half-finished frames from being emitted. Signed-off-by: Hein-Pieter van Braam <hp@tmm.cx>
* Cleanly exit at the end of an Interplay MVEHein-Pieter van Braam2017-06-181-0/+2
| | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Hein-Pieter van Braam <hp@tmm.cx> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521'Clément Bœsch2017-03-241-3/+0
|\ | | | | | | | | | | | | * commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521': Remove some pointless TRACE level debug code Merged-by: Clément Bœsch <u@pkh.me>
| * Remove some pointless TRACE level debug codeDiego Biurrun2016-10-271-3/+0
| | | | | | | | This also kills some warnings with certain compiler options.
* | 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>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-18/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | avformat/ipmovie: add context to av_log()Paul B Mahol2015-11-021-38/+38
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/ipmovie: put video decoding_map_size into packet and use it in decoderPaul B Mahol2015-11-021-3/+4
| | | | | | | | | | | | | | The size of decoding map can differ from one calculated internally, producing artifacts while decoding video. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes2015-10-271-2/+2
|\ \ | |/ | | | | | | | | | | * commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-261-2/+2
| | | | | | | | | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* | avformat/ipmovie: Fix late audio detectionMichael Niedermayer2015-07-261-2/+3
| | | | | | | | | | | | Fixes audio in Ticket117 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/ipmovie: Parse&handle late audio initMichael Niedermayer2015-07-261-1/+6
| | | | | | | | | | | | | | Fixes Ticket117 Based on problem description by Kostya Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/ipmovie: Factor init_audio() outMichael Niedermayer2015-07-261-18/+26
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-201-37/+37
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-191-37/+37
| | | | | | | | This applies to every library where performance is not critical.
* | Correct few "ffmpeg" typosPaul B Mahol2014-08-241-1/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | replace calls to url_feof() with avio_feof()James Almer2014-08-081-3/+3
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/ipmovie: Check palette size in OPCODE_SET_PALETTEMichael Niedermayer2013-12-181-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/ipmovie: Check that OPCODE_SET_PALETTE size is large enoughMichael Niedermayer2013-12-181-2/+2
| | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes: msan_uninit-mem_7fec1f40656c_4819_descent3_level5_16bit_partial.mve Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/ipmovie: remove superflous ()Michael Niedermayer2013-12-181-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/ipmovie: Check that the OPCODE_INIT_AUDIO_BUFFERS size is large enoughMichael Niedermayer2013-12-181-1/+1
| | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f75b03c1f19_4820_descent3_level5_16bit_partial.mve Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/ipmovie: Check OPCODE_CREATE_TIMER sizeMichael Niedermayer2013-12-141-1/+1
| | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f81e836ef8c_5930_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/ipmovie: Fix use of uninitialized memory in OPCODE_INIT_VIDEO_BUFFERSMichael Niedermayer2013-12-131-1/+3
| | | | | | | | | | | | Fixes: msan_uninit-mem_7ffe323a25f3_5929_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/ipmovie: check OPCODE_INIT_VIDEO_BUFFERS size more completelyMichael Niedermayer2013-11-221-1/+1
| | | | | | | | | | | | | | | | | | Fixes use of uninitialized data Fixes: signal_sigsegv_1571228_5930_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ipmovie_probe: make buffer pointers constMichael Niedermayer2012-12-251-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b'Michael Niedermayer2012-11-131-0/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b': (21 commits) jvdec: set channel layout iss: set channel layout ipmovie: set channel layout iff: set channel layout idroqdec: set channel layout gxfdec: set channel layout when applicable gsmdec: set channel layout flvdec: set channel layout dv: set channel layout dsicin: set channel layout daud: set channel layout cdxl: set channel layout bmv: set channel layout bink: set channel layout bfi: set channel layout bethsoftvid: set channel layout apc: set channel layout amr: set channel_layout ppc: replace pointer casting with AV_COPY32 ppc: fix some unused variable warnings ... Conflicts: libavformat/amr.c libavformat/iff.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ipmovie: set channel layoutJustin Ruggles2012-11-121-0/+3
| |
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-11/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-11/+11
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-301-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avformat: Drop pointless "format" from container long names swscale: bury one more piece of inline asm under HAVE_INLINE_ASM. wv: K&R formatting cosmetics configure: Add missing descriptions to help output h264_ps: declare array of colorspace strings on its own line. fate: amix: specify f32 sample format for comparison tiny_psnr: support 32-bit float samples eamad/eatgq/eatqi: call special EA IDCT directly eamad: remove use of MpegEncContext mpegvideo: remove unnecessary inclusions of faandct.h af_asyncts: avoid overflow in out_size with large delta values af_asyncts: add first_pts option Conflicts: configure libavcodec/eamad.c libavcodec/h264_ps.c libavformat/crcenc.c libavformat/ffmdec.c libavformat/ffmenc.c libavformat/framecrcenc.c libavformat/md5enc.c libavformat/nutdec.c libavformat/rawenc.c libavformat/yuv4mpeg.c tests/tiny_psnr.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Drop pointless "format" from container long namesDiego Biurrun2012-07-301-1/+1
| |
* | ipmovie_probe: speedup by avoiding memcmp() callMichael Niedermayer2012-05-311-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-281-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (71 commits) movenc: Allow writing to a non-seekable output if using empty moov movenc: Support adding isml (smooth streaming live) metadata libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set sunrast: Document the different Sun Raster file format types. sunrast: Add a check for experimental type. libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat lavf: remove disabled FF_API_SET_PTS_INFO cruft lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft lavf: remove disabled FF_API_REORDER_PRIVATE cruft lavf: remove disabled FF_API_SEEK_PUBLIC cruft lavf: remove disabled FF_API_STREAM_COPY cruft lavf: remove disabled FF_API_PRELOAD cruft lavf: remove disabled FF_API_NEW_STREAM cruft lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft lavf: remove disabled FF_API_MUXRATE cruft lavf: remove disabled FF_API_FILESIZE cruft lavf: remove disabled FF_API_TIMESTAMP cruft lavf: remove disabled FF_API_LOOP_OUTPUT cruft lavf: remove disabled FF_API_LOOP_INPUT cruft lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft ... Conflicts: doc/APIchanges libavcodec/8bps.c libavcodec/avcodec.h libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/options.c libavcodec/sunrast.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/h264_deblock.asm libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/avformat.h libavformat/avio.c libavformat/avio.h libavformat/aviobuf.c libavformat/dv.c libavformat/mov.c libavformat/utils.c libavformat/version.h libavformat/wtv.c libavutil/Makefile libavutil/file.c libswscale/x86/input.asm libswscale/x86/swscale_mmx.c libswscale/x86/swscale_template.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>