Commit Graph

502 Commits

Author SHA1 Message Date
Mark Thompson a050f56c09 lavu: Add OpenCL hardware pixfmt 2017-11-22 23:01:29 +00:00
James Almer 7df37dd319 avutil/frame: deprecate getters and setters for AVFrame fields
The fields can be accessed directly, so these are not needed anymore.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-29 10:16:44 -03:00
James Almer 572b7a0b85 Merge commit '35cf146a33ce41a1adb6c9bd5a0827eacb1b6bfc'
* commit '35cf146a33ce41a1adb6c9bd5a0827eacb1b6bfc':
  lavu: Drop deprecated av_dlog macro

Merged-by: James Almer <jamrial@gmail.com>
2017-10-23 18:20:07 -03:00
James Almer c0cfc0ce11 Merge commit '619a433eca2c5655c41b799e0b06380020fb1498'
* commit '619a433eca2c5655c41b799e0b06380020fb1498':
  lavu: Drop deprecated option type

Merged-by: James Almer <jamrial@gmail.com>
2017-10-23 18:18:00 -03:00
James Almer b773a8d8c1 Merge commit 'dd343fd986459f467a2d1d70c26101dff1d47d68'
* commit 'dd343fd986459f467a2d1d70c26101dff1d47d68':
  lavu: Drop deprecated VDPAU pixel formats

Merged-by: James Almer <jamrial@gmail.com>
2017-10-23 18:15:49 -03:00
James Almer b46613dd9b Merge commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198'
* commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198':
  lavc: Remove deprecated XvMC support hacks

Merged-by: James Almer <jamrial@gmail.com>
2017-10-23 15:20:49 -03:00
James Almer 382aaa3312 avutil/crc: remove gap in AVCRCId enum values
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-22 00:44:55 -03:00
James Almer 69b5ce64d2 Merge commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5'
* commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5':
  Bump major versions of all libraries

A few API deprecated ~2 years ago or more are also postponed here for
varying reasons.

FF_API_LOWRES:
Since this functionality depends on AVStream->codec, i figure the two can
be removed at the same time in the next bump or so.

FF_API_AVCTX_TIMEBASE:
Couldn't get this one to work. Not just libavcodec but apparently also
libavformat and ffmpeg.c expect AVCodecContext->time_base to be set for
decoding. Upon removal some tests report a different generic stream time
base (like 1/25), and others lose packet duration values. I guess it's
somehow tied to the AVStream->codec clusterfuck.
It can be dealt with alongside FF_API_LAVF_AVCTX in the next bump.

FF_API_OLD_FILTER_OPTS_ERROR:
This one is meant to remain after FF_API_OLD_FILTER_OPTS is removed.
Its purpose is displaying the corrected command line using the new syntax
as a suggestion as part of the error message.

Merged-by: James Almer <jamrial@gmail.com>
2017-10-21 14:57:53 -03:00
Michael Niedermayer 80154b1b3a Bump version for master after 3.4 branchpoint
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11 02:45:37 +02:00
Michael Niedermayer e1de9eab3a Bump minor versions for branching 3.4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11 01:23:47 +02:00
James Almer 7aa6b8a68f Merge commit '4de220d2e3751c459f8739a08ac6ca52e63eba30'
* commit '4de220d2e3751c459f8739a08ac6ca52e63eba30':
  frame: allow align=0 (meaning automatic) for av_frame_get_buffer()

See https://ffmpeg.org/pipermail/ffmpeg-devel/2017-September/215834.html

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 23:31:53 -03:00
James Almer 522f877086 Merge commit 'e6bff23f1e11aefb16a2b5d6ee72bf7469c5a66e'
* commit 'e6bff23f1e11aefb16a2b5d6ee72bf7469c5a66e':
  cpu: add a function for querying maximum required data alignment

Adapted to work with the arbitrary runtime cpuflag changes av_force_cpu_flags()
can generate.

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 23:03:57 -03:00
Vittorio Giovara 6f15f1cdc8 pixdesc: Add API to map color property names to enum values
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-09-21 13:33:29 +02:00
Mark Thompson 9cb23cd9fe lavu: Add DRM hwcontext 2017-09-13 22:03:27 +01:00
Vittorio Giovara 1460408703 Add single precision planar RGB pixel formats
Add a pixel format flag to identify this family.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-15 15:26:20 +02:00
Vittorio Giovara f357104866 pixfmt: Support chroma-derived and ictcp color matrices
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-10 15:54:06 +02:00
wm4 463b81de2b imgutils: add function to clear an image to black
Black isn't always just memset(ptr, 0, size). Limited YUV in particular
requires relatively non-obvious values, and filling a frame with
repeating 0 bytes is disallowed in some contexts. With component sizes
larger than 8 or packed YUV, this can become relatively complicated. So
having a generic function for this seems helpful.

In order to handle the complex cases in a generic way without destroying
performance, this code attempts to compute a black pixel, and then uses
that value to clear the image data quickly by using a function like
memset.

Common cases like yuv410p10 or rgba can't be handled with a simple
memset, so there is some code to fill memory with 2/4/8 byte patterns.
For the remaining cases, a generic slow fallback is used.

Signed-off-by: Anton Khirnov <anton@khirnov.net>

Merged from Libav commit 45df7adc1d.
2017-08-08 13:37:37 +02:00
wm4 caa12027ba lavc, lavu: move frame cropping to a convenience function
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Merged from Libav commit 47399ccdfd.
2017-08-08 13:35:09 +02:00
Paul B Mahol ab6d89d7ee libavutil: add GRAY9 pixel format 2017-08-07 13:06:51 +02:00
Yogender Gupta 3407d8118c hwcontext_cuda : Support YUV444P16 format
Signed-off-by: Philip Langdale <philipl@overt.org>
2017-08-03 15:25:35 -07:00
Rostislav Pehlivanov 24de4fddca lavu/frame: add new side data type for ICC profiles
Many image formats support embedding of ICC profiles directly in
their bitstreams. Add a new side data type to allow exposing them to
API users.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-25 20:11:06 +01:00
Muhammad Faiz a3d3cfa65c avutil: merge slice threading implementation from avcodec and avfilter
Rework it to improve performance. Now mutex is not shared by workers,
instead each worker has its own mutex and condition variable. This
reduces lock contention between workers. Also use atomic variable for
counter.

The interface also allows execute to run special function on main
thread, requested by Ronald.

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:50:07 +07:00
wm4 3303511f33 lavu: add new D3D11 pixfmt and hwcontext
To be used with the new d3d11 hwaccel decode API.

With the new hwaccel API, we don't want surfaces to depend on the
decoder (other than the required dimension and format). The old D3D11VA
pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the
decoder configuration, and thus is incompatible with the new hwaccel
API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D
and an index. It's simpler and compatible with the new hwaccel API.

The introduced hwcontext supports only the new pixfmt.

Frame upload code untested.

Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with
heavy changes/rewrites.

Merges Libav commit fff90422d1.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-06-27 18:05:02 +02:00
Mark Thompson d59c6a3aeb hwcontext: Improve allocation in derived contexts
Use the flags argument of av_hwframe_ctx_create_derived() to pass the
mapping flags which will be used on allocation.  Also, set the format
and hardware context on the allocated frame automatically - the user
should not be required to do this themselves.

(cherry picked from commit c5714b51aa)
2017-06-14 22:27:32 +01:00
Mark Thompson 0b1794a43e hwcontext: Make it easier to work with device types
Adds functions to convert to/from strings and a function to iterate
over all supported device types.  Also adds a new invalid type
AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value.

(cherry picked from commit b7487f4f3c)
2017-06-14 22:26:29 +01:00
Mark Thompson b22172f6f3 hwcontext: Add device derivation
Creates a new device context from another of a different type which
refers to the same underlying hardware.

(cherry picked from commit b266ad56fe)
2017-06-14 22:25:57 +01:00
wm4 532b23f079 videotoolbox: add hwcontext support
This adds tons of code for no other benefit than making VideoToolbox
support conform with the new hwaccel API (using hw_device_ctx and
hw_frames_ctx).

Since VideoToolbox decoding does not actually require the user to
allocate frames, the new code does mostly nothing.

One benefit is that ffmpeg_videotoolbox.c can be dropped once generic
hwaccel support for ffmpeg.c is merged from Libav.

Does not consider VDA or VideoToolbox encoding.

Fun fact: the frame transfer functions are copied from vaapi, as the
mapping makes copying generic boilerplate. Mapping itself is not
exported by the VT code, because I don't know how to test.
2017-05-15 11:30:36 +02:00
James Almer a47bd5d77e Merge commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3'
* commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3':
  frame: add a cropping rectangle to AVFrame

Merged-by: James Almer <jamrial@gmail.com>
2017-05-08 13:08:02 -03:00
Clément Bœsch 651ee93461 Merge commit 'e435beb1ea5380a90774dbf51fdc8c941e486551'
* commit 'e435beb1ea5380a90774dbf51fdc8c941e486551':
  crypto: consistently use size_t as type for length parameters

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-05-05 13:04:38 +02:00
Steven Liu 8378466507 doc/APIChages: Add av_strireplace()
Add av_strireplace() into APIChanges

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-04-11 12:46:28 +08:00
Paul B Mahol 4dc2dd80dc avutil/float_dsp: add vector_dmac_scalar()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-10 12:04:14 +02:00
Steve Lhomme b378f5bd64 lavu: add support for Content Light Level side metadata
As found in HEVC.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-06 11:26:25 -03:00
Michael Niedermayer 22b0daa1b3 Bump versions for master after 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:54:12 +02:00
Michael Niedermayer e1cc7f83df Bump minor for 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:49:45 +02:00
James Almer 9033e8723c avutil/spherical: add av_spherical_projection_name()
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-31 13:26:56 -03:00
Michael Niedermayer 58b867a7cf Bump minor versions for master after release/3.3 branchpoint
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-31 13:21:06 +02:00
Michael Niedermayer fc332f3e29 Bump minor versions for staring release/3.3 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-31 13:21:06 +02:00
Clément Bœsch 82ad9cbd32 Merge commit '17dac56b8fdd80c594c39b76de3f27a7949afbde'
* commit '17dac56b8fdd80c594c39b76de3f27a7949afbde':
  lavu: Rename ycgco color space appropriately

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-31 09:46:51 +02:00
Clément Bœsch 4cda23f1f1 Merge commit 'd06aa24ba583ad08025da9e1b29afcd8218ff9b0'
* commit 'd06aa24ba583ad08025da9e1b29afcd8218ff9b0':
  hwcontext: Hardware frame mapping

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-30 10:36:37 +02:00
Clément Bœsch bfdcdd6d82 lavu: add av_fourcc_make_string() and av_fourcc2str() 2017-03-29 14:49:29 +02:00
Clément Bœsch 0b3decc596 Merge commit '0d9b9bd37f43ee29ad9f709d85c8f3be9db71104'
* commit '0d9b9bd37f43ee29ad9f709d85c8f3be9db71104':
  lavu: Add JEDEC P22 color primaries

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-24 11:21:46 +01:00
Vittorio Giovara 35cf146a33 lavu: Drop deprecated av_dlog macro
Deprecated in 05/2015.
2017-03-23 10:09:17 +01:00
Vittorio Giovara 619a433eca lavu: Drop deprecated option type
Deprecated in 02/2014.
2017-03-23 10:09:17 +01:00
Vittorio Giovara dd343fd986 lavu: Drop deprecated VDPAU pixel formats
Deprecated in 07/2013.
2017-03-23 10:09:17 +01:00
Vittorio Giovara 0648dec19d lavc: Drop deprecated stream codec tag
Deprecated in 07/2015.
2017-03-23 10:09:17 +01:00
Diego Biurrun dcc39ee10e lavc: Remove deprecated XvMC support hacks
Deprecated in 11/2013.
2017-03-23 10:09:14 +01:00
Vittorio Giovara 07a2b15594 Bump major versions of all libraries
This disables everything that was deprecated at least 18 months ago.

Readjust the minimum API version as needed, postponing any
API-incompatible changes until the next bump.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-23 09:56:20 +01:00
Mark Thompson b7487f4f3c hwcontext: Make it easier to work with device types
Adds functions to convert to/from strings and a function to iterate
over all supported device types.  Also adds a new invalid type
AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value.
2017-03-20 23:15:43 +00:00
Mark Thompson b266ad56fe hwcontext: Add device derivation
Creates a new device context from another of a different type which
refers to the same underlying hardware.
2017-03-20 23:15:43 +00:00
Clément Bœsch 8200b16a9c Merge commit 'd7bc52bf456deba0f32d9fe5c288ec441f1ebef5'
* commit 'd7bc52bf456deba0f32d9fe5c288ec441f1ebef5':
  imgutils: add a function for copying image data from GPU mapped memory

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-20 08:34:10 +01:00