Rostislav Pehlivanov
05dfa21d47
opus_pvq: make max_den a float
...
Prevents int->float conversions on every loop.
Performance gain on synthetic benchmarks: 13%.
Suggested by kamedo2.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com >
2017-09-28 22:41:08 +01:00
Karthick J
f7b7d51a37
avcodec/decode: Pass on the Closed Captions Side Data
...
Signed-off-by: Karthick J <kjeyapal@akamai.com >
Signed-off-by: Marton Balint <cus@passwd.hu >
2017-09-28 21:12:08 +02:00
Karthick J
b6cf66ae1c
avdevice/decklink_dec: Added Closed caption decode from VANC
...
Signed-off-by: Karthick J <kjeyapal@akamai.com >
Signed-off-by: Marton Balint <cus@passwd.hu >
2017-09-28 21:06:12 +02:00
James Almer
93dfc4f174
avcodec/libopenh264dec: check for ff_set_dimensions() return value
...
Was removed by accident in e9b6212de2 .
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-28 00:49:05 -03:00
James Almer
e9b6212de2
Merge commit '030de53e9cc225dc767458aedcc87efd457b4f3b'
...
* commit '030de53e9cc225dc767458aedcc87efd457b4f3b':
libopenh264dec: Let the framework use the h264_mp4toannexb bitstream filter
Merged-by: James Almer <jamrial@gmail.com >
2017-09-28 00:44:11 -03:00
James Almer
e9a3880613
Merge commit 'ba30b74686f0cb6c9dd465ac4820059c48bf9d08'
...
* commit 'ba30b74686f0cb6c9dd465ac4820059c48bf9d08':
aac: Validate the sbr sample rate before using the value
See cf5f4c5169
Merged-by: James Almer <jamrial@gmail.com >
2017-09-27 23:49:06 -03: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
Mark Thompson
da53c424b9
lavc/v4l2: Add missing header include
...
Fixes checkheaders.
2017-09-27 23:10:03 +01:00
James Almer
f1cdfd2959
Merge commit '57ec83e4246b21c2f0c068b9151d806737d4497f'
...
* commit '57ec83e4246b21c2f0c068b9151d806737d4497f':
omx: Use the EOS flag to handle flushing at the end
Merged-by: James Almer <jamrial@gmail.com >
2017-09-27 19:06:12 -03: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
Kaustubh Raste
6796a1dd8c
avcodec/mips: Improve avc put mc 20, 01 and 03 msa functions
...
Remove loops and unroll as block sizes are known.
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-27 21:15:57 +02:00
Kaustubh Raste
b8854e2439
avcodec/mips: Improve avc chroma vert mc msa functions
...
Replace generic with block size specific function.
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-27 21:15:57 +02:00
Kaustubh Raste
10ab5534e0
avcodec/mips: Improve avc weighted mc msa functions
...
Replace generic with block size specific function.
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-27 21:15:57 +02:00
Kaustubh Raste
ed1586b921
avcodec/mips: Removed generic function call in avc intra msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-27 21:15:57 +02:00
Kaustubh Raste
deeaaba1ab
avcodec/mips: preload data in hevc sao edge 45 degree filter msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-27 21:15:57 +02:00
James Almer
0c005fa86f
Merge commit '7abdd026df6a9a52d07d8174505b33cc89db7bf6'
...
* commit '7abdd026df6a9a52d07d8174505b33cc89db7bf6':
asm: Consistently uppercase SECTION markers
Merged-by: James Almer <jamrial@gmail.com >
2017-09-26 18:48:06 -03:00
James Almer
b1cf151c4d
Merge commit '577326d430593a25456393a75212b95d1cd94131'
...
* commit '577326d430593a25456393a75212b95d1cd94131':
lavc: deprecate refcounted_frames field
Merged-by: James Almer <jamrial@gmail.com >
2017-09-26 16:42:18 -03:00
James Almer
318778de9e
Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'
...
* commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3':
Mark some arrays that never change as const.
Merged-by: James Almer <jamrial@gmail.com >
2017-09-26 16:02:40 -03:00
Frédéric Devernay
eec67f2522
avcodec/dnxhdenc: fix DNxHR 444 encoding crashes
...
Fixes #6649 .
2017-09-26 10:00:51 +02:00
James Almer
ecb9741ba2
avcodec/avpacket: deprecate av_copy_packet()
...
It does the same thing as av_packet_ref().
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-25 21:22:06 -03:00
Martin Vignali
cab71e4e4e
libavcodec/hapdec : add support HapAlphaOnly
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 21:54:13 +02:00
Michael Niedermayer
5d31f03a02
avcodec/takdec: Fix integer overflow in decode_lpc()
...
Fixes: runtime error: signed integer overflow: 16748560 + 2143729712 cannot be represented in type 'int'
Fixes: 3202/clusterfuzz-testcase-minimized-4988291642294272
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 21:54:13 +02:00
Michael Niedermayer
4f5eaf0b59
avcodec/proresdec2: Check bits in DECODE_CODEWORD(), fixes invalid shift
...
Fixes: runtime error: shift exponent 42 is too large for 32-bit type 'unsigned int'
Fixes: 3410/clusterfuzz-testcase-minimized-5313377960198144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 21:54:13 +02:00
Michael Niedermayer
3dabb9c69d
avcodec/takdec: Fix integer overflows in decode_subframe()
...
Fixes: runtime error: signed integer overflow: -1562477869 + -691460395 cannot be represented in type 'int'
Fixes: 3196/clusterfuzz-testcase-minimized-4528307146063872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 21:54:13 +02:00
Kaustubh Raste
16adbfe60c
avcodec/mips: Improve avc chroma horiz mc msa functions
...
Replace generic with block size specific function.
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 02:33:48 +02:00
Kaustubh Raste
d6737539e7
avcodec/mips: Unrolled loops avc intra msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 02:33:48 +02:00
Kaustubh Raste
7f8417f226
avcodec/mips: Improve hevc uni-w copy mc msa functions
...
Load the specific destination bytes instead of MSA load and pack.
Pack the data to half word before clipping.
Use immediate unsigned saturation for clip to max saving one vector register.
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 02:33:48 +02:00
Michael Niedermayer
d8ef5a47bb
avcodec/flacenc: Replace "return -1" by named constant
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 02:33:48 +02:00
Michael Niedermayer
9cec174247
avcodec/snowenc: Replace "return -1" by named constants
...
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 02:33:48 +02:00
James Almer
d1e7e4fbe2
avcodec/v4l2_m2m: add missing header inclusions
...
Should fix checkheaders on systems where v4l2_m2m is enabled.
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-23 18:13:01 -03: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
James Almer
015f976aae
avcodec/frame_thread_encoder: use av_packet_alloc()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-23 17:52:32 -03:00
James Almer
e4fd7b1fea
avcodec/opusenc_psy: use av_clip_uintp2()
...
Fixes fate-source.
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-23 13:23:27 -03:00
James Almer
b8eaecbf39
avcodec/opusenc_utils: add missing preprocessor guards
...
Fixes fate-source.
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-23 13:22:51 -03:00
Rostislav Pehlivanov
039ebaa5f3
lavfi: make window_func an inline function
...
Eliminate lavc->lavfi dependency. The function isn't big and doesn't
deserve its own file.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com >
2017-09-23 14:35:06 +01: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
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
Michael Niedermayer
67da2685e0
avcodec/dirac_dwt: Fix integer overflow in COMPOSE_FIDELITYi*()
...
Fixes: runtime error: signed integer overflow: 161 * 13872281 cannot be represented in type 'int'
Fixes: 3295/clusterfuzz-testcase-minimized-4738998142500864
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-22 12:19:07 +02:00
Michael Niedermayer
d00fc952b6
avcodec/ffv1dec: Fix integer overflow in read_quant_table()
...
Fixes: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 3361/clusterfuzz-testcase-minimized-5065842955911168
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-22 12:19:07 +02:00
Michael Niedermayer
2c933c5168
avcodec/svq3: Fix overflow in svq3_add_idct_c()
...
Fixes: runtime error: signed integer overflow: 2147392585 + 524288 cannot be represented in type 'int'
Fixes: 3348/clusterfuzz-testcase-minimized-4809500517203968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-22 12:19:07 +02:00
Kaustubh Raste
f160a63bad
avcodec/mips: Remove generic func use in hevc non-uni copy mc msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-22 12:12:59 +02:00
Kaustubh Raste
2b15626997
avcodec/mips: preload data in hevc sao edge 90 degree filter msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-22 12:12:59 +02:00
Carl Eugen Hoyos
724cf83f10
Remove some unneeded casts of bit_rate.
2017-09-22 01:33:22 +02:00
Kaustubh Raste
bba9c1c6bb
avcodec/mips: Reduced conditional cases in avc inter lpf msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-21 03:02:24 +02:00
Kaustubh Raste
b5da07d434
avcodec/mips: Unrolled loops and expanded functions in avc put mc 10 & 30 msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-21 03:02:24 +02:00
Kaustubh Raste
e428e5ded6
avcodec/mips: preload data in hevc sao edge 0 degree filter msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-20 02:56:20 +02:00
Kaustubh Raste
f4ba85dc82
avcodec/mips: Fixed rnd_val variable to 6 in hevc uni mc msa functions
...
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com >
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-20 02:56:20 +02:00
Michael Niedermayer
5480e82d77
avcodec/pngdec: Clean up on av_frame_ref() failure
...
Fixes: memleak
Fixes: 3203/clusterfuzz-testcase-minimized-4514553595428864
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-20 02:56:20 +02:00
Mark Thompson
375cf55fe9
vaapi: Disable deprecation warnings around use of old struct vaapi_context
2017-09-19 22:46:55 +01:00
Hendrik Leppkes
b4ecf2b582
vp9: move VP9SharedContext back to the top of VP9Context
...
VP9SharedContext needs to be the first member so its properties can be
safely accessed from hardware accelerators, without the need to share
the full VP9Context.
Fixes ticket #6674 .
2017-09-19 14:52:15 +02:00