1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-10 19:35:05 +02:00
Commit Graph

67 Commits

Author SHA1 Message Date
Derek Buitenhuis
f3af379b5c Merge commit '2862b63783b5556f7f3fb2d097629bc6879f833a'
* commit '2862b63783b5556f7f3fb2d097629bc6879f833a':
  lavc: Move prediction_method to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-03 16:49:19 +00:00
Michael Niedermayer
2d163cbdab avcodec/huffyuvenc: Remove duplicate include
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-29 12:33:22 +01:00
Derek Buitenhuis
5b0d4c247a Merge commit '96c373c7704aeb1cc1d2c275fbb5d71777665589'
* commit '96c373c7704aeb1cc1d2c275fbb5d71777665589':
  lavc: Move context_model to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-28 16:57:04 +00:00
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>
2016-01-21 15:33:19 -05:00
Vittorio Giovara
96c373c770 lavc: Move context_model to codec private options
This option is only used by ffv1 and ffvhuff.
It is a very codec-specific option, so deprecate the global variant.
Improve documentation a little.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Timothy Gu
5e586e1bef huffyuvencdsp: Add ff_diff_bytes_{sse2,avx2}
SSE2 version 4%-35% faster than MMX depending on the width.
AVX2 version 1%-13% faster than SSE2 depending on the width.
2015-10-21 12:25:32 -07:00
Paul B Mahol
6603368ab4 avcodec/huffyuvenc: use AV_OPT_TYPE_BOOL for non_deterministic option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-09 10:01:10 +00:00
Hendrik Leppkes
5d8e836d0e Replace all remaining occurances of step/depth_minus1 and offset_plus1 2015-09-08 17:10:48 +02:00
Michael Niedermayer
29d147c94d Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
* 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>
2015-07-27 23:15:19 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* 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>
2015-07-27 22:50:18 +02:00
Michael Niedermayer
94d68a41fa Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* 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>
2015-07-27 22:10:35 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
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>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
e36db49b7b avcodec: Add a min size parameter to ff_alloc_packet2()
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>
2015-07-27 19:57:52 +02:00
Michael Niedermayer
495eee0123 Merge commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370'
* 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>
2015-07-21 01:17:15 +02:00
Michael Niedermayer
b1fad7ac20 Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'
* 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>
2015-07-20 23:43:05 +02:00
Vittorio Giovara
40cf1bbacc Deprecate avctx.coded_frame
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>
2015-07-20 15:06:50 +01:00
Vittorio Giovara
d6604b29ef Gather all coded_frame allocations and free functions to a single place
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>
2015-07-20 14:16:15 +01:00
Michael Niedermayer
73e150fff7 Merge commit '7d2a6826912b629f17f3b0c5268e334fa123c4c9'
* commit '7d2a6826912b629f17f3b0c5268e334fa123c4c9':
  huffyuv: Check memory allocation

See: 4a722a5cab
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:57:29 +02:00
Vittorio Giovara
7d2a682691 huffyuv: Check memory allocation 2015-05-31 15:03:31 +02:00
Michael Niedermayer
f2978aa7ed Merge commit '43171886e08b6a2f20a1e2f3ecc95a7984b591cd'
* commit '43171886e08b6a2f20a1e2f3ecc95a7984b591cd':
  huffyuvenc: Mark codec as init-thread-safe and init-cleanup

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-24 21:48:27 +02:00
Vittorio Giovara
43171886e0 huffyuvenc: Mark codec as init-thread-safe and init-cleanup 2015-04-24 14:55:11 +01:00
Christophe Gisquet
6ee7681723 huffyuvenc: write last odd sample
If width is odd, last sample wouldn't be written.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-25 23:12:30 +02:00
Christophe Gisquet
1467780772 huffyuvenc: add a non-deterministic option
Not actually used in huffyuvenc, but rather in setting the frame
threading.

Example for some files:
context=0:       851974   27226   1137281
context=1,ND=0:  471819   22604    972351
context=1,ND=1:  472875   22673    972582

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-19 13:47:18 +02:00
Michael Niedermayer
35bb74900b Merge commit 'c67b449bebbe0b35c73b203683e77a0a649bc765'
* commit 'c67b449bebbe0b35c73b203683e77a0a649bc765':
  dsputil: Split bswap*_buf() off into a separate context

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/ac3dec.c
	libavcodec/ac3dec.h
	libavcodec/apedec.c
	libavcodec/eamad.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/huffyuvdec.c
	libavcodec/motionpixels.c
	libavcodec/truemotion2.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 13:31:26 +02:00
Diego Biurrun
c67b449beb dsputil: Split bswap*_buf() off into a separate context 2014-06-22 18:22:31 -07:00
Christophe Gisquet
e7fc5d53a0 huffyuv: change statistics initialization
Normally, a Laplace distribution is more typical of the residuals
encoded, but for noisy input, it's both better and simpler to be
safe and use a 1/d^2 distribution. Second hunk could use some
renormalization but it has effectively little impact.

Output size of ffvhuff on various 4:2:0 sequences:
context=0,1/d:    851974   27226   1137281
context=0,1/d²:   619081   25069   1051500
context=0,1/d³:   501983   30454   1290561
context=0,lapl:   500650   31754   1304082

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 06:03:51 +02:00
Michael Niedermayer
334aafe565 avcodec/huffman/ff_huff_gen_len_table: support skiping stat=0 entries
This is probably not the simplest solution but as this is needed for a bugfix,
simplification is left for later.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 14:56:00 +02:00
Michael Niedermayer
40a4ab8ba4 rename sub_hfyu_median_prediction_int16 to sub_hfyu_median_pred_int16
This makes the naming more consistent with the 8bit variant

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 19:48:23 +02:00
Michael Niedermayer
48a6916308 Merge commit '512f3ffe9b4bb86767c2b1176554407c75fe1a5c'
* 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>
2014-05-28 00:03:59 +02:00
Diego Biurrun
512f3ffe9b dsputil: Split off HuffYUV encoding bits into their own context
Also shorten HuffYUV context member names to avoid clutter.
2014-05-27 08:54:53 -07:00
Michael Niedermayer
9e58677438 avcodec/huffyuvenc: Make version 3 of ffvhuff non experimental
Tested-by: Tim Nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-07 23:24:38 +02:00
Michael Niedermayer
80793afb17 Merge commit '2f02bbcca050936686482453078e83dc25493da0'
* commit '2f02bbcca050936686482453078e83dc25493da0':
  build: Let the ffvhuff decoder/encoder depend on the huffyuv decoder/encoder

Conflicts:
	configure
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-01 12:37:38 +01:00
Diego Biurrun
2f02bbcca0 build: Let the ffvhuff decoder/encoder depend on the huffyuv decoder/encoder
Almost all of the code is shared so there is little point in
enabling one decoder/encoder without the other.
2014-02-28 21:17:01 +01:00
Michael Niedermayer
59279bf21f avcodec/huffyuvenc: only allocate stats_out when it will be used
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-15 15:06:29 +01:00
Michael Niedermayer
bb7a711156 avcodec/huffyuvenc: frame multi-threading support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-28 14:51:42 +01:00
Michael Niedermayer
2a9c50798b avcodec/huffyuv: dont depend on bitstream_bpp having a specific value for version>2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-28 00:27:57 +01:00
Michael Niedermayer
6369766f01 avcodec/huffyuv: support gbrp9/10/12/14
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 02:11:29 +01:00
Michael Niedermayer
7cf8918b0d avcodec/huffyuv: update years in copyright
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 01:45:57 +01:00
Michael Niedermayer
599e629f88 avcodec/huffyuvenc: fix end pointer for stats_out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 16:24:36 +01:00
Michael Niedermayer
a301bb63f0 avcodec/huffyuvenc: fail if stats_out is too small instead of silently truncating
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 16:23:45 +01:00
Michael Niedermayer
53167ecfdb avcodec/huffyuv: support AV_PIX_FMT_YUV(A)4XYP16 and GRAY16
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 00:23:03 +01:00
Michael Niedermayer
d9779d648e Move sub_hfyu_median_prediction_int16() to losslessviddsp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 23:02:58 +01:00
Michael Niedermayer
f9c7b14c04 avcdoec/huffyuvenc: optimize sub_left_prediction()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 22:12:56 +01:00
Michael Niedermayer
f70d7eb20c Move add/diff_int16 to lossless_videodsp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 21:32:47 +01:00
Michael Niedermayer
da0684820a avcodec/dsputil/huffyuv: move diff int16 and add int16 to dsputil
This also fixes masking the bits

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 04:06:04 +01:00
Michael Niedermayer
2fd39642c9 avcodec/huffyuv: fix median prediction for >8bps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 18:33:17 +01:00
Michael Niedermayer
3d87927959 avcodec/huffyuv: add YUVA{420,422,444}P{9,10} support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 17:43:24 +01:00
Michael Niedermayer
ef0282125c avcodec/huffyuv: add YUV{420,422,444}P{9,10,12,14} support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 17:29:58 +01:00
Michael Niedermayer
b53aab1a58 libavcodec/huffyuv: >8 bit support
This adds only yuv420p10, others are trivial to add after this commit
and will be added in a subsequent commit.
Currently the implementation is not optimized, optimizations will be
added later

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 16:59:15 +01:00