summaryrefslogtreecommitdiff
path: root/libavcodec/pngenc.c
Commit message (Collapse)AuthorAge
* Stop hardcoding align=32 in av_frame_get_buffer() calls.Anton Khirnov2020-05-22
| | | | Use 0, which selects the alignment automatically.
* avcodec: deprecate Lossless and Intra Only encoder capabilitesJames Almer2020-05-21
| | | | | | | Both are codec properties and not encoder capabilities. The relevant AVCodecDescriptor.props flags exist for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/pngenc: check malloc fail before using the pointerJun Zhao2019-05-12
| | | | | | Need to check malloc fail before using the pointer Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avcodec: stop using deprecated codec flagsJames Almer2017-03-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* huffyuvencdsp: move shared functions to a new lossless_videoencdsp contextJames Almer2017-01-12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* huffyuvencdsp: move functions only used by huffyuv from lossless_videodspJames Almer2017-01-12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* apng: use side data to pass extradata to muxerAndreas Cadhalpun2016-10-28
| | | | | | | | This fixes creating apng files, which is broken since commit 5ef19590802f000299e418143fc2301e3f43affe. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec/pngenc: check return value of av_frame_copy()Paul B Mahol2016-04-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/pngenc: restore image size before copying frameDmitriy2016-04-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '2862b63783b5556f7f3fb2d097629bc6879f833a'Derek Buitenhuis2016-02-03
|\ | | | | | | | | | | | | * commit '2862b63783b5556f7f3fb2d097629bc6879f833a': lavc: Move prediction_method to codec private options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: Move prediction_method to codec private optionsVittorio Giovara2016-01-21
| | | | | | | | | | | | | | | | | | | | This options is only used by huffyuv, ffvhuv, jpegls, mjpeg, mpegvideoenc, png, utvideo. It is a very codec-specific options, so deprecate the global variant. Set proper limits to the maximum allowed values, and update utvideoenc tests to use the new option name. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * png: read and write stereo3d frame side data informationKirill Gavrilov2015-10-30
| | | | | | | | | | | | | | Use optional sTER chunk defining side-by-side stereo pair within "Extensions to the PNG 1.2 Specification", version 1.3.0. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/pngenc: Fix mixed up linesizesMichael Niedermayer2016-01-15
| | | | | | | | | | | | | | | | Fixes out of array accesses Fixes: 0cf176e6d3ab9fe924f39738e513f547/asan_generic_4a54aa_3431_aaa28be1cb32e307a9890cad06f84fba.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/pngenc: Replace memcpy by av_image_copy()Michael Niedermayer2016-01-15
| | | | | | | | | | | | | | | | Fixes out of array access Fixes: 0cf176e6d3ab9fe924f39738e513f547/asan_generic_4a54aa_3431_aaa28be1cb32e307a9890cad06f84fba.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/png: read and write stereo3d frame side data informationKirill Gavrilov2015-10-28
| | | | | | | | | | | | | | Use optional sTER chunk defining side-by-side stereo pair within "Extensions to the PNG 1.2 Specification", version 1.3.0. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/pngenc: Check that there is at least 1 frameMichael Niedermayer2015-10-07
| | | | | | | | | | | | | | Fixes null pointer dereference Fixes CID1322330 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/pngenc: Initialize fctl_chunk to 0Michael Niedermayer2015-10-07
| | | | | | | | | | | | | | The structure is copied around and that triggers warnings if it is uninitialized Fixes CID1322360 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | apng: Support inter-frame compressionDonny Yang2015-08-28
| | | | | | | | | | | | | | | | | | The current algorithm is just "try all the combinations, and pick the best". It's not very fast either, probably due to a lot of copying, but will do for an initial implementation. Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer2015-07-27
| | | | | | | | | | | | | | | | This parameter can be used to inform the allocation code about how much downsizing might occur, and can be used to optimize how to allocate the packet Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370'Michael Niedermayer2015-07-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370': Deprecate avctx.coded_frame Conflicts: ffmpeg.c libavcodec/a64multienc.c libavcodec/asvenc.c libavcodec/cljrenc.c libavcodec/dpxenc.c libavcodec/gif.c libavcodec/mpegvideo_enc.c libavcodec/nvenc.c libavcodec/proresenc_kostya.c libavcodec/pthread_frame.c libavcodec/rawenc.c libavcodec/sunrastenc.c libavcodec/tiffenc.c libavcodec/version.h libavcodec/xbmenc.c libavcodec/xwdenc.c libavdevice/v4l2.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * Deprecate avctx.coded_frameVittorio Giovara2015-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rationale is that coded_frame was only used to communicate key_frame, pict_type and quality to the caller, as well as a few other random fields, in a non predictable, let alone consistent way. There was agreement that there was no use case for coded_frame, as it is a full-sized AVFrame container used for just 2-3 int-sized properties, which shouldn't even belong into the AVCodecContext in the first place. The appropriate AVPacket flag can be used instead of key_frame, while quality is exported with the new AVPacketSideData quality factor. There is no replacement for the other fields as they were unreliable, mishandled or just not used at all. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'Michael Niedermayer2015-07-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534': Gather all coded_frame allocations and free functions to a single place Conflicts: libavcodec/a64multienc.c libavcodec/asvenc.c libavcodec/cljrenc.c libavcodec/dpxenc.c libavcodec/dvenc.c libavcodec/gif.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libopenjpegenc.c libavcodec/libtheoraenc.c libavcodec/libvpxenc.c libavcodec/mpegvideo_enc.c libavcodec/nvenc.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/sunrastenc.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/v210enc.c libavcodec/v410enc.c libavcodec/xbmenc.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * Gather all coded_frame allocations and free functions to a single placeVittorio Giovara2015-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocating coded_frame is what most encoders do anyway, so it makes sense to always allocate and free it in a single place. Moreover a lot of encoders freed the frame with av_freep() instead of the correct API av_frame_free(). This bring uniformity to encoder behaviour and prevents applications from erroneusly accessing this field when not allocated. Additionally this helps isolating encoders that export information with coded_frame, and heavily simplifies its deprecation. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/pngenc: don't return a value in a void functionJames Almer2015-04-02
| | | | | | | | | | | | | | Should fix compilation failures with strict compilers Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | png: Use libavutil's crc functions instead of zlib'sDonny Yang2015-04-02
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | apng: Add a basic APNG encoderDonny Yang2015-04-02
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/png: Clearly separate encoding header and framesDonny Yang2015-04-01
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | png: Clear up the calculation of max packet sizeDonny Yang2015-03-31
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | png: Only init zlib onceDonny Yang2015-03-29
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | png: Calculate pixel format information only onceDonny Yang2015-03-29
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | png: Return slightly more meaningful error codesDonny Yang2015-03-29
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | png: Minor whitespace change and added missing commentDonny Yang2015-03-28
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | png: Use av_freep() instead of av_free()Donny Yang2015-03-28
| | | | | | | | | | Signed-off-by: Donny Yang <work@kota.moe> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil: Extract gamma determination from PNG encoder for future use. Adds ↵Kevin Wheatley2015-03-05
| | | | | | | | | | | | | | private avpriv_get_gamma_from_trc() function to libavutil. Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/pngenc: Remove outer () from macroMichael Niedermayer2015-03-04
| | | | | | | | | | | | | | | | | | The macro is implemented as a do{}while() enclosing this is () appears to be a GNU extension (6.1 Statements and Declarations in Expressions) the () is also unneeded and wrong as the macro returns no value Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/pngenc: replace round by lrint()Michael Niedermayer2015-03-02
| | | | | | | | | | | | | | Avoids passing double to AV_WB32() Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/pngenc: Support writing colorspace tags.Niklas Haas2015-02-28
| | | | | | | | These are defined in http://www.w3.org/TR/PNG/#11addnlcolinfo.
* | lavc/pngenc: Support encoding ya16be.Carl Eugen Hoyos2015-01-22
| |
* | Merge commit '5735552f1f17ea01dcbc99b08f54b5bf52176a8f'Michael Niedermayer2014-08-01
|\| | | | | | | | | | | | | * commit '5735552f1f17ea01dcbc99b08f54b5bf52176a8f': pngenc: Drop pointless pointer cast in png_write_row() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * pngenc: Drop pointless pointer cast in png_write_row()Diego Biurrun2014-08-01
| |
* | Merge commit '512f3ffe9b4bb86767c2b1176554407c75fe1a5c'Michael Niedermayer2014-05-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '512f3ffe9b4bb86767c2b1176554407c75fe1a5c': dsputil: Split off HuffYUV encoding bits into their own context Conflicts: configure libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/huffyuv.h libavcodec/huffyuvenc.c libavcodec/pngenc.c libavcodec/x86/dsputilenc_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split off HuffYUV encoding bits into their own contextDiego Biurrun2014-05-27
| | | | | | | | Also shorten HuffYUV context member names to avoid clutter.
* | Merge commit 'cccac7654f3f6b82967bc6ae08b35ae8b4fbe1a9'Michael Niedermayer2014-03-17
|\| | | | | | | | | | | | | | | | | | | | | * commit 'cccac7654f3f6b82967bc6ae08b35ae8b4fbe1a9': png: Support rgb48 and rgba64 encoding Conflicts: libavcodec/pngenc.c See: f94ce3bcab67369b18976f6cf8e69ae132805213 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * png: Support rgb48 and rgba64 encodingCarl Eugen Hoyos2014-03-16
| |
* | Merge commit 'c598b569fb3d1f4b6c4868fe64f6989254df5186'Michael Niedermayer2014-03-17
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'c598b569fb3d1f4b6c4868fe64f6989254df5186': png: K&R formatting cosmetics Conflicts: libavcodec/png.c libavcodec/pngdec.c libavcodec/pngenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>