Commit Graph

145 Commits

Author SHA1 Message Date
Michael Niedermayer
bf6d41d8a2 avcodec/internal: Fix skiped typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-17 01:23:10 +01:00
Matthieu Bouron
e162542e15 lavc/internal: add FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
The decoder extracts and fills its parameters even if the frame is
skipped due to the skip_frame setting.
2015-11-15 10:13:00 +01:00
Andreas Cadhalpun
a4680e7170 avcodec: rename avpriv_color_frame to ff_color_frame
It is only used inside libavcodec.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-22 00:38:50 +02:00
Derek Buitenhuis
abaa12263e avcodec: Don't lock during open if the codec has threadsafe init
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-10-02 14:07:14 +01:00
Michael Niedermayer
b947ac9096 avcodec/internal: Use do {} while() for ff_tlog()
Avoids problems when used without braces

Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 12:56:29 +02:00
Ganesh Ajjanagadde
4e2471ef1d avcodec/internal: silence -Wempty-body on clang
This silences a -Wempty-body warning on clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 11:29:49 +02:00
Hendrik Leppkes
264ff3dd2e Merge commit '87a051f97633010f71dfc1d23d806856499bf231'
* commit '87a051f97633010f71dfc1d23d806856499bf231':
  lavc: allow asynchronous decoders to return correct pkt_dts values

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 13:30:33 +02:00
wm4
87a051f976 lavc: allow asynchronous decoders to return correct pkt_dts values
The generic code in utils.c sets the AVFrame.pkt_dts field from the
packet it was supposedly decoded. This does not have to be true for a
fully asynchronous decoder like mmaldec. It could be overwritten with an
incorrect value. Even if the decoder doesn't determine the DTS (but sets
it to AV_NOPTS_VALUE), it's impossible to determine a correct value in
utils.c.

Decoders can now be marked with FF_CODEC_CAP_SETS_PKT_DTS, in which case
utils.c won't overwrite the field. The decoders are expected to set this
field (even if they only set it to AV_NOPTS_VALUE).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:27:19 +02:00
Hendrik Leppkes
64c33f9624 avcodec: remove deprecated old audio encode API 2015-09-05 21:15:55 +02:00
Ronald S. Bultje
70a19c482a Move ff_dlog from lavc to lavu. 2015-08-18 09:46:49 -04:00
Michael Niedermayer
d903b62750 avcodec/internal: improve min_size documentation for ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-04 04:16:43 +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
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
Michael Niedermayer
0dbfb5386f avcodec/internal: Deprecate ff_alloc_packet() in favor of ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-27 19:58:36 +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
c40ecffd31 Replace AV_PKT_DATA_QUALITY_FACTOR by AV_PKT_DATA_QUALITY_STATS
The stats are a superset of the quality factor, also allowing the picture type and encoder "PSNR" stats to be exported
This also replaces the native by fixed little endian order for the affected side data

AV_PKT_DATA_QUALITY_FACTOR is left as a synonym of AV_PKT_DATA_QUALITY_STATS

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-22 19:31:52 +02:00
Carl Eugen Hoyos
7f0d540188 lavc: Allow 64 channels internally. 2015-07-17 00:16:45 +02:00
Michael Niedermayer
a8ab64d2f7 Merge commit '910247f1720c6aae422723c05dac6d0b19f20bec'
* commit '910247f1720c6aae422723c05dac6d0b19f20bec':
  lavc: Deprecate avctx.{inter,intra}_quant_bias

Conflicts:
	libavcodec/mpegvideo_enc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-03 03:40:22 +02:00
Vittorio Giovara
910247f172 lavc: Deprecate avctx.{inter,intra}_quant_bias
They are used by dnxhd and mpegvideo_enc exclusively, move them to codec
private options instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-02 22:37:59 +01:00
Michael Niedermayer
036162a378 Merge commit '5bba3ab0cf7a0238ee1ea31ca2da08ce860fd8f9'
* commit '5bba3ab0cf7a0238ee1ea31ca2da08ce860fd8f9':
  internal: Make dlog/tlog a no-op when disabled

Conflicts:
	libavcodec/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-24 20:49:45 +02:00
Vittorio Giovara
5bba3ab0cf internal: Make dlog/tlog a no-op when disabled
Improves Coverity analysis, avoiding "double semicolon" CIDs.
2015-04-24 14:55:10 +01:00
Michael Niedermayer
dbd94b771f avcodec/internal: Fix ff_dlog() define like av_dlog()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:27:08 +02:00
Michael Niedermayer
8f7b022c8c Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
  lavc: Replace av_dlog and tprintf with internal macros

Conflicts:
	libavcodec/aacdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/bitstream.c
	libavcodec/dcadec.c
	libavcodec/dnxhddec.c
	libavcodec/dvbsubdec.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/get_bits.h
	libavcodec/gifdec.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/imc.c
	libavcodec/interplayvideo.c
	libavcodec/jpeglsdec.c
	libavcodec/libopencore-amr.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_parser.c
	libavcodec/pngdec.c
	libavcodec/ratecontrol.c
	libavcodec/rv10.c
	libavcodec/svq1dec.c
	libavcodec/vqavideo.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Vittorio Giovara
6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Michael Niedermayer
be920e4820 Merge commit '5637ff01218a44fcc1fff9b4382a15a6470abcc9'
* commit '5637ff01218a44fcc1fff9b4382a15a6470abcc9':
  libavcodec: Clarify the documentation of the internal codec capability flags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 22:35:19 +02:00
Martin Storsjö
5637ff0121 libavcodec: Clarify the documentation of the internal codec capability flags
The previous documentation was very vague and almost misleading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-05 20:47:50 +03:00
Michael Niedermayer
65a646eb0b avcodec/internal: Fix doxy for ff_alloc_packet2() return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-31 16:14:22 +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
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
Vittorio Giovara
117b432748 lavc: Introduce AVCodec internal capabilities
This field is designed for marking codec properties useful to lavc internals.
Two internal capabilities are added:
 - FF_CODEC_CAP_INIT_THREADSAFE: codec can be opened without locks;
 - FF_CODEC_CAP_INIT_CLEANUP: codec frees memory if initialization fails.
2015-03-13 19:47:47 +00:00
Michael Niedermayer
9bb6e1175f avcodec/internal: Add () to argument of FF_SIGNBIT() to ensure correct order or operations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 03:42:40 +01:00
Michael Niedermayer
cdbebae444 Merge commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa'
* commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa':
  lavc: fix bitshifts amount bigger than the type

Conflicts:
	libavcodec/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 03:16:38 +01:00
Vittorio Giovara
85dc006b1a lavc: fix bitshifts amount bigger than the type
CC: libav-stable@libav.org
Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
2014-11-18 00:39:23 +01:00
Michael Niedermayer
1df2f7b6a8 Merge commit 'eba2233b58c2c4b468c58287d6537b2f1188a8cd'
* commit 'eba2233b58c2c4b468c58287d6537b2f1188a8cd':
  build: Add define for SIMD extensions requiring 16-byte aligned buffers

Conflicts:
	configure
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 22:32:40 +02:00
Michael Niedermayer
0dceefc5fa Merge commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2'
* commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2':
  Add av_image_check_sar() and use it to validate SAR

Conflicts:
	libavcodec/dpx.c
	libavcodec/dvdec.c
	libavcodec/ffv1dec.c
	libavcodec/utils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 22:20:28 +02:00
Justin Ruggles
9e500efdbe Add av_image_check_sar() and use it to validate SAR 2014-06-20 10:39:33 -04:00
Michael Niedermayer
0739614c9c avcodec: remove no longer needed ff_codec_close_recursive()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 02:20:30 +02:00
James Almer
b82274487b lavc: define STRIDE_ALIGN as 32 when compiling with AVX support
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 22:09:43 +02:00
Michael Niedermayer
2ec4586d77 Merge commit 'dd2d3b766b20196d0b65a82e3d897ccecbf7adb8'
* commit 'dd2d3b766b20196d0b65a82e3d897ccecbf7adb8':
  lavc: Add hwaccel private data and init/uninit callbacks

Conflicts:
	libavcodec/avcodec.h
	libavcodec/internal.h
	libavcodec/pthread_frame.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-12 00:21:44 +02:00
Michael Niedermayer
f2f99f07a5 Merge commit '5c1d7246cd65dc4db1b6dc36e29ce39fc1068f3f'
* commit '5c1d7246cd65dc4db1b6dc36e29ce39fc1068f3f':
  lavc: set AVCodecContext.hwaccel in ff_get_format()

Conflicts:
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-11 23:28:40 +02:00
Michael Niedermayer
d93cf093f8 Merge commit '632ad2248e2e5d8cd4b51e6c87c943a38c3da425'
* commit '632ad2248e2e5d8cd4b51e6c87c943a38c3da425':
  lavc: Add an internal wrapper around get_format()

Conflicts:
	libavcodec/h264_slice.c
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-11 21:48:32 +02:00
Anton Khirnov
dd2d3b766b lavc: Add hwaccel private data and init/uninit callbacks 2014-05-11 14:59:07 +02:00
Anton Khirnov
5c1d7246cd lavc: set AVCodecContext.hwaccel in ff_get_format()
This way each decoder does not have to do the same thing manually.
2014-05-11 14:59:07 +02:00
Anton Khirnov
632ad2248e lavc: Add an internal wrapper around get_format()
It will be useful in the following commits.
2014-05-11 14:59:07 +02:00
Michael Niedermayer
c08e523586 Merge commit '4a0f6651434c6f213d830140f575b4ec7858519f'
* commit '4a0f6651434c6f213d830140f575b4ec7858519f':
  libavcodec: when decoding, copy replaygain side data to decoded frames

Conflicts:
	libavcodec/internal.h
	libavcodec/rawdec.c
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 14:26:17 +01:00
Anton Khirnov
4a0f665143 libavcodec: when decoding, copy replaygain side data to decoded frames 2014-03-24 06:07:51 +01:00
Michael Niedermayer
da89572004 avcodec: Move STRIDE_ALIGN to internal.h
The next commit/bugfix will need it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 14:56:42 +01:00
Carl Eugen Hoyos
5968415156 Define ff_log2_run[] in libavcodec/internal.h.
This avoids defining the array with different sizes in
different source files.
2014-03-10 13:37:12 +01:00
Michael Niedermayer
4cf4da9dc5 Merge commit '5b4797a21db900b7d509660b7a4d49829089b004'
* commit '5b4797a21db900b7d509660b7a4d49829089b004':
  avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 22:12:41 +01:00
Tim Walker
5b4797a21d avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.
Includes a libavcodec utility function to update a frame's side data.
2014-01-05 16:41:56 +01:00