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
Diego Biurrun
2a61592573
avcodec: Remove some commented-out debug cruft
11 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Michael Niedermayer
41bebda485
mjpegenc: fix restart interval parameters for yuv444
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
28b85b1fff
mjpegenc: fix YUV444 with w%16!=0
...
Fixes Ticket2040
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
633ae5a210
mjpegenc: fix 444 block count so it is below 10
...
Fixes Ticket1990
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
9f02d4ed0f
mjpegenc: yuvj444p support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago