1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

20929 Commits

Author SHA1 Message Date
Luca Barbato
3db51bf671 ac3dec: Simplify skipping
skip_bits_long() can skip up to 32-bit ranges.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
f0ccc65bc9 ac3dec: Split coupling-specific code from decode_audio_block()
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
a5ebe5d121 ac3dec: Split spx-specific code from decode_audio_block()
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Anton Khirnov
a115eb9e75 mimic: do not release the newly obsolete reference at the end of decoding
The reference frames are used in update_thread_context(), so modifying
them after finish_setup() is a race. The frame in question will be
released during the next decode call.

CC: libav-stable@libav.org
2016-07-29 15:59:48 +02:00
Diego Biurrun
48b80f8393 hpeldsp: Explain why put_no_rnd_pixels_tab is larger than necessary 2016-07-25 19:38:18 +02:00
Luca Barbato
b183abfb5b vpx: Support color range
The range field has been introduced in version 1.6.0
2016-07-23 08:27:29 +02:00
Anton Khirnov
8e07c22e50 qsvenc: print warnings from encode/init 2016-07-22 19:08:13 +02:00
Anton Khirnov
0956fd4606 qsvenc: do not re-execute encoding on all positive status codes
It should only be done for DEVICE_BUSY/IN_EXECUTION
2016-07-22 19:08:13 +02:00
Anton Khirnov
95414eb2dc qsv: print more complete error messages
Include the libmfx error code and its description
2016-07-22 19:08:13 +02:00
Anton Khirnov
d9ec3c6014 qsvenc: take only the allocated dimensions from the frames context
Other parameters, like the display size, should still be taken from the
codec context.
2016-07-22 19:08:13 +02:00
Anton Khirnov
37a9015ee8 qsvenc: add support for p010 2016-07-22 19:08:13 +02:00
Anton Khirnov
21962261c7 qsv: handle the semi-packed formats in map_fourcc as well
This will allow using this function for encoding as well, where the
input format is already the semi-packed version.
2016-07-22 19:08:13 +02:00
Anton Khirnov
f65285aba0 lavc: set sw_pix_fmt for hwaccel encoding 2016-07-22 19:08:13 +02:00
Anton Khirnov
d59641abfd lavc: initialize AVCodecContext.sw_pix_fmt properly
Currently it's memset to 0, which is YUV420P. It should be initialized
to none.
2016-07-22 19:08:13 +02:00
Vittorio Giovara
a1f6a2dfda ratecontrol: Reorder functions to avoid forward declarations 2016-07-20 19:03:31 +02:00
Vittorio Giovara
d639dcdae0 ratecontrol: Move Xvid-related functions to the place they are actually used
This will simplify the de-MpegEncContextualization.
2016-07-20 18:59:36 +02:00
Vittorio Giovara
44972e227d ratecontrol: Move mpegenc-only function where it is used 2016-07-20 18:59:36 +02:00
Vittorio Giovara
b4bb959383 ratecontrol: Drop commented out cruft 2016-07-20 18:59:35 +02:00
Diego Biurrun
d06dfaa5cb x86: huffyuv: Use EXTERNAL_SSSE3_FAST convenience macro where appropriate 2016-07-20 18:43:28 +02:00
Diego Biurrun
4efab89332 x86: Use *_FAST/*_SLOW CPU feature detection macros where appropriate 2016-07-20 18:43:28 +02:00
Diego Biurrun
0a39c9ac0b x86: hpeldsp: Don't check for bitexact flag when initializing VP3-specific code
That code is only ever initialized with that flag set.
2016-07-20 18:37:45 +02:00
Diego Biurrun
95c1df929b x86: hpeldsp: Drop unused function parameters 2016-07-20 18:33:26 +02:00
Diego Biurrun
c3e83ad3b7 x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate 2016-07-20 18:33:26 +02:00
Diego Biurrun
1dfc3cf89d x86: hpeldsp: Split off VP3-specific bits into a separate file 2016-07-20 18:33:25 +02:00
Anton Khirnov
e344e65109 h264dec: do not call finish_setup() if we have not started a frame
Found-By: Jan Ruge <jan.s.ruge@gmail.com>
Bug-Id: 952
2016-07-20 16:36:10 +02:00
Anton Khirnov
76f7e70aa0 h264dec: handle zero-sized NAL units in get_last_needed_nal()
The current code will ignore the init_get_bits() failure and do an
invalid read from the uninitialized GetBitContext.

Found-By: Jan Ruge <jan.s.ruge@gmail.com>
Bug-Id: 952
2016-07-20 16:35:55 +02:00
Anton Khirnov
1f7b4f9abc h264dec: make sure not to call finish_setup() more than once per frame
It does not break anything currently, but should not be done anyway.
2016-07-20 16:35:49 +02:00
Hendrik Leppkes
1ecb63cd1c hevc: set profile based on the profile compatibility flags if needed
This fixes retrieving a valid profile for many of the FATE conformance samples,
allowing them to be properly decoded by the HWAccel after adding a profile check.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-07-20 16:33:09 +02:00
James Almer
fca3c3b619 hevc: Add AVX2 DC IDCT
Originally written by Pierre Edouard Lepere <pierre-edouard.lepere@insa-rennes.fr>.
Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Mickaël Raulet
cc16da75c2 hevc: Add coefficient limiting to speed up IDCT
Integrated to libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Mickaël Raulet
a92fd8a062 hevc: Add DC IDCT
Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Mickaël Raulet
4f247de3b7 hevcdsp_template: Templatize IDCT
Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Alexandra Hájková
1bd890ad17 hevc: Separate adding residual to prediction from IDCT
Based on patch 250430bf28
by Mickaël Raulet <mraulet@insa-rennes.fr>, integrated
to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Anton Khirnov
33f6690eb4 hevc: offer DXVA2 for 10bit 420 2016-07-15 15:35:44 +02:00
Anton Khirnov
4a9bab3db0 h264: fix decoding multiple fields per packet with slice threads
Since we only know whether a NAL unit corresponds to a new field after
parsing the slice header, this requires reorganizing the calls to slice
parsing, per-slice/field/frame init and actual decoding.

In the previous code, the function for slice header decoding also
immediately started a new field/frame as necessary, so any slices
already queued for decoding would no longer be decodable.

After this patch, we first parse the slice header, and if we determine
that a new field needs to be started we decode all the queued slices.
2016-07-15 15:33:54 +02:00
Anton Khirnov
f450cc7bc5 h264: eliminate decode_postinit()
This function's purpose is not very well defined. Currently it does two
(only marginally related) things: selecting the next output frame and
calling ff_thread_finish_setup() for frame threading. The first of those
more properly belongs under field_start(), while the second can be
called directly from decode_nal_units().
2016-07-15 15:33:28 +02:00
Martin Storsjö
7a76371437 libopenh264enc: Simplify init by setting FF_CODEC_CAP_INIT_CLEANUP
Also set FF_CODEC_CAP_INIT_THREADSAFE while adding internal capabilities.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:23 +03:00
Martin Storsjö
2d097c16b8 libopenh264enc: Return a more sensible error code in some init failure paths
Previously they returned the default AVERROR_UNKNOWN.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:22 +03:00
Martin Storsjö
36b380dcd5 libopenh264dec: Simplify the init thanks to FF_CODEC_CAP_INIT_CLEANUP being set
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:21 +03:00
Martin Storsjö
d0b1e6049b libopenh264dec: Fix cleanup if the init failed early
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:20 +03:00
Vittorio Giovara
61bd0ed781 h264: Log more information about invalid NALu size 2016-07-13 18:18:46 -04:00
Janne Grunau
17c99b6158 h2645_parse: handle embedded Annex B NAL units in size prefixed NAL units
Fixes a regression in ca2f19b9cc with some mov/mp4 files. The files have
several NAL units in the supposed single NAL unit after the size field.
Annex B start code prefixes are used to separate them. The first NAL unit
is correctly parsed but the buffer does not point to the next size field.
Instead semi random data (it seems to be the rbsp_stop_one_bit and the
start code prefix) is then parsed as length and will exceed the
remaining length of the buffer.

Patch based on the code in h264's decode_nal_units() and a similar
patch by Hendrik Leppkes in FFmpeg (a9bb4cf87d).

Bug-Id: ffmpeg/trac5529
Reported-By: Vittorio Giovara
2016-07-13 22:18:52 +02:00
Anton Khirnov
a8cbe5a0cc h264_ps: export actual height in MBs as SPS.mb_height
Currently, SPS.mb_height is actually what the spec calls
PicHeightInMapUnits, which is half the frame height when interlacing is
allowed. Calling this 'mb_height' is quite confusing, and there are at
least two associated bugs where this field is treated as the actual
frame height - in the h264 parser and in the code computing maximum
reordering buffer size for a given level.

Fix those issues (and avoid possible future ones) by exporting the real
frame height in this field.
2016-07-11 16:29:57 +02:00
Steve Lhomme
99cf943339 d3d11va: don't keep the context lock while waiting for a frame
also fixes a deadlock found by Денис Кулаков <kudesnik33ra@gmail.com>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-07-11 16:27:30 +02:00
Martin Storsjö
2866d108c9 vp8dsp: Remove the comment saying that the height is equal to the width
This comment isn't true, the height can be different from the width
for these functions (which is why the height is passed as a parameter
to them).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-10 14:52:16 +03:00
Janne Grunau
5f74bd31a9 vp8/armv6: mc: avoid boolean expression in calculation
GNU as evaluates true as '-1' while Apple's variant and llvm's internal
assembler evaluate it as '1'. The best way to avoid this madness is to
eliminate boolean expressions instead of trying to fix it with
preprocessor directives. Use a direct formula to calculate the
required temporary space on the stack in
ff_put_vp8_{epel,bilin}{4,8,16}_h[246]v[246]_armv6().

Fixes a checkasm segfault in vp8dsp.mc when using llvm's internal
assembler for a non-Apple target.
2016-07-10 13:35:41 +02:00
Martin Storsjö
d825b1a530 libopenh264: Support building with the 1.6 release
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-09 22:33:58 +03:00
Martin Storsjö
e8b96a7701 arm: Fix a typo in a comment
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-06 22:58:51 +03:00
Martin Storsjö
dc08bbf63a vp8dsp: Clarify the first dimension of the mc function tables
Index 0 is w=16, 1 is wd=8, 2 is wd=4.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-06 22:45:29 +03:00
Anton Khirnov
924e2ecd2b qsvdec: when a frames ctx is supplied, use its frame dimensions
The allocated frame size may be larger than the coded dimensions.
2016-07-03 09:13:29 +02:00