This patch enables paletteuse to identify the transparency in incoming
video and tag transparent pixels on outgoing video with the correct
index from the palette.
This requires tracking the transparency index in the palette,
establishing an alpha threshold below which a pixel is considered
transparent and above which the pixel is considered opaque, and
additional changes to track the alpha value throughout the conversion
process.
This change is a partial fix for https://trac.ffmpeg.org/ticket/4443
However, animated GIFs are still output incorrectly due to a bug
in gif optimization which does not correctly handle transparency.
Signed-off-by: Clément Bœsch <u@pkh.me>
* commit '1fe858136b315796dd5349f3b4448a29d1bd6fa1':
utvideodec: Prevent possible signed overflow
This commit is a noop, see e86444b19d
Merged-by: James Almer <jamrial@gmail.com>
* 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>
merge from libav: 585dc1aece
If the metadata packet is corrupted, flv_read_metabody can accidentally
read past the start of the next packet. If the start of the next packet
had been flushed out of the IO buffer, we would be unable to seek to
the right position (on a nonseekable stream).
Prefer to clearly error out instead of silently trying to read from a
desynced stream which will only be interpreted as garbage.
* commit '193b09189004ede4a6998e69192d1a9f63602088':
thread: Define ff_mutex_* macros as stub functions when threads are disabled
Merged-by: James Almer <jamrial@gmail.com>
* commit 'efddf2c09aed7400c73ecf327f86a4d0452b94b5':
decode: Initialize ret before using it
filtfmts-test: Mark filter as const
This commit is a noop, see
3c14547eb7960b4d4761
Merged-by: James Almer <jamrial@gmail.com>
* commit 'd32d59bc977b43031007bb2ab21e232f96d2ebcb':
matroska: Read only the data written in the scratch buffer
This commit is a noop, see fd59207c1c
Merged-by: James Almer <jamrial@gmail.com>
* commit '6ac0e7818399a57e4684202bac79f35b3561ad1e':
mpeg4videodec: raise an error if sprite_trajectory.table is NULL
Merged-by: James Almer <jamrial@gmail.com>
* commit 'b62ed6873821c8fce8f7e2c2927ae54f86afeb22':
configure: Better names for functions that sanitize input
Merged-by: James Almer <jamrial@gmail.com>
* commit '3d197514e613ccd9eab43180c0a7c8b09a307606':
qsvenc: Allow use of hw_device_ctx to make the internal session
qsvdec: Allow use of hw_device_ctx to make the internal session
qsv: Add ability to create a session from a device
doc: Add VAAPI encoders
vaapi_encode: Add VP9 support
vp9: Add bsf to fix reordering in raw streams
This commit is a noop, see
49419925d3bde0460406dc81f1a2ce91c3b50d748aa3c2df1a28aedeed19
Merged-by: James Almer <jamrial@gmail.com>
* commit '0cf949a01193dcf6f83fd95d46792dd94479b4e4':
vp9: Add bsf to merge superframes
[14:25:37] <@BBB> the functional change is wrong
[14:25:48] <@BBB> it allows recusrively packing superframes in superframes
[14:26:37] <@BBB> so I would ignore the remainder
See 2e6636aa87
Merged-by: James Almer <jamrial@gmail.com>
* commit 'f64d1100a54d12c78ce436181bb64229c56da6b3':
avconv: Flush output BSFs when encode reaches EOF
vf_deinterlace_vaapi: Add support for field rate output
pthread_frame: Propagate sw_pix_fmt across threads
This commit is a noop, see
ebce133228bff7bec1d7bc4e33ce0f
Merged-by: James Almer <jamrial@gmail.com>
* commit '10f4511f14a4e830c0ed471df4cd1cc2a18a481a':
libavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx(
Also added LOCAL_ALIGNED_4 as it's used in vp8 decoder, and
simplified the configure defines.
Merged-by: James Almer <jamrial@gmail.com>
According to EBU tech 3285 supplement 3 the dwPosPeakOfPeaks field
should contain the absolute position to the maximum audio sample value,
but the current implementation writes the relative peak frame index
instead.
Fix the issue by writing the "unknown" value (-1) for now until the
feature is implemented correctly.
Previous version reviewed-by: Peter Bubestinger <p.bubestinger@av-rd.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
This patch uses dithering in DITHER_COPY macro only if
it was not used option '-sws_dither none'.
With option '-sws_dither none' it uses downshift.
For human eye dithering is OK, for video codecs not necessarily.
If user don't want to use dithering, we should respect that.
Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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>
Replace generic with block size specific function.
Load the specific destination bytes instead of MSA load and pack.
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>
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>
Technically _tzcnt* intrinsics are only available when the BMI
instruction set is present. However the instruction encoding
degrades to "rep bsf" on older processors.
Clang for Windows debatably restricts the _tzcnt* instrinics behind
the __BMI__ architecture define, so check for its presence or
exclude the usage of these intrinics when clang is present.
See also:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-November/183404.htmlhttps://bugs.llvm.org/show_bug.cgi?id=30506http://lists.llvm.org/pipermail/cfe-dev/2016-October/051034.html
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit '163cc67beb3ed28aeb500c9a09df47c8df613025':
takdec: Use ISO C printf conversion specifiers where appropriate
dcadec: remove extra indirection
hevcdec: Use LOCAL_ALIGNED_* for declaring local variables with alignment
arm: Always build the hevcdsp_init_arm.c file
This commit is a noop.
Merged-by: James Almer <jamrial@gmail.com>