1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
Commit Graph

151 Commits

Author SHA1 Message Date
Ronald S. Bultje
b07d2a2509 libvpxenc: make flags i64 instead of dbl. 2015-08-18 12:04:57 -04:00
Ronald S. Bultje
6471040f56 FF_OPT_TYPE_* -> AV_OPT_TYPE_*. 2015-08-18 11:48:49 -04:00
James Zern
9723d439fd libvpxenc: report pict_type/error via side-data
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Zern <jzern@google.com>
2015-07-29 19:59:20 -07:00
James Zern
88df16fe6d libvpxenc: quiet coded_frame deprecation warnings
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Zern <jzern@google.com>
2015-07-29 19:59:19 -07: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
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +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
Michael Niedermayer
96504b3f72 Merge commit 'd6006dd9f0d4d01023359230212f1f9fa4800e5b'
* commit 'd6006dd9f0d4d01023359230212f1f9fa4800e5b':
  libvpxenc: Do not entangle coded_frame

Conflicts:
	libavcodec/libvpxenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 22:05:27 +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
Vittorio Giovara
d6006dd9f0 libvpxenc: Do not entangle coded_frame
Keep coded_frame.key_frame a write-only variable.
2015-07-20 14:13:42 +01:00
Michael Niedermayer
1e7008675b Merge commit '8655c54160767de1a6b96f8bc310d6e4eaceff48'
* commit '8655c54160767de1a6b96f8bc310d6e4eaceff48':
  libvpx: Support the vp9 extended profiles

Conflicts:
	Changelog
	configure
	libavcodec/libvpx.c
	libavcodec/libvpx.h
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/version.h

mostly not merged, as requested by jamrial

See: 01e59d48ed
See: 079b7f6eac and others
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-21 22:57:54 +02:00
Michael Niedermayer
30e9ebb14f Merge commit '05bf3f54e6078716f6267df530bf1d474ca3d606'
* commit '05bf3f54e6078716f6267df530bf1d474ca3d606':
  libvpx: Do not set vp8 only parameters when encoding in vp9

Conflicts:
	libavcodec/libvpxenc.c

See: 238ec505e2
See: ae330070ee
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-21 21:08:05 +02:00
Luca Barbato
8655c54160 libvpx: Support the vp9 extended profiles
Bump the minimum libvpx version to 1.3.0 and rework the configure logic
to fail only if no decoders and encoders are found.

Based on the original patch from Vittorio.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-21 16:27:18 +03:00
James Zern
9b747500f3 libvpxenc: support setting colorspace for vp9
the vp9 bitstream supports 8 values:
unknown (default), bt601, bt709, smpte170, smpte240, bt2020, reserved
and sRGB.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2015-06-20 16:30:46 -07:00
Luca Barbato
05bf3f54e6 libvpx: Do not set vp8 only parameters when encoding in vp9 2015-06-20 12:18:01 +03:00
James Zern
a829040c43 libvpxenc: remove stray '\'s
Signed-off-by: James Zern <jzern@google.com>
2015-06-15 12:36:38 -07:00
James Zern
e6c71385f0 libvpxenc: cosmetics: reindent after 2c70436
Signed-off-by: James Zern <jzern@google.com>
2015-06-15 12:36:37 -07:00
James Zern
fd004e10d3 libvpxenc: add overshoot-pct option
balances the presence of undershoot-pct

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Zern <jzern@google.com>
2015-06-10 21:01:32 -07:00
James Zern
2c70436e69 libvpxenc: add undershoot-pct option
replaces deprecated rc_buffer_aggressivity

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Zern <jzern@google.com>
2015-06-10 21:01:20 -07:00
James Almer
40bf3687a1 libvpx: add support for yuv440p and yuv440p10/12 encoding
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-20 20:08:56 -03:00
James Zern
e07ef1ada3 libvpxenc: cosmetics: reindent
Signed-off-by: James Zern <jzern@google.com>
2015-04-24 00:00:12 -07:00
James Zern
238ec505e2 libvpxenc: only set noise reduction w/vp8
this quiets a warning:
Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified
internal error

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Zern <jzern@google.com>
2015-04-23 23:59:41 -07:00
Deb Mukherjee
26a0bcb15b Support for VP9 high-color/high-bit-depth encoding
Patch to support VP9 encoding with new profiles 1-3.
Profile 1 (8-bit 422/444) should work with default libvpx
configuration.
However you will need to configure libvpx with
--enable-vp9-highbitdepth before building and linking
with ffmpeg for profile 2 (10-/12-bit 420) and profile 3
(10-/12-bit 422/444) encoding.

You may use the appropriate profile option on the
command line:
-profile:v 1 for 422/444 8-bit encoding
-profile:v 2 for 420 10-/12- bit encoding
-profile:v 3 for 422/444 10-/12-bit encoding
If you do not use the -profile:v option, it will be deduced
from the source format.

Signed-off-by: James Zern <jzern@google.com>
2015-04-20 15:24:13 -07:00
Michael Niedermayer
2a8198b32f avcodec/libvpxenc: Set min/max quantizer to 0 for lossless mode
Fixes Ticket4246

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-20 19:22:33 +01:00
Michael Niedermayer
cf714205bd avcodec/libvpxenc: Clear twopass_stats.sz on deallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-09 21:18:43 +01:00
Michael Niedermayer
a11440c185 Merge commit '93f7948136fcda8ddbbc44a6c24418f11ca829b8'
* commit '93f7948136fcda8ddbbc44a6c24418f11ca829b8':
  libvpx: Fix mixed use of av_malloc() and av_reallocp()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-09 21:18:36 +01:00
Vittorio Giovara
93f7948136 libvpx: Fix mixed use of av_malloc() and av_reallocp()
This buffer is resized when vpx_codec_get_cx_data() returns a
VPX_CODEC_STATS_PKT packet.

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-09 12:58:18 +00:00
Clément Bœsch
546d69eb43 avcodec: use av_frame_free() for coded_frame 2015-03-02 21:27:21 +01:00
Michael Niedermayer
21518f5a0a avcodec/libvpxenc: Check for av_malloc() failure
Fixes CID1271045

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 02:40:16 +01:00
Matt Oliver
87deebe11a avcodec/libvpxenc.c: Fix linking with codec interface with msvc.
Default libvpx msvc buils used module definition to export symbols.
These symbols are exported as pointers to data which dont link when
referenced directly.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 21:10:02 +01:00
Michael Niedermayer
8426edef4c Merge commit '771656bd85416cd6308b11aed6f2c69a8db9c21b'
* commit '771656bd85416cd6308b11aed6f2c69a8db9c21b':
  libvpxenc: clean memory on error

Conflicts:
	libavcodec/libvpxenc.c

See: 104b1d9e10
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 03:08:20 +01:00
Vittorio Giovara
771656bd85 libvpxenc: clean memory on error
CC: libav-stable@libav.org
Bug-Id: CID 733795
2014-11-18 00:38:56 +01:00
Michael Niedermayer
765abb3b76 avcodec/libvpxenc: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-19 03:04:04 +02:00
Michael Niedermayer
8be1120deb Merge commit '685be3d1aecf965281128f3b631ed965bcfa754d'
* commit '685be3d1aecf965281128f3b631ed965bcfa754d':
  libvpxenc: add static-thresh private option

Conflicts:
	libavcodec/libvpxenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-18 15:33:57 +02:00
Anton Khirnov
685be3d1ae libvpxenc: add static-thresh private option
Currently, this option is accessed through AVCodecContext.mb_threshold,
which originally controlled reusing MB data when transcoding mpeg to
mpeg. Since the libvpx meaning is completely different from the original
mpegvideo meaning, it is better to use a separate private option for
this.
2014-10-18 05:28:03 +02:00
Stefano Sabatini
39b517fac0 lavc/libvpxenc: show crf CQ value in error message 2014-09-05 11:20:07 +02:00
Deb Mukherjee
b543a29020 avcodec/libvpxenc: Adds support for constant quality mode in VP9.
Changes in the parameter mapping for libvpx to support the constant
quality mode in VP9. The assumption in the patch is that if crf is
provided but bitrate is 0, then the 'constant quality' mode of VP9
is used. However if both are present, the 'constrained quality' mode
is used as before.

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-28 15:21:57 +02:00
Deb Mukherjee
b6a0b8bcf4 Adds support for setting aq_mode in libvpx encoder
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-08-27 23:12:47 -03:00
Michael Niedermayer
60dbed6067 Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'
* commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867':
  cosmetics: Write NULL pointer inequality checks more compactly

Conflicts:
	libavcodec/dvdsubdec.c
	libavcodec/h263dec.c
	libavcodec/libxvid.c
	libavcodec/rv10.c
	libavcodec/utils.c
	libavformat/format.c
	libavformat/matroskadec.c
	libavformat/segment.c
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:26:12 +02:00
Michael Niedermayer
fb33bff990 Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39':
  cosmetics: Write NULL pointer equality checks more compactly

Conflicts:
	cmdutils.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/dvbsub.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/dxa.c
	libavcodec/libxvid_rc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/rv10.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/zmbv.c
	libavdevice/v4l2.c
	libavformat/matroskadec.c
	libavformat/movenc.c
	libavformat/sdp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:00:50 +02:00
Gabriel Dume
4b1f5e5090 cosmetics: Write NULL pointer inequality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 05:34:13 -07:00
Rafaël Carré
9affa784a0 vp9 encoder: use a decent default speed setting
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-17 21:38:43 +02:00
Michael Niedermayer
71da91e887 avcodec/libvpxenc: update the ranges for "cpu_used" so it matches the "speed" alias
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-06 23:52:20 +02:00
Rafaël Carré
5265e3e40f avcodec/libvpxenc: Update the "cpu-used" options default to match the "speed" alias
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-06 23:50:03 +02:00
Carl Eugen Hoyos
ced0d6c14d Use correct msvc type specifiers for ptrdiff_t and size_t.
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472.

Reviewed-by: Ronald Bultje
2014-04-24 18:01:30 +02:00