Commit Graph

118 Commits

Author SHA1 Message Date
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
Michael Niedermayer
7a901eb33a Merge commit '37a749012aaacc801fe860428417a6d7b81c103f'
* commit '37a749012aaacc801fe860428417a6d7b81c103f':
  lavc: rework handling of refcounted_frames=0

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 19:37:53 +01:00
Anton Khirnov
37a749012a lavc: rework handling of refcounted_frames=0
Use only proper AVFrame API (no assigning of whole frames, since that
hardcodes sizeof(AVFrame) into lavc).

Make a copy of the side data, so the caller can use av_frame_unref/free
on non-refcounted frames, eliminating the need for
avcodec_get_frame_defaults()/avcodec_free_frame().
2013-12-09 08:54:29 +01:00
Michael Niedermayer
78e150c5e9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  hwaccel: Simplify ff_find_hwaccel

Conflicts:
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-10 17:37:51 +01:00
Luca Barbato
08303d7741 hwaccel: Simplify ff_find_hwaccel
It is always called by passing fields from an AVCodecContext.
2013-11-10 13:59:48 +01:00
Michael Niedermayer
ab71be0912 Merge commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9'
* commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9':
  lavc: move AVCodecContext.pkt to AVCodecInternal

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 11:41:55 +01:00
Michael Niedermayer
3fc26d8073 Merge commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12'
* commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12':
  pthread: store thread contexts in AVCodecInternal instead of AVCodecContext

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 11:14:38 +01:00
Anton Khirnov
da6506c607 lavc: move AVCodecContext.pkt to AVCodecInternal
It's a private field, not meant to be accessed from outside lavc.
2013-11-04 08:51:26 +01:00
Anton Khirnov
38ecc3702d pthread: store thread contexts in AVCodecInternal instead of AVCodecContext
It's a private field, it should not be visible to callers.

Deprecate AVCodecContext.thread_opaque
2013-11-04 08:51:26 +01:00
Michael Niedermayer
7b91e9cf5d Merge commit '7644f5a80787c9b608b82873604805d7e38a6a18'
* commit '7644f5a80787c9b608b82873604805d7e38a6a18':
  lavc: replace avcodec_set_dimensions with ff_set_dimensions

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 13:07:15 +01:00
Anton Khirnov
7644f5a807 lavc: replace avcodec_set_dimensions with ff_set_dimensions
avcodec_set_dimensions() is supposed to be an internal utility function,
there is no reason whatsoever for it to be public. Therefore deprecate
it.
2013-10-31 20:14:14 +01:00
Michael Niedermayer
9a0e20817a avcodec/util: Make size argument of ff_alloc_packet2() int64_t
This ensures that huge sizes dont get truncated before the check in ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-09 20:18:54 +02:00
Michael Niedermayer
98fd8a7848 avcodec: Remove ff_packet_free_side_data, use av_packet_free_side_data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-12 00:13:21 +02:00
Peter Große
c6c2231227 libavcodec: use 64bit counter in deprecated audio encoder API to prevent problems regarding negative dts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 13:40:13 +02:00
Michael Niedermayer
42bb3e4db6 avcodec: remove ff_get_logical_cpus()
This simplifies the code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 20:25:53 +02:00
Michael Niedermayer
b19604cc4b Merge commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0'
* commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0':
  lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo

Conflicts:
	libavcodec/h264_parser.c
	libavcodec/internal.h
	libavcodec/mpeg12.c
	libavcodec/utils.c
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-26 13:44:09 +01:00
Martin Storsjö
f1e9398621 lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 09:50:02 +02:00
Michael Niedermayer
f9fd6f983b Merge commit '2eba9087f3031c6050f8dcd996225490be6c2410'
* commit '2eba9087f3031c6050f8dcd996225490be6c2410':
  lavc: make up a fake frame channel layout when there is no real one.

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 12:49:59 +01:00
Michael Niedermayer
a7f9d92a6d Merge commit '192f1984b1a93aa08af053b8f9ab4950f307bd5d'
* commit '192f1984b1a93aa08af053b8f9ab4950f307bd5d':
  lavc: limit maximum number of channels to 63

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 12:23:12 +01:00
Michael Niedermayer
80e9e63c94 Merge commit '759001c534287a96dc96d1e274665feb7059145d'
* commit '759001c534287a96dc96d1e274665feb7059145d':
  lavc decoders: work with refcounted frames.

Anton Khirnov (1):
      lavc decoders: work with refcounted frames.

Clément Bœsch (47):
      lavc/ansi: reset file
      lavc/ansi: re-do refcounted frame changes from Anton
      fraps: reset file
      lavc/fraps: switch to refcounted frames
      gifdec: reset file
      lavc/gifdec: switch to refcounted frames
      dsicinav: resolve conflicts
      smc: resolve conflicts
      zmbv: resolve conflicts
      rpza: resolve conflicts
      vble: resolve conflicts
      xxan: resolve conflicts
      targa: resolve conflicts
      vmnc: resolve conflicts
      utvideodec: resolve conflicts
      tscc: resolve conflicts
      ulti: resolve conflicts
      ffv1dec: resolve conflicts
      dnxhddec: resolve conflicts
      v210dec: resolve conflicts
      vp3: resolve conflicts
      vcr1: resolve conflicts
      v210x: resolve conflicts
      wavpack: resolve conflicts
      pngdec: fix compilation
      roqvideodec: resolve conflicts
      pictordec: resolve conflicts
      mdec: resolve conflicts
      tiertexseqv: resolve conflicts
      smacker: resolve conflicts
      vb: resolve conflicts
      vqavideo: resolve conflicts
      xl: resolve conflicts
      tmv: resolve conflicts
      vmdav: resolve conflicts
      truemotion1: resolve conflicts
      truemotion2: resolve conflicts
      lcldec: fix compilation
      libcelt_dec: fix compilation
      qdrw: fix compilation
      r210dec: fix compilation
      rl2: fix compilation
      wnv1: fix compilation
      yop: fix compilation
      tiff: resolve conflicts
      interplayvideo: fix compilation
      qpeg: resolve conflicts (FIXME/TESTME).

Hendrik Leppkes (33):
      012v: convert to refcounted frames
      8bps: fix compilation
      8svx: resolve conflicts
      4xm: resolve conflicts
      aasc: resolve conflicts
      bfi: fix compilation
      aura: fix compilation
      alsdec: resolve conflicts
      avrndec: convert to refcounted frames
      avuidec: convert to refcounted frames
      bintext: convert to refcounted frames
      cavsdec: resolve conflicts
      brender_pix: convert to refcounted frames
      cinepak: resolve conflicts
      cinepak: avoid using AVFrame struct directly in private context
      cljr: fix compilation
      cpia: convert to refcounted frames
      cscd: resolve conflicts
      iff: resolve conflicts and do proper conversion to refcounted frames
      4xm: fix reference frame handling
      cyuv: fix compilation
      dxa: fix compilation
      eacmv: fix compilation
      eamad: fix compilation
      eatgv: fix compilation
      escape124: remove unused variable.
      escape130: convert to refcounted frames
      evrcdec: convert to refcounted frames
      exr: convert to refcounted frames
      mvcdec: convert to refcounted frames
      paf: properly free the frame data on decode close
      sgirle: convert to refcounted frames
      lavfi/moviesrc: use refcounted frames

Michael Niedermayer (56):
      Merge commit '759001c534287a96dc96d1e274665feb7059145d'
      resolve conflicts in headers
      motion_est: resolve conflict
      mpeg4videodec: fix conflicts
      dpcm conflict fix
      dpx: fix conflicts
      indeo3: resolve confilcts
      kmvc: resolve conflicts
      kmvc: resolve conflicts
      h264: resolve conflicts
      utils: resolve conflicts
      rawdec: resolve conflcits
      mpegvideo: resolve conflicts
      svq1enc: resolve conflicts
      mpegvideo: dont clear data, fix assertion failure on fate vsynth1 with threads
      pthreads: resolve conflicts
      frame_thread_encoder: simple compilefix not yet tested
      snow: update to buffer refs
      crytsalhd: fix compile
      dirac: switch to new API
      sonic: update to new API
      svq1: resolve conflict, update to new API
      ffwavesynth: update to new buffer API
      g729: update to new API
      indeo5: fix compile
      j2kdec: update to new buffer API
      linopencore-amr: fix compile
      libvorbisdec: update to new API
      loco: fix compile
      paf: update to new API
      proresdec: update to new API
      vp56: update to new api / resolve conflicts
      xface: convert to refcounted frames
      xan: fix compile&fate
      v408: update to ref counted buffers
      v308: update to ref counted buffers
      yuv4dec: update to ref counted buffers
      y41p: update to ref counted frames
      xbm: update to refcounted frames
      targa_y216: update to refcounted buffers
      qpeg: fix fate/crash
      cdxl: fix fate
      tscc: fix reget buffer useage
      targa_y216dec: fix style
      msmpeg4: fix fate
      h264: ref_picture() copy fields that have been lost too
      update_frame_pool: use channel field
      h264: Put code that prevents deadlocks back
      mpegvideo: dont allow last == current
      wmalossless: fix buffer ref messup
      ff_alloc_picture: free tables in case of dimension mismatches
      h264: fix null pointer dereference and assertion failure
      frame_thread_encoder: update to bufrefs
      ec: fix used arrays
      snowdec: fix off by 1 error in dimensions check
      h264: disallow single unpaired fields as references of frames

Paul B Mahol (2):
      lavc/vima: convert to refcounted frames
      sanm: convert to refcounted frames

Conflicts:
	libavcodec/4xm.c
	libavcodec/8bps.c
	libavcodec/8svx.c
	libavcodec/aasc.c
	libavcodec/alsdec.c
	libavcodec/anm.c
	libavcodec/ansi.c
	libavcodec/avs.c
	libavcodec/bethsoftvideo.c
	libavcodec/bfi.c
	libavcodec/c93.c
	libavcodec/cavsdec.c
	libavcodec/cdgraphics.c
	libavcodec/cinepak.c
	libavcodec/cljr.c
	libavcodec/cscd.c
	libavcodec/dnxhddec.c
	libavcodec/dpcm.c
	libavcodec/dpx.c
	libavcodec/dsicinav.c
	libavcodec/dvdec.c
	libavcodec/dxa.c
	libavcodec/eacmv.c
	libavcodec/eamad.c
	libavcodec/eatgq.c
	libavcodec/eatgv.c
	libavcodec/eatqi.c
	libavcodec/error_resilience.c
	libavcodec/escape124.c
	libavcodec/ffv1.h
	libavcodec/ffv1dec.c
	libavcodec/flicvideo.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/g723_1.c
	libavcodec/gifdec.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_direct.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/huffyuvdec.c
	libavcodec/idcinvideo.c
	libavcodec/iff.c
	libavcodec/indeo2.c
	libavcodec/indeo3.c
	libavcodec/internal.h
	libavcodec/interplayvideo.c
	libavcodec/ivi_common.c
	libavcodec/jvdec.c
	libavcodec/kgv1dec.c
	libavcodec/kmvc.c
	libavcodec/lagarith.c
	libavcodec/libopenjpegdec.c
	libavcodec/mdec.c
	libavcodec/mimic.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mmvideo.c
	libavcodec/motion_est.c
	libavcodec/motionpixels.c
	libavcodec/mpc7.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/msrle.c
	libavcodec/msvideo1.c
	libavcodec/nuv.c
	libavcodec/options_table.h
	libavcodec/pcx.c
	libavcodec/pictordec.c
	libavcodec/pngdec.c
	libavcodec/pnmdec.c
	libavcodec/pthread.c
	libavcodec/qpeg.c
	libavcodec/qtrle.c
	libavcodec/r210dec.c
	libavcodec/rawdec.c
	libavcodec/roqvideodec.c
	libavcodec/rpza.c
	libavcodec/smacker.c
	libavcodec/smc.c
	libavcodec/svq1dec.c
	libavcodec/svq1enc.c
	libavcodec/targa.c
	libavcodec/tiertexseqv.c
	libavcodec/tiff.c
	libavcodec/tmv.c
	libavcodec/truemotion1.c
	libavcodec/truemotion2.c
	libavcodec/tscc.c
	libavcodec/ulti.c
	libavcodec/utils.c
	libavcodec/utvideodec.c
	libavcodec/v210dec.c
	libavcodec/v210x.c
	libavcodec/vb.c
	libavcodec/vble.c
	libavcodec/vcr1.c
	libavcodec/vmdav.c
	libavcodec/vmnc.c
	libavcodec/vp3.c
	libavcodec/vp56.c
	libavcodec/vp56.h
	libavcodec/vp6.c
	libavcodec/vqavideo.c
	libavcodec/wavpack.c
	libavcodec/xl.c
	libavcodec/xxan.c
	libavcodec/zmbv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 03:23:28 +01:00
Anton Khirnov
f073b1500e lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft 2013-03-09 08:36:40 +01:00
Michael Niedermayer
c4e8821732 Merge commit '7ecc2d403ce5c7b6ea3b1f368dccefd105209c7e'
* commit '7ecc2d403ce5c7b6ea3b1f368dccefd105209c7e':
  Move AVFrame from lavc to lavu.

Conflicts:
	libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08 20:33:26 +01:00
Anton Khirnov
192f1984b1 lavc: limit maximum number of channels to 63
This is the most that can be represented with the current channel layout
system. This limit should be raised/removed when a better system is
implemented.
2013-03-08 07:39:53 +01:00
Anton Khirnov
759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
Michael Niedermayer
ff9b607489 Merge commit '5a4e9fe855282a99586050a507d0a486ad39df5b'
* commit '5a4e9fe855282a99586050a507d0a486ad39df5b':
  avcodec/internal: Fix #if DECODE_AUDIO / ENCODE_AUDIO name mismatch
  shorten: use the unsigned type where needed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-07 00:01:32 +01:00
Diego Biurrun
5a4e9fe855 avcodec/internal: Fix #if DECODE_AUDIO / ENCODE_AUDIO name mismatch 2013-03-06 16:48:03 +01:00
Michael Niedermayer
bf90ef0314 avcodec: add ff_frame_get_metadatap()
This is needed for av_dict_*

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-01 22:40:50 +01:00
Michael Niedermayer
a3a97129e7 mpegvideo: make ff_print_debug_info independant of mpegvideo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 02:46:05 +01:00