ffmpeg.git
3 years agoavprobe: Zero the allocated avio buffer memory
Vittorio Giovara [Wed, 20 Jul 2016 13:44:10 +0000 (15:44 +0200)]
avprobe: Zero the allocated avio buffer memory

Fixes valgrind warning "Conditional jump or move depends on
uninitialised value(s)." from avio_flush().

3 years agolibdc1394: Fill in packet data directly
Vittorio Giovara [Wed, 13 Jul 2016 16:56:51 +0000 (12:56 -0400)]
libdc1394: Fill in packet data directly

Drop the packet embedded in the context.

3 years agoh264dec: do not call finish_setup() if we have not started a frame
Anton Khirnov [Wed, 20 Jul 2016 07:41:35 +0000 (09:41 +0200)]
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

3 years agoh264dec: handle zero-sized NAL units in get_last_needed_nal()
Anton Khirnov [Wed, 20 Jul 2016 06:31:38 +0000 (08:31 +0200)]
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

3 years agoh264dec: make sure not to call finish_setup() more than once per frame
Anton Khirnov [Wed, 20 Jul 2016 07:59:45 +0000 (09:59 +0200)]
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.

3 years agoavconv_dxva2: add a profile check for hevc
Hendrik Leppkes [Sat, 30 Jan 2016 16:11:13 +0000 (17:11 +0100)]
avconv_dxva2: add a profile check for hevc

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agohevc: set profile based on the profile compatibility flags if needed
Hendrik Leppkes [Sat, 30 Jan 2016 16:44:34 +0000 (17:44 +0100)]
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>
3 years agohevc: Add AVX2 DC IDCT
James Almer [Wed, 29 Jun 2016 09:56:42 +0000 (11:56 +0200)]
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>
3 years agohevc: Add coefficient limiting to speed up IDCT
Mickaël Raulet [Tue, 5 Jul 2016 16:52:38 +0000 (18:52 +0200)]
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>
3 years agohevc: Add DC IDCT
Mickaël Raulet [Mon, 4 Jul 2016 13:37:52 +0000 (15:37 +0200)]
hevc: Add DC IDCT

Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
3 years agohevcdsp_template: Templatize IDCT
Mickaël Raulet [Mon, 4 Jul 2016 13:31:16 +0000 (15:31 +0200)]
hevcdsp_template: Templatize IDCT

Integrated to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
3 years agohevc: Separate adding residual to prediction from IDCT
Alexandra Hájková [Sun, 3 Jul 2016 15:38:56 +0000 (17:38 +0200)]
hevc: Separate adding residual to prediction from IDCT

Based on patch 250430bf28118cf843df887e8c8b345f1c60c82d
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>
3 years agox86util: Extend SPLATW for avx2
James Almer [Tue, 28 Jun 2016 11:22:40 +0000 (13:22 +0200)]
x86util: Extend SPLATW for avx2

Integration to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
3 years agocheckasm: arm: Ignore changes to bits 0-4 and 7 of FPSCR
Martin Storsjö [Sun, 17 Jul 2016 10:31:06 +0000 (13:31 +0300)]
checkasm: arm: Ignore changes to bits 0-4 and 7 of FPSCR

These bits are set by exceptions in NEON instructions.

Also print the differing bits when FPSCR is clobbered,
and use bic instead of lsl, for clearing the topmost bits.

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agocheackasm/arm: remove NEON instructions from checkasm_checked_call_vfp
Janne Grunau [Sun, 17 Jul 2016 08:43:10 +0000 (10:43 +0200)]
cheackasm/arm: remove NEON instructions from checkasm_checked_call_vfp

Fixes AS error on non NEON builds introduced in 71a04721145. Also
set the fpu directly to vfp in checkasm.S to cause build errors on NEON
builds.

3 years agocheckasm: arm: Don't start new const blocks for each string
Martin Storsjö [Sat, 16 Jul 2016 19:31:02 +0000 (22:31 +0300)]
checkasm: arm: Don't start new const blocks for each string

Each const block needs to be terminated by one endconst
invocation so either call endconst after each, or just
declare plain labels to the later strings.

This fixes errors such as this, on some binutils versions:

checkasm.S:38: Error: Macro `endconst' was already defined

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agoapichanges: Fill in missing hashes and dates
Diego Biurrun [Mon, 4 Jul 2016 18:50:43 +0000 (20:50 +0200)]
apichanges: Fill in missing hashes and dates

3 years agoswscale: Add proper ff_ prefix to init functions
Diego Biurrun [Wed, 13 Jul 2016 18:14:38 +0000 (20:14 +0200)]
swscale: Add proper ff_ prefix to init functions

They are internal symbols that should not be exported.

based on a patch by Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>

Signed-off-by: Diego Biurrun <diego@biurrun.de>
3 years agoswscale: Rename sws_context_class to ff_sws_context_class
Andreas Cadhalpun [Tue, 27 Oct 2015 21:56:53 +0000 (22:56 +0100)]
swscale: Rename sws_context_class to ff_sws_context_class

It is an internal swscale symbol and thus should not be exported.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
3 years agocheckasm: arm: report the first clobbered register in checkasm_checked_call
Janne Grunau [Thu, 14 Jul 2016 21:16:14 +0000 (23:16 +0200)]
checkasm: arm: report the first clobbered register in checkasm_checked_call

3 years agoavconv_dxva2: support HEVC Main10 decoding
Hendrik Leppkes [Tue, 28 Jun 2016 17:20:40 +0000 (19:20 +0200)]
avconv_dxva2: support HEVC Main10 decoding

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agohevc: offer DXVA2 for 10bit 420
Anton Khirnov [Wed, 29 Jun 2016 07:33:57 +0000 (09:33 +0200)]
hevc: offer DXVA2 for 10bit 420

3 years agoFATE: add a test for H.264 with two fields per packet
Anton Khirnov [Wed, 15 Jun 2016 09:11:32 +0000 (11:11 +0200)]
FATE: add a test for H.264 with two fields per packet

3 years agoh264: fix decoding multiple fields per packet with slice threads
Anton Khirnov [Sun, 12 Jun 2016 12:22:50 +0000 (14:22 +0200)]
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.

3 years agoh264: eliminate decode_postinit()
Anton Khirnov [Thu, 9 Jun 2016 14:32:12 +0000 (16:32 +0200)]
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().

3 years agoFATE: add a test of H.264 SEI recovery in an intra refresh stream
Anton Khirnov [Wed, 15 Jun 2016 08:39:08 +0000 (10:39 +0200)]
FATE: add a test of H.264 SEI recovery in an intra refresh stream

3 years agomp3enc: write trailing padding
Anton Khirnov [Fri, 1 Jul 2016 08:49:33 +0000 (10:49 +0200)]
mp3enc: write trailing padding

3 years agomp3dec: read the initial/trailing padding from the LAME tag
Anton Khirnov [Fri, 1 Jul 2016 08:44:41 +0000 (10:44 +0200)]
mp3dec: read the initial/trailing padding from the LAME tag

3 years agolibopenh264enc: Simplify init by setting FF_CODEC_CAP_INIT_CLEANUP
Martin Storsjö [Thu, 14 Jul 2016 19:24:55 +0000 (22:24 +0300)]
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>
3 years agolibopenh264enc: Return a more sensible error code in some init failure paths
Martin Storsjö [Thu, 14 Jul 2016 19:21:50 +0000 (22:21 +0300)]
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>
3 years agolibopenh264dec: Simplify the init thanks to FF_CODEC_CAP_INIT_CLEANUP being set
Martin Storsjö [Thu, 14 Jul 2016 19:20:25 +0000 (22:20 +0300)]
libopenh264dec: Simplify the init thanks to FF_CODEC_CAP_INIT_CLEANUP being set

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agolibopenh264dec: Fix cleanup if the init failed early
Martin Storsjö [Thu, 14 Jul 2016 19:03:16 +0000 (22:03 +0300)]
libopenh264dec: Fix cleanup if the init failed early

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agomov: fix stream extradata_size allocation
Matthieu Bouron [Fri, 15 Jul 2016 08:00:34 +0000 (10:00 +0200)]
mov: fix stream extradata_size allocation

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agolavd: Drop unneeded av_init_packet()s
Vittorio Giovara [Wed, 13 Jul 2016 15:41:35 +0000 (11:41 -0400)]
lavd: Drop unneeded av_init_packet()s

The input packet is already unref'd by the calling function.

3 years agofate: Add a mixed NAL coding sample
Vittorio Giovara [Mon, 11 Jul 2016 20:36:20 +0000 (16:36 -0400)]
fate: Add a mixed NAL coding sample

See 17c99b6158f2c6720af74e81ee727ee50d2e7e96.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 years agofate: Restore order of h264 entries
Vittorio Giovara [Mon, 11 Jul 2016 20:36:19 +0000 (16:36 -0400)]
fate: Restore order of h264 entries

3 years agoh264: Log more information about invalid NALu size
Vittorio Giovara [Tue, 5 Jul 2016 20:22:08 +0000 (16:22 -0400)]
h264: Log more information about invalid NALu size

3 years agocheckasm/arm: preserve the stack alignment checkasm_checked_call
Janne Grunau [Tue, 12 Jul 2016 20:46:43 +0000 (22:46 +0200)]
checkasm/arm: preserve the stack alignment checkasm_checked_call

The stack used by checkasm_checked_call_vfp was a multiple of 4 when the
checked function is called. AAPCS requires a double word (8 byte)
aligned stack public interfaces. Since both calls are public interfaces
the stack is misaligned when the checked is called.

Might fix the SIGBUS error in the armv7-linux-clang-3.7 fate config.

3 years agocheckasm: vp8.mc: initialize the full src buffer after ec32574209f
Janne Grunau [Tue, 12 Jul 2016 19:31:57 +0000 (21:31 +0200)]
checkasm: vp8.mc: initialize the full src buffer after ec32574209f

Fixes "Use of uninitialised value" valgrind warnings in checkasm.

3 years agoh2645_parse: handle embedded Annex B NAL units in size prefixed NAL units
Janne Grunau [Thu, 7 Jul 2016 18:33:01 +0000 (20:33 +0200)]
h2645_parse: handle embedded Annex B NAL units in size prefixed NAL units

Fixes a regression in ca2f19b9cc3 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 (a9bb4cf87d1).

Bug-Id: ffmpeg/trac5529
Reported-By: Vittorio Giovara
3 years agoh264_ps: export actual height in MBs as SPS.mb_height
Anton Khirnov [Sat, 2 Jul 2016 14:48:26 +0000 (16:48 +0200)]
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.

3 years agod3d11va: don't keep the context lock while waiting for a frame
Steve Lhomme [Wed, 15 Jun 2016 07:25:19 +0000 (09:25 +0200)]
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>
3 years agovp8dsp: Remove the comment saying that the height is equal to the width
Martin Storsjö [Sun, 10 Jul 2016 10:19:24 +0000 (13:19 +0300)]
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>
3 years agocheckasm/arm: align the clobber check data properly for ldrd
Janne Grunau [Sun, 10 Jul 2016 11:23:13 +0000 (13:23 +0200)]
checkasm/arm: align the clobber check data properly for ldrd

Should fix the SIGBUS in the armv7-linux-clang-3.7 fate target.

3 years agocheckasm: vp8: mc: test unequal width/height for partitions
Janne Grunau [Sat, 9 Jul 2016 22:32:12 +0000 (00:32 +0200)]
checkasm: vp8: mc: test unequal width/height for partitions

3 years agovp8/armv6: mc: avoid boolean expression in calculation
Janne Grunau [Sat, 9 Jul 2016 13:30:34 +0000 (15:30 +0200)]
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.

3 years agodoc: escape left brace in texi2pod.pl regex
Janne Grunau [Fri, 6 May 2016 11:32:06 +0000 (13:32 +0200)]
doc: escape left brace in texi2pod.pl regex

Unescaped literal left braces are deprecated and a warning was added in
Perl 5.22.

3 years agolibopenh264: Support building with the 1.6 release
Martin Storsjö [Fri, 8 Jul 2016 20:21:41 +0000 (23:21 +0300)]
libopenh264: Support building with the 1.6 release

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agomovenc: Add an option for skipping writing the mfra/tfra/mfro trailer
Martin Storsjö [Mon, 13 Jun 2016 20:47:15 +0000 (23:47 +0300)]
movenc: Add an option for skipping writing the mfra/tfra/mfro trailer

When writing a fragmented file, we by default write an index pointing
to all the fragments at the end of the file. This causes constantly
increasing memory usage during the muxing. For live streams, the
index might not be useful at all.

A similar fragment index is written (but at the start of the file) if
the global_sidx flag is set. If ism_lookahead is set, we need to keep
data about the last ism_lookahead+1 fragments.

If no fragment index is to be written, we don't need to store information
about all fragments, avoiding increasing the memory consumption
linearly with the muxing runtime.

This fixes out of memory situations with long live mp4 streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agocheckasm: Add tests for vp8dsp
Martin Storsjö [Mon, 13 Jun 2016 20:00:51 +0000 (23:00 +0300)]
checkasm: Add tests for vp8dsp

The tests are inspired by similar tests for vp9 by
Ronald Bultje.

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agoarm: Fix a typo in a comment
Martin Storsjö [Mon, 4 Jul 2016 11:41:45 +0000 (14:41 +0300)]
arm: Fix a typo in a comment

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agovp8dsp: Clarify the first dimension of the mc function tables
Martin Storsjö [Thu, 23 Jun 2016 11:31:14 +0000 (14:31 +0300)]
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>
3 years agoqsvdec: when a frames ctx is supplied, use its frame dimensions
Anton Khirnov [Wed, 22 Jun 2016 09:57:36 +0000 (11:57 +0200)]
qsvdec: when a frames ctx is supplied, use its frame dimensions

The allocated frame size may be larger than the coded dimensions.

3 years agoqsvdec: add support for P010 (10-bit 420) decoding
Anton Khirnov [Wed, 22 Jun 2016 09:53:00 +0000 (11:53 +0200)]
qsvdec: add support for P010 (10-bit 420) decoding

3 years agoqsvdec: use the same mfxFrameInfo for allocating frames that was passed to DECODE_Init
Anton Khirnov [Wed, 22 Jun 2016 09:44:09 +0000 (11:44 +0200)]
qsvdec: use the same mfxFrameInfo for allocating frames that was passed to DECODE_Init

Stop duplicating this information.

3 years agoqsvdec: make ff_qsv_map_pixfmt() return a MFX fourcc as well
Anton Khirnov [Wed, 22 Jun 2016 09:41:26 +0000 (11:41 +0200)]
qsvdec: make ff_qsv_map_pixfmt() return a MFX fourcc as well

Stop hardcoding NV12.

Also, move this function to the shared code, it will be used by the
encoder as well.

3 years agohwcontext_qsv: add support for p010
Anton Khirnov [Wed, 22 Jun 2016 11:00:49 +0000 (13:00 +0200)]
hwcontext_qsv: add support for p010

3 years agomatroskadec: export CodecDelay
Anton Khirnov [Sat, 2 Jul 2016 07:55:19 +0000 (09:55 +0200)]
matroskadec: export CodecDelay

3 years agovf_scale_vaapi: Respect driver quirks around buffer destruction
Mark Thompson [Sun, 26 Jun 2016 21:35:49 +0000 (22:35 +0100)]
vf_scale_vaapi: Respect driver quirks around buffer destruction

3 years agovaapi_encode: Respect driver quirks around buffer destruction
Mark Thompson [Sun, 12 Jun 2016 16:28:28 +0000 (17:28 +0100)]
vaapi_encode: Respect driver quirks around buffer destruction

No longer leaks memory when used with a driver with the "render does
not destroy param buffers" quirk (i.e. Intel i965).

3 years agohwcontext_vaapi: Add driver quirks to the hwdevice
Mark Thompson [Sun, 12 Jun 2016 16:20:25 +0000 (17:20 +0100)]
hwcontext_vaapi: Add driver quirks to the hwdevice

The driver being used is detected inside av_hwdevice_ctx_init() and
the quirks field then set from a table of known device.  If this
behaviour is unwanted, the user can also set the quirks field
manually.

Also adds the Intel i965 driver quirk (it does not destroy parameter
buffers used in a call to vaRenderPicture()) and detects that driver
to set it.

3 years agohwcontext_dxva2: add support for p010
Anton Khirnov [Wed, 22 Jun 2016 11:00:49 +0000 (13:00 +0200)]
hwcontext_dxva2: add support for p010

3 years agoswscale: add P010 input support
Hendrik Leppkes [Tue, 8 Dec 2015 10:53:54 +0000 (11:53 +0100)]
swscale: add P010 input support

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agopixfmt: add P010 pixel format
Hendrik Leppkes [Tue, 8 Dec 2015 10:17:01 +0000 (11:17 +0100)]
pixfmt: add P010 pixel format

P010 is the 10-bit variant of NV12 (planar luma, packed chroma), using two
bytes per component to store 10-bit data plus 6-bit zeroes in the LSBs.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agoavconv: use avcodec_parameters_copy() with streamcopy
Anton Khirnov [Fri, 1 Jul 2016 04:53:18 +0000 (06:53 +0200)]
avconv: use avcodec_parameters_copy() with streamcopy

This preserves all the information in the codec parameters.

The wavpack ref changes are caused by the fact that now the sample
format is set, so matroskaenc can use it to set the bit depth.

Bug-Id: 945, along with the previous commit

3 years agooggparseopus: export pre-skip
Anton Khirnov [Fri, 1 Jul 2016 04:32:49 +0000 (06:32 +0200)]
oggparseopus: export pre-skip

Bug-Id: 945, along with the following commit

3 years agomov: Save number of stsd elements after stream extradata allocation
Vittorio Giovara [Wed, 29 Jun 2016 16:03:59 +0000 (12:03 -0400)]
mov: Save number of stsd elements after stream extradata allocation

Avoid freeing an unallocated array in mov_read_close() in case
of a malloc failure.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 years agotiffenc: Check zlib support for deflate option during initialization
Vittorio Giovara [Mon, 27 Jun 2016 00:08:54 +0000 (20:08 -0400)]
tiffenc: Check zlib support for deflate option during initialization

This converts a misleading error about an option not found to a more
meaningful one.

3 years agotiffenc: Check av_pix_fmt_desc_get() return value
Vittorio Giovara [Mon, 27 Jun 2016 00:08:55 +0000 (20:08 -0400)]
tiffenc: Check av_pix_fmt_desc_get() return value

3 years agotargaenc: Move size check to initialization function
Vittorio Giovara [Mon, 27 Jun 2016 00:08:53 +0000 (20:08 -0400)]
targaenc: Move size check to initialization function

In case of bogus input, fail early at codec initialization, rather than
at the encode function.

3 years agorle: K&R formatting cosmetics
Vittorio Giovara [Mon, 27 Jun 2016 00:08:56 +0000 (20:08 -0400)]
rle: K&R formatting cosmetics

3 years agobuild: Drop unnecessary libavcodec <-> libavformat object dependencies
Diego Biurrun [Mon, 27 Jun 2016 14:21:47 +0000 (16:21 +0200)]
build: Drop unnecessary libavcodec <-> libavformat object dependencies

3 years agobuild: Move MP2 muxer declaration away from MP3 muxer code
Diego Biurrun [Tue, 28 Jun 2016 11:53:29 +0000 (13:53 +0200)]
build: Move MP2 muxer declaration away from MP3 muxer code

The MP2 muxer uses none of the code of the MP3 muxer.

3 years agocheckasm: hevc: Iterate over features first, then over bitdepths
Martin Storsjö [Tue, 28 Jun 2016 20:58:04 +0000 (23:58 +0300)]
checkasm: hevc: Iterate over features first, then over bitdepths

This avoids listing the same feature multiple times in the
test output. Previously the output contained something like this:

SSE2:
 - hevc_mc.qpel              [OK]
 - hevc_mc.epel              [OK]
 - hevc_mc.unweighted_pred   [OK]
 - hevc_mc.qpel              [OK]
 - hevc_mc.epel              [OK]
 - hevc_mc.unweighted_pred   [OK]

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agobuild: Move ff_mpeg12_frame_rate_tab to a separate file
Diego Biurrun [Mon, 27 Jun 2016 14:09:00 +0000 (16:09 +0200)]
build: Move ff_mpeg12_frame_rate_tab to a separate file

It is also used by the Dirac parsing code.

3 years agobuild: Add a new component for H.264 parsing code
Diego Biurrun [Tue, 28 Jun 2016 08:24:05 +0000 (10:24 +0200)]
build: Add a new component for H.264 parsing code

This fixes standalone compilation of the SVQ3 decoder, which had
incomplete dependencies related to H.264 parsing.

3 years agoffv1: Report additional bitstream information in verbose mode
Luca Barbato [Fri, 24 Jun 2016 15:38:33 +0000 (17:38 +0200)]
ffv1: Report additional bitstream information in verbose mode

Useful to inspect samples.

3 years agoffv1: Remove version 2 and mark version 3 as non-experimental
Luca Barbato [Sat, 25 Jun 2016 12:37:59 +0000 (14:37 +0200)]
ffv1: Remove version 2 and mark version 3 as non-experimental

The encoder produces bitstream compatible with the current specification
and version 2 is set as reserved (non-standardizable).

3 years agofate: Add test for webp
Diego Biurrun [Thu, 23 Jun 2016 15:05:42 +0000 (17:05 +0200)]
fate: Add test for webp

3 years agocheckasm: h264dsp: Move the x and y variables into the randomize_buffer macro
Martin Storsjö [Mon, 27 Jun 2016 19:24:15 +0000 (22:24 +0300)]
checkasm: h264dsp: Move the x and y variables into the randomize_buffer macro

This avoids the risk of accidentally clobbering such variables outside
of the macro if the same variables are used there.

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agocheckasm: h264dsp: Initialize the padding area
Martin Storsjö [Mon, 27 Jun 2016 19:22:21 +0000 (22:22 +0300)]
checkasm: h264dsp: Initialize the padding area

This fixes valgrind warnings about conditional jumps based on
uninitialized data (even though the uninitialized data only ever
was compared with a direct copy of the same uninitialized data).

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agoAdd an OpenH264 decoder wrapper
Martin Storsjö [Thu, 23 Jun 2016 21:58:17 +0000 (00:58 +0300)]
Add an OpenH264 decoder wrapper

While it is less featureful (and slower) than the built-in H264
decoder, one could potentially want to use it to take advantage
of the cisco patent license offer.

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agomovenc: Apply offsets on timestamps when peeking into interleaving queues
Martin Storsjö [Fri, 24 Jun 2016 20:38:54 +0000 (23:38 +0300)]
movenc: Apply offsets on timestamps when peeking into interleaving queues

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agoqsvdec_hevc: add the UID of the HEVC HW decoder plugin
Anton Khirnov [Wed, 22 Jun 2016 10:03:22 +0000 (12:03 +0200)]
qsvdec_hevc: add the UID of the HEVC HW decoder plugin

3 years agoqsvdec_hevc: fix a variable name
Anton Khirnov [Wed, 22 Jun 2016 10:00:48 +0000 (12:00 +0200)]
qsvdec_hevc: fix a variable name

hevcenc -> hevcdec, this is a _decoder_ plugin.

3 years agohwcontext_vaapi: allow transfers to/from any size of sw frame
Mark Thompson [Fri, 15 Apr 2016 09:58:51 +0000 (10:58 +0100)]
hwcontext_vaapi: allow transfers to/from any size of sw frame

The hw frame used as reference has an attached size but it need not
match the actual size of the surface, so enforcing that the sw frame
used in copying matches its size exactly is not useful.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agovf_hwdownload: allocate the destination frame for the pool size
Anton Khirnov [Fri, 15 Apr 2016 08:44:02 +0000 (10:44 +0200)]
vf_hwdownload: allocate the destination frame for the pool size

The reasoning is the same as for the previous commit.

3 years agohwcontext: allocate the destination frame for the pool size
Anton Khirnov [Fri, 15 Apr 2016 08:44:02 +0000 (10:44 +0200)]
hwcontext: allocate the destination frame for the pool size

The source frame may be cropped, so that its dimensions are smaller than
the pool dimensions. The transfer_data API requires the allocated size
of the destination frame to be the same as the pool size.

3 years agohwcontext: clarify the behaviour of transfer_data() for cropped frames
Anton Khirnov [Sat, 25 Jun 2016 12:48:47 +0000 (14:48 +0200)]
hwcontext: clarify the behaviour of transfer_data() for cropped frames

3 years agoavconv: restructure sending EOF to filters
Anton Khirnov [Mon, 27 Jun 2016 17:03:42 +0000 (19:03 +0200)]
avconv: restructure sending EOF to filters

Be more careful when an input stream encounters EOF when its filtergraph
has not been configured yet. The current code would immediately mark the
corresponding output streams as finished, while there may still be
buffered frames waiting for frames to appear on other filtergraph
inputs.

This should fix the random FATE failures for complex filtergraph tests
after a3a0230a9870b9018dc7415ae5872784d524cfe5

3 years agoavconv: move flushing the queued frames to configure_filtergraph()
Anton Khirnov [Mon, 27 Jun 2016 16:59:23 +0000 (18:59 +0200)]
avconv: move flushing the queued frames to configure_filtergraph()

This is a more appropriate place for it, and will also be useful in the
following commit.

3 years agooptions_table: Add aliases for color properties
Vittorio Giovara [Tue, 21 Jun 2016 14:22:59 +0000 (10:22 -0400)]
options_table: Add aliases for color properties

All option names now match the ones provided by the av_color_*_name().

3 years agopixdesc: Fix AVCOL_TRC_BT2020_12 name
Vittorio Giovara [Tue, 21 Jun 2016 14:22:58 +0000 (10:22 -0400)]
pixdesc: Fix AVCOL_TRC_BT2020_12 name

3 years agopixdesc: Add aliases to SMPTE color properties
Vittorio Giovara [Tue, 21 Jun 2016 14:22:57 +0000 (10:22 -0400)]
pixdesc: Add aliases to SMPTE color properties

Drop ST from names and symbols, it does not add anything distinctive or
descriptive.

3 years agovaapi_encode: Maintain a pool of bitstream output buffers
Mark Thompson [Sun, 5 Jun 2016 16:18:04 +0000 (17:18 +0100)]
vaapi_encode: Maintain a pool of bitstream output buffers

Previously we would allocate a new one for every frame.  This instead
maintains an AVBufferPool of them to use as-needed.

Also makes the maximum size of an output buffer adapt to the frame
size - the fixed upper bound was a bit too easy to hit when encoding
large pictures at high quality.

3 years agoavconv: Remove hw_device_ctx output filter reinit hack
Mark Thompson [Thu, 23 Jun 2016 00:40:04 +0000 (01:40 +0100)]
avconv: Remove hw_device_ctx output filter reinit hack

Not needed any more because we no longer have any useful case which
will reinitialise with hardware frames here.

3 years agolibavcodec: fix constness in clobber test avcodec_open2() wrappers
Clément Bœsch [Sat, 25 Jun 2016 11:41:13 +0000 (13:41 +0200)]
libavcodec: fix constness in clobber test avcodec_open2() wrappers

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agoavconv_qsv: use the device creation API
Anton Khirnov [Sun, 22 May 2016 07:40:46 +0000 (09:40 +0200)]
avconv_qsv: use the device creation API

3 years agoavconv: pass the hwaccel frames context to the decoder
Anton Khirnov [Fri, 27 May 2016 10:54:48 +0000 (12:54 +0200)]
avconv: pass the hwaccel frames context to the decoder

3 years agoavconv: init filtergraphs only after we have a frame on each input
Anton Khirnov [Fri, 27 May 2016 10:14:33 +0000 (12:14 +0200)]
avconv: 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.