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
Henrik Gramner
18821e3ba1
x86/exrdsp: optimize ff_reorder_pixels_avx2()
...
Tested with "checkasm --test=exrdsp -bench"
Before:
reorder_pixels_c: 5187.8
reorder_pixels_sse2: 377.0
reorder_pixels_avx2: 331.3
After:
reorder_pixels_c: 5181.5
reorder_pixels_sse2: 377.0
reorder_pixels_avx2: 313.8
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-18 23:24:55 -03:00
Carl Eugen Hoyos
3118e81f86
lavc/frame_thread_encoder: Do not mix variable declaration and code.
...
Fixes a warning:
ISO C90 forbids mixed declarations and code
2017-09-18 03:24:52 +02:00
James Almer
98d7ad085e
avcodec/exrdsp: improve the ExrDSPContext->reorder_pixels prototype
...
Make dst be the first parameter and src const. It's more in line with the rest of the codebase.
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-17 19:01:40 -03:00
Martin Vignali
9b8c1224d7
libavcodec/exr : add X86 SIMD for reorder_pixels
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-17 17:53:57 -03:00
Michael Niedermayer
08ec828de9
avcodec/vorbisenc: Fix mixed declaration and statements
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-16 19:55:03 +02:00
Michael Niedermayer
d76838c1ad
avcodec/fits: Fix include type
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-16 19:55:03 +02:00
Reimar Döffinger
a149fa97d9
avcodec/frame_thread_encoder: Fix AV_OPT_TYPE_STRING handling in avctx
...
This is the equivalent to what 7d317d4706
did for the codec-specific options.
av_opt_copy has specific handling so it's fine that we already copied
the whole context before.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de >
2017-09-16 16:46:00 +02:00
Kaustubh Raste
1a85fb7e1e
avcodec/mips: Improve hevc sao band filter msa functions
...
Preload data in band filter 0-8 for better pipeline parallelization.
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-15 22:36:42 +02:00
Kaustubh Raste
0105ed551c
avcodec/mips: Improve avc mc copy 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-15 22:19:07 +02:00
Kaustubh Raste
e5a650e141
avcodec/mips: Improve avc lpf msa functions
...
Optimize luma intra case by reducing conditional cases.
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-15 22:19:07 +02:00
Matthieu Bouron
dd8ffb191f
lavc/mediacodec_wrapper: fix jni vaargs types
...
Fixes decoding on 32-bit devices with Android NDK >= 15.
2017-09-15 14:19:16 +02:00
Kaustubh Raste
c6314cd750
avcodec/mips: Improve hevc idct msa functions
...
Align the buffers. Remove reduandant constant array.
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-15 01:47:14 +02:00
Kaustubh Raste
f692e55aab
avcodec/mips: Improve hevc lpf msa functions
...
Seperate the filter processing in all strong, all weak and strong + weak cases.
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-15 01:47:14 +02:00
James Almer
6561cdd70c
avcodec.h: fix doxygen comment
2017-09-14 01:43:52 -03: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
Mark Thompson
82342cead1
lavc: Add flag to mark packets containing trusted input
2017-09-13 22:25:29 +01:00
James Almer
7bae17e37a
avcodec/extract_extradata: return an error when buffer allocation fails
...
ret is 0 by default.
Reviewed-by: Mark Thompson <sw@jkqxz.net >
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-13 17:22:00 -03:00
James Almer
9669c05baf
avcodec/h264_sei: add namespace prefix to frame packingarrangement enum values
...
Missed in 6eb102a616 .
Signed-off-by: James Almer <jamrial@gmail.com >
2017-09-12 19:59:23 -03:00
Mark Thompson
6eb102a616
h264_sei: Add namespace prefix to all SEI values
...
This avoids confusion with equivalent H.265 SEI values when both are
being used at the same time.
(cherry picked from commit 6ea220cbee )
2017-09-12 22:29:31 +01:00
Ronald S. Bultje
1db03e952b
vp9: fix explicit memory order for report_progress.
2017-09-12 15:26:05 -04:00