summaryrefslogtreecommitdiff
path: root/libavformat/rawvideodec.c
Commit message (Collapse)AuthorAge
* Revert "all: Don't set AVClass.item_name to its default value"Anton Khirnov2024-01-20
| | | | | | | Some callers assume that item_name is always set, so this may be considered an API break. This reverts commit 0c6203c97a99f69dbaa6e4011d48c331e1111f5e.
* all: Don't set AVClass.item_name to its default valueAndreas Rheinhardt2023-12-22
| | | | | | | | Unnecessary since acf63d5350adeae551d412db699f8ca03f7e76b9; also avoids relocations. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/rawvideodec: check packet sizeMichael Niedermayer2022-01-13
| | | | | | | | | | | Fixes: division by zero Fixes: integer overflow Fixes: 43347/clusterfuzz-testcase-minimized-ffmpeg_dem_V210X_fuzzer-5846911637127168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: lance.lmwang@gmail.com Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rawvideodec: Disable option accidentally added for v210(x)Andreas Rheinhardt2022-01-09
| | | | | | | | | 41f213c3bf629d549400e935e7f123e6cfa959ab accidentally added an unused pixel_format option to the v210(x) demuxers. Remove it before it really becomes part of the API. Reviewed-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: reuse the common code for v210/v210xLimin Wang2022-01-05
| | | | | | | | As suggested by Andreas Rheinhardt, most code of v210 demuxer is common code which is duplicated from rawvideodec, so it's better to move v210/v210x demuxer code to rawvideodec.c and reuse the common code. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: add bitpacked demuxerLimin Wang2021-12-31
| | | | | | | | Allows user can playback bitpacked pixel format directly: ffplay -video_size 1280x720 -pixel_format yuv422p10 test.bitpacked ffplay -f bitpacked -video_size 1280x720 -pixel_format uyvy422 test.yuv Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | 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: Fix max value of AV_OPT_TYPE_VIDEO_RATEMichael Niedermayer2016-06-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/rawvideodec: Rework packet size calculationTimothy Gu2015-11-23
| | | | | | | | | | | | Calculate packet size only once, and propagate errors earlier in the chain. Also remove use of the deprecated av_image_get_buffer_size().
* | Merge commit 'f890677d05bc4e8b494a73373ab4cc19791bf884'Hendrik Leppkes2015-10-22
|\| | | | | | | | | | | | | * commit 'f890677d05bc4e8b494a73373ab4cc19791bf884': Replace any remaining avpicture function with imgutils Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * Replace any remaining avpicture function with imgutilsVittorio Giovara2015-10-21
| | | | | | | | | | | | avpicture_get_size() -> av_image_get_buffer_size() Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | rawvideodec: make use of AV_OPT_TYPE_IMAGE_SIZEPaul B Mahol2013-04-05
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | rawvideodec: make use of AV_OPT_TYPE_VIDEO_RATEPaul B Mahol2013-04-05
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavf/rawvideodec: fix/extend option descriptionsStefano Sabatini2013-02-09
| |
* | rawvideodec: set bit ratePaul B Mahol2012-12-04
| | | | | | | | | | | | Fixes #1989. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '1b891d17c531e8a63c2974aab4bf997ce70746f3'Michael Niedermayer2012-10-26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1b891d17c531e8a63c2974aab4bf997ce70746f3': avconv: fix bitrate report when writing to /dev/null avfilter: fix graphparser memleaks on error paths rawdec: remove ff_raw_read_header pcmdec: remove dependency from rawdec g722: refactor out of rawdec.c rawvideo: use a specific read_header Conflicts: ffmpeg.c libavformat/Makefile libavformat/rawdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rawvideo: use a specific read_headerLuca Barbato2012-10-25
| | | | | | | | ff_raw_read_header is used only for this demuxer for video.
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-07
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-30
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cosmetics: Align muxer/demuxer declarations mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning avcodec: remove avcodec_guess_channel_layout() avutil: Add av_get_default_channel_layout() Conflicts: doc/APIchanges libavcodec/mpeg12.c libavformat/cdg.c libavformat/matroskaenc.c libavformat/mpegts.c libavformat/nuv.c libavformat/wav.c libavutil/audioconvert.c libavutil/audioconvert.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-06
| | | | | | | | | | | | | | Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) fate: add golomb-test golomb-test: K&R formatting cosmetics h264: Split h264-test off into a separate file - golomb-test.c. h264-test: cleanup: drop timer invocations, commented out code and other cruft h264-test: Remove unused DSP and AVCodec contexts and related init calls. adpcm: Add missing stdint.h #include to fix standalone header compilation. lavf: add functions for accessing the fourcc<->CodecID mapping tables. lavc: set AVCodecContext.codec in avcodec_get_context_defaults3(). lavc: make avcodec_close() work properly on unopened codecs. lavc: add avcodec_is_open(). lavf: rename AVInputFormat.value to raw_codec_id. lavf: remove the pointless value field from flv and iv8 lavc/lavf: remove unnecessary symbols from the symbol version script. lavc: reorder AVCodec fields. lavf: reorder AVInput/OutputFormat fields. mp3dec: Fix a heap-buffer-overflow adpcmenc: remove some unneeded casts adpcmenc: use int16_t and uint8_t instead of short and unsigned char. adpcmenc: fix adpcm_ms extradata allocation adpcmenc: return proper AVERROR codes instead of -1 ... Conflicts: doc/APIchanges libavcodec/Makefile libavcodec/adpcmenc.c libavcodec/avcodec.h libavcodec/h264.c libavcodec/libavcodec.v libavcodec/mpc7.c libavcodec/mpegaudiodec.c libavcodec/options.c libavformat/Makefile libavformat/avformat.h libavformat/flvdec.c libavformat/libavformat.v Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: rename AVInputFormat.value to raw_codec_id.Anton Khirnov2012-01-31
| | | | | | | | It's only used by raw demuxers for storing the codec id.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) tiffenc: initialize forgotten avctx. avplay: free the active audio packet at exit. avplay: free rdft data used for spectrogram analysis. log.h: make AVClass a named struct fix ac3 encoder documentation vc1: more prettyprinting cosmetics vc1: prettyprint some tables vc1: K&R formatting cosmetics AVOptions: bump minor and add APIchanges entry. cmdutils/avtools: simplify show_help() by using av_opt_child_class_next() AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* Remove all uses of deprecated AVOptions API. AVOptions: add av_opt_next, deprecate av_next_option. AVOptions: add functions for evaluating option strings. AVOptions: split get_number(). AVOptions: add av_opt_get*, deprecate av_get*. AVOptions: add av_opt_set*(). AVOptions: add new API for enumerating children. rv34: move inverse transform functions to DSP context flvenc: Write the right metadata entry count ... Conflicts: avconv.c cmdutils.c doc/APIchanges ffplay.c ffprobe.c libavcodec/ac3dec.c libavcodec/h264.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mpeg12enc.c libavcodec/options.c libavdevice/libdc1394.c libavdevice/v4l2.c libavfilter/vf_drawtext.c libavformat/flvdec.c libavformat/mpegtsenc.c libavformat/options.c libavutil/avutil.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov2011-10-12
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: add select filter oggdec: fix out of bound write in the ogg demuxer movenc: create an alternate group for each media type lavd: add libcdio-paranoia input device for audio CD grabbing rawdec: refactor private option for raw video demuxers pcmdec: use unique classes for all pcm demuxers. rawdec: g722 is always 1 channel/16kHz Conflicts: Changelog configure doc/filters.texi libavdevice/avdevice.h libavfilter/avfilter.h libavfilter/vf_select.c tests/ref/lavf/mov Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rawdec: refactor private option for raw video demuxersAnton Khirnov2011-09-17
| | | | | | | | | | | | | | | | pixel_format/video_size only apply to 'rawvideo' (==uncompressed) demuxer and make no sense for the other raw (== containerless) demuxers. Keep only the framerate option for those. Also use unique classes for all raw video demuxers
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffmpeg: fix some indentation ffmpeg: fix operation with --disable-avfilter simple_idct: remove disabled code motion_est: remove disabled code vc1: remove disabled code fate: separate lavf-mxf_d10 test from lavf-mxf cabac: Move code only used in the cabac test program to cabac.c. ffplay: warn that -pix_fmt is no longer working, suggest alternative ffplay: warn that -s is no longer working, suggest alternative lavf: rename enc variable in utils.c:has_codec_parameters() lavf: use designated initialisers for all (de)muxers. wav: remove a use of deprecated AV_METADATA_ macro rmdec: remove useless ap parameter from rm_read_header_old() dct-test: remove write-only variable des: fix #if conditional around P_shuffle Use LOCAL_ALIGNED in ff_check_alignment() Conflicts: ffmpeg.c libavformat/avidec.c libavformat/matroskaenc.c libavformat/mp3enc.c libavformat/oggenc.c libavformat/utils.c tests/ref/lavf/mxf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: use designated initialisers for all (de)muxers.Anton Khirnov2011-07-17
| | | | | | | | It's more readable and less prone to breakage.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) ARM: disable ff_vector_fmul_vfp on VFPv3 systems ARM: check for VFPv3 swscale: Remove unused variables in x86 code. doc: Drop DJGPP section, Libav now compiles out-of-the-box on FreeDOS. x86: Add appropriate ifdefs around certain AVX functions. cmdutils: use sws_freeContext() instead of av_freep(). swscale: delay allocation of formatConvBuffer(). swscale: fix build with --disable-swscale-alpha. movenc: Deprecate the global RTP hinting flag, use a private AVOption instead movenc: Add an AVClass for setting muxer specific options swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions. configure: report yasm/nasm presence properly tcp: make connect() timeout properly rawdec: factor video demuxer definitions into a macro. rtspdec: add initial_pause private option. lavf: deprecate AVFormatParameters.width/height. tty: add video_size private option. rawdec: add video_size private option. x11grab: add video_size private option. x11grab: factorize returning error codes. ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rawdec: add video_size private option.Anton Khirnov2011-05-27
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | | | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.
* | Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-28
|/ | | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts. (cherry picked from commit c6610a216ed2948885772154a2eed696e0cb4aca)
* split raw.c into rawdec.c and rawenc.cAurelien Jacobs2010-08-30
| | | | Originally committed as revision 24997 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move raw video demuxer to its own fileAurelien Jacobs2010-08-30
Originally committed as revision 24996 to svn://svn.ffmpeg.org/ffmpeg/trunk