Commit Graph

899 Commits

Author SHA1 Message Date
James Almer 99cc3cf7a2 Merge commit '43778a501f1bfbceeddc8eaeea2ea2b3506beeda'
* commit '43778a501f1bfbceeddc8eaeea2ea2b3506beeda':
  Support AV1 encoding using libaom

This contains some extra changes taken from the libvpx encoder
wrapper, most of them contained in the set_pix_fmt() function.

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 00:05:45 -03:00
James Almer 0dc11d8bbd Merge commit 'c438899a706422b8362a13714580e988be4d638b'
* commit 'c438899a706422b8362a13714580e988be4d638b':
  Add AV1 video decoding support through libaom

This contains some extra changes taken from the libvpx decoder
wrapper, most of them contained in the set_pix_fmt() function.

Merged-by: James Almer <jamrial@gmail.com>
2018-03-28 18:09:46 -03:00
Luca Barbato 43778a501f Support AV1 encoding using libaom 2018-03-12 12:10:33 +01:00
Luca Barbato c438899a70 Add AV1 video decoding support through libaom
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-12 08:12:43 +01:00
Aurelien Jacobs ff4600d954 sbc: implement SBC encoder (low-complexity subband codec)
This was originally based on libsbc, and was fully integrated into ffmpeg.
2018-03-07 22:26:53 +01:00
Aurelien Jacobs 4439887198 sbc: implement SBC decoder (low-complexity subband codec)
This was originally based on libsbc, and was fully integrated into ffmpeg.
2018-03-07 22:26:53 +01:00
Tomas Härdin f958f431ec Add libcodec2 en/decoder 2018-02-24 17:06:31 +01:00
Aurelien Jacobs 6fd110a094 aptx: implement the aptX HD bluetooth codec 2018-02-09 22:10:55 +01:00
Josh de Kock 7e8eba2d87 lavc: add new API for iterating codecs and codec parsers
Based on an unfinished patch by atomnuker.
2018-02-06 18:50:27 +00:00
Michael Wootton 34c113335b Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-04 18:15:56 +01:00
Mark Thompson 433522a1b9 lavc: Remove register mechanism for hwaccels
There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.
2017-12-19 23:22:35 +00:00
Mikhail Mironov 9ea6607d29 Add HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-11-28 22:14:42 +00:00
Mark Thompson 9bd326ac46 lavc: Remove register mechanism for hwaccels
There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.
2017-11-26 21:36:34 +00:00
Philip Langdale 6b77a10e43 avcodec: Implement mpeg4 nvdec hwaccel
This was predictably nightmarish, given how ridiculous mpeg4 is.
I had to stare at the cuvid parser output for a long time to work
out what each field was supposed to be, and even then, I still don't
fully understand some of them. Particularly:

vop_coded: If I'm reading the decoder correctly, this flag will always
           be 1 as the decoder will not pass the hwaccel any frame
           where it is not 1.
divx_flags: There's obviously no documentation on what the possible
            flags are. I simply observed that this is '0' for a
            normal bitstream and '5' for packed b-frames.
gmc_enabled: I had a number of guesses as to what this mapped to.
             I picked the condition I did based on when the cuvid
             parser was setting flag.

Also note that as with the vdpau hwaccel, the decoder needs to
consume the entire frame and not the slice.
2017-11-20 07:21:41 -08:00
Philip Langdale 8bca292c30 avcodec: Implement mpeg1 nvdec hwaccel
Once I remembered that there's a separate decoder type for mpeg1,
even though params struct is shared with mpeg2, everything worked.
2017-11-20 07:03:26 -08:00
Philip Langdale 7c9f739d86 avcodec: Implement mpeg2 nvdec hwaccel
This is mostly straight-forward. The weird part is that it should
just work for mpeg1, but I see corruption in my test cases, so I'm
going to try and fix that separately.
2017-11-18 08:13:50 -08:00
Philip Langdale 912ceba61b avcodec: Implement vc1 nvdec hwaccel
This hwaccel is interesting because it also works for wmv3/9 content,
which is not supported by the nvidia parser used by cuviddec.
2017-11-14 19:40:01 -08:00
Aman Gupta e7a5249ab1 avcodec/videotoolboxenc: add hevc_videotoolbox encoder
Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Rodger Combs <rodger.combs@gmail.com>
2017-11-13 14:28:14 -08:00
Timo Rothenpieler f3f73f0893 avcodec: implement vp9 nvdec hwaccel 2017-11-13 20:33:10 +01:00
James Almer 1178babaca Merge commit 'b90fdb2c7199cc8b0e8d994fafba1fb4dc181d88'
* commit 'b90fdb2c7199cc8b0e8d994fafba1fb4dc181d88':
  hevcdec: add a CUVID hwaccel

Adapted for ffmpeg by Timo Rothenpieler.

Merged-by: James Almer <jamrial@gmail.com>
2017-11-10 20:43:15 -03:00
Anton Khirnov 0e00624389 h264dec: add a NVDEC hwaccel
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>

Merges Libav commit b9129ec466.

Due to the name clash with our cuvid decoder, rename it to nvdec.

This commit also changes the Libav code to dynamic loading of the
cuda/cuvid libraries.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-10 22:48:53 +01:00
Aurelien Jacobs a337b36b8b aptx: implement the aptX bluetooth codec
The encoder was reverse engineered from binary library and from
EP0398973B1 patent (long expired).
The decoder was simply deduced from the encoder.
2017-11-10 21:32:06 +00:00
James Almer 1926f13a20 Merge commit '2fd6e7d077f590e4d7195356f9baeb271f8b9ae2'
* commit '2fd6e7d077f590e4d7195356f9baeb271f8b9ae2':
  libavcodec/mjpeg_qsv: Add QSV MJPEG encoder

Merged-by: James Almer <jamrial@gmail.com>
2017-11-08 13:45:09 -03:00
Paul B Mahol 3729ae659f avcodec: add MagicYUV encoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-10-28 17:56:02 +02: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
Clément Bœsch 2b32031827 lavc: drop VDA
Deprecated (aka removed) in OSX 10.11, and we have a replacement for it
(VideoToolbox).
2017-10-23 11:56:15 +02:00
Aman Gupta 3d4f8b9184 avcodec/videotoolbox: add hevc support
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-09-28 16:47:47 -07:00
Mark Thompson c1f22c2959 lavc: Move V4L2 encoders lower in the list
Their previous positioning would cause them to chosen before software
encoders like libx264 or libvpx.
2017-09-27 23:47:32 +01:00
Lionel CHAZALLON f3aefb3e1c lavc: Add support for RockChip Media Process Platform
This adds hardware decoding for H.264 / HEVC / VP8 / VP9 using the MPP
Rockchip API.  It returns frames holding an AVDRMFrameDescriptor struct
in buf[0] that allows drm / dmabuf usage.  Tested on RK3288 (TinkerBoard)
and RK3328.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-09-27 22:43:58 +01:00
Jorge Ramirez-Ortiz 1ef7752d64 libavcodec: v4l2: add support for v4l2 mem2mem codecs
This patchset enhances Alexis Ballier's original patch and validates
    it using Qualcomm's Venus hardware (driver recently landed upstream
    [1]).

    This has been tested on Qualcomm's DragonBoard 410c and 820c
    Configure/make scripts have been validated on Ubuntu 10.04 and
    16.04.

    Tested decoders:
           - h264
           - h263
           - mpeg4
           - vp8
           - vp9
           - hevc

    Tested encoders:
           - h264
           - h263
           - mpeg4

    Tested transcoding (concurrent encoding/decoding)

    Some of the changes introduced:
        - v4l2: code cleanup and abstractions added
        - v4l2: follow the new encode/decode api.
        - v4l2: fix display size for NV12 output pool.
        - v4l2: handle EOS (EPIPE and draining)
        - v4l2: vp8 and mpeg4 decoding and encoding.
        - v4l2: hevc and vp9 support.
        - v4l2: generate EOF on dequeue errors.
        - v4l2: h264_mp4toannexb filtering.
        - v4l2: fixed make install and fate issues.
        - v4l2: codecs enabled/disabled depending on pixfmt defined
        - v4l2: pass timebase/framerate to the context
        - v4l2: runtime decoder reconfiguration.
        - v4l2: add more frame information
        - v4l2: free hardware resources on last reference being released
        - v4l2: encoding: disable b-frames for upstreaming (patch required)

    [1] https://lwn.net/Articles/697956/

    System Level view:
        v42l_m2m_enc/dec --> v4l2_m2m --> v4l2_context --> v4l2_buffers

    Reviewed-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
    Reviewed-by: Alexis Ballier <aballier@gentoo.org>
    Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-09-23 08:47:52 +02:00
Mark Thompson c8dea81921 lavc: Add wrapped_avframe decoder
Intended for use with hardware frames for which rawvideo is not
sufficient.  Requires the trusted packet flag to be set - decoding
fails if not to avoid security issues (the wrapped AVFrame can
contain pointers to arbitrary data).
2017-09-13 22:25:29 +01:00
Paras Chadha 6e02f66f1b Add FITS Encoder
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
2017-08-30 12:13:01 +02:00
Paras Chadha 61e4db4bb7 Add FITS Decoder
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
2017-08-30 12:13:01 +02:00
Carl Eugen Hoyos 898ea658c8 lavc/g726: Add a little-endian G.726 encoder.
Fixes ticket #6596.
2017-08-21 16:19:58 +02:00
Anton Khirnov b90fdb2c71 hevcdec: add a CUVID hwaccel 2017-07-28 14:12:56 +02:00
Anton Khirnov b9129ec466 h264dec: add a CUVID hwaccel
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>
2017-07-26 23:24:34 +02:00
Huang, Zhengxu 2fd6e7d077 libavcodec/mjpeg_qsv: Add QSV MJPEG encoder
usage:
-hwaccel qsv -c:v h264_qsv -i in -c:v mjpeg_qsv -global_quality 80 -f
mjpeg out

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2017-07-25 13:27:43 +02:00
foo86 930fe4b1f7 avcodec: add Dolby E decoder 2017-07-19 12:27:32 +02:00
Tomas Härdin 89e632de9b Add Cinepak encoder
With permission of Tomas Härdin applied by Rl aetey.se

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-07-05 13:05:54 +02:00
wm4 70143a3954 dxva: add support for new dxva2 and d3d11 hwaccel APIs
This also adds support to avconv (which is trivial due to the new
hwaccel API being generic enough).

The new decoder setup code in dxva2.c is significantly based on work by
Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites.

Merges Libav commit f9e7a2f95a.
Also adds untested VP9 support.
The check for DXVA2 COBJs is removed. Just update your MinGW to
something newer than a 5 year old release.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-06-27 18:05:02 +02:00
Mark Thompson bde0460406 vaapi_encode: Add VP9 support
(cherry picked from commit 0fd91e4bfc)
2017-06-24 17:41:55 +01:00
Paul B Mahol d1c08027d8 avcodec: add Gremlin Digital Video decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-11 10:00:39 +02:00
Paul B Mahol 29bdcf588f avcodec: add Gremlin DPCM decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-11 10:00:16 +02:00
wm4 f9e7a2f95a dxva: add support for new dxva2 and d3d11 hwaccel APIs
This also adds support to avconv (which is trivial due to the new
hwaccel API being generic enough).

The new decoder setup code in dxva2.c is significantly based on work by
Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-06-08 21:20:18 +02:00
Aman Gupta a32a6b4201 lavc: add mpeg2 mediacodec decoder
Android TV and FireOS hardware supports mpeg2 hardware decoding via
MediaCodec.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-06-08 19:16:09 +02:00
Rostislav Pehlivanov 220b24c7c9 lavc: remove libschroedinger encoding and decoding wrappers
The library has stopped being developed and Debian has removed it
from its repositories citing security issues.
The native Dirac decoder supports everything the library has and basic
encoding support is still provided via the native vc2 (Dirac Pro, intra
only version of Dirac) encoder. Hence, there's no reason to still support
linking to the library and potentially leading users into security issues.
2017-05-29 20:15:58 +01:00
James Almer 605c5ca312 avcodec/allcodecs: move librsvg_decoder to the external library section 2017-05-16 14:45:20 -03:00
Rostislav Pehlivanov 5fd4cffe32 lavc: add a librsvg rasterization library wrapper
Enables rendering of SVG images. This is possible since SVG images
still contain and specify the dimensions in pixels to which they've
been drawn to and thus enable browsers to display them without any
external data. Users can still override and generate images with
arbitrary resolutions.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-05-16 11:40:44 +01:00
Kostya Shishkov 189157c3fc Add ClearVideo decoder
Only I-frames are decoded for now.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-04-25 15:39:10 +02:00