summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegenc_common.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/mjpegenc_common: Only pass what is used from ScanTableAndreas Rheinhardt2022-10-241-2/+2
| | | | | | | Namely ScanTable.permutated. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc: support writing ICC profilesNiklas Haas2022-04-111-1/+3
| | | | | | | | | | | | | | | | This is mostly straightforward. The major complication is that, as a result of the 16-bit chunk size limitation, ICC profiles may need to be split up into multiple chunks. We also need to make sure to allocate enough extra space in the packet to fit the ICC profile, so modify both mpegvideo_enc.c and ljpegenc.c to take into account this extra overhead, failing cleanly if necessary. Also add a FATE transcode test to ensure that the ICC profile gets written (and read) correctly. Note that this ICC profile is smaller than 64 kB, so this doesn't test the APP2 chunk re-arranging code at all. Signed-off-by: Niklas Haas <git@haasn.dev>
* avcodec/mjpegenc: Fix files with slices > 1, but threads == 1Andreas Rheinhardt2022-04-011-1/+2
| | | | | | | | | | | | | | | | | In the aforementioned case mpegvideo_enc.c calls ff_mjpeg_encode_stuffing() at the end of every line which pads the output to byte-alignment and escapes it; yet it does not write the restart-markers (and also not the DRI marker when writing the header) and so the output files are broken. Fix this by writing these markers depending upon the number of slices and not the number of threads in use; this also makes the output of the encoder reproducible given a slice count and is therefore important if encoder tests that actually use -threads auto are added in the future. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_common: Pass MJpegContext for writing picture headerAndreas Rheinhardt2022-01-041-0/+3
| | | | | | It is the structure that is actually used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc: Include all supported pix_fmts in mpegenc pix_fmtsAndreas Rheinhardt2021-04-101-0/+2
| | | | | | | | | | | | | | | Currently said list contains only the pixel formats that are always supported irrespective of the range and the value of strict_std_compliance. This makes the MJPEG encoder an outlier as all other codecs put all potentially supported pixel formats into said list and error out if the chosen pixel format is unsupported. This commit brings it therefore in line with the other encoders. The behaviour of fftools/ffmpeg_filter.c has been preserved. A more informed decision would be possible if colour range were available at this point, but it isn't. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_common: Move stuff only used by mjpegenc.c to itAndreas Rheinhardt2021-02-231-5/+0
| | | | | | | | This allows to make ff_init_uni_ac_vlc static; ff_mjpeg_encode_picture_frame has also been made static, but it could always have been made static. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/jpegtables: Move ff_mjpeg_build_huffman_codes to mjpegenc_commonAndreas Rheinhardt2021-02-231-0/+3
| | | | | | | Since g2meet.c doesn't use it any more, only encoders use it and the place for their common code is mjpegenc_common.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mjpegenc: move ff_mjpeg_encode_picture_frame to mjpegenc_commonJames Almer2017-05-081-0/+1
| | | | Fixes compilation of ljpeg encoder if mjpeg and amv encoders are disabled
* mjpegenc_common: add missing ff_ prefix to init_uni_ac_vlcRostislav Pehlivanov2017-02-091-1/+1
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* Implement optimal huffman encoding for (M)JPEG.Jerry Jiang2017-02-081-0/+2
| | | | | | | > seems to break > make fate-vsynth1-mjpeg-444 Fixed.
* Merge commit '2862b63783b5556f7f3fb2d097629bc6879f833a'Derek Buitenhuis2016-02-031-1/+1
|\ | | | | | | | | | | | | * 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-211-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | avcodec/ljpegenc: Fix encoding RGBA LJPEGMichael Niedermayer2015-09-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mjpegenc_common: Use ff_mpv_reallocate_putbitbuffer()Michael Niedermayer2015-05-251-1/+1
| | | | | | | | | | | | | | Fixes assertion failure Fixes Ticket4396 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'Michael Niedermayer2014-07-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e3fcb14347466095839c2a3c47ebecff02da891e': dsputil: Split off IDCT bits into their own context Conflicts: configure libavcodec/aic.c libavcodec/arm/Makefile libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/asvdec.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dvdec.c libavcodec/dxva2_mpeg2.c libavcodec/intrax8.c libavcodec/mdec.c libavcodec/mjpegdec.c libavcodec/mjpegenc_common.h libavcodec/mpegvideo.c libavcodec/ppc/dsputil_altivec.h libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/idctdsp.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split off IDCT bits into their own contextDiego Biurrun2014-06-301-1/+1
| |
* | Merge commit 'adcb8392c9b185fd8a91a95fa256d15ab1432a30'Michael Niedermayer2014-07-011-6/+11
|/ | | | | | | | | | | * commit 'adcb8392c9b185fd8a91a95fa256d15ab1432a30': mjpeg: Split off bits shared by MJPEG and LJPEG encoders Conflicts: libavcodec/mjpegenc.c libavcodec/mjpegenc.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* mjpeg: Split off bits shared by MJPEG and LJPEG encodersDiego Biurrun2014-06-301-0/+38
This obviates a dependency of the LJPEG encoder on mpegvideo.