1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

86961 Commits

Author SHA1 Message Date
James Almer
c220fe008c avcodec/webp: add support for ICCP chunks
Export the raw data as ICC Profile frame side data.

Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-26 11:31:17 -03:00
James Almer
5e4e9afaa1 ffprobe: add support for ICC Profile frame side data
Print the name metadata entry and the buffer size.

Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-26 11:31:17 -03:00
James Almer
4cebf0fc45 avutil/frame: add ICC Profile to av_frame_side_data_name
Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-26 11:31:17 -03:00
Muhammad Faiz
c8305079da avcodec/rdft: reorder calculation
old:
 165188 decicycles in  rdft,   65536 runs,      0 skips
 165865 decicycles in irdft,   65536 runs,      0 skips
new:
 142487 decicycles in  rdft,   65536 runs,      0 skips
 141498 decicycles in irdft,   65536 runs,      0 skips

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-26 06:13:05 +07:00
Michael Niedermayer
7140761481 avformat/oggparsecelt: Do not re-allocate os->private
Fixes: double free
Fixes: clusterfuzz-testcase-minimized-5080550145785856

Found-by: ClusterFuzz
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-25 22:04:34 +02:00
Kaustubh Raste
a776cb2074 libavcodec/mips: Optimize avc idct 4x4 for msa
Removed memset call and improved performance.

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-07-25 22:04:34 +02:00
Rostislav Pehlivanov
0563a5d175 mdct15: simplify prereindexing and forward transform postrotation
Equivalent.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-25 20:15:17 +01:00
Rostislav Pehlivanov
2e08bbb282 pngdec: decode and expose iCCP chunks as side data
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-25 20:12:44 +01: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
Nicolas George
bbc7cfbf1e lavfi/testsrc2: fix completely transparent alpha. 2017-07-25 09:27:35 +02:00
James Almer
4a654be3fb avcodec/mpegvideo_enc: fix mixed declarations and code warning 2017-07-25 00:58:24 -03:00
Steven Liu
805ce25b1d avformat/hlsenc: improve hls encrypt get key file operation
get key file only once time is ok, no need more times.
Ticket-id: #6545

Found-by: JohnPi
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-07-25 10:31:29 +08:00
Michael Niedermayer
03a9e6ff30 avcodec/ylc: Fix shift overflow
Fixes: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 2698/clusterfuzz-testcase-minimized-4713541443518464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-24 17:52:42 +02:00
Michael Niedermayer
0764fe1d09 avcodec/aacps: Fix multiple integer overflow in map_val_34_to_20()
Fixes: avcodec/aacps.c:511:40: runtime error: signed integer overflow: 1509077651 + 758068176 cannot be represented in type 'int'
Fixes: 2678/clusterfuzz-testcase-minimized-4702787684270080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-24 17:52:42 +02:00
Clément Bœsch
850a45aef1 lavf/movenc: support GPMF track (gpmd) remuxing
See https://github.com/gopro/gpmf-parser for more information on the
data stream itself.
2017-07-24 14:43:40 +02:00
Steven Liu
f21457f8e0 avformat/hlsenc: fix hls fmp4 extention name bug
ticket-id: #6541
when use hls fmp4 muxer, the extention name is not .m4s, this
code can fix it.

Found-by: JohnPi
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-07-24 19:55:19 +08:00
Michael Niedermayer
aff93e1929 avcodec/mpegvideo_enc: Use intra/inter scantable matching mb type in quantization
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-24 02:42:33 +02:00
Michael Niedermayer
2dfb8c4178 avcodec/aacdec_fixed: fix: left shift of negative value -1
Fixes: 2699/clusterfuzz-testcase-minimized-5631303862976512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-24 02:42:33 +02:00
Michael Niedermayer
69e7daf6ce avcodec/dirac_vlc: Fix undefined shift
Fixes: runtime error: shift exponent 64 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2674/clusterfuzz-testcase-minimized-4999700518273024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-24 02:42:33 +02:00
Muhammad Faiz
7e9f550003 avfilter/w3fdif: do not write to line before start line
That line has been written by previous job.
Fix tsan warning.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-23 20:32:42 +07:00
Brice Waegeneire
6a6eec485d doc/filters: typo in frei0r
Signed-off-by: Brice Waegeneire <brice.wge@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-23 14:58:29 +02:00
Vodyannikov Aleksandr
47c9365724 avcodec/cfhd: Fix decoding regression due to height check
Fixes: Ticket6546

Regression since: 54aaadf648

Reviewed-by: Muhammad Faiz <mfcc64@gmail.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-23 14:58:29 +02:00
foo86
dd4b7badb4 avcodec/dcaadpcm: fix use of uninitialized variable
Fixes CID 1409924.
2017-07-23 00:28:18 +03:00
foo86
34fb84a97d avcodec/dcaadpcm: check for av_malloc() failure
Fixes CID 1409915.
2017-07-23 00:28:18 +03:00
Mark Thompson
f2c11b9337 pixdesc: Reindent after previous commit 2017-07-22 21:51:41 +01:00
Mark Thompson
f48efb14f9 pixdesc: Explicitly handle invalid arguments to av_find_best_pix_fmt_of_2() 2017-07-22 21:51:26 +01:00
Vittorio Giovara
d24a82d2e2 ffprobe: Print color properties from show_frames
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-07-21 20:19:07 +02:00
Vittorio Giovara
dc9735eb67 hevc: Make sure to update the current frame transfer characteristic
Otherwise the first decoded frame will still be tagged with the
original transfer instead of the alternative one.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-07-21 20:07:40 +02:00
Vittorio Giovara
2e91a96d7b zscale: Factor out graph building 2017-07-21 20:07:40 +02:00
Vittorio Giovara
0a243bedec zscale: Factor out format initialization 2017-07-21 20:07:40 +02:00
Michael Niedermayer
edc88646ee avcodec/diracdec: Check dimensions which are closer to what is allocated in alloc_sequence_buffers()
Fixes OOM
Fixes: 2674/clusterfuzz-testcase-minimized-4999700518273024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 17:37:05 +02:00
Michael Niedermayer
1196e53b70 doc: Add initial documentation explaining undefined behavior and SUINT
Requested-by: Kieran Kunhya <kierank@obe.tv>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 17:37:05 +02:00
Kaustubh Raste
ef1b4bdf44 libavutil/mips: Updated msa generic macros
Reduced msa load-store code.
Removed inline asm of GP load-store for 64 bit.
Updated variable names in GP load-store macros for naming consistency.
Corrected macro descriptions.

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-07-21 17:37:05 +02:00
foo86
67af24da0d MAINTAINERS: add myself
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-21 12:18:48 -03:00
James Almer
7c9d2ad45f avcodec/dca: remove GetBitContext usage from avpriv_dca_parse_core_frame_header()
This prevents potential ABI issues with GetBitContext.

Reviewed-by: foo86 <foobaz86@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-21 12:18:10 -03:00
Wan-Teh Chang
99c5ac2039 avcodec/h264: Declare the local variable decode_chroma as const.
ff_h264_decode_mb_cabac() and ff_h264_decode_mb_cavlc() are very long
functions. Declaring decode_chroma as const makes it clear the variable
doesn't change after initialization.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 02:08:33 +02:00
Wan-Teh Chang
b77e26b285 avcodec/hevcdec: hevc_await_progress: declare |y| only if used.
hevc_await_progress() uses the variable |y| only inside the "if" block.
So |y| only needs to be declared and initialized in that block.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 02:08:33 +02:00
Wan-Teh Chang
ea1ca17be2 avcodec/x86/cavsdsp: Delete #include "libavcodec/x86/idctdsp.h".
This file already has #include "idctdsp.h", which is resolved to the
idctdsp.h header in the directory where this file resides by compilers.
Two other files in this directory, libavcodec/x86/idctdsp_init.c and
libavcodec/x86/xvididct_init.c, also rely on #include "idctdsp.h"
working this way.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 02:08:33 +02:00
Rostislav Pehlivanov
3aca16e857 opus_rc: fix CDF encoding of zeroes
0th CDF value is where probabilities are.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-20 08:24:46 +01:00
James Almer
0a813ca091 fate: add libavdevice/reverse.c to fate-source 2017-07-20 01:59:43 -03:00
James Almer
3cd616a0c9 avdevice: make ff_reverse available on shared builds
Should fix compilation failures introduced by 9b93795890.
2017-07-20 00:33:29 -03:00
Paul B Mahol
12791ec5b0 avfilter/af_astats: measure dynamic range
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 21:07:45 +02:00
James Almer
cb13f44831 avcodec/dolby_e: use av_clip_uintp2()
Fixes fate-source.
2017-07-19 15:19:59 -03:00
Paul B Mahol
a17fcd8e04 avfilter/af_astats: do not overwrite already set values when doing reset
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 20:11:43 +02:00
George Boyle
6e156075b0 avfilter: Add blue and violet noise generation filters
For the blue and violet noise, I took the pink and brown noise
respectively and subtracted the offsets instead of adding them. When I
eyeball the frequency spectrum of the resulting outputs it looks correct
to me, i.e. the blue graph appears to be a mirror image of the pink, and
the same can be said of the violet and the brown. I did not do anything
else to confirm the correctness.
2017-07-19 19:51:04 +02:00
foo86
f04ef26816 avformat: add SMPTE 337M demuxer 2017-07-19 12:27:33 +02:00
foo86
930fe4b1f7 avcodec: add Dolby E decoder 2017-07-19 12:27:32 +02:00
Muhammad Faiz
22b72de04b avfilter/pthread: use slice threading from avutil
Benchmark (with 2 cpus):
./ffmpeg -f rawvideo -s 1280x720 -t 1000 -i /dev/zero \
    -filter_threads $threads -vf transpose=clock -f null null
threads=2:
  old: 31.129s 31.446s 31.574s
  new: 29.602s 29.636s 29.656s
threads=3 (nb_threads = nb_cpus + 1 is bad choice at this situation):
  old: 40.132s 40.279s 40.279s
  new: 39.308s 39.570s 39.693s
threads=4:
  old: 31.306s 31.366s 31.654s
  new: 30.231s 30.360s 30.451s

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:51:38 +07:00
Muhammad Faiz
b505f15b15 avcodec/pthread_slice: use slice threading from avutil
Also remove pthread_cond_broadcast(progress_cond) on uninit.
Broadcasting it is not required because workers are always
parked when they are not in thread_execute. So it is imposible
that a worker is waiting on progress_cond when uninitialized.

Benchmark:
./ffmpeg -threads $threads -thread_type slice -i 10slices.mp4 -f null null
threads=2:
  old: 70.212s 70.525s 70.877s
  new: 65.219s 65.377s 65.484s
threads=3:
  old: 65.086s 66.306s 66.409s
  new: 63.229s 65.026s 65.116s
threads=4:
  old: 60.993s 61.482s 62.123s
  new: 59.224s 59.441s 59.667s
threads=5:
  old: 57.576s 57.860s 58.832s
  new: 53.032s 53.948s 54.086s

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:51:32 +07: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