1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

82599 Commits

Author SHA1 Message Date
Timo Rothenpieler
5c02d2827b compat/cuda: add dynamic loader 2016-11-22 10:34:27 +01:00
Steven Liu
d316b21dba avformat/flvenc: add no_metadata to flvflags
some flv have no metadata,
ffmpeg will same with the source flv stream.

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2016-11-22 10:18:23 +08:00
James Almer
0b8df0ce48 avformat/utils: add missing brackets around arguments in av_realloc() call
Found-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-21 23:02:20 -03:00
Mark Thompson
f242e0a0ff vaapi_encode: Fix format specifier for bitrate logging
Same as e0df56f25d.  This was accidentally
reintroduced while merging c8241e730f.
2016-11-21 22:59:58 +00:00
Jun Zhao
e72662e131 lavc/vaapi_encode_h264: fix poc incorrect issue after meeting idr frame.
when meeting IDR frame, vaapi_encode_h264 poc number don't reset, now fix
this issue based on h264 spec. Some decoder don't care this case, but this
fix will enhance the encoder action. Before this fix, poc number is
negative in some case.

Reviewed-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2016-11-21 22:37:02 +00:00
Mark Thompson
30ebabca7c vaapi_h265: Fix buffering parameters
A decoder may need this to be set correctly to output frames in the
right order.

(cherry picked from commit b8cac1e830)
2016-11-21 22:13:41 +00:00
Mark Thompson
ae0230cc3e vaapi_h265: Fix slice header writing
This was not observed earlier because the only syntax element which
it normally misses with the current setup is slice_qp_delta, but that
is always going to be zero (in IDR frames QP isn't varied on the
slice) which will always exp-golomb code as a single 1 bit.  The
immediately following part is the byte alignment, which is always a 1
bit followed by 0s which are ignored, so as long as the bitstream is
never aligned at that point we will never notice because the only
difference is that an ignored bit is a 1 instead of a 0.

(cherry picked from commit fc30a90898)
2016-11-21 22:13:41 +00:00
Mark Thompson
6796e6ea84 vaapi_h264: Write bitstream restriction fields
(cherry picked from commit ec17ab381e)
2016-11-21 22:13:41 +00:00
Mark Thompson
658c5afaa0 vaapi_h264: Fix CFR mode with frame_rate set in AVCodecContext
(cherry picked from commit 17a0f9481c)
2016-11-21 22:13:41 +00:00
Mark Thompson
ded1859df1 vaapi_encode: Decide on GOP setup before initialising sequence parameters
This was always too late; several fields related to it have been incorrectly
zero since the encoder was added.

(cherry picked from commit 314b421dd8)
2016-11-21 22:13:41 +00:00
Mark Thompson
ee1d04f970 vaapi_h264: Set max_num_ref_frames to 1 when not using B frames
(cherry picked from commit 956a54129d)
2016-11-21 22:13:41 +00:00
Mark Thompson
94f446c628 vaapi_encode: Sync to input surface rather than output
While outwardly bizarre, this change makes the behaviour consistent
with other VAAPI encoders which sync to the encode /input/ picture in
order to wait for /output/ from the encoder.  It is not harmful on
i965 (because synchronisation already happens in vaRenderPicture(),
so it has no effect there), and it allows the encoder to work on
mesa/gallium which assumes this behaviour.

(cherry picked from commit 086e4b58b5)
2016-11-21 22:13:41 +00:00
Mark Thompson
478a4b7e6d vaapi_encode: Check packed header capabilities
This improves behaviour with drivers which do not support packed
headers, such as AMD VCE on mesa/gallium.

(cherry picked from commit 892bbbcdc1)
2016-11-21 22:13:41 +00:00
Mark Thompson
c8241e730f vaapi_encode: Refactor initialisation
This allows better checking of capabilities and will make it easier
to add more functionality later.

It also commonises some duplicated code around rate control setup
and adds more comments explaining the internals.

(cherry picked from commit 80a5d05108)
2016-11-21 22:13:41 +00:00
Mark Thompson
06d73d002e vaapi_h264: Fix HRD bit_rate/cpb_size scaling
There should be an extra offset of 6 on bit_rate_scale and of 4 on
cpb_size_scale which were not accounted for here.

(cherry picked from commit 3a9662af6c)
2016-11-21 22:13:41 +00:00
Matthew Gregan
156fbbb562 avformat/movenc: Restrict experimental VP9 support to MODE_MP4.
Signed-off-by: Matthew Gregan <kinetik@flim.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-21 16:07:14 -03:00
Matthew Gregan
2d73d25670 Add experimental demuxing support for FLAC in ISO BMFF (MP4).
Based on the draft spec at https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt

Signed-off-by: Matthew Gregan <kinetik@flim.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-21 15:38:34 -03:00
Matthew Gregan
7dc4200c38 Add experimental muxing support for FLAC in ISO BMFF (MP4).
Based on the draft spec at https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt

'-strict experimental' is required to create files in this format.

Signed-off-by: Matthew Gregan <kinetik@flim.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-21 15:36:42 -03:00
Ludmila Glinskih
5f4e555dc7 MAINTAINERS: add myself as an API tests maintainer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-21 18:16:20 +01:00
Marton Balint
28d87899e3 ffplay: allow fallback to software renderer
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-20 23:38:06 +01:00
Marton Balint
58af48f1c3 ffplay: add support for negative RGBA linesize
This fixes the crash reported in ticket #5947.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-20 23:38:06 +01:00
James Almer
8c1342e631 avformat/matroskaenc: write updated STREAMINFO metadata for FLAC streams if available
FLAC streams originating from the FLAC encoder send updated and more
complete STREAMINFO metadata as part of the last packet, so write that
to CodecPrivate instead of the incomplete one available in extradata
during init.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-20 19:31:32 -03:00
James Almer
ee888cfbe7 avformat/matroskaenc: postpone writing the Tracks master
This will allow us to write updated stream information not available
during write_header().

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-20 19:31:32 -03:00
Michael Niedermayer
748ce9d702 avutil/opt: Fix setting int64 to its maximum
Found-by: Andreas
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-20 22:39:52 +01:00
Carl Eugen Hoyos
322568c079 lavc/ffv1: Support YUV4xxP12 and GRAY12. 2016-11-20 22:23:01 +01:00
Andreas Cadhalpun
1c7da19a4b ffmdec: validate codec parameters
A negative extradata size for example gets passed to memcpy in
avcodec_parameters_from_context causing a segmentation fault.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-20 20:08:35 +01:00
Michael Niedermayer
ac206bb175 swscale/options: Use AV_OPT_TYPE_PIXEL_FMT
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-20 13:00:22 +01:00
James Almer
574929d8b6 avcodec/avpacket: fix leak on realloc in av_packet_add_side_data()
If realloc fails, the pointer is overwritten and the previously allocated
buffer is leaked, which goes against the expected behavior of keeping the
packet unchanged in case of error.

Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-19 20:23:25 -03:00
James Almer
0ffea35657 avformat/utils: check for overflow before reallocating side data
This makes av_stream_add_side_data() consistent with av_packet_add_side_data().

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-19 20:11:50 -03:00
James Almer
2343f23e4d avformat/matroska: use av_stream_add_side_data() for stereo3d side data
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-19 12:20:50 -03:00
James Almer
eb3a59c903 avformat/mov: reuse existing err variable
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-19 00:54:58 -03:00
James Almer
77f033eb98 avformat/mov: use av_stream_add_side_data() for displaymatrix side data
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-18 22:20:36 -03:00
James Almer
2ab50647ff avformat/utils: add av_stream_add_side_data()
Functionally similar to av_packet_add_side_data(). Allows the use of an
already allocated buffer as stream side data.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-18 22:17:13 -03:00
Steven Liu
4696f7639b avformat/flvdec: add debug message to list keyframes index metadata
when parsing keyframe index metadata, list the message by trace log

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-19 02:15:27 +01:00
Andreas Cadhalpun
7289aa2d71 options_table: limit codec parameters to sane values
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-18 22:40:42 +01:00
James Almer
2de1c79b61 x86/vp9itxfm: add missing AVX2 guards
Fixes compilation with Yasm 1.1.0 and older.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-18 17:01:11 -03:00
Clément Bœsch
825f6fbfac ffmpeg: factor out sending frame to filters
Video doesn't exit ffmpeg on error anymore, and audio now prints an
error.
2016-11-18 20:23:58 +01:00
Clément Bœsch
b9c26aed4e ffmpeg: remove dead code out of the video filter loop
It makes no sense for this code to be inside the video filter loop, and
the frame sample aspect ratio is even set unconditionally a few lines
above.
2016-11-18 20:23:58 +01:00
Michael Niedermayer
d1d18de6ad avcodec/ffv1dec: Set packed_at_lsb for 16bit YUV
This avoids unneeded computations

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-18 18:04:28 +01:00
Michael Niedermayer
d7a3bb2088 avcodec/ffv1dec: Support gray 10/12/16 explicitly avoid shifts
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-18 18:04:28 +01:00
James Almer
50e0e96f3f avformat/apngenc: use the stream parameters extradata if available
Fixes remuxing apng streams coming from the apng demuxer, which sends extradata
during init.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-18 12:26:44 -03:00
James Almer
16c429166d Revert "apngdec: use side data to pass extradata to the decoder"
This reverts commit e0c6b32046.

Said commit changed the behavior of the demuxer and decoder in a non
backwards compatible way.
Demuxers should make extradata available at init if possible, and send
new extradata as side data within a packet if needed.

A better fix for the remuxing crash will follow.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-18 12:24:28 -03:00
Hendrik Leppkes
127cc6dd3d Merge commit '8d07e941b04d63fc4443dd986e3dc7b69cdcca43'
* commit '8d07e941b04d63fc4443dd986e3dc7b69cdcca43':
  FATE: add a test of H.264 SEI recovery in an intra refresh stream

Our H264 decoder drops 3 frames from the beginning of the stream, but
all frames after those match, hence the difference in the fate test.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 11:32:10 +01:00
Hendrik Leppkes
5e78126bbd Merge commit '46278ec90ac5ad1dab5e85991f176afe49003fee'
* commit '46278ec90ac5ad1dab5e85991f176afe49003fee':
  mp3enc: write trailing padding

Noop, we have our own implementation for mp3 gapless.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:48:40 +01:00
Hendrik Leppkes
f4c3aa7ade Merge commit 'd60c2d5216930ef98c7d4d6837d6229b37e0dcb3'
* commit 'd60c2d5216930ef98c7d4d6837d6229b37e0dcb3':
  mp3dec: read the initial/trailing padding from the LAME tag

Noop, we have our own implementation for mp3 gapless tags.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:48:04 +01:00
Hendrik Leppkes
07502e473f Merge commit '7a76371437f9562c3414f985523f883489e3936a'
* commit '7a76371437f9562c3414f985523f883489e3936a':
  libopenh264enc: Simplify init by setting FF_CODEC_CAP_INIT_CLEANUP

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:47:08 +01:00
Hendrik Leppkes
7e9474ca47 Merge commit '2d097c16b833c532ac974a7f1fd05c0a1f3b7675'
* commit '2d097c16b833c532ac974a7f1fd05c0a1f3b7675':
  libopenh264enc: Return a more sensible error code in some init failure paths

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:46:02 +01:00
Hendrik Leppkes
0bd76401d1 Merge commit '36b380dcd52ef47d7ba0559ed51192c88d82a9bd'
* commit '36b380dcd52ef47d7ba0559ed51192c88d82a9bd':
  libopenh264dec: Simplify the init thanks to FF_CODEC_CAP_INIT_CLEANUP being set

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:45:08 +01:00
Hendrik Leppkes
6fb07c7d85 Merge commit 'd0b1e6049b06eeeeca146ece4d2f199c5dba1565'
* commit 'd0b1e6049b06eeeeca146ece4d2f199c5dba1565':
  libopenh264dec: Fix cleanup if the init failed early

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:44:37 +01:00
Hendrik Leppkes
8a91452e83 Merge commit '61cb9fac47498a38dfe7623f66aa1f3696e9158c'
* commit '61cb9fac47498a38dfe7623f66aa1f3696e9158c':
  mov: fix stream extradata_size allocation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:44:21 +01:00