1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

43548 Commits

Author SHA1 Message Date
Anton Khirnov
232399e3ee avconv: pass the hwaccel frames context to the decoder 2016-06-25 12:10:42 +02:00
Anton Khirnov
a3a0230a98 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.
2016-06-25 12:04:32 +02:00
Anton Khirnov
3e265ca58f 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.
2016-06-25 12:04:32 +02:00
Anton Khirnov
50722b4f0c 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
2016-06-25 12:04:32 +02:00
Anton Khirnov
ba7397baef 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.
2016-06-25 12:04:29 +02:00
Anton Khirnov
722ec3eb35 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.
2016-06-25 11:20:50 +02:00
Anton Khirnov
398f015f07 avconv: buffer the packets written while the muxer is not initialized 2016-06-25 11:15:54 +02:00
Anton Khirnov
1c169782ca 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.
2016-06-25 11:12:53 +02:00
Anton Khirnov
5b63b15663 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).
2016-06-25 11:11:46 +02:00
Martin Storsjö
0c9c4004ed 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>
2016-06-24 22:30:54 +03:00
Martin Storsjö
31aa5335c3 libopenh264enc: Fix inconsistent whitespace
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-06-24 22:30:46 +03:00
Diego Biurrun
4f98bb7b6d msmpeg4: Remove commented-out debug logging code 2016-06-24 13:25:36 +02:00
Diego Biurrun
eedbeb4c27 msmpeg4: Remove some broken, commented-out cruft 2016-06-24 13:25:36 +02:00
Diego Biurrun
3c84eaae9d h264: Eliminate unused but set variable
libavcodec/h264_slice.c:1384:9: warning: variable 'droppable' set but not used
2016-06-23 14:16:14 +02:00
Luca Barbato
4dbfcd0757 librtmp: Avoid an infiniloop setting connection arguments
The exit condition was missing.

CC: libav-stable@libav.org
2016-06-22 06:37:33 +02:00
Mark Thompson
fe498ef514 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.
2016-06-21 20:42:22 +01:00
Mark Thompson
11b8030309 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.
2016-06-21 20:42:22 +01:00
Martin Storsjö
8c3c7b8920 dxva2_h264: Remove an unused variable
This was introduced by mistake in 39cdbb12aa (only one of the
added variables were really needed).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-06-21 22:09:35 +03:00
Martin Storsjö
dc7501e524 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>
2016-06-21 22:09:29 +03:00
Anton Khirnov
beb62dac62 Use AVFrame.pts instead of deprecated pkt_pts. 2016-06-21 19:54:42 +02:00
Anton Khirnov
32c8359093 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.
2016-06-21 19:54:42 +02:00
Anton Khirnov
ac7bfd6967 lavfi: add a QSV scaling filter 2016-06-21 19:53:38 +02:00
Anton Khirnov
ad9c9440d5 qsvenc: support getting the session from an AVHWFramesContext 2016-06-21 19:53:38 +02:00
Anton Khirnov
a0524d9b1e qsvdec: support getting the session from an AVHWFramesContext 2016-06-21 19:53:38 +02:00
Anton Khirnov
59e7361cc7 hwcontext: add a QSV implementation 2016-06-21 19:53:37 +02:00
Anton Khirnov
6f19bbcf85 qsvdec: move reading the user-provided session to qsv_decode_init()
This is a more appropriate place for it.
2016-06-21 19:52:19 +02:00
Anton Khirnov
e85f6f7f8d 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.
2016-06-21 19:52:17 +02:00
Vittorio Giovara
40dd5166d2 truemotion2rt: Use ff_set_dimensions 2016-06-21 09:38:56 -04:00
Vittorio Giovara
a816432337 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>
2016-06-21 09:29:04 -04:00
Neil Birkbeck
5d560d38de 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>
2016-06-21 09:02:46 -04:00
Anton Khirnov
6ed0f70f97 avconv: factor out initializing stream parameters for streamcopy 2016-06-21 12:39:02 +02:00
Anton Khirnov
5fa255b65c avconv: initialize output framerate earlier
This will be needed in the following commits.
2016-06-21 12:39:02 +02:00
Anton Khirnov
1e93c1e30f avconv: do not set encoder options when streamcopy is used 2016-06-21 12:39:02 +02:00
Anton Khirnov
90944ee3ab avconv: refactor selecting an encoder
Fail immediately if automatic encoder selection failed. Always set the
stream_copy/encoding_needed flags in one place.
2016-06-21 12:39:02 +02:00
Anton Khirnov
5e1840622c 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).
2016-06-21 12:39:02 +02:00
Anton Khirnov
73c6ec6d65 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.
2016-06-21 12:39:02 +02:00
Anton Khirnov
49670e4218 avconv: add a function for determining whether a filtergraph is simple
This makes the code easier to read.
2016-06-21 12:39:02 +02:00
Anton Khirnov
58640fe89e 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.
2016-06-21 11:20:51 +02:00
Anton Khirnov
e26c64148b 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.
2016-06-21 11:20:26 +02:00
Anton Khirnov
6efc463858 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.
2016-06-21 11:20:20 +02:00
Anton Khirnov
606fb6c032 h264: call the hwaccel frame_start() from h264_field_start()
This is a more appropriate place for it.
2016-06-21 11:19:51 +02:00
Anton Khirnov
d1d7678040 h264: fix the check for mixed IDR/non-IDR slices 2016-06-21 11:19:19 +02:00
Anton Khirnov
b13fc1e344 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.
2016-06-21 11:18:44 +02:00
Anton Khirnov
996f13413b 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.
2016-06-21 11:18:15 +02:00
Anton Khirnov
bc7f426851 h264: drop tests whether the codec id is AV_CODEC_ID_H264
Those are unused remnants of the old SVQ3 code.
2016-06-21 11:17:59 +02:00
Anton Khirnov
8281cd5cb8 h264_cabac: drop an always true condition 2016-06-21 11:17:53 +02:00
Anton Khirnov
5c2fb561d9 h264: add H264_ prefix to the NAL unit types
This will prevent conflicts e.g. in code that deals with both h264 and
hevc.
2016-06-21 11:17:28 +02:00
Anton Khirnov
1cf2f3d334 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
2016-06-21 11:15:44 +02:00
Anton Khirnov
b24dafe105 lavc: drop unnecessary h264dec.h includes 2016-06-21 11:15:11 +02:00
Anton Khirnov
70b1dcef2d 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.
2016-06-21 11:14:07 +02:00