Commit Graph

4235 Commits

Author SHA1 Message Date
Clément Bœsch
3c8f7a8f6b Merge commit 'e89cef40506d990a982aefedfde7d3ca4f88c524'
* commit 'e89cef40506d990a982aefedfde7d3ca4f88c524':
  checkasm: Read the unsigned value as it should

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-20 11:55:20 +01:00
Clément Bœsch
38343651a8 Merge commit '3aa9d37d03da3c9b482d19b3988659287815280e'
* commit '3aa9d37d03da3c9b482d19b3988659287815280e':
  build: Fix directory dependencies of tests/pixfmts.mak target

This might not be necessary given our mkdirs in the configure, but it
probably doesn't hurt.

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-20 11:01:02 +01:00
Clément Bœsch
d6635daded swscale: remove unused is{RGB,BGR}inBytes 2017-03-20 08:02:30 +01:00
Clément Bœsch
ff6bc16c5a swscale: use a (more correct) function for isPacked 2017-03-20 08:02:30 +01:00
Clément Bœsch
08e1376d81 fate: add fate-sws-pixdesc-query
Test the pixel format querying within libswscale.
2017-03-20 08:02:30 +01:00
James Almer
e5623aafd8 Merge commit '87c6c78604e4dd16f1f45862b27ca006da010527'
* commit '87c6c78604e4dd16f1f45862b27ca006da010527':
  vp8: Change type of stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-19 15:11:44 -03:00
Vittorio Giovara
21a8e751ad fate: Do not report side data size
This field is of little value, and interferes with testing side data,
since sizes can be different on multiple architectures.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-17 13:12:25 -04:00
Tobias Rapp
205b8fd078 avcodec: estimate output bitrate for uncompressed video codecs
Allows to get a more realistic total bitrate (and estimated file size)
in avi_write_header. Previously a static default value of 200k was
assumed.

Adds an internal helper function for bitrate guessing.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-17 11:55:16 +01:00
Muhammad Faiz
1f7eb216b0 swresample/options: enable linear_interp and exact_rational by default
better quality without speedloss

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-17 00:08:03 +07:00
Alexis Ballier
21bed3c981 fate: Add vf_framerate test.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-16 16:16:05 +01:00
Clément Bœsch
8b13492c9e Merge commit '40ad05bab206c932a32171d45581080c914b06ec'
* commit '40ad05bab206c932a32171d45581080c914b06ec':
  checkasm: Cast unsigned to signed

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-15 12:32:15 +01:00
wm4
55eab1733b ffmpeg, ffprobe: don't "merge" side data into packet data by default
Preparation for potentially disabling merged side data by default in the
libs. Do this in particular because it affects fate tests.

The changed tests either reflect added packet side data, or the changed
packet size due to merged side data removal reducing the packet size.
2017-03-14 23:37:28 +01:00
Muhammad Faiz
6c7a0876fe swresample/swresample: do not reset tsf on swr_alloc_set_opts
so tsf option in aresample will have effect
previously tsf/internal_sample_format had no effect

fate is updated
s32p previously used fltp internally
dblp previously used fltp/dblp internally

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-13 02:45:36 +07:00
James Almer
ff17c76e92 tests/api-seek: fix memory leak on realloc() failure
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-12 14:29:11 -03:00
James Almer
bdd07d7796 test/api-seek: clean up properly on failure
Also propagate better error values.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-12 14:29:11 -03:00
James Almer
88deeb3eba tests/api-seek: make the crc array uint32_t
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-12 14:29:10 -03:00
wm4
f5da453b06 concatdec: pass AVFormatContext flags to sub demuxer 2017-03-09 16:24:00 +01:00
Muhammad Faiz
53a5cea478 swresample/resample: do not allow odd filter_length
except filter_length == 1

odd filter_length gives worse frequency response,
even when compared with shorter filter_length

also makes build_filter simpler

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-09 13:09:14 +07:00
Muhammad Faiz
fe57bf7cd6 fate/swresample: fix FUZZ typo
unintentionally changed to 0.01 at
'61926b6c3e560283ef6c015d6d85c32716942833'

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-08 21:51:02 +07:00
Thomas Turner
a50ccbd240 avutil/tests/lfg.c: added proper normality test
The Chen-Shapiro(CS) test was used to test normality for
Lagged Fibonacci PRNG.

Normality Hypothesis Test:

The null hypothesis formally tests if the population
the sample represents is normally-distributed. For
CS, when the normality hypothesis is True, the
distribution of QH will have a mean close to 1.

Information on CS can be found here:

http://www.stata-journal.com/sjpdf.html?articlenum=st0264
http://www.originlab.com/doc/Origin-Help/NormalityTest-Algorithm

Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-08 14:32:00 +01:00
Muhammad Faiz
61926b6c3e swresample/resample: use uniform normalization
this gives better frequency response

update swresample fate and other fates
that depend on resampling

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-08 16:09:38 +07:00
Vittorio Giovara
bde9642268 mkv: Export bounds and padding from spherical metadata
Update the fate test as needed.
2017-03-07 11:28:02 -05:00
Vittorio Giovara
022b4ea583 mov: Export bounds and padding from spherical metadata
Update the fate test as needed.
2017-03-07 11:25:37 -05:00
Vittorio Giovara
1b7ffddb3a spherical: Add tiled equirectangular type and projection-specific properties
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-07 11:19:37 -05:00
Anton Khirnov
af1761f7b5 ffmpeg: init filtergraphs only after we have a frame on each input
This makes sure the actual stream parameters are used, which is
important mainly for hardware decoding+filtering cases, which would
previously require various weird workarounds to handle the fact that a
fake software graph has to be constructed, but never used.
This should also improve behaviour in rare cases where
avformat_find_stream_info() does not provide accurate information.

This merges Libav commit a3a0230. It was previously skipped.

The code in flush_encoders() which sets up a "fake" format wasn't in
Libav. I'm not sure if it's a good idea, but it tends to give
behavior closer to the old one in certain corner cases.

The vp8-size-change gives different result, because now the size of
the first frame is used. libavformat reported the size of the largest
frame for some reason.

The exr tests now use the sample aspect ratio of the first frame. For
some reason libavformat determines 0/1 as aspect ratio, while the
decoder returns the correct one.

The ffm and mxf tests change the field_order values. I'm assuming
another libavformat/decoding mismatch.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-03-03 08:45:43 +01:00
Anton Khirnov
4ee5aed122 ffmpeg: do packet ts rescaling in write_packet()
This will be useful in the following commit, after which the muxer
timebase is not always available when encoding.

This merges Libav commit 3e265ca. It was previously skipped.

There are some changes with how/when the mux_timebase field is set,
because the Libav approach often causes a too imprecise time base
to be set. This is hard, because the muxer's write_header function
can readjust the timebase, at which point we might already have
encoded packets buffered. (It might be better to buffer them after
the encoder, instead of after all the timestamp handling logic
before muxing.)

The two FATE tests change because the output time base is raised
for subtitles. (Needed to avoid certain rounding issues in other
cases.)

Includes a minor merge fix by Mark Thompson, and

    avconv: Move rescale to stream timebase before monotonisation

also by Mark Thompson <sw@jkqxz.net>.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-03-03 08:45:43 +01:00
Micah Galizia
489c09ad4b add locale month names to av_small_strptime
Signed-off-by: Micah Galizia <micahgalizia@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-26 17:16:22 +01:00
Paul B Mahol
3a003cc381 fate: update ffprobe stuff after dbc7f02a72
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-26 17:05:43 +01:00
Paul B Mahol
dbc7f02a72 avfilter/aeval: trim last frame's number of samples to match requested duration
Fixes #6181.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-25 19:53:14 +01:00
Michael Niedermayer
d34bf886e9 avcodec/vp56: Implement very basic error concealment
This should fix the fate failure due to a truncated last frame.
Alternatively the frame could be dropped.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-25 13:09:50 +01:00
Michael Niedermayer
513a349439 avcodec/vp56: Fix sign typo
Fixes: 664/clusterfuzz-testcase-4917047475568640

The change to fate is due to a truncated last frames which is now detected as damaged.

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-24 22:23:53 +01:00
Michael Niedermayer
ed69cb83f8 fate/source: Check for cases that could use av_clip_uintp2() and av_clip_intp2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-21 00:40:20 +01:00
Michael Niedermayer
56803218db tests/fate/hevc: remove vsync drop from where it is not needed anymore
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-18 17:26:31 +01:00
Paul B Mahol
ee4aa388b2 adpcm: fix clipping for yamaha
According to specification max value allowed is 0x6000.
Fixes #5862.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-15 12:46:01 +01:00
Paul B Mahol
72864547f9 avfilter/vf_lut: do not always explicitly clip pixels
Old behaviour was not useful at all. New behaviour only emulate
old behaviour with default options.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-13 22:54:20 +01:00
James Almer
96ee6da401 fate: add WavPack muxer test
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-10 23:52:16 -03:00
James Almer
e8d6fef316 avformat/apetag: fix flag value to signal footer presence
According to the spec[1], a value of 0 means the footer is present and a value
of 1 means it's absent, the exact opposite of header presence flag where 1
means present and 0 absent.
The reason for this is compatibility with APEv1 tags, where there's no header,
footer presence was mandatory for all files, and the flags field was a zeroed
reserved field.

[1] http://wiki.hydrogenaud.io/index.php?title=Ape_Tags_Flags

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-10 18:33:29 -03:00
Jerry Jiang
884506dfe2 Implement optimal huffman encoding for (M)JPEG.
> seems to break
> make fate-vsynth1-mjpeg-444

Fixed.
2017-02-08 13:59:53 +00:00
Clément Bœsch
92cb9a3869 Merge commit '9064777dbb335ab4809ae09e3fdcc0245f925cdc'
* commit '9064777dbb335ab4809ae09e3fdcc0245f925cdc':
  checkasm: add HEVC test for testing IDCT DC

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:40:58 +01:00
Clément Bœsch
a0860b0a38 Merge commit '6f9e34baea4f6f484392e4e67f606a0835d07b73'
* commit '6f9e34baea4f6f484392e4e67f606a0835d07b73':
  arm: Check for support for the .fpu directive

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:22:04 +01:00
erankor
37557b28b9 mov: add fate test for decryption with edit list
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 15:09:38 +01:00
James Almer
dce863421b avformat/matroskaenc: don't reserve more bytes than needed for the Colour master size
Found-by: Aaron Colwell <acolwell@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-28 13:46:26 -03:00
Paul B Mahol
d1df72a702 fate: add SCC test
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-27 17:06:42 +01:00
Marton Balint
977fd88419 avfilter/formats: do not allow unknown layouts in ff_parse_channel_layout if nret is not set
Current code returned the number of channels as channel layout in that case,
and if nret is not set then unknown layouts are typically not supported.

Also use the common parsing code. Use a temporary workaround to parse an
unknown channel layout such as '13c', after a 1 year grace period only '13C'
will work.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-01-24 23:51:36 +01:00
Clément Bœsch
9f1c81e5ec Merge commit '71a0472114574993df7035f4de9aa007e03817b8'
* commit '71a0472114574993df7035f4de9aa007e03817b8':
  checkasm: arm: report the first clobbered register in checkasm_checked_call

Also includes 446353ea18, 59aeed93e4, and 37961044c6 to avoid breaking
too much stuff.

Merged-by: Clément Bœsch <u@pkh.me>
2017-01-24 19:21:29 +01:00
Clément Bœsch
7448019890 Merge commit '38efff92f1ef81f3de20ff0460ec7b70c253d714'
* commit '38efff92f1ef81f3de20ff0460ec7b70c253d714':
  FATE: add a test for H.264 with two fields per packet
  h264: fix decoding multiple fields per packet with slice threads

This merge includes two commits because the FATE test was useful in
order to make proper testing.

The merge gets rid of the now unused:
- SLICE_SINGLETHREAD and SLICE_SKIPED macros
- max_contexts
- "again" label in decode_nal_units()

This commit also includes the fix from d3e4d406b.

Thanks to wm4 and Michael Niedermayer for their testing.

Merged-by: Clément Bœsch <u@pkh.me>
Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-01-24 16:13:03 +01:00
Michael Niedermayer
25f4f08ba5 avcodec/h264dec: Fix regression with "make fate-h264-attachment-631 THREADS=8"
This treats the case of no slices like no frames which it basically is.

The field is added to the context as other nal related fields are also there
and passing the has_slices field per *arguments is ugly and not consistent

Found-by: ubitux
Approved-by: ubitux

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-24 12:13:59 +01:00
Daniil Cherednik
c2500d62c6 dcaenc: Implementation of Huffman codes for DCA encoder
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-01-15 18:17:12 +00:00
Martin Storsjö
388f6e6715 arm: vp9itxfm: Skip empty slices in the first pass of idct_idct 16x16 and 32x32
This work is sponsored by, and copyright, Google.

Previously all subpartitions except the eob=1 (DC) case ran with
the same runtime:

                                     Cortex A7       A8       A9      A53
vp9_inv_dct_dct_16x16_sub16_add_neon:   3188.1   2435.4   2499.0   1969.0
vp9_inv_dct_dct_32x32_sub32_add_neon:  18531.7  16582.3  14207.6  12000.3

By skipping individual 4x16 or 4x32 pixel slices in the first pass,
we reduce the runtime of these functions like this:

vp9_inv_dct_dct_16x16_sub1_add_neon:     274.6    189.5    211.7    235.8
vp9_inv_dct_dct_16x16_sub2_add_neon:    2064.0   1534.8   1719.4   1248.7
vp9_inv_dct_dct_16x16_sub4_add_neon:    2135.0   1477.2   1736.3   1249.5
vp9_inv_dct_dct_16x16_sub8_add_neon:    2446.7   1828.7   1993.6   1494.7
vp9_inv_dct_dct_16x16_sub12_add_neon:   2832.4   2118.3   2266.5   1735.1
vp9_inv_dct_dct_16x16_sub16_add_neon:   3211.7   2475.3   2523.5   1983.1
vp9_inv_dct_dct_32x32_sub1_add_neon:     756.2    456.7    862.0    553.9
vp9_inv_dct_dct_32x32_sub2_add_neon:   10682.2   8190.4   8539.2   6762.5
vp9_inv_dct_dct_32x32_sub4_add_neon:   10813.5   8014.9   8518.3   6762.8
vp9_inv_dct_dct_32x32_sub8_add_neon:   11859.6   9313.0   9347.4   7514.5
vp9_inv_dct_dct_32x32_sub12_add_neon:  12946.6  10752.4  10192.2   8280.2
vp9_inv_dct_dct_32x32_sub16_add_neon:  14074.6  11946.5  11001.4   9008.6
vp9_inv_dct_dct_32x32_sub20_add_neon:  15269.9  13662.7  11816.1   9762.6
vp9_inv_dct_dct_32x32_sub24_add_neon:  16327.9  14940.1  12626.7  10516.0
vp9_inv_dct_dct_32x32_sub28_add_neon:  17462.7  15776.1  13446.2  11264.7
vp9_inv_dct_dct_32x32_sub32_add_neon:  18575.5  17157.0  14249.3  12015.1

I.e. in general a very minor overhead for the full subpartition case due
to the additional loads and cmps, but a significant speedup for the cases
when we only need to process a small part of the actual input data.

In common VP9 content in a few inspected clips, 70-90% of the non-dc-only
16x16 and 32x32 IDCTs only have nonzero coefficients in the upper left
8x8 or 16x16 subpartitions respectively.

This is cherrypicked from libav commit
9c8bc74c2b.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-14 21:13:30 +01:00
Carl Eugen Hoyos
c723108e25 lavf/matroskaenc: Do not write two CodecID elements for rawvideo.
Fixes ticket #6068.
2017-01-14 06:06:05 +01:00