Carl Eugen Hoyos
f2e7864496
lavc/mjpegenc: Fix not writing RST tag after final slice.
...
Fixes ticket #8412 .
5 years ago
James Almer
2cb656ad11
avcodec/mjpegenc: move ff_mjpeg_encode_picture_frame to mjpegenc_common
...
Fixes compilation of ljpeg encoder if mjpeg and amv encoders are disabled
8 years ago
Rostislav Pehlivanov
2c9be3882a
mjpegenc_common: check for codec ID before using avctx->priv_data
...
When coding lossless jpeg the priv context will be pointing to LJpegEncContext
rather than MpegEncContext, which the function expects.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
8 years ago
Carl Eugen Hoyos
3ea9773793
lavc/mjpegenc_common: Remove an unused variable.
8 years ago
Michael Niedermayer
ce6e7a2db1
avcodec/mjpegenc: Simplify by moving assert into ff_mjpeg_encode_huffman_close()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
3e1507a954
avcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not requested
...
This limits the bugs, speedloss and extra memory allocation to the case when
optimal tables are needed.
Fixes regressions with slice multi-threading
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
e10bd12c25
avcodec/mjpegenc: Remove non functional huffman reallocation and error handling
...
If this is wanted iam not against it but it must be designed to work with all cases
like slice threads, and a single growing buffer does not work very well with slices.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Rostislav Pehlivanov
d164ef6589
mjpegenc_common: add missing ff_ prefix to init_uni_ac_vlc
...
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
8 years ago
Jerry Jiang
884506dfe2
Implement optimal huffman encoding for (M)JPEG.
...
> seems to break
> make fate-vsynth1-mjpeg-444
Fixed.
8 years ago
Michael Niedermayer
068026b0f7
avcodec/mjpegenc_common: Store approximate aspect if exact cannot be stored
...
Fixes Ticket5244
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
2862b63783
lavc: Move prediction_method to codec private options
...
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>
9 years ago
Carl Eugen Hoyos
d6cfbcd621
lavc/mjpegenc: Add an option to force outputting chroma matrix.
...
RFC 2435 suggests that mjpeg over rtp uses both two tables.
9 years ago
Michael Niedermayer
8b72f6d50b
avcodec/ljpegenc: Fix encoding RGBA LJPEG
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
b26497f824
avcodec/mjpegenc_common: do not ignore the color_range field
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
c50904fd78
avcodec/mjpegenc_common: Use ff_mpv_reallocate_putbitbuffer()
...
Fixes assertion failure
Fixes Ticket4396
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Shiina Hideaki
85ca012ba6
mjpegenc: Fix JFIF header byte ordering
...
The header had a wrong version description.
Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Diego Biurrun
4978850ca2
build: Split JPEG-related tables off into a separate component
10 years ago
Diego Biurrun
e6e3dcba0c
mjpeg: Move code only used in the encoder(s) to the appropriate header
10 years ago
Michael Niedermayer
02729f7a5a
avcodec/mjpegenc_common: Restore removed copyright statements
...
These where removed by libav while spliting the file in adcb8392c9
See: de6d9b6404
See: 723106b279
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
e3fcb14347
dsputil: Split off IDCT bits into their own context
11 years ago
Diego Biurrun
adcb8392c9
mjpeg: Split off bits shared by MJPEG and LJPEG encoders
...
This obviates a dependency of the LJPEG encoder on mpegvideo.
11 years ago
Michael Niedermayer
d41a4a765b
avcodec/mjpegenc: allow encoding amv with height % 16 != 0 when strict -1 is set
...
This should make it simpler for users to test if such videos work
Suggested-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Reimar Döffinger
6d695d7acc
Fix nonsense non-mod16 AMV flipping code.
...
It is obviously nonsense since it produces wrong results
or even crashes (crashes should be encode-only though).
Fixes trac issue #1092 .
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
181b2c3724
avcodec/mjpegenc: disallow encoding amv with height%16!=0
...
I do not know on which side to place the padding to encode with 16x16 MBs
If someone knows or has a known to be correct sample, please contact me
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
256f530603
avcodec/mjpegen: Fix declared argument size
...
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a26e9c1040
avcodec/mjpegenc: Use av_frame_clone() instead of av_frame_ref()
...
This avoids the need for double error checking
Fixes CID1163843
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7dc0aba3fb
avcodec/mjpegenc: use a seperate chroma matrix when luma and chroma differ
...
drop hardcoded TWOMATRIX code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
859d74040e
avcodec/mjpegenc: pass chroma quantization matrix through as well, not just luma
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Nicolas George
2ebaadf35c
lavc/mjpegenc: use proper error codes.
11 years ago
Nicolas George
19a2d101ac
lavc/mjpegenc: check av_frame_alloc() failure.
11 years ago
Michael Niedermayer
5b3f4b3ef5
avcodec/mjpegenc: drop dependancy on sizeof(AVFrame)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2b215f3939
mjpeg/ljpegenc: factor ff_mjpeg_init_hvsample() out
...
This reduces the amount of duplicated code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9a0d719b10
avcodec/mjpegenc/ff_mjpeg_escape_FF: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0ebdf8d9ec
avcodec/mjpegenc: fix and use lossless flag in ff_mjpeg_encode_picture_header()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
978ae13f23
avcodec/mjpegenc: move end padding/alignment to ff_mjpeg_escape_FF()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9fcd58ab26
avcodec/mjpegenc: make escape_FF() non static
...
This will be used by ljpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6005ab3e0e
avcodec/mjpegenc: use av_log2_16bit() in encode_block()
...
This reduces the number of operations done per non zero coefficient
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
daffed3b17
ljpegenc: accept bgr24 instead of bgra
...
The alpha plane is not encoded.
11 years ago
Anton Khirnov
86eb2eaac6
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_dc()
...
This will allow deMpegEncContextizing the LJPEG encoder.
11 years ago
Anton Khirnov
3360ad9955
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_trailer()
...
This will allow deMpegEncContextizing the LJPEG encoder.
11 years ago
Anton Khirnov
058d5f2feb
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_header()
...
This will allow deMpegEncContextizing the LJPEG encoder.
11 years ago
Anton Khirnov
6d70639c7d
mjpegenc: do not pass MpegEncContext to jpeg_table_header()
...
Pass the three needed fields from it directly.
This will allow to deMpegEncContextize the LJPEG encoder.
11 years ago
Anton Khirnov
e1eaaec765
mjpegenc: remove commented out never-to-be-finished WIP cruft
11 years ago
Anton Khirnov
ff506c75b7
mjpegenc: do not pass MpegEncContext to put_huffman_table()
...
It only needs PutBitContext from it, so pass that directly.
11 years ago
Anton Khirnov
a1ba1f20b3
mjpegenc: cosmetics, reformat jpeg_put_comments()
11 years ago
Anton Khirnov
0812f5a40a
mjpegenc: write the JFIF header if the sample aspect ratio is set
...
MpegEncContext.aspect_ratio_info is never set for mjpeg, so this was
never written before.
11 years ago
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325
.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
15d4965239
avcodec/mjpegenc: dont store DQT for LJPEG
...
This may improve compatibility of lgpegs generated by libavcodec
also encoded ljpegs become slightly smaller
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago