Compare commits

...

56 Commits

Author SHA1 Message Date
Michael Niedermayer
fda00aa774 doc/Doxyfile: update for 3.0.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-29 04:25:48 +02:00
Michael Niedermayer
9b1b674ebe Changelog: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-29 04:23:42 +02:00
Michael Niedermayer
00b54d4625 avcodec/diracdec: check bitstream size related fields for overflows
Fixes segfault
Fixes Ticket5333

Regression since bfc8a4dabe5a0154b31128b59dca575010176441
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8f2a1990c06df73cf58401c8ba193711eb8947e7)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-29 03:25:15 +02:00
Michael Niedermayer
26d29f0c3d avcodec/h264_slice: Check PPS more extensively when its not copied
Fixes Ticket5371
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c50be7a52bc1e8e18a0059e489743ec12a43f257)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-29 03:25:15 +02:00
James Almer
7b1e020fc5 avformat/svag: fix division by zero
Fixes ticket #5386

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit d5a3578350a3901a26df39df196bb085760ec46f)
2016-03-28 19:10:34 -03:00
Rostislav Pehlivanov
3d9ebfd272 Changelog: update for 3.0.1's vc2enc fixes
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-28 17:04:23 +01:00
Rostislav Pehlivanov
f01919b57a vc2enc: correctly zero out coefficient array padding
Credit for figuring this out goes to James Darnley.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
(cherry picked from commit 3ef10406e19663a78791ed1b38178fb00d4c7d88)
2016-03-28 17:02:05 +01:00
Rostislav Pehlivanov
6cb5bbc660 Changelog: update for 3.0.1's aacenc optimizations
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-28 16:59:14 +01:00
Ganesh Ajjanagadde
f281cb4ea9 lavc/aacenc_utils: replace powf(x,y) by expf(logf(x), y)
This is ~2x faster for y not an integer on Haswell+GCC, and should
generally be faster due to the fact that anyway powf essentially does
this under the hood. Made an inline function in lavu/internal.h for this
purpose.

Note that there are some accuracy differences, that should generally be
negligible. In particular, FATE still passes on this platform.

Results in ~ 7% speedup in aac encoding with -march=native, Haswell+GCC.
before:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  6.05s user 0.06s system 104% cpu 5.821 total

after:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  5.67s user 0.03s system 105% cpu 5.416 total

This is also faster than an alternative approach that pulls in powf, gets rid of
the crufty NaN checks and other special cases, exploits knowledge about the intervals, etc.
This of course does not exclude smarter approaches; just suggests that
there would need to be significant work on this front of lower utility than
searches for hotspots elsewhere.

Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
(cherry picked from commit bccc81dfa08e6561df6ed37860e3a08f7d983825)
2016-03-28 16:57:41 +01:00
Reimar Döffinger
b176ab0556 aacenc_utils: Use temporary variable.
This ensures gcc does not create unnecessary
loads or stores and possibly even does not vectorize
the negation.
Speeds up mp3 to aac transcoding with default settings
by 10% when using "gcc (Debian 5.3.1-10) 5.3.1 20160224".

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit b60dfae7af65c4c7d255ef599352f2c54964303d)
2016-03-28 16:56:27 +01:00
Reimar Döffinger
1cbe4ff2ac aacenc: avoid double in quantize_bands.
I cannot see any point whatsoever to use
double here instead of float, the results
are likely identical in all cases..
Using float allows for much more
efficient use of SIMD.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 0a04c2885f02f7db6b410b6d43d120e5eb48dc18)
2016-03-28 16:56:11 +01:00
Ganesh Ajjanagadde
7c2576e15d lavc/aacenc_utils: replace sqrtf(Q*sqrtf(Q)) by precomputed value
It makes no sense whatsoever to do this at each function call; we
already have a table for this.

Yields a 2x improvement in find_min_book (x86-64, Haswell+GCC):
ffmpeg -i sin.flac -acodec aac -y sin.aac
find_min_book
old
    605 decicycles in find_min_book, 8388453 runs,    155 skips.9x
    606 decicycles in find_min_book,16776912 runs,    304 skips.9x
    607 decicycles in find_min_book,33553819 runs,    613 skips.2x
    607 decicycles in find_min_book,67107668 runs,   1196 skips.3x
    607 decicycles in find_min_book,134215360 runs,   2368 skips3x

new
    359 decicycles in find_min_book, 8388552 runs,     56 skips.3x
    360 decicycles in find_min_book,16777112 runs,    104 skips.1x
    361 decicycles in find_min_book,33554218 runs,    214 skips.4x
    361 decicycles in find_min_book,67108381 runs,    483 skips.5x
    361 decicycles in find_min_book,134216725 runs,   1003 skips5x

and more importantly a non-negligible speedup (~ 8%) to overall AAC encoding:
old:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_new.aac  6.82s user 0.03s system 104% cpu 6.565 total
new:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_old.aac  6.24s user 0.03s system 104% cpu 5.993 total

This also improves accuracy of the expression by ~ 2 ulp in some cases.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
(cherry picked from commit bd9c58756a50b52e495b748d6ea6b0aafe397c25)
2016-03-28 16:55:59 +01:00
Michael Niedermayer
526c7b2186 Update for 3.0.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 22:37:41 +01:00
Michael Niedermayer
2d0e415482 avcodec/libutvideodec: copy frame so it has reference counters when refcounted_frames is set
Reviewed-by: maintainer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0cd9ff4e3aa23318a855c21d60b1c9035b2b99d2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:48 +01:00
Ico Doornekamp
daa6dc0a3b avformat/rtpdec_jpeg: fix low contrast image on low quality setting
Original mail and my own followup on ffmpeg-user earlier today:

I have a device sending out a MJPEG/RTP stream on a low quality setting.
Decoding and displaying the video with libavformat results in a washed
out, low contrast, greyish image. Playing the same stream with VLC results
in proper color representation.

Screenshots for comparison:

  http://zevv.nl/div/libav/shot-ffplay.jpg
  http://zevv.nl/div/libav/shot-vlc.jpg

A pcap capture of a few seconds of video and SDP file for playing the
stream are available at

  http://zevv.nl/div/libav/mjpeg.pcap
  http://zevv.nl/div/libav/mjpeg.sdp

I believe the problem might be in the calculation of the quantization
tables in the function create_default_qtables(), the attached patch
solves the issue for me.

The problem is that the argument 'q' is of the type uint8_t. According to the
JPEG standard, if 1 <= q <= 50, the scale factor 'S' should be 5000 / Q.
Because the create_default_qtables() reuses the variable 'q' to store the
result of this calculation, for small values of q < 19, q wil subsequently
overflow and give wrong results in the calculated quantization tables. The
patch below uses a new variable 'S' (same name as in RFC2435) with the proper
range to store the result of the division.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e3e6a2cff4af9542455d416faec4584d5e823d5d)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:48 +01:00
Michael Niedermayer
6e5648ad42 avformat/mpegtsenc: Fix used service
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 26811fd9468dc484402faca3ca33cacb2e58c53e)

Conflicts:

	libavformat/version.h
2016-03-26 21:52:48 +01:00
Michael Niedermayer
e15a48d35a avformat/mpegtsenc: Keep track of the program for each service
Simplifies code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 50d017a28171177b89c367194ec8d02f963e7e9e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:48 +01:00
Michael Niedermayer
0fae52d7e3 avformat/file: Add crypto to default whitelist
Fixes Ticket5287

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit efa98cdc2ff17a2f3b0ceb69e22864fd5bc433db)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
50a639a62a avcodec/mjpegenc_common: Store approximate aspect if exact cannot be stored
Fixes Ticket5244

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 068026b0f7845e0f1850094d974f60d181480d64)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Mark Thompson
d6adcab842 lavc/hevc: Allow arbitrary garbage in bytestream as long as at least one NAL unit is found.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fbec157ea08f61063847bbe0dba28525e6283ff5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
bf80b1d88d avcodec/resample: Remove disabled and faulty code
Fixes Ticket5345

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 50ef7361cb5f78c94da2323f3bae86c6bbd618c8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Luca Barbato
53fffc9fc4 indeo2: Fix banding artefacts
Rename luma table to delta table and change how it is used.

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit f8c34f4b8d62afad3f63cf3d9617d73735bef8c1)
(cherry picked from commit 73f3c8f73edf0a69502233b2c50fa9e7104f99ec)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Luca Barbato
b0e836466f indeo2data: K&R formatting cosmetics
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit d4066a702407352a0648af882c34ea81a404fa2b)
(cherry picked from commit 522ab0b9a92962edda7156a91a494a1e2b8a7f64)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
e158936712 avformat/hlsenc: Fix passing options, regression since bc9a5965c815cf7fd998d8ce14a18b8e861dd9ce
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b2ab3398f59ed18a565063584f961ff84484d699)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
c8977ec6e9 avutil/random_seed: Add the runtime in cycles of the main loop to the entropy pool
This should theoretically improve the randomness slightly

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2540d884f3fd7cfac503e048112098967be2569a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Martin Cracauer
934bc32acc avutil/channel_layout: AV_CH_LAYOUT_6POINT1_BACK not reachable in parsing
Trying to make heads and tails out of DTS 6.1 I can across this typo.

I also noticed that this wiki page is incorrect or misleading, the
channel order for 6.1 given does not match the source code.  At the
least it should be clarified that the layout given does not apply to
DTS.  https://trac.ffmpeg.org/wiki/AudioChannelManipulation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 73d1398f0c4ce2de16790f46e05a79242137d153)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
64f2b48be0 avformat/concatdec: set safe mode to enabled instead of auto
This is safer, as a selected demuxer could still mean that it was auto-detected
by a user application

Reviewed-previously-by: Nicolas George <george@nsup.org>
Reviewed-previously-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 689211d5727231c3fe92762d224dbadebdbf4e30)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
756f4b586a avformat/utils: fix dts from pts code in compute_pkt_fields() during ascending delay
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit de1de4932419d0fb49c9c23f62e68cdbe90d0ee3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Boris Nagels
56c4dca5ae avformat/rtpenc: Fix integer overflow in NTP_TO_RTP_FORMAT
RTCP synchronization packet was broken since commit in ffmpeg version > 2.8.3
(commit: e04b039b1528f4c7df5c2b93865651bfea168a19) Since this commit (2e814d0329aded98c811d0502839618f08642685)
"rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps", NTP_TO_RTP_FORMAT
uses av_rescale_rnd() function to add the data to the packet.

This causes an overflow in the av_rescale_rnd() function and it will return INT64_MIN.
Causing the NTP stamp in the RTCP packet to have an invalid value.

Github: Closes #182

Reverting commit '2e814d0329aded98c811d0502839618f08642685' solves the problem.
(cherry picked from commit 1109ed7973c7fd1e7001898adc4976590d862122)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
foo86
da6ccfe18e avcodec/dca: clear X96 channels if nothing was decoded
The first X96 channel set can have more channels than core, causing X96
decoding to be skipped. Clear the number of decoded X96 channels to zero
in this rudimentary case.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit db44b599805fdd96940cf2e5a336f872648bbda1)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
27a61302b7 fate/aac: Increase fuzz from of fate-aac-pns-encode from 72 to 74 for Loongson
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c78a7267175a3d1e07b88be42f949f95124925e3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
b4be953c55 avformat/cache: Fix memleak of tree entries
Found-by: jamrial

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 554f6e930ce05a4c5449efcaae36bdafe2d9de74)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Rodger Combs
3b179b6302 lavf/mov: downgrade sidx errors to non-fatal warnings; fixes trac #5216
(cherry picked from commit 22dbc1caaf13e4bb17c9e0164a5b1ccaf490e428)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Rodger Combs
bf8f2fae2a lavf/mov: fix sidx with edit lists
(cherry picked from commit 3617e69d50dd9dd07b5011dfb9477a9d1a630354)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
0d7343f8dd avcodec/mjpegdec: Fix decoding slightly odd progressive jpeg
Fixes: ebd58db6-dc86-11e5-91c2-59daeddf50c7.jpg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c6f4720b8664e6e22eb5b3da6bb48ed5b113f746)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
fb8676eb1c swscale/utils: Fix chrSrcHSubSample for GBRAP16
Fixes part of Ticket5264

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 67e5bd0c501f7568fc8d93284d0f7eb40663ab06)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
ca5c639446 swscale/input: Fix GBRAP16 input
Fixes part of Ticket5264

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit df36257a53561a51af969a6ea6319dd2579509b9)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
bd79dbfa2b avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1ec7a703806049265991723a8826bd61555edef4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
c4765a41b9 avcodec/h264: Execute error concealment before marking the frame as done.
Fixes race condition causing artifacts
Fixes Ticket4122

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 98a0053d0f90e3309dc1038b1bae3a48bbd9067c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
be5acd6cb1 swscale/x86/output: Fix yuv2planeX_16* with unaligned destination
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f6492a2ea8df80be0ed9591aee4019cef0e36e99)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
Michael Niedermayer
c3e7a7ef3f swscale/x86/output: Move code into yuv2planeX_mainloop
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d07f6e5f1c36be675e0900edba3e40a32f05f0f4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:47 +01:00
KO Myung-Hun
9e4d297ba7 MAINTAINERS: add myself as an OS/2 maintainer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 346ec917646c18fc9e26bddf04bfa8f8f1e2e18f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 21:52:46 +01:00
James Almer
373bc77a35 libwebpenc_animencoder: print library messages in verbose log levels
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit f875ba48739f59691661393eed1f7cc2371c93f1)
2016-03-17 12:57:00 -03:00
James Almer
20d89a3a32 libwebpenc_animencoder: zero initialize the WebPAnimEncoderOptions struct
This zeroes the WebPAnimEncoderOptions.verbose field, silencing library info messages
printed to stderr.

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 626b6b769ced6d3e55d2661985ab2a1cb89f481e)
2016-03-17 12:56:30 -03:00
Hendrik Leppkes
ee7c347935 configure: check for SEC_I_CONTEXT_EXPIRED before enabling SChannel
Fixes build on mingw32, which lacks this constant.
2016-03-16 15:32:50 +01:00
Carl Eugen Hoyos
9da31a0373 lavf/http: Add httpproxy to the default protocol whitelist.
(cherry picked from commit 58fa694978735e30f433f8ede6c7f808b9409919)
2016-03-14 16:39:05 +01:00
Paul B Mahol
eb46065f4a doc/utils: fix typo for min() description
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit bdf474bcff29f5b40fe14f6fa1dbe10e69c73ab7)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2016-03-02 16:43:57 -08:00
Oliver Collyer
b80083a5c1 ffserver&ffm: Fixed issues preventing ffserver write_index and files_size from being set correctly which was breaking ffserver streaming.
I discovered that ffserver streaming was broken (it seems like it has been since 20th November) and I opened a ticket for this (https://trac.ffmpeg.org/ticket/5250 <https://trac.ffmpeg.org/ticket/5250>).

I spent yesterday learning git bisect (with the kind help of cehoyos) to painstakingly track down the cause. This was made more difficult due to the presence of a segfault in ffserver during the period where the bug was introduced so I first had to identify when and how that was fixed and then retrospectively apply that fix again for each step of the second git bisect to find the actual bug.

Anyway, the fruits of my labour are the innocent looking patch below to correct a couple of typos and define a valid range for two variables.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a2f8beef2dfaee573f7c4a607afaa9e83fc2c1e0)
2016-02-23 15:58:42 +01:00
Carl Eugen Hoyos
449ff0e3fd postproc: fix unaligned access
Based on 59074310 by Andreas Cadhalpun.
Fixes ticket #5259.
(cherry picked from commit 2aa21eec1adcb3737be59f0eab7081c5a790faa9)
2016-02-23 15:58:07 +01:00
Rostislav Pehlivanov
0aa2fbddb1 vc2enc: fix use of uninitialized variables in the rate control system
Fixes: CID1352550
Fixes: CID1352549

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
(cherry picked from commit 7cdea450c67d24a3503a0eb64f491f58e474973f)
2016-02-15 15:36:59 +00:00
Michael Niedermayer
c40983a6f6 fate/source-check.sh: Use "git show" instead of git --version to test for git
This fixes fate with non git source trees

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 295de3efc53efa3945c3116b5a910b1464632358)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-15 03:51:39 +01:00
Michael Niedermayer
bd0497b28b avcodec/cfhd: Temporary disable frame threading until related bugs have been fixed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-15 03:12:13 +01:00
James Almer
4d95207938 x86: use the new helper macros where useful
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 70d685a77f283b110e7b1ab565ff5de53f752d55)
2016-02-14 20:04:19 -03:00
James Almer
1e8a75fae4 x86: add some more helper macros to check for slow cpuflags
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 73a4589d4b0d97cbd6f8bf8be18b78151b657898)
2016-02-14 20:04:06 -03:00
Rostislav Pehlivanov
380980e0d2 Changelog: add entries for the SMPTE VC-2 decoder and encoder
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-14 22:12:06 +00:00
Michael Niedermayer
1fd8eb4d4f Basic updates for 3.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-14 23:03:41 +01:00
63 changed files with 658 additions and 361 deletions

View File

@ -1,7 +1,47 @@
Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
version <next>:
version 3.0.1:
avcodec/libutvideodec: copy frame so it has reference counters when refcounted_frames is set
avformat/rtpdec_jpeg: fix low contrast image on low quality setting
avformat/mpegtsenc: Fix used service
avformat/mpegtsenc: Keep track of the program for each service
avformat/file: Add crypto to default whitelist
avcodec/mjpegenc_common: Store approximate aspect if exact cannot be stored
lavc/hevc: Allow arbitrary garbage in bytestream as long as at least one NAL unit is found.
avcodec/resample: Remove disabled and faulty code
indeo2: Fix banding artefacts
indeo2data: K&R formatting cosmetics
avformat/hlsenc: Fix passing options, regression since bc9a5965c815cf7fd998d8ce14a18b8e861dd9ce
avutil/random_seed: Add the runtime in cycles of the main loop to the entropy pool
avutil/channel_layout: AV_CH_LAYOUT_6POINT1_BACK not reachable in parsing
avformat/concatdec: set safe mode to enabled instead of auto
avformat/utils: fix dts from pts code in compute_pkt_fields() during ascending delay
avformat/rtpenc: Fix integer overflow in NTP_TO_RTP_FORMAT
avcodec/dca: clear X96 channels if nothing was decoded
fate/aac: Increase fuzz from of fate-aac-pns-encode from 72 to 74 for Loongson
avformat/cache: Fix memleak of tree entries
lavf/mov: downgrade sidx errors to non-fatal warnings; fixes trac #5216
lavf/mov: fix sidx with edit lists
avcodec/mjpegdec: Fix decoding slightly odd progressive jpeg
swscale/utils: Fix chrSrcHSubSample for GBRAP16
swscale/input: Fix GBRAP16 input
avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
avcodec/h264: Execute error concealment before marking the frame as done.
swscale/x86/output: Fix yuv2planeX_16* with unaligned destination
swscale/x86/output: Move code into yuv2planeX_mainloop
MAINTAINERS: add myself as an OS/2 maintainer
libwebpenc_animencoder: print library messages in verbose log levels
libwebpenc_animencoder: zero initialize the WebPAnimEncoderOptions struct
configure: check for SEC_I_CONTEXT_EXPIRED before enabling SChannel
lavf/http: Add httpproxy to the default protocol whitelist.
doc/utils: fix typo for min() description
ffserver&ffm: Fixed issues preventing ffserver write_index and files_size from being set correctly which was breaking ffserver streaming.
postproc: fix unaligned access
vc2enc: fix use of uninitialized variables in the rate control system, correctly zero out coefficient array padding
aacenc: optimize encoding speed
avcodec/diracdec: check bitstream size related fields for overflows
avcodec/h264_slice: Check PPS more extensively when its not copied
version 3.0:
@ -70,6 +110,8 @@ version 3.0:
- streamselect video and astreamselect audio filter
- swaprect filter
- metadata video and ametadata audio filter
- SMPTE VC-2 HQ profile support for the Dirac decoder
- SMPTE VC-2 native encoder supporting the HQ profile
version 2.8:

View File

@ -564,6 +564,7 @@ Windows ICL Matthew Oliver
ADI/Blackfin DSP Marc Hoffman
Sparc Roman Shaposhnik
x86 Michael Niedermayer
OS/2 KO Myung-Hun
Releases

View File

@ -1 +1 @@
2.8.git
3.0.1

15
RELEASE_NOTES Normal file
View File

@ -0,0 +1,15 @@
┌─────────────────────────────────────────┐
│ RELEASE NOTES for FFmpeg 3.0 "Einstein" │
└─────────────────────────────────────────┘
The FFmpeg Project proudly presents FFmpeg 3.0 "Einstein", about 5
months after the release of FFmpeg 2.8.
A complete Changelog is available at the root of the project, and the
complete Git history on http://source.ffmpeg.org.
We hope you will like this release as much as we enjoyed working on it, and
as usual, if you have any questions about it, or any FFmpeg related topic,
feel free to join us on the #ffmpeg IRC channel (on irc.freenode.net) or ask
on the mailing-lists.

2
configure vendored
View File

@ -5659,7 +5659,7 @@ disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreF
enable securetransport; }
disabled schannel || { check_func_headers "windows.h Security.h" InitializeSecurityContext -DSECURITY_WIN32 -lSecur32 &&
enable schannel && add_extralibs -lSecur32; }
check_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" && enable schannel && add_extralibs -lSecur32; }
makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
enabled makeinfo \

View File

@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER =
PROJECT_NUMBER = 3.0.1
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
# in the documentation. The maximum height of the logo should not exceed 55

View File

@ -104,7 +104,7 @@ All subsequent file-related directives apply to that file.
@item @code{ffconcat version 1.0}
Identify the script type and version. It also sets the @option{safe} option
to 1 if it was to its default -1.
to 1 if it was -1.
To make FFmpeg recognize the format automatically, this directive must
appears exactly as is (no extra space or byte-order-mark) on the very first
@ -192,7 +192,9 @@ component.
If set to 0, any file name is accepted.
The default is -1, it is equivalent to 1 if the format was automatically
The default is 1.
-1 is equivalent to 1 if the format was automatically
probed and 0 otherwise.
@item auto_convert

View File

@ -869,7 +869,7 @@ Return 1 if @var{x} is lesser than or equal to @var{y}, 0 otherwise.
Return the maximum between @var{x} and @var{y}.
@item min(x, y)
Return the maximum between @var{x} and @var{y}.
Return the minimum between @var{x} and @var{y}.
@item mod(x, y)
Compute the remainder of division of @var{x} by @var{y}.

View File

@ -373,8 +373,8 @@ static void ffm_set_write_index(AVFormatContext *s, int64_t pos,
int64_t file_size)
{
av_opt_set_int(s, "server_attached", 1, AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(s, "write_index", pos, AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(s, "file_size", file_size, AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(s, "ffm_write_index", pos, AV_OPT_SEARCH_CHILDREN);
av_opt_set_int(s, "ffm_file_size", file_size, AV_OPT_SEARCH_CHILDREN);
}
static char *ctime1(char *buf2, size_t buf_size)

View File

@ -28,6 +28,7 @@
#ifndef AVCODEC_AACENC_UTILS_H
#define AVCODEC_AACENC_UTILS_H
#include "libavutil/internal.h"
#include "aac.h"
#include "aacenctab.h"
#include "aactab.h"
@ -66,13 +67,13 @@ static inline void quantize_bands(int *out, const float *in, const float *scaled
const float rounding)
{
int i;
double qc;
for (i = 0; i < size; i++) {
qc = scaled[i] * Q34;
out[i] = (int)FFMIN(qc + rounding, (double)maxval);
float qc = scaled[i] * Q34;
int tmp = (int)FFMIN(qc + rounding, (float)maxval);
if (is_signed && in[i] < 0.0f) {
out[i] = -out[i];
tmp = -tmp;
}
out[i] = tmp;
}
}
@ -90,8 +91,7 @@ static inline float find_max_val(int group_len, int swb_size, const float *scale
static inline int find_min_book(float maxval, int sf)
{
float Q = ff_aac_pow2sf_tab[POW_SF2_ZERO - sf + SCALE_ONE_POS - SCALE_DIV_512];
float Q34 = sqrtf(Q * sqrtf(Q));
float Q34 = ff_aac_pow34sf_tab[POW_SF2_ZERO - sf + SCALE_ONE_POS - SCALE_DIV_512];
int qmaxval, cb;
qmaxval = maxval * Q34 + C_QUANT;
if (qmaxval >= (FF_ARRAY_ELEMS(aac_maxval_cb)))
@ -123,7 +123,10 @@ static inline float find_form_factor(int group_len, int swb_size, float thresh,
if (s >= ethresh) {
nzl += 1.0f;
} else {
nzl += powf(s / ethresh, nzslope);
if (nzslope == 2.f)
nzl += (s / ethresh) * (s / ethresh);
else
nzl += ff_fast_powf(s / ethresh, nzslope);
}
}
if (e2 > thresh) {

View File

@ -756,6 +756,6 @@ AVCodec ff_cfhd_decoder = {
.init = cfhd_decode_init,
.close = cfhd_close_decoder,
.decode = cfhd_decode,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};

View File

@ -1760,6 +1760,7 @@ static int parse_x96_frame_exss(DCACoreDecoder *s)
return ret;
// Channel set data
s->x96_nchannels = 0;
for (i = 0, x96_base_ch = 0; i < x96_nchsets; i++) {
header_pos = get_bits_count(&s->gb);

View File

@ -173,7 +173,7 @@ typedef struct DiracContext {
struct {
unsigned prefix_bytes;
unsigned size_scaler;
uint64_t size_scaler;
} highquality;
struct {
@ -826,9 +826,15 @@ static int decode_hq_slice(AVCodecContext *avctx, void *arg)
/* Luma + 2 Chroma planes */
for (i = 0; i < 3; i++) {
int length = s->highquality.size_scaler * get_bits(gb, 8);
int bits_left = 8 * length;
int bits_end = get_bits_count(gb) + bits_left;
int64_t length = s->highquality.size_scaler * get_bits(gb, 8);
int64_t bits_left = 8 * length;
int64_t bits_end = get_bits_count(gb) + bits_left;
if (bits_end >= INT_MAX) {
av_log(s->avctx, AV_LOG_ERROR, "end too far away\n");
return AVERROR_INVALIDDATA;
}
for (level = 0; level < s->wavelet_depth; level++) {
for (orientation = !!level; orientation < 4; orientation++) {
decode_subband(s, gb, quants[level][orientation], slice->slice_x, slice->slice_y, bits_end,
@ -848,7 +854,8 @@ static int decode_hq_slice(AVCodecContext *avctx, void *arg)
static int decode_lowdelay(DiracContext *s)
{
AVCodecContext *avctx = s->avctx;
int slice_x, slice_y, bytes = 0, bufsize;
int slice_x, slice_y, bufsize;
int64_t bytes = 0;
const uint8_t *buf;
DiracSlice *slices;
int slice_num = 0;
@ -872,6 +879,11 @@ static int decode_lowdelay(DiracContext *s)
if (bytes <= bufsize/8)
bytes += buf[bytes] * s->highquality.size_scaler + 1;
}
if (bytes >= INT_MAX) {
av_log(s->avctx, AV_LOG_ERROR, "too many bytes\n");
av_free(slices);
return AVERROR_INVALIDDATA;
}
slices[slice_num].bytes = bytes;
slices[slice_num].slice_x = slice_x;
@ -1151,6 +1163,10 @@ static int dirac_unpack_idwt_params(DiracContext *s)
} else if (s->hq_picture) {
s->highquality.prefix_bytes = svq3_get_ue_golomb(gb);
s->highquality.size_scaler = svq3_get_ue_golomb(gb);
if (s->highquality.prefix_bytes >= INT_MAX / 8) {
av_log(s->avctx,AV_LOG_ERROR,"too many prefix bytes\n");
return AVERROR_INVALIDDATA;
}
}
/* [DIRAC_STD] 11.3.5 Quantisation matrices (low-delay syntax). quant_matrix() */

View File

@ -1678,6 +1678,47 @@ again:
ret = 0;
end:
#if CONFIG_ERROR_RESILIENCE
sl = h->slice_ctx;
/*
* FIXME: Error handling code does not seem to support interlaced
* when slices span multiple rows
* The ff_er_add_slice calls don't work right for bottom
* fields; they cause massive erroneous error concealing
* Error marking covers both fields (top and bottom).
* This causes a mismatched s->error_count
* and a bad error table. Further, the error count goes to
* INT_MAX when called for bottom field, because mb_y is
* past end by one (callers fault) and resync_mb_y != 0
* causes problems for the first MB line, too.
*/
if (!FIELD_PICTURE(h) && h->current_slice && !h->sps.new && h->enable_er) {
int use_last_pic = h->last_pic_for_ec.f->buf[0] && !sl->ref_count[0];
ff_h264_set_erpic(&sl->er.cur_pic, h->cur_pic_ptr);
if (use_last_pic) {
ff_h264_set_erpic(&sl->er.last_pic, &h->last_pic_for_ec);
sl->ref_list[0][0].parent = &h->last_pic_for_ec;
memcpy(sl->ref_list[0][0].data, h->last_pic_for_ec.f->data, sizeof(sl->ref_list[0][0].data));
memcpy(sl->ref_list[0][0].linesize, h->last_pic_for_ec.f->linesize, sizeof(sl->ref_list[0][0].linesize));
sl->ref_list[0][0].reference = h->last_pic_for_ec.reference;
} else if (sl->ref_count[0]) {
ff_h264_set_erpic(&sl->er.last_pic, sl->ref_list[0][0].parent);
} else
ff_h264_set_erpic(&sl->er.last_pic, NULL);
if (sl->ref_count[1])
ff_h264_set_erpic(&sl->er.next_pic, sl->ref_list[1][0].parent);
sl->er.ref_count = sl->ref_count[0];
ff_er_frame_end(&sl->er);
if (use_last_pic)
memset(&sl->ref_list[0][0], 0, sizeof(sl->ref_list[0][0]));
}
#endif /* CONFIG_ERROR_RESILIENCE */
/* clean up */
if (h->cur_pic_ptr && !h->droppable) {
ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX,

View File

@ -186,47 +186,6 @@ int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup)
ff_vdpau_h264_picture_complete(h);
#endif
#if CONFIG_ERROR_RESILIENCE
av_assert0(sl == h->slice_ctx);
/*
* FIXME: Error handling code does not seem to support interlaced
* when slices span multiple rows
* The ff_er_add_slice calls don't work right for bottom
* fields; they cause massive erroneous error concealing
* Error marking covers both fields (top and bottom).
* This causes a mismatched s->error_count
* and a bad error table. Further, the error count goes to
* INT_MAX when called for bottom field, because mb_y is
* past end by one (callers fault) and resync_mb_y != 0
* causes problems for the first MB line, too.
*/
if (!FIELD_PICTURE(h) && h->current_slice && !h->sps.new && h->enable_er) {
int use_last_pic = h->last_pic_for_ec.f->buf[0] && !sl->ref_count[0];
ff_h264_set_erpic(&sl->er.cur_pic, h->cur_pic_ptr);
if (use_last_pic) {
ff_h264_set_erpic(&sl->er.last_pic, &h->last_pic_for_ec);
sl->ref_list[0][0].parent = &h->last_pic_for_ec;
memcpy(sl->ref_list[0][0].data, h->last_pic_for_ec.f->data, sizeof(sl->ref_list[0][0].data));
memcpy(sl->ref_list[0][0].linesize, h->last_pic_for_ec.f->linesize, sizeof(sl->ref_list[0][0].linesize));
sl->ref_list[0][0].reference = h->last_pic_for_ec.reference;
} else if (sl->ref_count[0]) {
ff_h264_set_erpic(&sl->er.last_pic, sl->ref_list[0][0].parent);
} else
ff_h264_set_erpic(&sl->er.last_pic, NULL);
if (sl->ref_count[1])
ff_h264_set_erpic(&sl->er.next_pic, sl->ref_list[1][0].parent);
sl->er.ref_count = sl->ref_count[0];
ff_er_frame_end(&sl->er);
if (use_last_pic)
memset(&sl->ref_list[0][0], 0, sizeof(sl->ref_list[0][0]));
}
#endif /* CONFIG_ERROR_RESILIENCE */
if (!in_setup && !h->droppable)
ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX,
h->picture_structure == PICT_BOTTOM_FIELD);

View File

@ -1282,10 +1282,14 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
if (first_slice) {
h->pps = *h->pps_buffers[pps_id];
} else if (h->setup_finished && h->dequant_coeff_pps != pps_id) {
} else {
if (h->pps.sps_id != pps->sps_id ||
h->pps.transform_8x8_mode != pps->transform_8x8_mode ||
(h->setup_finished && h->dequant_coeff_pps != pps_id)) {
av_log(h->avctx, AV_LOG_ERROR, "PPS changed between slices\n");
return AVERROR_INVALIDDATA;
}
}
if (pps->sps_id != h->sps.sps_id ||
pps->sps_id != h->current_sps_id ||

View File

@ -232,10 +232,16 @@ int ff_hevc_split_packet(HEVCContext *s, HEVCPacket *pkt, const uint8_t *buf, in
++buf;
--length;
if (length < 4) {
if (pkt->nb_nals > 0) {
// No more start codes: we discarded some irrelevant
// bytes at the end of the packet.
return 0;
} else {
av_log(avctx, AV_LOG_ERROR, "No start code is found.\n");
return AVERROR_INVALIDDATA;
}
}
}
buf += 3;
length -= 3;

View File

@ -146,6 +146,7 @@ static int ir2_decode_frame(AVCodecContext *avctx,
AVFrame *picture = data;
AVFrame * const p = s->picture;
int start, ret;
int ltab, ctab;
if ((ret = ff_reget_buffer(avctx, p)) < 0)
return ret;
@ -168,34 +169,36 @@ static int ir2_decode_frame(AVCodecContext *avctx,
if ((ret = init_get_bits8(&s->gb, buf + start, buf_size - start)) < 0)
return ret;
ltab = buf[0x22] & 3;
ctab = buf[0x22] >> 2;
if (s->decode_delta) { /* intraframe */
if ((ret = ir2_decode_plane(s, avctx->width, avctx->height,
p->data[0], p->linesize[0],
ir2_luma_table)) < 0)
ir2_delta_table[ltab])) < 0)
return ret;
/* swapped U and V */
if ((ret = ir2_decode_plane(s, avctx->width >> 2, avctx->height >> 2,
p->data[2], p->linesize[2],
ir2_luma_table)) < 0)
ir2_delta_table[ctab])) < 0)
return ret;
if ((ret = ir2_decode_plane(s, avctx->width >> 2, avctx->height >> 2,
p->data[1], p->linesize[1],
ir2_luma_table)) < 0)
ir2_delta_table[ctab])) < 0)
return ret;
} else { /* interframe */
if ((ret = ir2_decode_plane_inter(s, avctx->width, avctx->height,
p->data[0], p->linesize[0],
ir2_luma_table)) < 0)
ir2_delta_table[ltab])) < 0)
return ret;
/* swapped U and V */
if ((ret = ir2_decode_plane_inter(s, avctx->width >> 2, avctx->height >> 2,
p->data[2], p->linesize[2],
ir2_luma_table)) < 0)
ir2_delta_table[ctab])) < 0)
return ret;
if ((ret = ir2_decode_plane_inter(s, avctx->width >> 2, avctx->height >> 2,
p->data[1], p->linesize[1],
ir2_luma_table)) < 0)
ir2_delta_table[ctab])) < 0)
return ret;
}

View File

@ -99,12 +99,12 @@ static const uint16_t ir2_codes[IR2_CODES][2] = {
{ 0x0011, 5 }, { 0x0014, 5 }, { 0x0015, 5 }, { 0x0030, 6 },
{ 0x0037, 6 }, { 0x00E2, 8 }, { 0x00E3, 8 }, { 0x00E8, 8 },
{ 0x00EB, 8 }, { 0x00EE, 8 }, { 0x01E1, 9 }, { 0x01E4, 9 },
{0x01E7, 9}, {0x01EA, 9}, {0x01ED, 9}
{ 0x01E7, 9 }, { 0x01EA, 9 }, { 0x01ED, 9 },
#endif
};
static const uint8_t ir2_luma_table[256] = {
0x80, 0x80, 0x84, 0x84, 0x7C, 0x7C, 0x7F, 0x85,
static const uint8_t ir2_delta_table[4][256] = {
{ 0x80, 0x80, 0x84, 0x84, 0x7C, 0x7C, 0x7F, 0x85,
0x81, 0x7B, 0x85, 0x7F, 0x7B, 0x81, 0x8C, 0x8C,
0x74, 0x74, 0x83, 0x8D, 0x7D, 0x73, 0x8D, 0x83,
0x73, 0x7D, 0x77, 0x89, 0x89, 0x77, 0x89, 0x77,
@ -135,7 +135,103 @@ static const uint8_t ir2_luma_table[256] = {
0x29, 0x4A, 0xC8, 0xD7, 0x38, 0x29, 0xD7, 0xC8,
0x29, 0x38, 0xA4, 0xD8, 0x5C, 0x28, 0xD8, 0xA4,
0x28, 0x5C, 0x6C, 0xC1, 0x94, 0x3F, 0xC1, 0x6C,
0x3F, 0x94, 0xD9, 0xD9, 0x27, 0x27, 0x80, 0x80
0x3F, 0x94, 0xD9, 0xD9, 0x27, 0x27, 0x80, 0x80, },
{ 0x80, 0x80, 0x85, 0x85, 0x7B, 0x7B, 0x7E, 0x87,
0x82, 0x79, 0x87, 0x7E, 0x79, 0x82, 0x8F, 0x8F,
0x71, 0x71, 0x84, 0x8F, 0x7C, 0x71, 0x8F, 0x84,
0x71, 0x7C, 0x75, 0x8B, 0x8B, 0x75, 0x8B, 0x75,
0x75, 0x8B, 0x8E, 0x9A, 0x72, 0x66, 0x9A, 0x8E,
0x66, 0x72, 0x7B, 0x93, 0x85, 0x6D, 0x93, 0x7B,
0x6D, 0x85, 0x9B, 0x9B, 0x65, 0x65, 0x82, 0x9D,
0x7E, 0x63, 0x9D, 0x82, 0x63, 0x7E, 0x9B, 0xA8,
0x65, 0x58, 0xA8, 0x9B, 0x58, 0x65, 0xA9, 0xA9,
0x57, 0x57, 0x8D, 0xAA, 0x73, 0x56, 0xAA, 0x8D,
0x56, 0x73, 0x6E, 0x99, 0x92, 0x67, 0x99, 0x6E,
0x67, 0x92, 0x76, 0xA2, 0x8A, 0x5E, 0xA2, 0x76,
0x5E, 0x8A, 0x7F, 0xAF, 0x81, 0x51, 0xAF, 0x7F,
0x51, 0x81, 0xAB, 0xBA, 0x55, 0x46, 0xBA, 0xAB,
0x46, 0x55, 0x9A, 0xBB, 0x66, 0x45, 0xBB, 0x9A,
0x45, 0x66, 0xBB, 0xBB, 0x45, 0x45, 0x60, 0xA0,
0xA0, 0x60, 0xA0, 0x60, 0x60, 0xA0, 0x8B, 0xBE,
0x75, 0x42, 0xBE, 0x8B, 0x42, 0x75, 0x66, 0xAA,
0x9A, 0x56, 0xAA, 0x66, 0x56, 0x9A, 0x70, 0xB5,
0x90, 0x4B, 0xB5, 0x70, 0x4B, 0x90, 0xBE, 0xCF,
0x42, 0x31, 0xCF, 0xBE, 0x31, 0x42, 0xAB, 0xD0,
0x55, 0x30, 0xD0, 0xAB, 0x30, 0x55, 0xD1, 0xD1,
0x2F, 0x2F, 0x9A, 0xD3, 0x66, 0x2D, 0xD3, 0x9A,
0x2D, 0x66, 0x7B, 0xC5, 0x85, 0x3B, 0xC5, 0x7B,
0x3B, 0x85, 0x54, 0xB4, 0xAC, 0x4C, 0xB4, 0x54,
0x4C, 0xAC, 0x5E, 0xBE, 0xA2, 0x42, 0xBE, 0x5E,
0x42, 0xA2, 0x87, 0xD8, 0x79, 0x28, 0xD8, 0x87,
0x28, 0x79, 0xC0, 0xE8, 0x40, 0x18, 0xE8, 0xC0,
0x18, 0x40, 0xD5, 0xE8, 0x2B, 0x18, 0xE8, 0xD5,
0x18, 0x2B, 0xAB, 0xE9, 0x55, 0x17, 0xE9, 0xAB,
0x17, 0x55, 0x68, 0xCD, 0x98, 0x33, 0xCD, 0x68,
0x33, 0x98, 0xEA, 0xEA, 0x16, 0x16, 0x80, 0x80, },
{ 0x80, 0x80, 0x86, 0x86, 0x7A, 0x7A, 0x7E, 0x88,
0x82, 0x78, 0x88, 0x7E, 0x78, 0x82, 0x92, 0x92,
0x6E, 0x6E, 0x85, 0x92, 0x7B, 0x6E, 0x92, 0x85,
0x6E, 0x7B, 0x73, 0x8D, 0x8D, 0x73, 0x8D, 0x73,
0x73, 0x8D, 0x91, 0x9E, 0x6F, 0x62, 0x9E, 0x91,
0x62, 0x6F, 0x79, 0x97, 0x87, 0x69, 0x97, 0x79,
0x69, 0x87, 0xA0, 0xA0, 0x60, 0x60, 0x83, 0xA2,
0x7D, 0x5E, 0xA2, 0x83, 0x5E, 0x7D, 0xA0, 0xB0,
0x60, 0x50, 0xB0, 0xA0, 0x50, 0x60, 0xB1, 0xB1,
0x4F, 0x4F, 0x8F, 0xB2, 0x71, 0x4E, 0xB2, 0x8F,
0x4E, 0x71, 0x6B, 0x9E, 0x95, 0x62, 0x9E, 0x6B,
0x62, 0x95, 0x74, 0xA9, 0x8C, 0x57, 0xA9, 0x74,
0x57, 0x8C, 0x7F, 0xB8, 0x81, 0x48, 0xB8, 0x7F,
0x48, 0x81, 0xB4, 0xC5, 0x4C, 0x3B, 0xC5, 0xB4,
0x3B, 0x4C, 0x9F, 0xC6, 0x61, 0x3A, 0xC6, 0x9F,
0x3A, 0x61, 0xC6, 0xC6, 0x3A, 0x3A, 0x59, 0xA7,
0xA7, 0x59, 0xA7, 0x59, 0x59, 0xA7, 0x8D, 0xCA,
0x73, 0x36, 0xCA, 0x8D, 0x36, 0x73, 0x61, 0xB2,
0x9F, 0x4E, 0xB2, 0x61, 0x4E, 0x9F, 0x6D, 0xBF,
0x93, 0x41, 0xBF, 0x6D, 0x41, 0x93, 0xCA, 0xDF,
0x36, 0x21, 0xDF, 0xCA, 0x21, 0x36, 0xB3, 0xDF,
0x4D, 0x21, 0xDF, 0xB3, 0x21, 0x4D, 0xE1, 0xE1,
0x1F, 0x1F, 0x9F, 0xE3, 0x61, 0x1D, 0xE3, 0x9F,
0x1D, 0x61, 0x7A, 0xD3, 0x86, 0x2D, 0xD3, 0x7A,
0x2D, 0x86, 0x4C, 0xBE, 0xB4, 0x42, 0xBE, 0x4C,
0x42, 0xB4, 0x57, 0xCA, 0xA9, 0x36, 0xCA, 0x57,
0x36, 0xA9, 0x88, 0xE9, 0x78, 0x17, 0xE9, 0x88,
0x17, 0x78, 0xCC, 0xFB, 0x34, 0x05, 0xFB, 0xCC,
0x05, 0x34, 0xE6, 0xFB, 0x1A, 0x05, 0xFB, 0xE6,
0x05, 0x1A, 0xB4, 0xFD, 0x4C, 0x03, 0xFD, 0xB4,
0x03, 0x4C, 0x63, 0xDC, 0x9D, 0x24, 0xDC, 0x63,
0x24, 0x9D, 0xFE, 0xFE, 0x02, 0x02, 0x80, 0x80, },
{ 0x80, 0x80, 0x87, 0x87, 0x79, 0x79, 0x7E, 0x89,
0x82, 0x77, 0x89, 0x7E, 0x77, 0x82, 0x95, 0x95,
0x6B, 0x6B, 0x86, 0x96, 0x7A, 0x6A, 0x96, 0x86,
0x6A, 0x7A, 0x70, 0x90, 0x90, 0x70, 0x90, 0x70,
0x70, 0x90, 0x94, 0xA4, 0x6C, 0x5C, 0xA4, 0x94,
0x5C, 0x6C, 0x78, 0x9B, 0x88, 0x65, 0x9B, 0x78,
0x65, 0x88, 0xA6, 0xA6, 0x5A, 0x5A, 0x83, 0xA9,
0x7D, 0x57, 0xA9, 0x83, 0x57, 0x7D, 0xA6, 0xB9,
0x5A, 0x47, 0xB9, 0xA6, 0x47, 0x5A, 0xBA, 0xBA,
0x46, 0x46, 0x92, 0xBC, 0x6E, 0x44, 0xBC, 0x92,
0x44, 0x6E, 0x67, 0xA3, 0x99, 0x5D, 0xA3, 0x67,
0x5D, 0x99, 0x72, 0xB0, 0x8E, 0x50, 0xB0, 0x72,
0x50, 0x8E, 0x7F, 0xC3, 0x81, 0x3D, 0xC3, 0x7F,
0x3D, 0x81, 0xBE, 0xD2, 0x42, 0x2E, 0xD2, 0xBE,
0x2E, 0x42, 0xA5, 0xD4, 0x5B, 0x2C, 0xD4, 0xA5,
0x2C, 0x5B, 0xD4, 0xD4, 0x2C, 0x2C, 0x52, 0xAE,
0xAE, 0x52, 0xAE, 0x52, 0x52, 0xAE, 0x8F, 0xD8,
0x71, 0x28, 0xD8, 0x8F, 0x28, 0x71, 0x5B, 0xBB,
0xA5, 0x45, 0xBB, 0x5B, 0x45, 0xA5, 0x69, 0xCB,
0x97, 0x35, 0xCB, 0x69, 0x35, 0x97, 0xD8, 0xF0,
0x28, 0x10, 0xF0, 0xD8, 0x10, 0x28, 0xBD, 0xF1,
0x43, 0x0F, 0xF1, 0xBD, 0x0F, 0x43, 0xF3, 0xF3,
0x0D, 0x0D, 0xA5, 0xF6, 0x5B, 0x0A, 0xF6, 0xA5,
0x0A, 0x5B, 0x78, 0xE2, 0x88, 0x1E, 0xE2, 0x78,
0x1E, 0x88, 0x42, 0xC9, 0xBE, 0x37, 0xC9, 0x42,
0x37, 0xBE, 0x4F, 0xD8, 0xB1, 0x28, 0xD8, 0x4F,
0x28, 0xB1, 0x8A, 0xFD, 0x76, 0x03, 0xFD, 0x8A,
0x03, 0x76, 0xDB, 0xFF, 0x25, 0x01, 0xFF, 0xDB,
0x01, 0x25, 0xF9, 0xFF, 0x07, 0x01, 0xFF, 0xF9,
0x01, 0x07, 0xBE, 0xFF, 0x42, 0x01, 0xFF, 0xBE,
0x01, 0x42, 0x5E, 0xED, 0xA2, 0x13, 0xED, 0x5E,
0x13, 0xA2, 0xFF, 0xFF, 0x01, 0x01, 0x80, 0x80, },
};
#endif /* AVCODEC_INDEO2DATA_H */

View File

@ -222,9 +222,19 @@ static int utvideo_decode_frame(AVCodecContext *avctx, void *data,
pic->data[0] = utv->buffer + utv->buf_size + pic->linesize[0];
break;
}
pic->width = w;
pic->height = h;
pic->format = avctx->pix_fmt;
if (avctx->refcounted_frames) {
int ret = av_frame_ref((AVFrame*)data, pic);
if (ret < 0)
return ret;
} else {
av_frame_move_ref((AVFrame*)data, pic);
}
*got_frame = 1;
av_frame_move_ref((AVFrame*)data, pic);
return avpkt->size;
}

View File

@ -41,8 +41,9 @@ static av_cold int libwebp_anim_encode_init(AVCodecContext *avctx)
int ret = ff_libwebp_encode_init_common(avctx);
if (!ret) {
LibWebPAnimContext *s = avctx->priv_data;
WebPAnimEncoderOptions enc_options;
WebPAnimEncoderOptions enc_options = { 0 };
WebPAnimEncoderOptionsInit(&enc_options);
enc_options.verbose = av_log_get_level() >= AV_LOG_VERBOSE;
// TODO(urvang): Expose some options on command-line perhaps.
s->enc = WebPAnimEncoderNew(avctx->width, avctx->height, &enc_options);
if (!s->enc)

View File

@ -1381,12 +1381,10 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
return AVERROR_INVALIDDATA;
}
if (!Al) {
// s->coefs_finished is a bitmask for coefficients coded
// ss and se are parameters telling start and end coefficients
s->coefs_finished[c] |= (2ULL << se) - (1ULL << ss);
last_scan = !~s->coefs_finished[c];
}
last_scan = !Al && !~s->coefs_finished[c];
if (s->interlaced && s->bottom_field)
data += linesize >> 1;

View File

@ -122,6 +122,16 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
uint8_t *ptr;
if (avctx->sample_aspect_ratio.num > 0 && avctx->sample_aspect_ratio.den > 0) {
AVRational sar = avctx->sample_aspect_ratio;
if (sar.num > 65535 || sar.den > 65535) {
if (!av_reduce(&sar.num, &sar.den, avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den, 65535))
av_log(avctx, AV_LOG_WARNING,
"Cannot store exact aspect ratio %d:%d\n",
avctx->sample_aspect_ratio.num,
avctx->sample_aspect_ratio.den);
}
/* JFIF header */
put_marker(p, APP0);
put_bits(p, 16, 16);
@ -131,8 +141,8 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
* released revision. */
put_bits(p, 16, 0x0102);
put_bits(p, 8, 0); /* units type: 0 - aspect ratio */
put_bits(p, 16, avctx->sample_aspect_ratio.num);
put_bits(p, 16, avctx->sample_aspect_ratio.den);
put_bits(p, 16, sar.num);
put_bits(p, 16, sar.den);
put_bits(p, 8, 0); /* thumbnail width */
put_bits(p, 8, 0); /* thumbnail height */
}

View File

@ -291,12 +291,6 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
short *output_bak = NULL;
int lenout;
if (s->input_channels == s->output_channels && s->ratio == 1.0 && 0) {
/* nothing to do */
memcpy(output, input, nb_samples * s->input_channels * sizeof(short));
return nb_samples;
}
if (s->sample_fmt[0] != AV_SAMPLE_FMT_S16) {
int istride[1] = { s->sample_size[0] };
int ostride[1] = { 2 };

View File

@ -658,7 +658,8 @@ static int rate_control(AVCodecContext *avctx, void *arg)
VC2EncContext *s = slice_dat->ctx;
const int sx = slice_dat->x;
const int sy = slice_dat->y;
int quant_buf[2], bits_buf[2], quant = s->q_start, range = s->q_start/3;
int bits_last = INT_MAX, quant_buf[2] = {-1, -1};
int quant = s->q_start, range = s->q_start/3;
const int64_t top = slice_dat->bits_ceil;
const double percent = s->tolerance;
const double bottom = top - top*(percent/100.0f);
@ -670,14 +671,13 @@ static int rate_control(AVCodecContext *avctx, void *arg)
bits = count_hq_slice(s, sx, sy, quant);
range = av_clip(range/2, 1, s->q_ceil);
if (quant_buf[1] == quant) {
quant = bits_buf[0] < bits ? quant_buf[0] : quant;
bits = bits_buf[0] < bits ? bits_buf[0] : bits;
quant = bits_last < bits ? quant_buf[0] : quant;
bits = bits_last < bits ? bits_last : bits;
break;
}
quant_buf[1] = quant_buf[0];
quant_buf[0] = quant;
bits_buf[1] = bits_buf[0];
bits_buf[0] = bits;
bits_last = bits;
}
slice_dat->quant_idx = av_clip(quant, 0, s->q_ceil);
slice_dat->bytes = FFALIGN((bits >> 3), s->size_scaler) + 4 + s->prefix_bytes;
@ -867,7 +867,7 @@ static int dwt_plane(AVCodecContext *avctx, void *arg)
}
}
memset(buf, 0, (p->coef_stride*p->dwt_height - p->height*p->width)*sizeof(dwtcoef));
memset(buf, 0, p->coef_stride * (p->dwt_height - p->height) * sizeof(dwtcoef));
for (level = s->wavelet_depth-1; level >= 0; level--) {
const SubBand *b = &p->band[level][0];

View File

@ -753,6 +753,10 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth)
c->transform_add[3] = ff_hevc_transform_add32_8_avx;
}
if (EXTERNAL_AVX2(cpu_flags)) {
c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_8_avx2;
c->sao_band_filter[1] = ff_hevc_sao_band_filter_16_8_avx2;
}
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
c->idct_dc[2] = ff_hevc_idct16x16_dc_8_avx2;
c->idct_dc[3] = ff_hevc_idct32x32_dc_8_avx2;
if (ARCH_X86_64) {
@ -897,7 +901,9 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth)
SAO_BAND_INIT(10, avx);
}
if (EXTERNAL_AVX2(cpu_flags)) {
c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_10_avx2;
}
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
c->idct_dc[2] = ff_hevc_idct16x16_dc_10_avx2;
c->idct_dc[3] = ff_hevc_idct32x32_dc_10_avx2;
if (ARCH_X86_64) {
@ -1095,6 +1101,9 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth)
SAO_BAND_INIT(12, avx);
}
if (EXTERNAL_AVX2(cpu_flags)) {
c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_12_avx2;
}
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
c->idct_dc[2] = ff_hevc_idct16x16_dc_12_avx2;
c->idct_dc[3] = ff_hevc_idct32x32_dc_12_avx2;

View File

@ -98,7 +98,7 @@ av_cold void ff_huffyuvencdsp_init_x86(HuffYUVEncDSPContext *c)
c->diff_bytes = ff_diff_bytes_sse2;
}
if (EXTERNAL_AVX2(cpu_flags)) {
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
c->diff_bytes = ff_diff_bytes_avx2;
}
}

View File

@ -44,7 +44,7 @@ av_cold void ff_jpeg2000dsp_init_x86(Jpeg2000DSPContext *c)
c->mct_decode[FF_DWT97] = ff_ict_float_avx;
}
if (EXTERNAL_AVX2(cpu_flags)) {
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
c->mct_decode[FF_DWT53] = ff_rct_int_avx2;
}
}

View File

@ -199,6 +199,6 @@ av_cold void ff_mlpdsp_init_x86(MLPDSPContext *c)
#endif
if (ARCH_X86_64 && EXTERNAL_SSE4(cpu_flags))
c->mlp_rematrix_channel = ff_mlp_rematrix_channel_sse4;
if (ARCH_X86_64 && EXTERNAL_AVX2(cpu_flags) && cpu_flags & AV_CPU_FLAG_BMI2)
if (ARCH_X86_64 && EXTERNAL_AVX2_FAST(cpu_flags) && cpu_flags & AV_CPU_FLAG_BMI2)
c->mlp_rematrix_channel = ff_mlp_rematrix_channel_avx2_bmi2;
}

View File

@ -67,7 +67,7 @@ av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
if (EXTERNAL_AVX_FAST(cpu_flags)) {
s->synth_filter_float = synth_filter_avx;
}
if (EXTERNAL_FMA3(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_AVXSLOW)) {
if (EXTERNAL_FMA3_FAST(cpu_flags)) {
s->synth_filter_float = synth_filter_fma3;
}
#endif /* HAVE_YASM */

View File

@ -45,7 +45,7 @@ av_cold void ff_v210enc_init_x86(V210EncContext *s)
if (EXTERNAL_AVX(cpu_flags))
s->pack_line_8 = ff_v210_planar_pack_8_avx;
if (EXTERNAL_AVX2(cpu_flags)) {
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
s->pack_line_8 = ff_v210_planar_pack_8_avx2;
s->pack_line_10 = ff_v210_planar_pack_10_avx2;
s->sample_factor = 2;

View File

@ -377,7 +377,7 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact)
init_ipred(32, avx, v, VERT);
}
if (EXTERNAL_AVX2(cpu_flags)) {
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
init_fpel_func(1, 1, 32, avg, _8, avx2);
init_fpel_func(0, 1, 64, avg, _8, avx2);
if (ARCH_X86_64) {

View File

@ -129,7 +129,7 @@ av_cold void ff_vp9dsp_init_16bpp_x86(VP9DSPContext *dsp)
init_ipred_funcs(hd, HOR_DOWN, 16, avx);
}
if (EXTERNAL_AVX2(cpu_flags)) {
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
init_fpel_func(2, 1, 32, avg, _16, avx2);
init_fpel_func(1, 1, 64, avg, _16, avx2);
init_fpel_func(0, 1, 128, avg, _16, avx2);

View File

@ -225,7 +225,7 @@ av_cold void INIT_FUNC(VP9DSPContext *dsp, int bitexact)
init_lpf_funcs(BPC, avx);
}
if (EXTERNAL_AVX2(cpu_flags)) {
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
#if HAVE_AVX2_EXTERNAL
init_subpel3_32_64(0, put, BPC, avx2);
init_subpel3_32_64(1, avg, BPC, avx2);

View File

@ -283,6 +283,12 @@ resolve_eof:
return ret;
}
static int enu_free(void *opaque, void *elem)
{
av_free(elem);
return 0;
}
static int cache_close(URLContext *h)
{
Context *c= h->priv_data;
@ -292,6 +298,7 @@ static int cache_close(URLContext *h)
close(c->fd);
ffurl_close(c->inner);
av_tree_enumerate(c->root, NULL, NULL, enu_free);
av_tree_destroy(c->root);
return 0;

View File

@ -710,7 +710,7 @@ static int concat_seek(AVFormatContext *avf, int stream,
static const AVOption options[] = {
{ "safe", "enable safe mode",
OFFSET(safe), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, DEC },
OFFSET(safe), AV_OPT_TYPE_BOOL, {.i64 = 1}, -1, 1, DEC },
{ "auto_convert", "automatically convert bitstream format",
OFFSET(auto_convert), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, DEC },
{ "segment_time_metadata", "output file segment start time and duration as packet metadata",

View File

@ -775,8 +775,8 @@ static int ffm_probe(AVProbeData *p)
static const AVOption options[] = {
{"server_attached", NULL, offsetof(FFMContext, server_attached), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_EXPORT },
{"ffm_write_index", NULL, offsetof(FFMContext, write_index), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, 1, AV_OPT_FLAG_EXPORT },
{"ffm_file_size", NULL, offsetof(FFMContext, file_size), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, 1, AV_OPT_FLAG_EXPORT },
{"ffm_write_index", NULL, offsetof(FFMContext, write_index), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, AV_OPT_FLAG_EXPORT },
{"ffm_file_size", NULL, offsetof(FFMContext, file_size), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, AV_OPT_FLAG_EXPORT },
{ NULL },
};

View File

@ -349,7 +349,7 @@ URLProtocol ff_file_protocol = {
.url_open_dir = file_open_dir,
.url_read_dir = file_read_dir,
.url_close_dir = file_close_dir,
.default_whitelist = "file"
.default_whitelist = "file,crypto"
};
#endif /* CONFIG_FILE_PROTOCOL */
@ -388,7 +388,7 @@ URLProtocol ff_pipe_protocol = {
.url_check = file_check,
.priv_data_size = sizeof(FileContext),
.priv_data_class = &pipe_class,
.default_whitelist = "none"
.default_whitelist = "crypto"
};
#endif /* CONFIG_PIPE_PROTOCOL */

View File

@ -396,7 +396,7 @@ static int hls_window(AVFormatContext *s, int last)
set_http_options(&options, hls);
snprintf(temp_filename, sizeof(temp_filename), use_rename ? "%s.tmp" : "%s", s->filename);
if ((ret = s->io_open(s, &out, temp_filename, AVIO_FLAG_WRITE, NULL)) < 0)
if ((ret = s->io_open(s, &out, temp_filename, AVIO_FLAG_WRITE, &options)) < 0)
goto fail;
for (en = hls->segments; en; en = en->next) {

View File

@ -1522,7 +1522,7 @@ URLProtocol ff_http_protocol = {
.priv_data_size = sizeof(HTTPContext),
.priv_data_class = &http_context_class,
.flags = URL_PROTOCOL_FLAG_NETWORK,
.default_whitelist = "http,https,tls,rtp,tcp,udp,crypto"
.default_whitelist = "http,https,tls,rtp,tcp,udp,crypto,httpproxy"
};
#endif /* CONFIG_HTTP_PROTOCOL */
@ -1541,7 +1541,7 @@ URLProtocol ff_https_protocol = {
.priv_data_size = sizeof(HTTPContext),
.priv_data_class = &https_context_class,
.flags = URL_PROTOCOL_FLAG_NETWORK,
.default_whitelist = "http,https,tls,rtp,tcp,udp,crypto"
.default_whitelist = "http,https,tls,rtp,tcp,udp,crypto,httpproxy"
};
#endif /* CONFIG_HTTPS_PROTOCOL */

View File

@ -3609,7 +3609,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
av_log(c->fc, AV_LOG_DEBUG, "calculated into dts %"PRId64"\n", dts);
} else {
dts = frag->time;
dts = frag->time - sc->time_offset;
av_log(c->fc, AV_LOG_DEBUG, "found frag time %"PRId64
", using it for dts\n", dts);
}
@ -3666,7 +3666,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
version = avio_r8(pb);
if (version > 1) {
avpriv_request_sample(c->fc, "sidx version %u", version);
return AVERROR_PATCHWELCOME;
return 0;
}
avio_rb24(pb); // flags
@ -3679,8 +3679,8 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
}
if (!st) {
av_log(c->fc, AV_LOG_ERROR, "could not find corresponding track id %d\n", track_id);
return AVERROR_INVALIDDATA;
av_log(c->fc, AV_LOG_WARNING, "could not find corresponding track id %d\n", track_id);
return 0;
}
sc = st->priv_data;

View File

@ -56,6 +56,7 @@ typedef struct MpegTSService {
int pcr_pid;
int pcr_packet_count;
int pcr_packet_period;
AVProgram *program;
} MpegTSService;
// service_type values as defined in ETSI 300 468
@ -275,17 +276,14 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
if (s->nb_programs) {
int j, k, found = 0;
int k, found = 0;
AVProgram *program = service->program;
for (j = 0; j < s->nb_programs; j++)
if (s->programs[j]->id == service->sid) {
for (k = 0; k < s->programs[j]->nb_stream_indexes; k++)
if (s->programs[j]->stream_index[k] == i) {
for (k = 0; k < program->nb_stream_indexes; k++)
if (program->stream_index[k] == i) {
found = 1;
break;
}
break;
}
if (!found)
continue;
@ -784,6 +782,7 @@ static int mpegts_init(AVFormatContext *s)
service->pmt.write_packet = section_write_packet;
service->pmt.opaque = s;
service->pmt.cc = 15;
service->program = program;
}
}
@ -807,6 +806,7 @@ static int mpegts_init(AVFormatContext *s)
/* assign pids to each stream */
for (i = 0; i < s->nb_streams; i++) {
AVProgram *program;
st = s->streams[i];
ts_st = av_mallocz(sizeof(MpegTSWriteStream));
@ -824,6 +824,17 @@ static int mpegts_init(AVFormatContext *s)
ret = AVERROR(ENOMEM);
goto fail;
}
program = av_find_program_from_stream(s, NULL, i);
if (program) {
for (j = 0; j < ts->nb_services; j++) {
if (ts->services[j]->program == program) {
service = ts->services[j];
break;
}
}
}
ts_st->service = service;
/* MPEG pid values < 16 are reserved. Applications which set st->id in
* this range are assigned a calculated pid. */

View File

@ -193,16 +193,17 @@ static void create_default_qtables(uint8_t *qtables, uint8_t q)
{
int factor = q;
int i;
uint16_t S;
factor = av_clip(q, 1, 99);
if (q < 50)
q = 5000 / factor;
S = 5000 / factor;
else
q = 200 - factor * 2;
S = 200 - factor * 2;
for (i = 0; i < 128; i++) {
int val = (default_quantizers[i] * q + 50) / 100;
int val = (default_quantizers[i] * S + 50) / 100;
/* Limit the quantizers to 1 <= q <= 255. */
val = av_clip(val, 1, 255);

View File

@ -271,7 +271,8 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time, int bye)
avio_w8(s1->pb, RTCP_SR);
avio_wb16(s1->pb, 6); /* length in words - 1 */
avio_wb32(s1->pb, s->ssrc);
avio_wb64(s1->pb, NTP_TO_RTP_FORMAT(ntp_time));
avio_wb32(s1->pb, ntp_time / 1000000);
avio_wb32(s1->pb, ((ntp_time % 1000000) << 32) / 1000000);
avio_wb32(s1->pb, rtp_ts);
avio_wb32(s1->pb, s->packet_count);
avio_wb32(s1->pb, s->octet_count);

View File

@ -48,7 +48,7 @@ static int svag_read_header(AVFormatContext *s)
if (st->codec->sample_rate <= 0)
return AVERROR_INVALIDDATA;
st->codec->channels = avio_rl32(s->pb);
if (st->codec->channels <= 0)
if (st->codec->channels <= 0 || st->codec->channels > 8)
return AVERROR_INVALIDDATA;
st->duration = size / (16 * st->codec->channels) * 28;
align = avio_rl32(s->pb);

View File

@ -1186,11 +1186,12 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
}
}
if (pkt->pts != AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY && has_decode_delay_been_guessed(st)) {
if (pkt->pts != AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY) {
st->pts_buffer[0] = pkt->pts;
for (i = 0; i<delay && st->pts_buffer[i] > st->pts_buffer[i + 1]; i++)
FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i + 1]);
if(has_decode_delay_been_guessed(st))
pkt->dts = select_from_pts_buffer(st, st->pts_buffer, pkt->dts);
}
// We skipped it above so we try here.

View File

@ -94,7 +94,7 @@ static const struct {
{ "6.0(front)", 6, AV_CH_LAYOUT_6POINT0_FRONT },
{ "hexagonal", 6, AV_CH_LAYOUT_HEXAGONAL },
{ "6.1", 7, AV_CH_LAYOUT_6POINT1 },
{ "6.1", 7, AV_CH_LAYOUT_6POINT1_BACK },
{ "6.1(back)", 7, AV_CH_LAYOUT_6POINT1_BACK },
{ "6.1(front)", 7, AV_CH_LAYOUT_6POINT1_FRONT },
{ "7.0", 7, AV_CH_LAYOUT_7POINT0 },
{ "7.0(front)", 7, AV_CH_LAYOUT_7POINT0_FRONT },

View File

@ -24,13 +24,16 @@
#define CPUEXT_SUFFIX(flags, suffix, cpuext) \
(HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
#define CPUEXT_SUFFIX_FAST(flags, suffix, cpuext) \
#define CPUEXT_SUFFIX_FAST2(flags, suffix, cpuext, slow_cpuext) \
(HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \
!((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW))
!((flags) & AV_CPU_FLAG_ ## slow_cpuext ## SLOW))
#define CPUEXT_SUFFIX_SLOW(flags, suffix, cpuext) \
#define CPUEXT_SUFFIX_SLOW2(flags, suffix, cpuext, slow_cpuext) \
(HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \
((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW))
((flags) & AV_CPU_FLAG_ ## slow_cpuext ## SLOW))
#define CPUEXT_SUFFIX_FAST(flags, suffix, cpuext) CPUEXT_SUFFIX_FAST2(flags, suffix, cpuext, cpuext)
#define CPUEXT_SUFFIX_SLOW(flags, suffix, cpuext) CPUEXT_SUFFIX_SLOW2(flags, suffix, cpuext, cpuext)
#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
#define CPUEXT_FAST(flags, cpuext) CPUEXT_SUFFIX_FAST(flags, , cpuext)

View File

@ -313,6 +313,22 @@ static av_always_inline float ff_exp10f(float x)
return exp2f(M_LOG2_10 * x);
}
/**
* Compute x^y for floating point x, y. Note: this function is faster than the
* libm variant due to mainly 2 reasons:
* 1. It does not handle any edge cases. In particular, this is only guaranteed
* to work correctly for x > 0.
* 2. It is not as accurate as a standard nearly "correctly rounded" libm variant.
* @param x base
* @param y exponent
* @return x^y
*/
static av_always_inline float ff_fast_powf(float x, float y)
{
return expf(logf(x) * y);
}
/**
* A wrapper for open() setting O_CLOEXEC.
*/

View File

@ -2275,6 +2275,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
#define FF_COLOR_GRAY 1 /**< gray color space */
#define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
#define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
#define FF_COLOR_XYZ 4
#define pixdesc_has_alpha(pixdesc) \
((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
@ -2290,6 +2291,9 @@ static int get_color_type(const AVPixFmtDescriptor *desc) {
if(desc->name && !strncmp(desc->name, "yuvj", 4))
return FF_COLOR_YUV_JPEG;
if(desc->name && !strncmp(desc->name, "xyz", 3))
return FF_COLOR_XYZ;
if(desc->flags & AV_PIX_FMT_FLAG_RGB)
return FF_COLOR_RGB;

View File

@ -97,8 +97,13 @@ static uint32_t get_generic_seed(void)
last_t = t;
}
if(TEST)
if(TEST) {
buffer[0] = buffer[1] = 0;
} else {
#ifdef AV_READ_TIME
buffer[111] += AV_READ_TIME();
#endif
}
av_sha_init(sha, 160);
av_sha_update(sha, (const uint8_t *)buffer, sizeof(buffer));

View File

@ -68,8 +68,12 @@
#define EXTERNAL_AVX_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, AVX)
#define EXTERNAL_XOP(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, XOP)
#define EXTERNAL_FMA3(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, FMA3)
#define EXTERNAL_FMA3_FAST(flags) CPUEXT_SUFFIX_FAST2(flags, _EXTERNAL, FMA3, AVX)
#define EXTERNAL_FMA3_SLOW(flags) CPUEXT_SUFFIX_SLOW2(flags, _EXTERNAL, FMA3, AVX)
#define EXTERNAL_FMA4(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, FMA4)
#define EXTERNAL_AVX2(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AVX2)
#define EXTERNAL_AVX2_FAST(flags) CPUEXT_SUFFIX_FAST2(flags, _EXTERNAL, AVX2, AVX)
#define EXTERNAL_AVX2_SLOW(flags) CPUEXT_SUFFIX_SLOW2(flags, _EXTERNAL, AVX2, AVX)
#define EXTERNAL_AESNI(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AESNI)
#define INLINE_AMD3DNOW(flags) CPUEXT_SUFFIX(flags, _INLINE, AMD3DNOW)

View File

@ -92,7 +92,7 @@ av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
fdsp->vector_fmul_add = ff_vector_fmul_add_avx;
fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_avx;
}
if (EXTERNAL_FMA3(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_AVXSLOW)) {
if (EXTERNAL_FMA3_FAST(cpu_flags)) {
fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_fma3;
fdsp->vector_fmul_add = ff_vector_fmul_add_fma3;
}

View File

@ -39,7 +39,7 @@ av_cold void ff_init_lls_x86(LLSModel *m)
if (EXTERNAL_AVX_FAST(cpu_flags)) {
m->update_lls = ff_update_lls_avx;
}
if (EXTERNAL_FMA3(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_AVXSLOW)) {
if (EXTERNAL_FMA3_FAST(cpu_flags)) {
m->update_lls = ff_update_lls_fma3;
}
}

View File

@ -973,7 +973,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
int i;
const int count= FFMAX(mbHeight * absQPStride, mbWidth);
for(i=0; i<(count>>2); i++){
((uint32_t*)c->stdQPTable)[i] = (((const uint32_t*)QP_store)[i]>>1) & 0x7F7F7F7F;
AV_WN32(c->stdQPTable + (i<<2), AV_RN32(QP_store + (i<<2)) >> 1 & 0x7F7F7F7F);
}
for(i<<=2; i<count; i++){
c->stdQPTable[i] = QP_store[i]>>1;

View File

@ -174,7 +174,7 @@ MULTI_CAPS_FUNC(SSE2, sse2)
ac->simd_f = ff_pack_8ch_float_to_int32_a_avx;
}
}
if(EXTERNAL_AVX2(mm_flags)) {
if(EXTERNAL_AVX2_FAST(mm_flags)) {
if( out_fmt == AV_SAMPLE_FMT_S32 && in_fmt == AV_SAMPLE_FMT_FLT || out_fmt == AV_SAMPLE_FMT_S32P && in_fmt == AV_SAMPLE_FMT_FLTP)
ac->simd_f = ff_float_to_int32_a_avx2;
}

View File

@ -71,7 +71,7 @@ av_cold void swri_resample_dsp_x86_init(ResampleContext *c)
c->dsp.resample = c->linear ? ff_resample_linear_float_avx
: ff_resample_common_float_avx;
}
if (EXTERNAL_FMA3(mm_flags) && !(mm_flags & AV_CPU_FLAG_AVXSLOW)) {
if (EXTERNAL_FMA3_FAST(mm_flags)) {
c->dsp.resample = c->linear ? ff_resample_linear_float_fma3
: ff_resample_common_float_fma3;
}

View File

@ -885,6 +885,19 @@ static av_always_inline void planar_rgb16_to_y(uint8_t *_dst, const uint8_t *_sr
}
}
static av_always_inline void planar_rgb16_to_a(uint8_t *_dst, const uint8_t *_src[4],
int width, int bpc, int is_be, int32_t *rgb2yuv)
{
int i;
const uint16_t **src = (const uint16_t **)_src;
uint16_t *dst = (uint16_t *)_dst;
int shift = bpc < 16 ? bpc : 14;
for (i = 0; i < width; i++) {
dst[i] = rdpx(src[3] + i) << (14 - shift);
}
}
static av_always_inline void planar_rgb16_to_uv(uint8_t *_dstU, uint8_t *_dstV,
const uint8_t *_src[4], int width,
int bpc, int is_be, int32_t *rgb2yuv)
@ -913,6 +926,11 @@ static void planar_rgb##nbits##endian_name##_to_y(uint8_t *dst, const uint8_t *s
{ \
planar_rgb16_to_y(dst, src, w, nbits, endian, rgb2yuv); \
} \
static void planar_rgb##nbits##endian_name##_to_a(uint8_t *dst, const uint8_t *src[4], \
int w, int32_t *rgb2yuv) \
{ \
planar_rgb16_to_a(dst, src, w, nbits, endian, rgb2yuv); \
} \
static void planar_rgb##nbits##endian_name##_to_uv(uint8_t *dstU, uint8_t *dstV, \
const uint8_t *src[4], int w, int32_t *rgb2yuv) \
{ \
@ -1248,6 +1266,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c->readLumPlanar = planar_rgb14le_to_y;
break;
case AV_PIX_FMT_GBRAP16LE:
c->readAlpPlanar = planar_rgb16le_to_a;
case AV_PIX_FMT_GBRP16LE:
c->readLumPlanar = planar_rgb16le_to_y;
break;
@ -1264,6 +1283,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c->readLumPlanar = planar_rgb14be_to_y;
break;
case AV_PIX_FMT_GBRAP16BE:
c->readAlpPlanar = planar_rgb16be_to_a;
case AV_PIX_FMT_GBRP16BE:
c->readLumPlanar = planar_rgb16be_to_y;
break;

View File

@ -1354,6 +1354,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
srcFormat != AV_PIX_FMT_GBRP12BE && srcFormat != AV_PIX_FMT_GBRP12LE &&
srcFormat != AV_PIX_FMT_GBRP14BE && srcFormat != AV_PIX_FMT_GBRP14LE &&
srcFormat != AV_PIX_FMT_GBRP16BE && srcFormat != AV_PIX_FMT_GBRP16LE &&
srcFormat != AV_PIX_FMT_GBRAP16BE && srcFormat != AV_PIX_FMT_GBRAP16LE &&
((dstW >> c->chrDstHSubSample) <= (srcW >> 1) ||
(flags & SWS_FAST_BILINEAR)))
c->chrSrcHSubSample = 1;

View File

@ -54,6 +54,118 @@ SECTION .text
; int32_t if $output_size is 16. $filter is 12-bits. $filterSize is a multiple
; of 2. $offset is either 0 or 3. $dither holds 8 values.
;-----------------------------------------------------------------------------
%macro yuv2planeX_mainloop 2
.pixelloop_%2:
%assign %%i 0
; the rep here is for the 8bit output mmx case, where dither covers
; 8 pixels but we can only handle 2 pixels per register, and thus 4
; pixels per iteration. In order to not have to keep track of where
; we are w.r.t. dithering, we unroll the mmx/8bit loop x2.
%if %1 == 8
%assign %%repcnt 16/mmsize
%else
%assign %%repcnt 1
%endif
%rep %%repcnt
%if %1 == 8
%if ARCH_X86_32
mova m2, [rsp+mmsize*(0+%%i)]
mova m1, [rsp+mmsize*(1+%%i)]
%else ; x86-64
mova m2, m8
mova m1, m_dith
%endif ; x86-32/64
%else ; %1 == 9/10/16
mova m1, [yuv2yuvX_%1_start]
mova m2, m1
%endif ; %1 == 8/9/10/16
movsx cntr_reg, fltsizem
.filterloop_%2_ %+ %%i:
; input pixels
mov r6, [srcq+gprsize*cntr_reg-2*gprsize]
%if %1 == 16
mova m3, [r6+r5*4]
mova m5, [r6+r5*4+mmsize]
%else ; %1 == 8/9/10
mova m3, [r6+r5*2]
%endif ; %1 == 8/9/10/16
mov r6, [srcq+gprsize*cntr_reg-gprsize]
%if %1 == 16
mova m4, [r6+r5*4]
mova m6, [r6+r5*4+mmsize]
%else ; %1 == 8/9/10
mova m4, [r6+r5*2]
%endif ; %1 == 8/9/10/16
; coefficients
movd m0, [filterq+2*cntr_reg-4] ; coeff[0], coeff[1]
%if %1 == 16
pshuflw m7, m0, 0 ; coeff[0]
pshuflw m0, m0, 0x55 ; coeff[1]
pmovsxwd m7, m7 ; word -> dword
pmovsxwd m0, m0 ; word -> dword
pmulld m3, m7
pmulld m5, m7
pmulld m4, m0
pmulld m6, m0
paddd m2, m3
paddd m1, m5
paddd m2, m4
paddd m1, m6
%else ; %1 == 10/9/8
punpcklwd m5, m3, m4
punpckhwd m3, m4
SPLATD m0
pmaddwd m5, m0
pmaddwd m3, m0
paddd m2, m5
paddd m1, m3
%endif ; %1 == 8/9/10/16
sub cntr_reg, 2
jg .filterloop_%2_ %+ %%i
%if %1 == 16
psrad m2, 31 - %1
psrad m1, 31 - %1
%else ; %1 == 10/9/8
psrad m2, 27 - %1
psrad m1, 27 - %1
%endif ; %1 == 8/9/10/16
%if %1 == 8
packssdw m2, m1
packuswb m2, m2
movh [dstq+r5*1], m2
%else ; %1 == 9/10/16
%if %1 == 16
packssdw m2, m1
paddw m2, [minshort]
%else ; %1 == 9/10
%if cpuflag(sse4)
packusdw m2, m1
%else ; mmxext/sse2
packssdw m2, m1
pmaxsw m2, m6
%endif ; mmxext/sse2/sse4/avx
pminsw m2, [yuv2yuvX_%1_upper]
%endif ; %1 == 9/10/16
mov%2 [dstq+r5*2], m2
%endif ; %1 == 8/9/10/16
add r5, mmsize/2
sub wd, mmsize/2
%assign %%i %%i+2
%endrep
jg .pixelloop_%2
%endmacro
%macro yuv2planeX_fn 3
@ -123,116 +235,16 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset
xor r5, r5
.pixelloop:
%assign %%i 0
; the rep here is for the 8bit output mmx case, where dither covers
; 8 pixels but we can only handle 2 pixels per register, and thus 4
; pixels per iteration. In order to not have to keep track of where
; we are w.r.t. dithering, we unroll the mmx/8bit loop x2.
%if %1 == 8
%assign %%repcnt 16/mmsize
%else
%assign %%repcnt 1
%endif
%rep %%repcnt
%if %1 == 8
%if ARCH_X86_32
mova m2, [rsp+mmsize*(0+%%i)]
mova m1, [rsp+mmsize*(1+%%i)]
%else ; x86-64
mova m2, m8
mova m1, m_dith
%endif ; x86-32/64
%else ; %1 == 9/10/16
mova m1, [yuv2yuvX_%1_start]
mova m2, m1
%endif ; %1 == 8/9/10/16
movsx cntr_reg, fltsizem
.filterloop_ %+ %%i:
; input pixels
mov r6, [srcq+gprsize*cntr_reg-2*gprsize]
%if %1 == 16
mova m3, [r6+r5*4]
mova m5, [r6+r5*4+mmsize]
%else ; %1 == 8/9/10
mova m3, [r6+r5*2]
%endif ; %1 == 8/9/10/16
mov r6, [srcq+gprsize*cntr_reg-gprsize]
%if %1 == 16
mova m4, [r6+r5*4]
mova m6, [r6+r5*4+mmsize]
%else ; %1 == 8/9/10
mova m4, [r6+r5*2]
%endif ; %1 == 8/9/10/16
; coefficients
movd m0, [filterq+2*cntr_reg-4] ; coeff[0], coeff[1]
%if %1 == 16
pshuflw m7, m0, 0 ; coeff[0]
pshuflw m0, m0, 0x55 ; coeff[1]
pmovsxwd m7, m7 ; word -> dword
pmovsxwd m0, m0 ; word -> dword
pmulld m3, m7
pmulld m5, m7
pmulld m4, m0
pmulld m6, m0
paddd m2, m3
paddd m1, m5
paddd m2, m4
paddd m1, m6
%else ; %1 == 10/9/8
punpcklwd m5, m3, m4
punpckhwd m3, m4
SPLATD m0
pmaddwd m5, m0
pmaddwd m3, m0
paddd m2, m5
paddd m1, m3
%endif ; %1 == 8/9/10/16
sub cntr_reg, 2
jg .filterloop_ %+ %%i
%if %1 == 16
psrad m2, 31 - %1
psrad m1, 31 - %1
%else ; %1 == 10/9/8
psrad m2, 27 - %1
psrad m1, 27 - %1
%endif ; %1 == 8/9/10/16
%if %1 == 8
packssdw m2, m1
packuswb m2, m2
movh [dstq+r5*1], m2
%else ; %1 == 9/10/16
%if %1 == 16
packssdw m2, m1
paddw m2, [minshort]
%else ; %1 == 9/10
%if cpuflag(sse4)
packusdw m2, m1
%else ; mmxext/sse2
packssdw m2, m1
pmaxsw m2, m6
%endif ; mmxext/sse2/sse4/avx
pminsw m2, [yuv2yuvX_%1_upper]
%endif ; %1 == 9/10/16
mova [dstq+r5*2], m2
%endif ; %1 == 8/9/10/16
add r5, mmsize/2
sub wd, mmsize/2
%assign %%i %%i+2
%endrep
jg .pixelloop
%if mmsize == 8 || %1 == 8
yuv2planeX_mainloop %1, a
%else ; mmsize == 16
test dstq, 15
jnz .unaligned
yuv2planeX_mainloop %1, a
REP_RET
.unaligned:
yuv2planeX_mainloop %1, u
%endif ; mmsize == 8/16
%if %1 == 8
%if ARCH_X86_32

View File

@ -175,7 +175,7 @@ fate-aac-pns-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.w
fate-aac-pns-encode: CMP_SHIFT = -4096
fate-aac-pns-encode: CMP_TARGET = 616
fate-aac-pns-encode: SIZE_TOLERANCE = 3560
fate-aac-pns-encode: FUZZ = 72
fate-aac-pns-encode: FUZZ = 74
FATE_AAC_ENCODE += fate-aac-tns-encode
fate-aac-tns-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -c:a aac -aac_tns 1 -aac_is 0 -aac_pns 0 -aac_ms 0 -b:a 128k -cutoff 22050 -fflags +bitexact -flags +bitexact

View File

@ -2,7 +2,7 @@
cd "$1"/..
git --version > /dev/null || { cat tests/ref/fate/source ; exit 0; }
git show > /dev/null 2> /dev/null || { cat tests/ref/fate/source ; exit 0; }
echo Files without standard license headers:
git grep -L -E "This file is part of FFmpeg|This file is part of libswresample|"\

View File

@ -25,9 +25,9 @@
1, 264, 264, 21, 609, 0xc0dc255c
1, 285, 285, 21, 619, 0x9ac52dd1
0, 292, 292, 41, 16751, 0xf293ab46, F=0x0
0, 292, 417, 41, 22029, 0x3696462b, F=0x0
1, 306, 306, 21, 574, 0xf6410d4d
1, 327, 327, 22, 565, 0xfd561191
0, 334, 417, 41, 22029, 0x3696462b, F=0x0
1, 350, 350, 21, 713, 0x48425147
1, 371, 371, 21, 537, 0x09bbf515
0, 375, 375, 41, 5044, 0xa0344ae6, F=0x0