Vittorio Giovara
d37faad0cd
mjpeg: Use profile names in the encoder and decoder
6 years ago
Davinder Singh
4116b2b136
avcodec/mjpegenc: cosmetic changes
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Davinder Singh
1939b90306
avcodec/mjpegenc: disable unused code with AMV
...
disable unused amv_encode_picture() when AMV encoder is not configured.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 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
45eeb1f785
mjpegenc: enable optimal huffman coding by default
...
As it gives excellent encoding gains at an insignificant speed increase
and passes fate without problems, it should now be safe to enable by
default.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
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
f57665b318
avcodec/mjpegenc: Revert some differences in ff_mjpeg_encode_mb() relative to pre optimal huffman
...
The changes are not needed anymore and the return code was never used
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
daccbe81a2
avcodec/mjpegenc: Drop i_tex misuse, set itex/header bits correctly, fix 2pass encoding
...
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
a70f0927ea
mjpegenc: use s->avctx as a context for av_log rather than NULL
...
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
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
Diego Biurrun
0f40c90984
Drop pointless assert.h #includes
9 years ago
Derek Buitenhuis
c4ef6c883b
mjpegenc: Remove duplicate initializer
...
This was causing c99conv to crash.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
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
Ronald S. Bultje
2fb593dcb9
Put remaining pieces of CODEC_FLAG_EMU_EDGE under FF_API_EMU_EDGE.
...
The amv one probably looks suspicious, but since it's an intra-only
codec, I couldn't possibly imagine what it would use the edge for,
and the vsynth fate result doesn't change, so it's probably OK.
9 years ago
Diego Biurrun
4978850ca2
build: Split JPEG-related tables off into a separate component
10 years ago
Michael Niedermayer
f8b743b9e6
avcodec/mjpegenc: Mark ff_mjpeg_encode_close() as av_cold
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7cac568b39
avcodec/mjpegenc: support trellis quantization
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
db71c4926d
mjpegenc: fix argument size in encode_mb
...
CC: libav-stable@libav.org
Bug-Id: CID 1047235
10 years ago
Michael Niedermayer
0c6c5d7bcb
avcodec/mjpegenc: use av_freep(), avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ae6ba2db8f
avcodec/mjpegenc: add priv_class to encoders
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
b227be34db
avcodec/mjpegenc: the AMV encoder doesnt support yuv422
...
Fixes Ticket3883
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
835f798c7d
mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes
10 years ago
Nidhi Makhijani
c3ec963d0d
mjpeg: return proper error code
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 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