1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-11 03:45:05 +02:00
Commit Graph

129 Commits

Author SHA1 Message Date
Michael Niedermayer
2c1d38d1e1 avcodec/snowenc: Clear MMX state after edge drawing and picture encode
Fixes undefined behavior from calling libc allocation with unclean FPU state.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-22 13:46:58 +02:00
Derek Buitenhuis
96d616052b Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13':
  build: Split test programs off into separate files

Some conversions done by: James Almer <jamrial@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-11 19:13:03 +01:00
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
Derek Buitenhuis
e8c5d5f429 snow: Move scenechange_threshold to a private option
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-28 15:36:06 +00:00
Derek Buitenhuis
21f9468402 avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Libav, for some reason, merged this as a public API function. This will
aid in future merges.

A define is left for backwards compat, just in case some person
used it, since it is in a public header.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 16:36:46 +00:00
Michael Niedermayer
5b4da8a38a avcodec/motion_est: Fix mv_penalty table size
Fixes out of array read

Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-05 18:10:34 +01:00
Ganesh Ajjanagadde
c5b3c4c741 lavc/snowenc: replace rint by lrint
avoids float to int cast.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-26 20:29:22 -08:00
Clément Bœsch
fb99ef0bd3 avcodec: use AV_OPT_TYPE_BOOL in a bunch of places 2015-12-04 15:37:05 +01:00
Ganesh Ajjanagadde
4870d8518a avcodec/snowenc: use log2 instead of log() / log(2...)
This is likely more precise and conveys the intent better.
The expression has also been accordingly simplified.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:46:00 -04:00
Hendrik Leppkes
5fa5e73e81 Merge commit '1aa24df74c052a73175c43e57d35b4835e537ec8'
* commit '1aa24df74c052a73175c43e57d35b4835e537ec8':
  lavu: Deprecate AVFrame.error[]

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 09:52:39 +02:00
Michael Niedermayer
01770bfda0 avcodec/snowenc: Do not write into const AVFrame
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 23:26:39 +02:00
Michael Niedermayer
55b803e33e avcodec/snowenc: Remove unused new_picture field
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 23:26:39 +02:00
Michael Niedermayer
4bd99f715d avcodec/snowenc: Support setting the iterative dia size separately
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-30 04:23:30 +02:00
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.
2015-08-28 14:40:59 -04:00
Michael Niedermayer
16df02fd2e avcodec/snowenc: Avoid use of deprecated me_method
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-09 14:33:31 +02:00
Michael Niedermayer
1ca042a14b avcodec/snowenc: Export quality/pict_type/PSNR stats through side data
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-28 02:22:23 +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
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
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
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
Michael Niedermayer
db8ae37a78 Merge commit 'da0c8664b4dc906696803685f7e53ade68594ab8'
* commit 'da0c8664b4dc906696803685f7e53ade68594ab8':
  mpegvideo: Move various temporary buffers to a separate context

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/rv34.c
	libavcodec/vc1_mc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 21:05:12 +02:00
Clément Bœsch
533c37db8d avcodec/snowenc: use av_clip() instead of nested min & max
Note: AVCodecContext.refs is an int field.
2015-06-06 13:18:28 +02:00
Michael Niedermayer
89fa32e5b4 avcodec/snowenc: avoid floats in the rangecoder initialization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 22:30:30 +02:00
Michael Niedermayer
d9b264bc73 Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42':
  mpegvideo: Drop flags and flags2

Conflicts:
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/ratecontrol.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:24:41 +02:00
Michael Niedermayer
729108515d avcodec/snowenc: set dia_size for the first pass of motion estimation too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 14:19:56 +02:00
Michael Niedermayer
58201c6e9e avcodec/snowenc: correct fullpel search pattern
No real difference in quality, its a bit slower for the same dia_size as more
vectors are searched for the same dia_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 02:38:05 +02:00
Michael Niedermayer
db6d0a5bd2 avcodec/snowenc: Fix used reference MV in fullpel iterative ME
This very very slightly improves quality, no measurable speed change

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 01:05:42 +02:00
Michael Niedermayer
f349703e1d avcodec/snowenc: change log level for iterative ME information to debug level
The printed stuff should be useless to the average user and its certainly
not an error.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 00:46:02 +02:00
Michael Niedermayer
b62297805b avcodec/snowenc: add intra_penalty AVOption
This allows favoring intra or inter blocks by a user specified amount.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-09 23:52:36 +02:00
Michael Niedermayer
d49210788b avcodec/snowenc: Mark as FF_CODEC_CAP_INIT_THREADSAFE and FF_CODEC_CAP_INIT_CLEANUP
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-25 12:58:17 +02:00
Michael Niedermayer
385fe984fc avcodec/snowenc: Check av_frame_ref() return value
Fixes CID1026740

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-31 04:33:50 +02:00
Michael Niedermayer
7517e932ff avcodec/snow: fix support for odd dimensions
Fixes Ticket3914

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-22 23:34:53 +01:00
Michael Niedermayer
34a8de866f avcodec/snowenc: Allocate and reference coded_frame correctly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 19:47:04 +01:00
Michael Niedermayer
d301a13427 avcodec/snowenc: Use av_clip_uint8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 15:44:34 +01:00
Michael Niedermayer
88a46fa8c9 avcodec/snowenc-test: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 15:04:15 +01:00
Michael Niedermayer
482761b85a avcodec/snowenc-test: check for av_malloc*() failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 15:02:36 +01:00
Michael Niedermayer
7ababb85f9 avcodec/snow: clear freed pointers
Avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-16 23:48:38 +01:00
Michael Niedermayer
d4e62ebae7 avcodec/snowenc: remove redundant FF_MPV_OFFSET()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-20 04:09:43 +02:00
Michael Niedermayer
bf301258b4 avcodec/snowenc: add FF_MPV_COMMON_OPTS
This fixes the ratecontrol code with snow
adding FF_MPV_COMMON_OPTS is needed as the generic rate control options
are currently in the (unrelated) MpegEncContext

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-18 19:41:48 +02:00
Michael Niedermayer
85f0bde4f0 avcodec/snowenc: remove out-commented assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-26 15:20:58 +02:00
Michael Niedermayer
3a2d1465c8 Merge commit '2d60444331fca1910510038dd3817bea885c2367'
* commit '2d60444331fca1910510038dd3817bea885c2367':
  dsputil: Split motion estimation compare bits off into their own context

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/arm/Makefile
	libavcodec/dvenc.c
	libavcodec/error_resilience.c
	libavcodec/h264.h
	libavcodec/h264_slice.c
	libavcodec/me_cmp.c
	libavcodec/me_cmp.h
	libavcodec/motion_est.c
	libavcodec/motion_est_template.c
	libavcodec/mpeg4videoenc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/x86/Makefile
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-17 23:27:40 +02:00
Michael Niedermayer
8156e036e5 avcodec/snowdec: remove mpegvideoencdsp dependency
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-16 04:20:59 +02:00
Michael Niedermayer
3790801f9c Merge commit '3c650efb81aaa3b395ba4606ee68a47ee4efb57b'
* commit '3c650efb81aaa3b395ba4606ee68a47ee4efb57b':
  dsputil: Move draw_edges() to mpegvideoencdsp

Conflicts:
	libavcodec/mpegvideo_enc.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>
2014-07-07 16:17:27 +02:00
Michael Niedermayer
b96c9513f3 avcodec/snow: factor ff_snow_get_buffer() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 04:49:09 +02:00
Michael Niedermayer
e059ac59ef avcodec/snow: ensure the buffers have allocated edges
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 20:52:06 +02:00
Michael Niedermayer
98a6806fdd Merge commit '368f50359eb328b0b9d67451f56fda20b3255f9a'
* commit '368f50359eb328b0b9d67451f56fda20b3255f9a':
  dsputil: Split off quarterpel bits into their own context

Conflicts:
	configure
	libavcodec/dsputil.c
	libavcodec/h263dec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/vc1dec.c
	libavcodec/vc1dsp.c
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/qpeldsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 02:43:34 +02:00
Michael Niedermayer
2baf1c8c60 avcodec/snowenc: Fix "incompatible pointer type" warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-06 01:03:58 +02:00
Michael Niedermayer
77df9de78c avcdoec/snowenc: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-03 20:08:18 +02:00
Michael Niedermayer
2ca553ed9c avcodec/snowenc: remove operations that have become redundant with AVFrame pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 16:17:22 +02:00
Michael Niedermayer
59a53842d3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: operate with pointers to AVFrames instead of whole structs

Conflicts:
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/intrax8.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/mpegvideo_xvmc.c
	libavcodec/msmpeg4.c
	libavcodec/ratecontrol.c
	libavcodec/vaapi.c
	libavcodec/vc1dec.c
	libavcodec/vdpau_vc1.c

See: fc567ac49e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 15:18:46 +02:00