Commit Graph

83880 Commits

Author SHA1 Message Date
Paul B Mahol fbc1f323db avcodec/xpmdec: rename yet another function
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol 9d7e71a233 avcodec/xpmdec: rename convert to hex_char_to_number
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol 7133ab435a avcodec/xpmdec: improve comment for one function and also fix 2 identation issues
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +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
Jun Zhao bf238a6a3c vf_hwupload: Add missing return value check
Add missing return value checks to suppress build warning and
remove noop ff_formats_unref() calling.

Note: most filters using ff_formats_ref() didn't have a suitable
error handling, it's a potential memory leak issue.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 18:12:30 +00: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
Paul B Mahol e73325b971 avcodec/xpmdec: skip everything before signature
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 18:24:49 +01:00
Paul B Mahol 01b069c1b8 avcodec/codec_desc: add mime type for X-BitMap
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 18:24:49 +01:00
Paul B Mahol 404d2b977f avcodec/codec_desc: add mime type for X-PixMap
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 18:24:49 +01:00
Paul B Mahol eda78c8b7f avcodec/xpmdec: make convert function more picky about its input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 18:24:49 +01:00
Paras Chadha 5dab7b91ad avcodec: add XPM decoder and demuxer
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
2017-03-12 18:24:49 +01:00
Mark Thompson b9acc7fbd9 Merge commit 'ad71d3276fef0ee7e791e62bbfe9c4e540047417'
* commit 'ad71d3276fef0ee7e791e62bbfe9c4e540047417':
  lavfi: add a QSV deinterlacing filter

Minor fixup for lavfi differences.

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 17:00:42 +00:00
Mark Thompson a7434ef195 Merge commit '8e07c22e508b349d145b9f142aa3ee8b3ce1d3a4'
* commit '8e07c22e508b349d145b9f142aa3ee8b3ce1d3a4':
  qsvenc: print warnings from encode/init

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 15:21:41 +00:00
Mark Thompson 80fa5a0bcc Merge commit '0956fd460681e8ccbdae19f135f0d3970bf95c2f'
* commit '0956fd460681e8ccbdae19f135f0d3970bf95c2f':
  qsvenc: do not re-execute encoding on all positive status codes

Noop, see fb240a6276.

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 15:19:52 +00:00
Mark Thompson 15887a410c Merge commit '95414eb2dc63a6f934275b4ed33dedd4369f2c49'
* commit '95414eb2dc63a6f934275b4ed33dedd4369f2c49':
  qsv: print more complete error messages

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 15:19:05 +00:00
Mark Thompson 723a542d6c Merge commit 'd9ec3c60143babe1bb77c268e1d5547d15acd69b'
* commit 'd9ec3c60143babe1bb77c268e1d5547d15acd69b':
  qsvenc: take only the allocated dimensions from the frames context

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 15:06:07 +00:00
Mark Thompson 562f386c77 Merge commit '37a9015ee84c15fec5247ba8f6577351a25fa8d2'
* commit '37a9015ee84c15fec5247ba8f6577351a25fa8d2':
  qsvenc: add support for p010

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 15:04:45 +00:00
Anton Khirnov 807a3b30d2 lavfi: add a QSV scaling filter
This merges libav commit ac7bfd6967,
which was previously skipped.

(cherry picked from commit ac7bfd6967)
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 15:02:33 +00:00
Mark Thompson 210dd7bbb2 Merge commit '21962261c74aed4df00ae8348a5e2d1ecb67c52d'
* commit '21962261c74aed4df00ae8348a5e2d1ecb67c52d':
  qsv: handle the semi-packed formats in map_fourcc as well

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-03-12 14:21:37 +00:00
Clément Bœsch 5e193daaa2 Merge commit 'f65285aba0df7d46298abe0c945dfee05cbc6028'
* commit 'f65285aba0df7d46298abe0c945dfee05cbc6028':
  lavc: set sw_pix_fmt for hwaccel encoding

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-12 13:21:01 +01:00
Clément Bœsch 8d2d817098 Merge commit 'd59641abfd25a1007bdf4723d952887b1e3619c6'
* commit 'd59641abfd25a1007bdf4723d952887b1e3619c6':
  lavc: initialize AVCodecContext.sw_pix_fmt properly

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-12 13:20:57 +01:00
Clément Bœsch 15f6e5f2a9 Merge commit '8b7a9729aa162e2bbd571933f1aa40767f1ff47b'
* commit '8b7a9729aa162e2bbd571933f1aa40767f1ff47b':
  avconv_qsv: use the actual pixel format provided by lavc

This commit is a noop, see 03cef34aa6

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-12 13:13:55 +01:00
Clément Bœsch e514309a91 Merge commit '6f40181cad8ac04adff7bd10e1e1ab65f22bc1f0'
* commit '6f40181cad8ac04adff7bd10e1e1ab65f22bc1f0':
  avconv_qsv: align the surface size to 32

This commit is a noop, see 03cef34aa6

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-12 13:13:05 +01:00
Clément Bœsch 993a9a3d72 Merge commit 'b0f36a0043d76436cc7ab8ff92ab99c94595d3c0'
* commit 'b0f36a0043d76436cc7ab8ff92ab99c94595d3c0':
  avconv: stop using setpts for input framerate forced with -r

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-12 13:08:04 +01:00
Paul B Mahol 807d5dcde9 avcodec/scpr: use correct linesize for prev frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 12:34:55 +01:00
Michael Niedermayer ce010655a6 avcodec/dca_xll: Fix runtime error: signed integer overflow: 2147286116 + 6298923 cannot be represented in type 'int'
Fixes: 732/clusterfuzz-testcase-4872990070145024

See: [FFmpeg-devel] [PATCH 2/6] avcodec/dca_xll: Fix runtime error: signed integer overflow: 2147286116 + 6298923 cannot be represented in type 'int'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-12 04:38:14 +01:00
Michael Niedermayer 44e2105189 avcodec/amrwbdec: Fix runtime error: left shift of negative value -1
Fixes: 763/clusterfuzz-testcase-6007567320875008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-12 04:38:14 +01:00
Michael Niedermayer f4c2302ee2 avcodec/dca_xll: Fix runtime error: signed integer overflow: 1762028192 + 698372290 cannot be represented in type 'int'
Fixes: 762/clusterfuzz-testcase-5927683747741696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-12 04:38:14 +01:00
Michael Niedermayer 47cc9c1d77 avcodec/wavpack: Fix runtime error: signed integer overflow: -2147483648 + -83886075 cannot be represented in type 'int'
Fixes: 761/clusterfuzz-testcase-5442222252097536

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-12 04:38:14 +01:00
Muhammad Faiz 0bab78f7e7 avfilter/af_firequalizer: add av_restrict on convolution func
slightly improved speed

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-12 03:21:55 +07:00
Przemysław Sobala 89c0fda5f4 lavf/dashenc: update bitrates on dash_write_trailer
Provides a way to change bandwidth parameter inside DASH manifest after a non-CBR H.264 encoding.
Caller now is able to compute the bitrate by itself, after all packets have been written, and then set that value in AVFormatContext->streams->codecpar->bit_rate before calling av_write_trailer. As a result that value will be set in DASH manifest.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-11 16:43:43 +01:00
Steven Liu 70a9407b50 doc/muxers: move hls_flags temp_file to after SECOND LEVEL hls example
the temp_file hls_flags describe text offset is wrong, now move it after example

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-03-11 21:11:38 +08:00
Martin Storsjö 26ee83acc4 aarch64: vp9itxfm: Reorder iadst16 coeffs
This matches the order they are in the 16 bpp version.

There they are in this order, to make sure we access them in the
same order they are declared, easing loading only half of the
coefficients at a time.

This makes the 8 bpp version match the 16 bpp version better.

This is cherrypicked from libav commit
b8f66c0838.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:52 +02:00
Martin Storsjö b2e20d8984 arm: vp9itxfm: Reorder iadst16 coeffs
This matches the order they are in the 16 bpp version.

There they are in this order, to make sure we access them in the
same order they are declared, easing loading only half of the
coefficients at a time.

This makes the 8 bpp version match the 16 bpp version better.

This is cherrypicked from libav commit
08074c092d.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:52 +02:00
Martin Storsjö f952273019 aarch64: vp9itxfm: Reorder the idct coefficients for better pairing
All elements are used pairwise, except for the first one.
Previously, the 16th element was unused. Move the unused element
to the second slot, to make the later element pairs not split
across registers.

This simplifies loading only parts of the coefficients,
reducing the difference to the 16 bpp version.

This is cherrypicked from libav commit
09eb88a12e.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:52 +02:00
Martin Storsjö 4f693b56bd arm: vp9itxfm: Reorder the idct coefficients for better pairing
All elements are used pairwise, except for the first one.
Previously, the 16th element was unused. Move the unused element
to the second slot, to make the later element pairs not split
across registers.

This simplifies loading only parts of the coefficients,
reducing the difference to the 16 bpp version.

This is cherrypicked from libav commit
de06bdfe6c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:51 +02:00
Martin Storsjö 2905657b90 aarch64: vp9itxfm: Avoid reloading the idct32 coefficients
The idct32x32 function actually pushed d8-d15 onto the stack even
though it didn't clobber them; there are plenty of registers that
can be used to allow keeping all the idct coefficients in registers
without having to reload different subsets of them at different
stages in the transform.

After this, we still can skip pushing d12-d15.

Before:
vp9_inv_dct_dct_32x32_sub32_add_neon: 8128.3
After:
vp9_inv_dct_dct_32x32_sub32_add_neon: 8053.3

This is cherrypicked from libav commit
65aa002d54.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:51 +02:00
Martin Storsjö 600f4c9b03 arm: vp9itxfm: Avoid reloading the idct32 coefficients
The idct32x32 function actually pushed q4-q7 onto the stack even
though it didn't clobber them; there are plenty of registers that
can be used to allow keeping all the idct coefficients in registers
without having to reload different subsets of them at different
stages in the transform.

Since the idct16 core transform avoids clobbering q4-q7 (but clobbers
q2-q3 instead, to avoid needing to back up and restore q4-q7 at all
in the idct16 function), and the lanewise vmul needs a register in
the q0-q3 range, we move the stored coefficients from q2-q3 into q4-q5
while doing idct16.

While keeping these coefficients in registers, we still can skip pushing
q7.

Before:                              Cortex A7       A8       A9      A53
vp9_inv_dct_dct_32x32_sub32_add_neon:  18553.8  17182.7  14303.3  12089.7
After:
vp9_inv_dct_dct_32x32_sub32_add_neon:  18470.3  16717.7  14173.6  11860.8

This is cherrypicked from libav commit
402546a172.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:51 +02:00
Martin Storsjö a88db8b9a0 arm: vp9lpf: Implement the mix2_44 function with one single filter pass
For this case, with 8 inputs but only changing 4 of them, we can fit
all 16 input pixels into a q register, and still have enough temporary
registers for doing the loop filter.

The wd=8 filters would require too many temporary registers for
processing all 16 pixels at once though.

Before:                          Cortex A7      A8     A9     A53
vp9_loop_filter_mix2_v_44_16_neon:   289.7   256.2  237.5   181.2
After:
vp9_loop_filter_mix2_v_44_16_neon:   221.2   150.5  177.7   138.0

This is cherrypicked from libav commit
575e31e931.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:51 +02:00
Martin Storsjö f32690a298 aarch64: vp9lpf: Use dup+rev16+uzp1 instead of dup+lsr+dup+trn1
This is one cycle faster in total, and three instructions fewer.

Before:
vp9_loop_filter_mix2_v_44_16_neon: 123.2
After:
vp9_loop_filter_mix2_v_44_16_neon: 122.2

This is cherrypicked from libav commit
3bf9c48320.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:50 +02:00
Martin Storsjö 3fbbad2984 arm/aarch64: vp9lpf: Keep the comparison to E within 8 bit
The theoretical maximum value of E is 193, so we can just
saturate the addition to 255.

Before:                     Cortex A7      A8      A9     A53  A53/AArch64
vp9_loop_filter_v_4_8_neon:     143.0   127.7   114.8    88.0         87.7
vp9_loop_filter_v_8_8_neon:     241.0   197.2   173.7   140.0        136.7
vp9_loop_filter_v_16_8_neon:    497.0   419.5   379.7   293.0        275.7
vp9_loop_filter_v_16_16_neon:   965.2   818.7   731.4   579.0        452.0
After:
vp9_loop_filter_v_4_8_neon:     136.0   125.7   112.6    84.0         83.0
vp9_loop_filter_v_8_8_neon:     234.0   195.5   171.5   136.0        133.7
vp9_loop_filter_v_16_8_neon:    490.0   417.5   377.7   289.0        271.0
vp9_loop_filter_v_16_16_neon:   951.2   814.7   732.3   571.0        446.7

This is cherrypicked from libav commit
c582cb8537.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:50 +02:00
Martin Storsjö dda45c087b aarch64: Add parentheses around the offset parameter in movrel
This fixes building with clang for linux with PIC enabled.

This is cherrypicked from libav commit
8847eeaa14.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:50 +02:00
Martin Storsjö c8d6eec85d aarch64: vp9lpf: Fix broken indentation/vertical alignment
This is cherrypicked from libav commit
07b5136c48.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:49 +02:00
Martin Storsjö 9f3a886364 aarch64: vp9lpf: Interleave the start of flat8in into the calculation above
This adds lots of extra .ifs, but speeds it up by a couple cycles,
by avoiding stalls.

This is cherrypicked from libav commit
b0806088d3.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:49 +02:00
Martin Storsjö 83399cf569 arm: vp9lpf: Interleave the start of flat8in into the calculation above
This adds lots of extra .ifs, but speeds it up by a couple cycles,
by avoiding stalls.

This is cherrypicked from libav commit
e18c39005a.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:49 +02:00
Martin Storsjö 92ab8374b1 arm: vp9lpf: Use orrs instead of orr+cmp
This is cherrypicked from libav commit
435cd7bc99.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:49 +02:00
Martin Storsjö f0ecbb13cf arm/aarch64: vp9lpf: Calculate !hev directly
Previously we first calculated hev, and then negated it.

Since we were able to schedule the negation in the middle
of another calculation, we don't see any gain in all cases.

Before:                     Cortex A7      A8      A9     A53  A53/AArch64
vp9_loop_filter_v_4_8_neon:     147.0   129.0   115.8    89.0         88.7
vp9_loop_filter_v_8_8_neon:     242.0   198.5   174.7   140.0        136.7
vp9_loop_filter_v_16_8_neon:    500.0   419.5   382.7   293.0        275.7
vp9_loop_filter_v_16_16_neon:   971.2   825.5   731.5   579.0        453.0
After:
vp9_loop_filter_v_4_8_neon:     143.0   127.7   114.8    88.0         87.7
vp9_loop_filter_v_8_8_neon:     241.0   197.2   173.7   140.0        136.7
vp9_loop_filter_v_16_8_neon:    497.0   419.5   379.7   293.0        275.7
vp9_loop_filter_v_16_16_neon:   965.2   818.7   731.4   579.0        452.0

This is cherrypicked from libav commit
e1f9de86f4.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:48 +02:00
Martin Storsjö 148cc0bb89 aarch64: vp9itxfm: Optimize 16x16 and 32x32 idct dc by unrolling
This work is sponsored by, and copyright, Google.

Before:                           Cortex A53
vp9_inv_dct_dct_16x16_sub1_add_neon:   235.3
vp9_inv_dct_dct_32x32_sub1_add_neon:   555.1
After:
vp9_inv_dct_dct_16x16_sub1_add_neon:   180.2
vp9_inv_dct_dct_32x32_sub1_add_neon:   475.3

This is cherrypicked from libav commit
3fcf788fbb.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 13:14:48 +02:00