Michael Niedermayer
b27d4fd997
Revert "libavcodec/utils: av_get_exact_bits_per_sample fixed to return "1" for DSD codecs."
...
Requested-by: Ganesh Ajjanagadde <gajjanag@mit.edu> (original patch reviewer)
This reverts commit 293e25be61
.
2015-08-01 03:25:04 +02:00
Ihar A. Tumashyk
293e25be61
libavcodec/utils: av_get_exact_bits_per_sample fixed to return "1" for DSD codecs.
...
All DSD codes have 1 bit per sample.
https://en.wikipedia.org/wiki/Direct_Stream_Digital
Signed-off-by: Ihar A. Tumashyk <itumashyk@gmail.com>
Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-01 01:49:21 +02:00
Michael Niedermayer
9789595189
avcodec/utils: Set coded_frame.pict_type in generic code
...
This makes it possible to remove more coded_frame usage without breaking the
publically visible coded_frame
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-29 01:45:32 +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
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
9fe873bec8
avcodec/utils: do not use internal->byte_buffer when little downsizing is expected
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 20:03:02 +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
James Almer
d32547a24a
avcodec/utils: silence some deprecation warnings
...
And prevent eventual compilation failures once the relevant functions
and fields are removed.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-21 13:03:29 -03: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
809780ca42
avcodec/utils: Do not merge side data for encoders
...
With side data now being added to every MPEG*/H26* video encoder
in the form of a quality scalar, software which simply stores
the pkt->data to get an ES stream would break.
This also as a side-effect makes the code faster
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 00:54:59 +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
ea8785ceda
avcodec/utils: Check that channel count is valid in avcodec_open2();
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-19 18:17:45 +02:00
Carl Eugen Hoyos
8dad213143
lavc: Add properties field to AVCodecContext.
...
The new field can hold information about losslessness and closed captions for now.
2015-07-16 12:18:30 +02:00
Michael Niedermayer
10d7d0880c
avcodec/utils: Check that the sample rate is not negative when opening an encoder
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 03:51:33 +02:00
Michael Niedermayer
d6ff68ad85
Factor duplicated ff_fast_malloc() out into mem_internal.h
...
internal.h is difficult to use due to circular dependancies
mem.h is a public header ff_* is not public
Alternative solutions probably are possible too
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 02:41:43 +02:00
Michael Niedermayer
f8db81074a
avcodec/utils: Assert that the pointer is set when size is in ff_fast_malloc()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 23:36:45 +02:00
Michael Niedermayer
59a07df067
avcodec/utils: Avoid undefined void casts in ff_fast_malloc()
...
based on code from libavutil/mem.c
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 23:24:16 +02:00
Michael Niedermayer
bc976e5793
avcodec/utils: Fix potential overflow in overallocation code
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 22:46:44 +02:00
Michael Niedermayer
47d077337a
avcodec/utils: Document 32 min for h264 width
...
Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 18:31:42 +02:00
Michael Niedermayer
7ef6656b1e
avcodec/utils: use a minimum 32pixel width in avcodec_align_dimensions2() for H.264
...
Fixes Assertion failure
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 15:18:41 +02:00
Michael Niedermayer
e83ffb48ac
avcodec/utils: Check values in apply_param_change()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 12:06:17 +02:00
Marton Balint
859731d642
lavc/utils: get rid of add_metadata_from_side_data forward declaration
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 01:02:35 +02:00
Marton Balint
9476c4c67e
lavc/utils: call add_metadata_from_side_data in ff_init_buffer_info
...
This should ensure that each frame get its metadata from its proper packet
regardless of frame delays caused by reordering or threading.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 00:39:29 +02:00
Marton Balint
10b6a83fb3
lavc/utils: change add_metadata_from_side_data to accept avpacket
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 00:08:48 +02:00
Marton Balint
3a19fe0048
lavc/utils: remove redundant call to ff_init_buffer_info
...
It does the same as calling ff_decode_frame_props.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 00:07:55 +02:00
Michael Niedermayer
aab4dbe534
avcodec/utils: Replace ENOTSUP by AVERROR_PATCHWELCOME
...
ENOTSUP is not available on all platforms
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-27 11:19:57 +02:00
Philip Langdale
b69bea3ab8
avcodec: Add flag for experimental HWAccels and use it for VDPAU/HEVC
...
This HWAccel isn't really usable right now due to an nvidia driver bug,
so we don't want it selected by default.
HWAccels have a capabilities field and there's a comment about flags,
but no flags exist today, so let's add one for experimental hwaccels.
2015-06-26 19:07:51 -07:00
Michael Niedermayer
ffd9d60201
avcodec: Add codec_desc and remapping for AV_CODEC_ID_PCM_S16BE_PLANAR_DEPRECATED
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-24 20:37:02 +02:00
Paul B Mahol
5a79bf0284
PCM signed 16-bit big-endian planar decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-24 14:45:00 +01:00
Rodger Combs
7e7256c3a4
lavc: add little-endian ADPCM_THP decoder
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-20 16:33:39 +02:00
Rodger Combs
bb42a7d4d4
lavf/brstm: add support for BFSTM files
...
Previous version reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-17 13:24:11 +02:00
Michael Niedermayer
c94d9079b1
avcodec/utils: Assert that audio decoders do not report using more data than was input
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-04 23:10:56 +02:00
Carl Eugen Hoyos
70c0433525
lavc: Print a warning if gray decoding was requested but not enabled.
2015-05-17 10:22:03 +02:00
Ronald S. Bultje
57f970a704
lavc: add yuv440p10/12 formats to aligned pixfmt list.
2015-05-06 12:04:31 -04:00
Michael Niedermayer
b112e25dde
Merge commit 'a78f5548d94f23ce23cece41edf0fe9d18926de6'
...
* commit 'a78f5548d94f23ce23cece41edf0fe9d18926de6':
avcodec: Free the default avoptions on init failure
See: 1907ff0a67
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-23 21:41:23 +02:00
Michael Niedermayer
c39b07ff28
Merge commit 'aef0be08756e00f363c524453c948a6e2a348614'
...
* commit 'aef0be08756e00f363c524453c948a6e2a348614':
avcodec: Unref the dummy buffer on the fail path
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-23 21:20:07 +02:00
Luca Barbato
a78f5548d9
avcodec: Free the default avoptions on init failure
2015-04-22 12:27:13 +02:00
Luca Barbato
aef0be0875
avcodec: Unref the dummy buffer on the fail path
2015-04-22 12:27:13 +02:00
wm4
95f524aff5
lavc: use correct type for printf() argument
...
This was passing uint32_t for %d.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 21:45:07 +02:00
wm4
2b5f34f788
avformat, avcodec: log discard padding
...
Useful for debugging.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 21:37:46 +02:00
Michael Niedermayer
a994fc39b3
avcodec/utils: mark codec argument as const in ff_lock_avcodec()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 23:33:31 +01:00
Michael Niedermayer
b14de8e689
avcodec/utils: use atomic operations on entangled_thread_counter
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 23:59:07 +01:00
Michael Niedermayer
a048bd44b2
Merge commit '117b432748ca87de4cd0f09d9b1495545e264733'
...
* commit '117b432748ca87de4cd0f09d9b1495545e264733':
lavc: Introduce AVCodec internal capabilities
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 22:38:53 +01:00
Michael Niedermayer
79f013a206
Merge commit '9993a067f6c8c7e7838052ac3146aa6b80dd7e81'
...
* commit '9993a067f6c8c7e7838052ac3146aa6b80dd7e81':
lavc: Improve thread locking error message
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 22:02:19 +01:00