ffmpeg.git
3 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.

3 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
filtergraph.

This is similar to what is done for filtergraph inputs in
30ab4c51a180610d9f1720c75518d763515c0d9f

3 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
data.

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

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

3 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

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

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

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

3 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

3 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

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

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

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

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

3 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

3 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

3 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

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

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

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

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

3 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>
3 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:
http://www.arib.or.jp/english/html/overview/doc/2-STD-B67v1_0.pdf

The choice of enum value of 18 is consistent with HEVC:
http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=10481

And also with latest proposal for color format in mkv:
https://mailarchive.ietf.org/arch/search/?email_list=cellar&gbt=1&q=Colour+Format+proposal

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 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

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

3 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

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

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

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

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

3 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
invalid.

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

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

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

3 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

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

3 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
there.

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

3 years agoh264_cabac: drop an always true condition
Anton Khirnov [Wed, 18 May 2016 12:31:48 +0000 (14:31 +0200)]
h264_cabac: drop an always true condition

3 years agoh264: add H264_ prefix to the NAL unit types
Anton Khirnov [Wed, 18 May 2016 08:36:33 +0000 (10:36 +0200)]
h264: add H264_ prefix to the NAL unit types

This will prevent conflicts e.g. in code that deals with both h264 and
hevc.

3 years agoh264_sei: drop an unnecessary h264dec.h include
Anton Khirnov [Wed, 18 May 2016 08:23:21 +0000 (10:23 +0200)]
h264_sei: drop an unnecessary h264dec.h include

The code does not depend on the h264 decoder anymore and only needs
information from h264_ps

3 years agolavc: drop unnecessary h264dec.h includes
Anton Khirnov [Wed, 18 May 2016 08:22:24 +0000 (10:22 +0200)]
lavc: drop unnecessary h264dec.h includes

3 years agoh264: tighten the valid range for ref_frame_count
Anton Khirnov [Wed, 18 May 2016 08:04:44 +0000 (10:04 +0200)]
h264: tighten the valid range for ref_frame_count

This field (which the spec calls max_num_ref_frames) must be less than
or equal to MaxDpbFrames, which is at most 16.

3 years agoh264: move the parameter set definitions to a new header file
Anton Khirnov [Wed, 18 May 2016 07:40:33 +0000 (09:40 +0200)]
h264: move the parameter set definitions to a new header file

The PS parsing code is independent from the decoder, so it makes more
sense for it to have its own separate header.

3 years agosvq3: stop using H264Picture
Anton Khirnov [Wed, 18 May 2016 07:34:05 +0000 (09:34 +0200)]
svq3: stop using H264Picture

The SVQ3 decoder has been decoupled from the H.264 decoder, so it can
now use its own data type.

3 years agoh264: create a new header for common h264 definitions
Anton Khirnov [Wed, 18 May 2016 07:16:35 +0000 (09:16 +0200)]
h264: create a new header for common h264 definitions

Move the NAL unit types into it. This will allow to stop including the
whole decoder-specific h264dec.h in some code that is unrelated to the
decoder and only needs some enum values.

3 years agoh264: rename h264.[ch] to h264dec.[ch]
Anton Khirnov [Wed, 18 May 2016 07:02:39 +0000 (09:02 +0200)]
h264: rename h264.[ch] to h264dec.[ch]

This is more consistent with the naming of other decoders.

3 years agoh264: factor out setting frame properties / side data
Anton Khirnov [Wed, 18 May 2016 05:27:32 +0000 (07:27 +0200)]
h264: factor out setting frame properties / side data

Right now this code is mixed with selecting the next output frame. Move
it to a separate function called from h264_field_start(), which is a
more appropriate place for this.

3 years agoh264: drop unused NAL_FF_IGNORE
Anton Khirnov [Tue, 17 May 2016 18:01:34 +0000 (20:01 +0200)]
h264: drop unused NAL_FF_IGNORE

3 years agoh264: move a per-field block from decode_slice_header() to field_start()
Anton Khirnov [Tue, 17 May 2016 17:00:18 +0000 (19:00 +0200)]
h264: move a per-field block from decode_slice_header() to field_start()

This is a more appropriate place for it.

3 years agoh264: only allow ending a field/starting a new one before finish_setup()
Anton Khirnov [Tue, 17 May 2016 16:57:23 +0000 (18:57 +0200)]
h264: only allow ending a field/starting a new one before finish_setup()

Doing this after ff_thread_finish_setup() is called is invalid and can
conflict with reads from the other thread.

3 years agoh264: store {curr,max}_pic_num in the per-slice context
Anton Khirnov [Tue, 17 May 2016 14:45:15 +0000 (16:45 +0200)]
h264: store {curr,max}_pic_num in the per-slice context

While the value of those variables will be constant for the whole frame,
they are only used in two functions called from slice header decoding.
Moving them to the per-slice context allows us to make the H264Context
passed to slice_header_parse() constant.

3 years agoh264: decode the poc values from the slice header into the per-slice context
Anton Khirnov [Tue, 17 May 2016 13:35:50 +0000 (15:35 +0200)]
h264: decode the poc values from the slice header into the per-slice context

Copy them into the decoder-global context in field_start(). This avoids
modifying the decoder-global context during bitstream parsing.

3 years agoh264: set mb_aff_frame in frame_start()
Anton Khirnov [Tue, 17 May 2016 13:07:23 +0000 (15:07 +0200)]
h264: set mb_aff_frame in frame_start()

Avoid unnecessary modification of the decoder-global state in per-slice
code.

3 years agoh264: move the block starting a new field out of slice_header_parse()
Anton Khirnov [Tue, 17 May 2016 12:51:01 +0000 (14:51 +0200)]
h264: move the block starting a new field out of slice_header_parse()

There is no bitstream parsing in that block and messing with
decoder-global state is not something that belongs into header parsing.

Nothing else in this function depends on the value of current_slice,
except for two validity checks. Those checks are also moved out of
slice_header_parse().

3 years agoh264: pass a H2645NAL to slice header decoding
Anton Khirnov [Mon, 16 May 2016 07:34:44 +0000 (09:34 +0200)]
h264: pass a H2645NAL to slice header decoding

Replace the decoder-global nal_unit_type/nal_ref_idc variables with the
per-NAL ones. The decoder-global ones still cannot be removed because
they are used by hwaccels.

3 years agofate: Add TrueMotion 2 RT tests
Vittorio Giovara [Fri, 3 Jun 2016 15:53:25 +0000 (11:53 -0400)]
fate: Add TrueMotion 2 RT tests

3 years agofate: Move Duck Truemotion 1 and 2 tests to vpx.mak
Vittorio Giovara [Fri, 3 Jun 2016 19:51:30 +0000 (15:51 -0400)]
fate: Move Duck Truemotion 1 and 2 tests to vpx.mak

3 years agoAdd TrueMotion 2.0 Real Time decoder
Paul B Mahol [Fri, 17 Jun 2016 16:30:34 +0000 (12:30 -0400)]
Add TrueMotion 2.0 Real Time decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 years agofate: Add tests for MagicYUV
Vittorio Giovara [Fri, 3 Jun 2016 19:51:32 +0000 (15:51 -0400)]
fate: Add tests for MagicYUV

3 years agoAdd MagicYUV decoder
Paul B Mahol [Sat, 18 Jun 2016 22:23:28 +0000 (18:23 -0400)]
Add MagicYUV decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 years agoffv1: Error out on unsupported format
Jerome Martinez [Thu, 16 Jun 2016 14:33:55 +0000 (16:33 +0200)]
ffv1: Error out on unsupported format

Transparency is supported only by YUV and within specific bit depths.

3 years agocheckasm: Add tests for h264 idct
Martin Storsjö [Sat, 11 Jun 2016 11:17:37 +0000 (14:17 +0300)]
checkasm: Add tests for h264 idct

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

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agomov: Support prores with multiple stsd
Vittorio Giovara [Thu, 9 Jun 2016 22:55:19 +0000 (18:55 -0400)]
mov: Support prores with multiple stsd

This function needs to return false, or data in the additional tables
will be skipped, and the decoder will not be able to decode frames
associated with them.

3 years agomov: Implement support for multiple sample description tables
Vittorio Giovara [Wed, 15 Jun 2016 19:24:30 +0000 (15:24 -0400)]
mov: Implement support for multiple sample description tables

Store data from each stsd in a separate extradata buffer, keep track of
the stsc index for read and seek operations, switch buffers when the
index differs. Decoder is notified with an AV_PKT_DATA_NEW_EXTRADATA
packet side data.

Since H264 supports this notification, and can be reset midstream, enable
this feature only for multiple avcC's. All other stsd types (such as
hvc1 and hev1) need decoder-side changes, so they are left disabled for
now.

This is implemented only in non-fragmented MOVs.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 years agoh264: Support AV_PKT_DATA_NEW_EXTRADATA
Vittorio Giovara [Thu, 9 Jun 2016 22:55:17 +0000 (18:55 -0400)]
h264: Support AV_PKT_DATA_NEW_EXTRADATA

3 years agolavc: Document AV_PKT_DATA_NEW_EXTRADATA
Vittorio Giovara [Thu, 9 Jun 2016 22:55:16 +0000 (18:55 -0400)]
lavc: Document AV_PKT_DATA_NEW_EXTRADATA

3 years agox86: Add missing movsxd for the int stride parameter
Martin Storsjö [Sat, 11 Jun 2016 19:06:16 +0000 (22:06 +0300)]
x86: Add missing movsxd for the int stride parameter

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agoavdevice: Ignore timefilter test program
Diego Biurrun [Mon, 13 Jun 2016 12:50:38 +0000 (12:50 +0000)]
avdevice: Ignore timefilter test program

3 years agoLICENSE: Fix silly typo
Diego Biurrun [Mon, 13 Jun 2016 16:11:49 +0000 (18:11 +0200)]
LICENSE: Fix silly typo

3 years agoh264: Drop unused function check_opcodes()
Diego Biurrun [Mon, 13 Jun 2016 16:14:41 +0000 (18:14 +0200)]
h264: Drop unused function check_opcodes()

3 years agoavpacket: Error out when creating 0-sized side data
Vittorio Giovara [Thu, 9 Jun 2016 22:35:03 +0000 (18:35 -0400)]
avpacket: Error out when creating 0-sized side data

This mimics the behaviour of other av_*_new_side_data().
This is not caught by the malloc check, since padding
is always added to the allocated size.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 years agopixdesc: Use C99 array to list color properties names
Vittorio Giovara [Wed, 1 Jun 2016 20:13:17 +0000 (16:13 -0400)]
pixdesc: Use C99 array to list color properties names

3 years agoh264: Fix decoding delay for Intra only streams
Anton Mitrofanov [Sun, 8 May 2016 11:28:00 +0000 (13:28 +0200)]
h264: Fix decoding delay for Intra only streams

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agolavc: add H.264 MVC profiles
Anton Khirnov [Sat, 14 May 2016 15:15:46 +0000 (17:15 +0200)]
lavc: add H.264 MVC profiles

3 years agoh264: factor out setting the parameter sets for a frame
Anton Khirnov [Thu, 12 May 2016 12:37:35 +0000 (14:37 +0200)]
h264: factor out setting the parameter sets for a frame

3 years agoh264: pass just the PPS to get_chroma_qp()
Anton Khirnov [Thu, 12 May 2016 12:25:52 +0000 (14:25 +0200)]
h264: pass just the PPS to get_chroma_qp()

It does not need the whole context. This will simplify the following
commit.

3 years agoh264: merge the two reinit blocks in slice_header_parse()
Anton Khirnov [Tue, 10 May 2016 11:34:59 +0000 (13:34 +0200)]
h264: merge the two reinit blocks in slice_header_parse()

The only difference is that the first of them contains a
ff_h264_flush_change() call. While that is not necessary in the second
block, it should cause no problems either.

Reduce the verbosity of the reinit log message from info to verbose,
since now it will be displayed during every decode session.

3 years agoh264: factor starting a new field out of parsing the slice header
Anton Khirnov [Mon, 9 May 2016 13:58:32 +0000 (15:58 +0200)]
h264: factor starting a new field out of parsing the slice header

3 years agoh264: postpone generating the implicit MMCOs
Anton Khirnov [Mon, 9 May 2016 12:25:56 +0000 (14:25 +0200)]
h264: postpone generating the implicit MMCOs

Do it right before the MMCOs are applied to the DPB. This will allow
moving the frame_start() call out of the slice header parsing, since
generating the implicit MMCOs needs to be done after frame_start().

3 years agoh264: decode the MMCOs into per-slice contexts
Anton Khirnov [Mon, 9 May 2016 11:48:01 +0000 (13:48 +0200)]
h264: decode the MMCOs into per-slice contexts

They are stored in the slice header, so technically they are per-slice
(though they must be the same in every slice). This will simplify the
following commits.

3 years agoh264: rename mmco_index to nb_mmco
Anton Khirnov [Mon, 9 May 2016 07:30:10 +0000 (09:30 +0200)]
h264: rename mmco_index to nb_mmco

The variable stores the number of mmco entries, so the current name is
misleading.

3 years agoh264: move initializing the slice start out of h264_slice_header_parse()
Anton Khirnov [Sat, 16 Apr 2016 01:20:37 +0000 (03:20 +0200)]
h264: move initializing the slice start out of h264_slice_header_parse()

3 years agoh264: move calculating the POC out of h264_slice_header_parse()
Anton Khirnov [Thu, 14 Apr 2016 18:53:59 +0000 (20:53 +0200)]
h264: move calculating the POC out of h264_slice_header_parse()

This function does not do any bitstream parsing and it depends on the
current frame being allocated, so this will allow the frame_start() to
be moved out eventually.

3 years agoh264: move building the reference list out of h264_slice_header_parse()
Anton Khirnov [Thu, 14 Apr 2016 18:53:59 +0000 (20:53 +0200)]
h264: move building the reference list out of h264_slice_header_parse()

This does not do any bitstream parsing and will allow moving out other
code in later commits.

3 years agoh264: move initing the implicit pred weight table out of h264_slice_header_parse()
Anton Khirnov [Thu, 14 Apr 2016 18:53:59 +0000 (20:53 +0200)]
h264: move initing the implicit pred weight table out of h264_slice_header_parse()

It depends on the reference list, so this will allow moving out the
reference list construction and consequently other code it depends on.

3 years agoh264: split reading the ref list modifications and actually building the ref list
Anton Khirnov [Fri, 15 Apr 2016 14:10:21 +0000 (16:10 +0200)]
h264: split reading the ref list modifications and actually building the ref list

This will allow postponing the reference list construction (and by
consequence some other functions, like frame_start) until the whole
slice header has been parsed.

3 years agoh264: move initialising the implicit pred weight table for MBAFF
Anton Khirnov [Fri, 15 Apr 2016 13:02:33 +0000 (15:02 +0200)]
h264: move initialising the implicit pred weight table for MBAFF

Do it where the normal implicit table is initialised.

3 years agoh264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list
Anton Khirnov [Fri, 15 Apr 2016 13:00:29 +0000 (15:00 +0200)]
h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list

There is no real reason to call it separately.

3 years agoh264: move initialising the explicit pred weight table for MBAFF
Anton Khirnov [Fri, 15 Apr 2016 12:45:48 +0000 (14:45 +0200)]
h264: move initialising the explicit pred weight table for MBAFF

Currently it's done in the code that initialises the ref list for
MBAFF, which is not a logical place for it. Move it to the function that
parses the pred table from the bitstream, which is analogous to what is
done for the implicit weight table as well.

3 years agoh264: drop an outdated comment
Anton Khirnov [Thu, 14 Apr 2016 18:59:20 +0000 (20:59 +0200)]
h264: drop an outdated comment

3 years agoh264: move direct mode inits out of h264_slice_header_parse()
Anton Khirnov [Thu, 14 Apr 2016 18:53:59 +0000 (20:53 +0200)]
h264: move direct mode inits out of h264_slice_header_parse()

This code does not do any bitstream parsing, it just initializes some
internal state.

3 years agoh264: start splitting decode_slice_header()
Anton Khirnov [Wed, 13 Apr 2016 15:53:50 +0000 (17:53 +0200)]
h264: start splitting decode_slice_header()

That function is currently very long and entangles bitstream parsing and
decoder configuration. This makes the code much harder to read than
necessary.

Begin splitting the code that configures the decoder state based on the
slice header information from the parsing of the slice header.

3 years agovaapi_h265: cu_qp_delta should not be used in constant-QP mode
Mark Thompson [Tue, 31 May 2016 09:21:19 +0000 (10:21 +0100)]
vaapi_h265: cu_qp_delta should not be used in constant-QP mode

3 years agovaapi_h264: Add source version identifier as unregistered SEI
Mark Thompson [Wed, 18 May 2016 09:19:07 +0000 (10:19 +0100)]
vaapi_h264: Add source version identifier as unregistered SEI

Contains the libavcodec version, the VAAPI version and the libva
driver vendor string.