5 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.

5 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

5 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

Fixes a checkasm segfault in vp8dsp.mc when using llvm's internal
assembler for a non-Apple target.

5 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.

5 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>
5 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>
5 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>
5 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>
5 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>
5 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.

5 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

5 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.

5 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.

5 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

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

5 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

5 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).

5 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

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.

5 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

5 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>
5 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>
5 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

5 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

5 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>
5 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.

5 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

5 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.

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

5 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

5 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.

5 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:

 - 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>
5 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.

5 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.

5 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.

5 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).

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

5 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>
5 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>
5 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>
5 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>
5 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

5 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.

5 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>
5 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.

5 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.

5 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

5 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

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

5 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.

5 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().

5 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

5 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

6 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.

6 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.

6 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>
6 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

6 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

6 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.

6 years agoavconv: do packet ts rescaling in write_packet()
Anton Khirnov [Fri, 27 May 2016 10:04:29 +0000 (12:04 +0200)]
avconv: 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.

6 years agoavconv: decouple configuring filtergraphs and setting output parameters
Anton Khirnov [Mon, 23 May 2016 12:09:08 +0000 (14:09 +0200)]
avconv: decouple configuring filtergraphs and setting output parameters

Currently, a filtergraph will pull in the output constraints from its
corresponding decoder context, which breaks proper layering. Instead,
explicitly send the constaints on the output parameters to the

This is similar to what is done for filtergraph inputs in

6 years agoavconv: factor out initializing stream parameters for encoding
Anton Khirnov [Mon, 23 May 2016 07:37:10 +0000 (09:37 +0200)]
avconv: factor out initializing stream parameters for encoding

Setting the filter input parameters is moved to init_input_stream(),
so that it is done before the decoder is opened, potentially overwriting
the information from avformat_find_stream_info() with less accurate

This commit temporarily disables QSV transcoding with hw frames. The
functionality will be re-added in the following commits.

6 years agoavconv: decouple configuring filtergraphs and setting input parameters
Anton Khirnov [Mon, 23 May 2016 12:09:08 +0000 (14:09 +0200)]
avconv: decouple configuring filtergraphs and setting input parameters

Currently, calling configure_filtergraph() will pull in the input
parameters from the corresponding decoder context. This has the
following disadvantages:
- the decoded frame is a more proper source for this information
- a filter accessing decoder data breaks proper layering

Add functions for explicitly sending the input stream parameters to a
filtergraph input - currently from a frame and a decoder. The decoder
one will be dropped in future commits after some more restructuring.

6 years agoavconv: buffer the packets written while the muxer is not initialized
Anton Khirnov [Mon, 23 May 2016 08:48:26 +0000 (10:48 +0200)]
avconv: buffer the packets written while the muxer is not initialized

6 years agoavconv: explicitly postpone writing the header until all streams are initialized
Anton Khirnov [Mon, 23 May 2016 07:19:25 +0000 (09:19 +0200)]
avconv: explicitly postpone writing the header until all streams are initialized

This should have no practical effect for now, but will make a difference
in the following commits.

6 years agolavfi: set the link hwframes context before configuring the dst input
Anton Khirnov [Tue, 21 Jun 2016 17:39:51 +0000 (19:39 +0200)]
lavfi: set the link hwframes context before configuring the dst input

The destination filter might expect the hw frames context to be already
set (this is the case e.g. for hwdownload).

6 years agoomx: Don't return > 0 from omx_encode_frame
Martin Storsjö [Thu, 23 Jun 2016 22:13:16 +0000 (01:13 +0300)]
omx: Don't return > 0 from omx_encode_frame

The encode function is supposed to just return 0 on success.
This stems from a mixup with the return value of decode functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agolibopenh264enc: Fix inconsistent whitespace
Martin Storsjö [Thu, 23 Jun 2016 22:06:12 +0000 (01:06 +0300)]
libopenh264enc: Fix inconsistent whitespace

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agomsmpeg4: Remove commented-out debug logging code
Diego Biurrun [Thu, 23 Jun 2016 12:43:45 +0000 (14:43 +0200)]
msmpeg4: Remove commented-out debug logging code

6 years agomsmpeg4: Remove some broken, commented-out cruft
Diego Biurrun [Thu, 23 Jun 2016 12:36:37 +0000 (14:36 +0200)]
msmpeg4: Remove some broken, commented-out cruft

6 years agoh264: Eliminate unused but set variable
Diego Biurrun [Tue, 21 Jun 2016 11:24:41 +0000 (13:24 +0200)]
h264: Eliminate unused but set variable

libavcodec/h264_slice.c:1384:9: warning: variable 'droppable' set but not used

6 years agolibrtmp: Avoid an infiniloop setting connection arguments
Luca Barbato [Wed, 22 Jun 2016 04:36:31 +0000 (06:36 +0200)]
librtmp: Avoid an infiniloop setting connection arguments

The exit condition was missing.

CC: libav-stable@libav.org
6 years agohwcontext_vaapi: Return all formats for constraints without config
Mark Thompson [Sat, 18 Jun 2016 13:10:13 +0000 (14:10 +0100)]
hwcontext_vaapi: Return all formats for constraints without config

No longer make a dummy device configuration to query.  Instead, just
return everything we recognise from the whole format list.  Also
change the device setup code to query that list only, rather than
intersecting it with the constraint output.

This makes hwupload more usable on mesa/gallium where the video
processor only declares support for RGB formats, making it unable to
deal with YUV formats before this patch.  It might introduce some
different trickier failures in the internal upload/download code
because the set of allowed formats there has changed, though I didn't
find any obvious regressions with i965.

6 years agovaapi_encode: Fix fallback when input does not match any format
Mark Thompson [Sat, 18 Jun 2016 12:05:23 +0000 (13:05 +0100)]
vaapi_encode: Fix fallback when input does not match any format

Just a typo.  Add a comment to make it clearer what it's doing.

6 years agodxva2_h264: Remove an unused variable
Martin Storsjö [Tue, 21 Jun 2016 11:13:40 +0000 (14:13 +0300)]
dxva2_h264: Remove an unused variable

This was introduced by mistake in 39cdbb12aa214 (only one of the
added variables were really needed).

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agocheckasm: Issue emms after benchmarking functions
Martin Storsjö [Tue, 21 Jun 2016 11:00:01 +0000 (14:00 +0300)]
checkasm: Issue emms after benchmarking functions

The functions may not clean up properly after using MMX
registers. For the normal testing calls, the checkasm_checked_call
functions will do the cleanup (and check that functions that
should clean up do it as well), but when benchmarking functions
that don't clean up, we don't currently properly clean up at all.

This causes issues if a benchmarked function is followed by testing
of a function that is supposed to not clobber the MMX/FPU state but
doesn't touch it at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoUse AVFrame.pts instead of deprecated pkt_pts.
Anton Khirnov [Sun, 20 Mar 2016 06:51:11 +0000 (07:51 +0100)]
Use AVFrame.pts instead of deprecated pkt_pts.

6 years agolavc: export the timestamps when decoding in AVFrame.pts
Anton Khirnov [Sat, 19 Mar 2016 20:45:24 +0000 (21:45 +0100)]
lavc: export the timestamps when decoding in AVFrame.pts

Currently it's exported as AVFrame.pkt_pts, which is also the only use
for that field. The reason it is done like this is that lavc used to
export various codec-specific "timing" information in AVFrame.pts, which
is not done anymore.

Since it is confusing to the callers to have a separate field which is
used only for decoder timestamps and nothing else, deprecate pkt_pts and
use just AVFrame.pts everywhere.

6 years agolavfi: add a QSV scaling filter
Anton Khirnov [Sat, 26 Mar 2016 11:39:58 +0000 (12:39 +0100)]
lavfi: add a QSV scaling filter

6 years agoqsvenc: support getting the session from an AVHWFramesContext
Anton Khirnov [Sun, 12 Jun 2016 18:45:02 +0000 (20:45 +0200)]
qsvenc: support getting the session from an AVHWFramesContext

6 years agoqsvdec: support getting the session from an AVHWFramesContext
Anton Khirnov [Fri, 27 May 2016 11:23:19 +0000 (13:23 +0200)]
qsvdec: support getting the session from an AVHWFramesContext

6 years agohwcontext: add a QSV implementation
Anton Khirnov [Wed, 13 Jan 2016 13:25:58 +0000 (14:25 +0100)]
hwcontext: add a QSV implementation

6 years agoqsvdec: move reading the user-provided session to qsv_decode_init()
Anton Khirnov [Sat, 21 May 2016 16:26:40 +0000 (18:26 +0200)]
qsvdec: move reading the user-provided session to qsv_decode_init()

This is a more appropriate place for it.

6 years agolavc: allow using AVCodecContext.hw_frames_ctx for decoding
Anton Khirnov [Mon, 9 May 2016 19:40:08 +0000 (21:40 +0200)]
lavc: allow using AVCodecContext.hw_frames_ctx for decoding

For now it will only be used by the default get_buffer2 callback for
allocating hw frames.

6 years agotruemotion2rt: Use ff_set_dimensions
Vittorio Giovara [Tue, 21 Jun 2016 13:11:32 +0000 (09:11 -0400)]
truemotion2rt: Use ff_set_dimensions

6 years agopixdesc: Add new SMPTE 431, 432, and 2085 color properties
Vittorio Giovara [Wed, 15 Jun 2016 18:25:04 +0000 (14:25 -0400)]
pixdesc: Add new SMPTE 431, 432, and 2085 color properties

Appeared in H.264 2016/02.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
6 years agopixfmt: Add ARIB STD-B76 color transfer characteristic
Neil Birkbeck [Wed, 15 Jun 2016 18:25:00 +0000 (14:25 -0400)]
pixfmt: Add ARIB STD-B76 color transfer characteristic

Adding hybrid log-gamma (https://en.wikipedia.org/wiki/Hybrid_Log-Gamma)
based on the standardization in ARIB STD-B67:

The choice of enum value of 18 is consistent with HEVC:

And also with latest proposal for color format in mkv:

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
6 years agoavconv: factor out initializing stream parameters for streamcopy
Anton Khirnov [Mon, 23 May 2016 07:37:10 +0000 (09:37 +0200)]
avconv: factor out initializing stream parameters for streamcopy

6 years agoavconv: initialize output framerate earlier
Anton Khirnov [Mon, 23 May 2016 14:52:28 +0000 (16:52 +0200)]
avconv: initialize output framerate earlier

This will be needed in the following commits.

6 years agoavconv: do not set encoder options when streamcopy is used
Anton Khirnov [Mon, 23 May 2016 07:29:01 +0000 (09:29 +0200)]
avconv: do not set encoder options when streamcopy is used

6 years agoavconv: refactor selecting an encoder
Anton Khirnov [Mon, 23 May 2016 05:38:58 +0000 (07:38 +0200)]
avconv: refactor selecting an encoder

Fail immediately if automatic encoder selection failed. Always set the
stream_copy/encoding_needed flags in one place.

6 years agoavconv: fix handling attachments in init_output_stream
Anton Khirnov [Mon, 23 May 2016 07:59:35 +0000 (09:59 +0200)]
avconv: fix handling attachments in init_output_stream

The current code assumes that encoding_needed is simply an inverse of
stream_copy, which is not true for manually attached files (for which
neither of those is true).

6 years agoavconv: create simple filtergraphs earlier
Anton Khirnov [Sun, 22 May 2016 17:57:36 +0000 (19:57 +0200)]
avconv: create simple filtergraphs earlier

We already have all the necessary information in open_output_file().
This makes the information about the stream/filtergraph mappings
available earlier.

6 years agoavconv: add a function for determining whether a filtergraph is simple
Anton Khirnov [Sun, 22 May 2016 15:57:59 +0000 (17:57 +0200)]
avconv: add a function for determining whether a filtergraph is simple

This makes the code easier to read.

6 years agoh264: handle frame recovery in h264_field_start()
Anton Khirnov [Fri, 20 May 2016 10:42:23 +0000 (12:42 +0200)]
h264: handle frame recovery in h264_field_start()

This is a more appropriate place for this. H264Context.recovery_frame is
shared between frame threads, so modifying it where it is right now is

6 years agoh264: discard slices of redundant pictures right after parsing the slice header
Anton Khirnov [Fri, 20 May 2016 10:30:42 +0000 (12:30 +0200)]
h264: discard slices of redundant pictures right after parsing the slice header

Going through the whole decoder initialization process for a slice we
are not going to decode is unnecessary and potentially dangerous.

6 years agoh264: always set redundant_pic_count during slice header parsing
Anton Khirnov [Fri, 20 May 2016 10:33:30 +0000 (12:33 +0200)]
h264: always set redundant_pic_count during slice header parsing

It is always checked in the surrounding code, so this make sure we don't
see a value from an old slice.

6 years agoh264: call the hwaccel frame_start() from h264_field_start()
Anton Khirnov [Fri, 20 May 2016 10:21:36 +0000 (12:21 +0200)]
h264: call the hwaccel frame_start() from h264_field_start()

This is a more appropriate place for it.

6 years agoh264: fix the check for mixed IDR/non-IDR slices
Anton Khirnov [Fri, 20 May 2016 09:04:55 +0000 (11:04 +0200)]
h264: fix the check for mixed IDR/non-IDR slices

6 years agoh264: do not pass H264Context to h264_slice_header_parse()
Anton Khirnov [Fri, 20 May 2016 08:20:33 +0000 (10:20 +0200)]
h264: do not pass H264Context to h264_slice_header_parse()

This should make it more clear that this function does not need any
decoder-global state other than the parameter sets.

6 years agoh264: fix warnings in fill_filter_caches_inter()
Anton Khirnov [Thu, 19 May 2016 06:19:14 +0000 (08:19 +0200)]
h264: fix warnings in fill_filter_caches_inter()

The code does some weird casting to a 2-dimensional sub-array of
ref2frm. This is not necessary, since only one dimension is needed

6 years agoh264: drop tests whether the codec id is AV_CODEC_ID_H264
Anton Khirnov [Wed, 18 May 2016 12:33:33 +0000 (14:33 +0200)]
h264: drop tests whether the codec id is AV_CODEC_ID_H264

Those are unused remnants of the old SVQ3 code.