Commit Graph

42130 Commits

Author SHA1 Message Date
Tom Butterworth ae5a8dca67 hap: Fix slice size computation
A bug was introduced in 977105407c whereby when
frame height wasn't divisible by the number of threads, pixels would be omitted
from the bottom rows during decode.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-23 10:46:19 +02:00
Tom Butterworth ebe8b5d947 dds: Fix the slice size computation
A bug was introduced in 6b2b26e7af whereby when
frame height wasn't divisible by the number of threads, pixels would be omitted
from the bottom rows during decode.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-23 10:45:40 +02:00
Anton Khirnov 22ecfcd4c7 af_channelmap: properly set the supported output channel layouts
The current code expects query_formats() to be called exactly once, it
will leak if it's not called at all (filter initialized, but never
configured or used) or try to read freed memory if it's called more than
once.

Found-by: James Almer <jamrial@gmail.com>
CC: libav-stable@libav.org
2015-07-23 09:53:55 +02:00
Alexandra Hájková aed7715b8f asfdec: increment nb_streams right after the stream allocation
to prevent possible memory leaks

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-23 09:48:26 +02:00
Alexandra Hájková ee80f834cb asfdec: set nb_streams to 0 in the asf_read_close
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-23 09:47:59 +02:00
Vittorio Giovara 21c90d86d2 mpegvideo: Add missing include 2015-07-22 13:35:44 +01:00
Vittorio Giovara a16854892c dds: Add a rgba fate test 2015-07-22 13:35:44 +01:00
Michael Niedermayer d08d8b61aa dds: Fix 32bpp bitmaps decoding
Found-By: ami_stuff
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-22 13:35:44 +01:00
Vittorio Giovara 57214b2f7f dds: Fix palette decoding
Red and blue channels were decoded in the wrong order.

Found-By: ami_stuff
2015-07-22 13:35:44 +01:00
Vittorio Giovara ea4d46e729 dds: Fix enum declaration
Drop the global variables with anonymous enum type.
2015-07-22 13:35:43 +01:00
Alexandra Hájková 2a187a074a asfdec: avoid crash in the case when chunk_len is 0 or pkt_len is 0
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-22 12:11:46 +02:00
Alexandra Hájková 93f16f338f asfdec: close the demuxer properly when read_header is failing
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-22 12:11:46 +02:00
Alexandra Hájková 5655236a67 asfdec: factor out seeking to the Data Object outside while
return INVALIDDARA if Data Object was not found

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-22 12:11:46 +02:00
Anton Khirnov ecee1148af qsvenc_hevc: use the correct HW plugin UID 2015-07-22 12:11:46 +02:00
Janne Grunau e605bf3b59 checkasm: remove empty array initializer list in h264pred test
Fixes MSVC compilation.
2015-07-22 12:06:32 +02:00
Luca Barbato 3ae0e721c7 checkasm: Always link statically
Checkasm needs to use internal symbols that should not be made public.
2015-07-21 23:22:42 +02:00
Luca Barbato 6b2b26e7af dds: Decode using optimal slices sizes
Enjoy some cache locality and use less threads.
About the same speedup provided to HAP.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-21 12:14:25 +02:00
Luca Barbato 977105407c hap: Decode using optimal slices sizes
Enjoy some cache locality and use less threads.
About 5x speedup (from 60ms to 12ms to decode a 4k frame).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-21 12:14:25 +02:00
Luca Barbato 219b39a71a parseutil: Use non ambiguous aliases for uhd
uhd1 and uhd2 would be ambigous.
2015-07-21 11:43:44 +02:00
Janne Grunau 9ed6f9a17c arm: use a local label instead of the function symbol in ff_prefetch_arm
Avoids a relocation which might end out of range for thumb2.

Reported-By: Ludovic Fauvet <etix@videolan.org>
Bug-Id: https://bugs.webkit.org/show_bug.cgi?id=137022
CC: libav-stable@libav.org
2015-07-20 23:10:29 +02:00
Janne Grunau f56d8d8dd7 h264: aarch64: intra prediction optimisations 2015-07-20 23:10:29 +02:00
Vittorio Giovara 40cf1bbacc Deprecate avctx.coded_frame
The rationale is that coded_frame was only used to communicate key_frame,
pict_type and quality to the caller, as well as a few other random fields,
in a non predictable, let alone consistent way.

There was agreement that there was no use case for coded_frame, as it is
a full-sized AVFrame container used for just 2-3 int-sized properties,
which shouldn't even belong into the AVCodecContext in the first place.

The appropriate AVPacket flag can be used instead of key_frame, while
quality is exported with the new AVPacketSideData quality factor.
There is no replacement for the other fields as they were unreliable,
mishandled or just not used at all.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:50 +01:00
Vittorio Giovara 5d3addb937 Add a quality factor packet side data
This is necessary to preserve the quality information currently exported
with coded_frame. Add the new side data to every encoder that needs it,
and use it in avconv.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:47 +01:00
Vittorio Giovara d6604b29ef Gather all coded_frame allocations and free functions to a single place
Allocating coded_frame is what most encoders do anyway, so it makes
sense to always allocate and free it in a single place. Moreover a lot
of encoders freed the frame with av_freep() instead of the correct API
av_frame_free().

This bring uniformity to encoder behaviour and prevents applications
from erroneusly accessing this field when not allocated. Additionally
this helps isolating encoders that export information with coded_frame,
and heavily simplifies its deprecation.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:16:15 +01:00
Vittorio Giovara 91f9b6579a flashsvenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara 75c1ed2e4c ffv1enc: Use input frame to set SAR and interlacing 2015-07-20 14:13:42 +01:00
Vittorio Giovara 10a9149de2 ffv1enc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara efc618aff9 qtrleenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara f3b4a92241 libtheoraenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara d6006dd9f0 libvpxenc: Do not entangle coded_frame
Keep coded_frame.key_frame a write-only variable.
2015-07-20 14:13:42 +01:00
Vittorio Giovara 7fc8d8a1b3 libxvid: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara 56672aeaee svq1enc: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara 05fb4c9aaf proresenc: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara 91767360d8 a64multienc: Do not entangle coded_frame
This change (and the following ones of the same kind) is mainly to
simplify wrapping this section with an #if FF_API block later on.

No functional changes are applied, the fields of the context coded_frame
fields are directly initialized, instead of keeping a reference to the
coded_frame itself.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:12:48 +01:00
Vittorio Giovara 95e2317ed8 roqvideoenc: Drop unneeded initialization
Its fields are never initialized to begin with.
2015-07-20 13:57:25 +01:00
Vittorio Giovara 1f171de8ca mpegvideo_enc: Drop unnneded initialization
coded_frame is already initialized where needed.
2015-07-20 13:57:18 +01:00
Luca Barbato e93ca480c9 parseutil: Add more resolution aliases
Add DCI 2k and 4k and uhd1 and uhd2.
2015-07-20 04:05:48 +02:00
Anton Khirnov 69b92f1b99 qsvenc: properly handle asynchronous encoding
Wait for async_depth frames before syncing.
2015-07-19 10:06:53 +02:00
Anton Khirnov f5c4d38c78 qsvdec: properly handle asynchronous decoding
Wait for async_depth frames before syncing.
2015-07-19 09:47:45 +02:00
Anton Khirnov 6b15874fc2 af_resample: do not touch the timestamps if we are not resampling
This filter currently assumes that the input audio is continuous and
does some timestamps manipulation based on this assumption.

This is unnecessary if we are only converting the channel layout or the
sample format, without resampling. In such a case, just leave the
timestamps as they are.
2015-07-19 09:39:42 +02:00
Anton Khirnov 6d592fbd0d avconv: split creating and (re-)configuring complex filtergraphs
The current code is less than straightforward due to the fact that
output streams can be created based on filtergraph definitions. This
change should make the code simpler and more readable. It will also be
useful in the future commits.
2015-07-19 09:38:53 +02:00
Anton Khirnov be101bc1e3 avconv: create the complex filtergraphs earlier
Since global options are processed before all the other options now, we
do not have to try creating the complex filtergraphs several times
anymore, it is enough to do it once after the input files are opened.
2015-07-19 09:38:44 +02:00
Anton Khirnov 1959351aec avconv: move the no streams failure to open_output_file()
It is a better place for it, there is no reason to wait until
transcode_init().
2015-07-19 09:38:28 +02:00
Anton Khirnov ab7b038906 avconv: factor out the output stream initialization 2015-07-19 09:38:25 +02:00
Anton Khirnov bd2ab27c48 avconv: use read_file() for reading the 2pass stats
Also, drop the now unused cmdutils_read_file(). There is no reason to
have two functions doing essentially the same thing.
2015-07-19 09:37:11 +02:00
Anton Khirnov 6d5d924604 avconv: move handling the 2pass logfile into avconv_opt
It more logically belongs there.
2015-07-19 09:34:24 +02:00
Anton Khirnov 59245e0c5e avconv: set the encoding/decoding_needed flags earlier
This will be useful in the following commits.
2015-07-19 09:34:08 +02:00
Anton Khirnov 56c2f37727 avconv: drop update_sample_fmt()
There is only one decoder left that supports this (libopus, which is not
used by default since we have a native one) and this code goes against
the avconv design, since it propagates information back from the encoder
to decoder.
2015-07-19 09:33:51 +02:00
Alexandra Hájková e61f39849c asfdec: make nb_sub to be unsigned int
number of subpayloads should be always positive

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-19 09:20:01 +02:00
Alexandra Hájková 2883ef34b5 asfdec: read the replicated data in a separate function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-19 09:18:27 +02:00