GCC is perfectly happy generating optimized multiplication code on its own for
64-bit arches. GCC refuses to optimize the loongson code when in 32-bit mode,
so I've left that.
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This makes the sorting of the colors along an axis (r, g or b)
predictible, and thus testable under FATE. The performance is not really
an issue here since the function is called only once at the end and will
need to sort very small number of entries, so an alternative would be to
make the sorting functions (see DECLARE_CMP_FUNC()) fallback on another
axis in case of equality. This approach was actually simpler.
I don't know if there is any advantage in using a multidimensional sort,
but it will affect the final palette one way or another.
This avoids a null pointer dereference of pkt->data.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
It is used in adx_read_packet, which currently depends on the decoder/parser setting this value between reading the file header and demuxing the first packet.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This assumes CBR (which is true for all samples i have)
Previous version reviewed by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* cehoyos/master:
Allow muxing h264 into ts with startcode "001" instead of "0001".
lavfi/fade: Do not overread input buffer.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fixes out of array read
Fixes: asan_heap-oob_ae74b5_3610_cov_1739568095_test.3g2
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fixes out of array read
Fixes: asan_heap-oob_4d4eb0_3994_cov_3169972261_zmbv_15bit.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fixes out of array read
Fixes: asan_heap-oob_2ff30d2_3479_cov_3803648058_src13_hrc7_525_420_2.264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b31328d008985f87f0a7c83c700847cef1a4f08c':
xcbgrab: Provide better names for the y and x option
Conflicts:
doc/indevs.texi
libavdevice/x11grab.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a':
libavformat: Use ffio_free_dyn_buf where applicable
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8a273a746061a112e5e35066a8fd8e146d821a62':
avio: Add an internal utility function for freeing dynamic buffers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '078d43e23a7a3d64aafee8a58b380d3e139b3020':
rtpdec: Free depacketizers if the init function failed
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'bb4a310bb85f43e62240145a656b1e5285b14239':
rtpdec: Don't free the payload context in the .free function
Conflicts:
libavformat/rtpdec_latm.c
libavformat/rtpdec_mpeg4.c
libavformat/rtpdec_mpegts.c
libavformat/rtpdec_xiph.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '78791c086bcaf9eb084c27555b31fea8bbb7624a':
rtpdec: Use .init instead of .alloc to set default values
Conflicts:
libavformat/rdt.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '3567b91e49c6ae101c9a35c90f46b8ad9890ac15':
rtpdec_hevc: Share the implementation of fragmented packets with h264
Conflicts:
libavformat/rtpdec_h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f3449062a8d100ac4f703647336c32b126aa99f1':
rtpdec_hevc: Reduce indentation level by returning early on errors
Conflicts:
libavformat/rtpdec_hevc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8633fb47db2ec39eb8bd1bd65302af75a94ff5d0':
rtpdec_hevc: Share the implementation of parsing a=framesize with h264
Conflicts:
libavformat/rtpdec_h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5956f489d0452ff6dea6b6b81b4fa8e596fc5684':
rtpdec_hevc: Add asterisks at the start of each long comment line
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8':
rtpdec: Get rid of all trivial .alloc/.free functions
Merged-by: Michael Niedermayer <michaelni@gmx.at>