1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

90635 Commits

Author SHA1 Message Date
Michael Niedermayer
6cd81d68c5 libavcodec/rv34: error out earlier on missing references
Fixes visual corruption on seeking

Fixes: downloadTest_clip_24M.rmvb

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-07 19:16:37 +02:00
Michael Niedermayer
6261ef4251 avcodec/get_bits: Document skip_bits_long()
Found-by: Kieran
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-07 19:16:37 +02:00
James Almer
9703b7d05f avformat/matroskadec: reference the existing data buffer when creating packets
Newly allocated data buffers (wavpack, prores, compressed buffers)
are padded to meet the requirements of AVPacket.

About 10x speed up in matroska_parse_frame().

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-06 21:14:50 -03:00
James Almer
b8e75a2a08 avformat/matroskadec: factor the prores packet parsing code out
Simplifies code in matroska_parse_frame(). This is in preparation for
the following patch.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-06 21:14:50 -03:00
James Almer
a61886650b avformat/matroskadec: use refcounted buffers in EbmlBin
Data in EbmlBin objects is never changed after being read from the
input file (save for two specific cases with encoded CodePrivate), so
using AVBufferRef we can prevent unnecessary copy of data by instead
creating new references to said constant data.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-06 21:14:49 -03:00
Hendrik Schreiber
647fd4b829 swresample/swresample: Fix for seg fault in swr_convert_internal() -> sum2_float during dithering.
Removed +len1 in call to s->mix_2_1_f() as I found no logical explanation for it. After removal, problem was gone.

Signed-off-by: Hendrik Schreiber <hs@tagtraum.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-07 02:10:45 +02:00
Lou Logan
2f1963eedc doc/developer: remove merge request method of contributing
This seems to confuse Github users into thinking that we may accept pull
requests. We do not accept pull requests.

Sending patches to the ffmpeg-devel mailing list is our preferred method
for users to contribute code.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-04-06 13:24:18 -08:00
Bela Bodecs
e54679b6c1 doc/filters: some more details and modified example to zmq/azmq
Info about default value of bind_address option and its abbreviated
version (b). Example modified to have named instanced filter and to show
its use.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Lou Logan <lou@lrcd.com>
2018-04-05 16:22:04 -08:00
Carl Eugen Hoyos
233f52fd25 lavf/amr: Stricter heuristic for auto-detection.
Fixes ticket #7125.
2018-04-06 00:21:22 +02:00
Josh de Kock
92fe0bf1e8 lavfi,lavd: add gitignore for generated static component lists
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-05 22:08:53 +01:00
Misty De Meo
187ff5a108 Add Sega FILM muxer
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-05 22:04:30 +01:00
Martin Vignali
1425114af2 avcodec/prores_ks : do not call estimate_alpha at each quantification step
also remove unused arg in estimate_alpha_plane

Improve quality of Prores 4444 encoding
2018-04-05 22:06:30 +02:00
Martin Vignali
595505083a checkasm/vf_blend : add test for 16 bit version of
grainextract
grainmerge
average
extremity
negation
2018-04-05 21:46:19 +02:00
Martin Vignali
f3df42e81d avfilter/x86/vf_blend : add SIMD for 16 bit version of
grainextract
grainmerge
average
extremity
negation
2018-04-05 21:46:16 +02:00
Martin Vignali
8eb0bb1108 avfilter/x86/vf_blend : reorganize DIFFERENCE macro to reduce line duplication between 8bit and 16 bit version 2018-04-05 21:46:11 +02:00
Valery Kot
67fd8df419 avcodec/openh264enc.c: generate IDR frame in response to I frame pict_type
Signed-off-by: Valery Kot <valery.kot@gmail.com>
2018-04-05 15:59:18 -03:00
Jacob Trimble
b08c132a9c avformat/mov: Fix parsing of tfdt when using sample descriptors.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-05 20:10:24 +02:00
Lou Logan
a2356e5091 doc/developer: update link to "sign-off" info
Found by Hendrik Schreiber.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-04-05 10:00:42 -08:00
wm4
709e0291d6 avcodec/decode: fix warning when decoding pseudo paletted formats
The pseudo palette allocation is optional now. But if it's still
allocated (like the internal get_buffer2 implementation does, for
compatibility), it shouldn't print a warning.
2018-04-05 16:58:40 +02:00
Timo Teräs
53688b62ca avformat/movenc: add rtp_hinting_needed() helper function
This is shared test and this simplifies code a bit. Follow up
commit will have additional tests for this function.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-04 19:09:28 +02:00
Timo Teräs
94d831f388 ffmpeg: allow setting attached_pic disposition
This is used to signal that image should be stored in metadata
as cover image.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-04 19:09:28 +02:00
James Almer
4f55b94663 avformat/matroskadec: address some more missing AVPacket frees
Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 13:53:12 -03:00
James Almer
2f27370111 avcodec/mpeg4videodec: unbreak multithreading decoding
Should fix double free related crashes.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 11:09:11 -03:00
James Almer
2f0e0deadc avformat/matroskadec: address a missing AVPacket free
Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 10:54:14 -03:00
James Almer
2accdd3871 avcodec/libaomdec: fix broken pix_fmt changes from the previous commit
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 02:13:40 -03:00
James Almer
a866cc3ad3 avcodec/mpeg4videodec: free studio profile VLCs when closing the decoder
Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 00:45:16 -03:00
James Almer
fefe47b701 avcodec/clearvideo: fix mixed code and declarations
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 00:43:01 -03:00
James Almer
d95f15b14d avformat/mp3enc: use AVPacketList helper functions to queue packets
Simplifies code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 00:15:39 -03:00
James Almer
15ca8311e6 avformat/ttaenc: use AVPacketList helper functions to queue packets
Simplifies code.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 00:15:38 -03:00
James Almer
78b96be758 avformat/matroskadec: use AVPacketList to queue packets
It's more robust and efficient.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 00:15:38 -03:00
James Almer
58ce4fdeae avformat/utils: optimize ff_packet_list_free()
Don't constantly overwrite the list's head pointer.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 00:15:38 -03:00
James Almer
3a4d74c1ff avformat/utils: make AVPacketList helper functions shared
Based on a patch by Luca Barbato.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 00:15:37 -03:00
Jun Zhao
51e3010575 lavf/hls: Remove the dead code in parse_playlist()
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Reviewed-by: Steven Liu <lq@onvideo.cn>
2018-04-04 11:04:56 +08:00
James Almer
9df784db6e avcodec/sheervideo: add missing wrappers to sheervideodata.h
Fixes make fate-source

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-03 23:32:03 -03:00
James Almer
4d89b5f844 avcodec/clearvideo: add missing wrappers to clearvideodata.h
Fixes make fate-source

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-03 23:31:36 -03:00
James Almer
f3fae82042 avcodec/libaomdec: add support for monochrome files
All such files are signaled as I42016, as there's no monochrome value
in aom_img_fmt_t.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-03 15:33:48 -03:00
James Almer
d5343a5005 avcodec/libaomdec: remove duplicate code
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-03 15:27:18 -03:00
Gagandeep Singh
673604e0e3 lavc/cfhd: fix distortion of lowest 8 lines when height is not multiple of 16
Also update fate reference. Fixes ticket #6675.
2018-04-03 18:20:30 +02:00
wm4
d6fc031caf avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL
PSEUDOPAL pixel formats are not paletted, but carried a palette with the
intention of allowing code to treat unpaletted formats as paletted. The
palette simply mapped the byte values to the resulting RGB values,
making it some sort of LUT for RGB conversion.

It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8,
GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap
formats. The last one, GRAY8, is more common, but its treatment is
grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming
from typical Y video planes was not mapped to the correct RGB values.
This cannot be fixed, because AVFrame.color_range can be freely changed
at runtime, and there is nothing to ensure the pseudo palette is
updated.

Also, nothing actually used the PSEUDOPAL palette data, except xwdenc
(trivially changed in the previous commit). All other code had to treat
it as a special case, just to ignore or to propagate palette data.

In conclusion, this was just a very strange old mechnaism that has no
real justification to exist anymore (although it may have been nice and
useful in the past). Now it's an artifact that makes the API harder to
use: API users who allocate their own pixel data have to be aware that
they need to allocate the palette, or FFmpeg will crash on them in
_some_ situations. On top of this, there was no API to allocate the
pseuo palette outside of av_frame_get_buffer().

This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes
the pseudo palette optional. Nothing accesses it anymore, though if it's
set, it's propagated. It's still allocated and initialized for
compatibility with API users that rely on this feature. But new API
users do not need to allocate it. This was an explicit goal of this
patch.

Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I
first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL
macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0.

Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition,
FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation
functions manually changed to not allocating a palette.
2018-04-03 17:53:00 +02:00
wm4
e53d3348d1 avcodec/xwdenc: do not rely on AV_PIX_FMT_FLAG_PSEUDOPAL palettes
This is the only code I found within FFmpeg that still inherently
requires AV_PIX_FMT_FLAG_PSEUDOPAL. It's easily changed not to require
it.

Preparation for the next patch.
2018-04-03 17:52:06 +02:00
Paul B Mahol
be3a051ca8 avcodec/sheervideo: move tables to own header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-03 17:28:16 +02:00
Paul B Mahol
a874586994 avcodec/clearvideo: add inter-frame decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-03 17:28:16 +02:00
Simon Thelen
8c2c97403b avcodec/imgconvert: fix possible null pointer dereference
regression since 354b26a394
2018-04-03 16:20:31 +02:00
Tobias Rapp
4b736bc921 fftools/cmdutils: add support for level flag in loglevel option parser
Allows to manage the AV_LOG_PRINT_LEVEL flag as a prefix to the loglevel
option value, similar to the existing AV_LOG_SKIP_REPEATE flag. Adds
support for setting flags relative to the existing value by using a +/-
prefix.

Previous version reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-04-03 10:17:38 +02:00
Michael Niedermayer
197a4e8fee avcodec/aacdec_fixed: Fix integer overflow in apply_independent_coupling_fixed()
I was not able to reproduce this, this fix is based on just the fuzzer log.
Fixes: 4959/clusterfuzz-testcase-minimized-6035350934781952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-02 23:27:51 +02:00
Michael Niedermayer
d52be5d4e9 avcodec/cscd: Error out when LZ* decompression fails
Fixes: Timeout
Fixes: 6304/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CSCD_fuzzer-5754772461191168

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-02 23:27:51 +02:00
Jun Zhao
c6c20249e7 avformat/options_table: Change the seek2any location in opt table.
Change the seek2any location in avformat_options to make code more
readable.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-02 23:27:51 +02:00
James Almer
4897c80cc6 avcodec/libaomdec: remove references to gbrp pixfmt
Support for this needs testing, so remove for now.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-02 17:54:36 -03:00
James Almer
877aff2bea avcodec/libaomenc: remove references to gbrp pixfmt
Support for this needs testing, so remove for now.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-02 17:54:36 -03:00
Paul B Mahol
46129b4044 avformat/rmdec: make use of avio_get_str()
Also do not set empty metadata.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-02 22:44:26 +02:00