Commit Graph

2259 Commits

Author SHA1 Message Date
James Almer 86c7d8df95 avformat/codec2: don't include avcodec objects
They belong in avcodec.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 17:20:25 -03:00
Martin Vignali 7b0cb2e032 avcodec/hapqa_extract_bsf : add new bsf filter
convert HapQA data to HAPQ or HAPAlphaOnly
by copying the corresponding texture
2018-03-13 20:26:07 +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 2505ebc632 sbc: add parser for SBC 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
James Almer 40102a2137 avcodec/Makefile: skip nvdec.h header when nvdec is not enabled
Fixes make checkheaders now that the cuda headers are no longer in-tree

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-27 17:51:02 -03:00
Tomas Härdin f958f431ec Add libcodec2 en/decoder 2018-02-24 17:06:31 +01:00
James Almer 4f273b97b0 avcodec/Makefile: add missing dependencies for some cuvid decoders
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-23 21:53:15 -03:00
Philip Langdale cd98f20b4a avcodec/nvdec: Implement mjpeg nvdec hwaccel 2018-02-21 23:38:42 +00:00
Mark Thompson 63c690ad15 vaapi: Add MJPEG decode hwaccel 2018-02-21 23:38:30 +00:00
Muhammad Faiz b7d476b138 fate/libavcodec: add codec_desc test
Remove runtime check at codec_desc.c

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-12 06:06:37 +07:00
Aurelien Jacobs 6fd110a094 aptx: implement the aptX HD bluetooth codec 2018-02-09 22:10:55 +01:00
James Almer 0cc3d830d1 avcodec/Makefile: add missing opus.c dependency to opus encoder
Needed for ff_celt_quant_bands and ff_celt_bitalloc.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-30 00:32:27 -03:00
Rostislav Pehlivanov fdbd261967 lavc/Makefile: fix opus_parser dependencies
Fix suggested by RiCON.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-01 19:56:37 +00:00
Jacob Trimble b38f222165 avcodec/Makefile: Fix opus parser dependency.
The opus.c file uses ff_celt_freq_range and ff_celt_freq_bands which are
defined in opustab.c.  The opus parser needs to include that file to
avoid linker errors when not including the opus encoder/decoder.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-09 23:12:30 +01: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
Philip Langdale 1da9851e34 avcodec/nvdec: Implement vp8 hwaccel 2017-11-26 14:55:01 -08:00
Mark Thompson 40b75a943b vaapi: Add VP8 decode hwaccel 2017-11-26 21:41:19 +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
Timo Rothenpieler f3f73f0893 avcodec: implement vp9 nvdec hwaccel 2017-11-13 20:33:10 +01:00
James Almer 91df92e442 avcodec/Makefile: build libxvid_rc.o only if libxvid_encoder is enabled
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-11 22:25:12 -03: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
wm4 5593049466 avcodec/cuvid: rename cuvid.c to cuviddec.c
cuvid.c is used by Libav's CUVID hwaccel. Resolve the conflict and
avoid future merge problems by renaming our decoder.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-10 22:48:34 +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
James Almer b9d3def9b2 Merge commit 'b5f19f7478492307e4b4763aeac3180faf50e17f'
* commit 'b5f19f7478492307e4b4763aeac3180faf50e17f':
  aac: Split function to parse ADTS header data into public and private part

Merged-by: James Almer <jamrial@gmail.com>
2017-10-30 18:56:45 -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 e0250cf365 Merge commit '50a1c66cf6ab7eb683daaa9e2da3869fa3a54609'
* commit '50a1c66cf6ab7eb683daaa9e2da3869fa3a54609':
  ac3_parser: add a public function for parsing the data required by the demuxer

avpriv_ac3_parse_header() is left in place but without the
GetBitContext parameter, as the mov muxer requires a lot more fields
than just bitstream_id and frame_size from the AC3HeaderInfo struct.

Merged-by: James Almer <jamrial@gmail.com>
2017-10-27 18:15:37 -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
James Almer 43befa6826 avcodec: Drop deprecated audio convert API
Deprecated in 10/2013.
2017-10-21 23:16:13 -03:00
James Almer 8f483108b5 avcodec: Drop deprecated audio resample API
Deprecated in 03/2013.
2017-10-21 23:15:19 -03:00
Mark Thompson 00179664bc vaapi_h265: Convert to use coded bitstream infrastructure
Also improves the metadata and generally makes the configuration
a bit cleaner.

(cherry picked from commit ac12486714)
2017-10-17 20:56:30 +01:00
Mark Thompson 2e29ca2a9f vaapi_h264: Convert to use coded bitstream infrastructure
(cherry picked from commit 7a4fac5e91)
2017-10-17 20:56:30 +01:00
Mark Thompson 569721ac8d lavc: Add mpeg2_metadata bitstream filter
(cherry picked from commit b78c30d7ec)
2017-10-17 20:56:30 +01:00
Mark Thompson 278c308cea mpeg12: Add a common function to find the best frame rate
This will be used later in both the mpeg2_metadata filter and the
VAAPI MPEG-2 encoder.  Also adds a unit test.

(cherry picked from commit b5859e0b04)
2017-10-17 20:56:30 +01:00
Mark Thompson 03f982bbca lavc: Add hevc_metadata bitstream filter
This is able to modify some header metadata found in the VPS/SPS/VUI,
and can also add/remove AUDs.

(cherry picked from commit b31a9eae02)
2017-10-17 20:56:30 +01:00
Mark Thompson 8b26306294 lavc: Add h264_redundant_pps bitstream filter
This applies a specific fixup to some Blu-ray streams which contain
redundant PPSs modifying irrelevant parameters of the stream which
confuse other transformations which require correct extradata.

A new single global PPS is created, and all of the redundant PPSs
within the stream are removed.

(cherry picked from commit e6874bc3af)
2017-10-17 20:56:30 +01:00
Mark Thompson a308872b04 lavc: Add h264_metadata bitstream filter
This is able to modify some header metadata found in the SPS/VUI,
and can also add/remove AUDs and insert user data in SEI NAL units.

(cherry picked from commit 9e93001b61)
(cherry picked from commit c42b62d1f9)
2017-10-17 20:56:29 +01:00
Mark Thompson 9c7d70b49b lavc: Add trace_headers bitstream filter
Supports all streams that the coded bitstream infrastructure does
(currently H.264, H.265 and MPEG-2).

(cherry picked from commit f11d8a5e8b)
2017-10-17 20:56:29 +01:00
Mark Thompson 686e388bbb lavc: Add coded bitstream read/write support for MPEG-2
(cherry picked from commit 2bc9ba8d3c)
(cherry picked from commit a41b69b5eb)
2017-10-17 20:56:29 +01:00
Mark Thompson 9b0c7aa0e4 lavc: Add coded bitstream read/write support for H.265
(cherry picked from commit 867381b8b5)
(cherry picked from commit f763489364)
(cherry picked from commit 067a9ddeb8)
2017-10-17 20:56:29 +01:00
Mark Thompson b4c915f4b3 lavc: Add coded bitstream read/write support for H.264
(cherry picked from commit acf06f4544)
(cherry picked from commit 768eb9182e)
(cherry picked from commit e7f64191b2)
2017-10-17 20:56:29 +01:00
Mark Thompson 6734eef6b8 lavc: Add coded bitstream read/write API
(cherry picked from commit 18f1706f33)
(cherry picked from commit 44cde38c8a)
2017-10-17 20:56:29 +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
James Almer ff7f859c25 avcodec/Makefile: skip v4l2_m2m headers if needed
Fixes checkheaders on systems where v4l2_m2m is unavailable.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 18:08:07 -03:00
Rostislav Pehlivanov 2ad1768c7b opusenc: implement a psychoacoustic system
This commit implements a psychoacoustic system for the native Opus
encoder. Its unlike any other psychoacoustic system known since its
capable of using a lookahead to make better choices on how to treat the
current frame and how many bits to allocate for it (and future frames).

Also, whilst the main bulk of the analysis function has to run in a
single thread, the per-frame anaylsis functions does not modify the main
psychoacoustic context, so in the future it will be fairly trivial to
run those as slice threads.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-09-23 08:27:44 +01:00