OSDN Git Service

android-x86/external-ffmpeg.git
7 years agoffmpeg: use new encode API
wm4 [Sat, 1 Oct 2016 15:23:02 +0000 (17:23 +0200)]
ffmpeg: use new encode API

7 years agoffmpeg: use new decode API
wm4 [Sat, 1 Oct 2016 15:22:15 +0000 (17:22 +0200)]
ffmpeg: use new decode API

This is a bit messy, mainly due to timestamp handling.

decode_video() relied on the fact that it could set dts on a flush/drain
packet. This is not possible with the old API, and won't be. (I think
doing this was very questionable with the old API. Flush packets should
not contain any information; they just cause a FIFO to be emptied.) This
is replaced with checking the best_effort_timestamp for AV_NOPTS_VALUE,
and using the suggested DTS in the drain case.

The modified tests (fate-cavs and others) still fails due to dropping
the last frame. This happens because the timestamp of the last frame
goes backwards (ffprobe -show_frames shows the same thing). I suspect
that this "worked" due to the best effort timestamp logic picking the
DTS over the decreasing PTS. Since this logic is in libavcodec (where
it probably shouldn't be), this can't be easily fixed. The timestamps
of the cavs samples are weird anyway, so I chose not to fix it.

Another strange thing is the timestamp handling in the video path of
process_input_packet (after the decode_video() call). It looks like
the code to increase next_dts and next_pts should be run every time
a frame is decoded - but it's needed even if output is skipped.

7 years agoffmpeg: move subframe warning to libavcodec
wm4 [Sat, 1 Oct 2016 15:22:02 +0000 (17:22 +0200)]
ffmpeg: move subframe warning to libavcodec

With the new decode API, doing this in ffmpeg.c is impractical. There
was resistance against removing the warning, so put it into libavcodec.

Not bothering with reducing the warning to verbose log level for
subsequent wanrings. The warning should be rare, and only happen when
developing new codecs for the old API.

Includes a change suggested by Michael Niedermayer.

7 years agodoc/libav-merge: add a note for the skipped QSV functionality
Hendrik Leppkes [Sat, 1 Oct 2016 13:20:44 +0000 (15:20 +0200)]
doc/libav-merge: add a note for the skipped QSV functionality

7 years agoMerge commit 'ac7bfd69678f3966e38debdb27f4bde94dc0345c'
Hendrik Leppkes [Sat, 1 Oct 2016 13:19:18 +0000 (15:19 +0200)]
Merge commit 'ac7bfd69678f3966e38debdb27f4bde94dc0345c'

* commit 'ac7bfd69678f3966e38debdb27f4bde94dc0345c':
  lavfi: add a QSV scaling filter

This is a noop since it depends on sharing a hwcontext with the
decoder/encoder, see 04b17ff and 130e1f1

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
7 years agoMerge commit 'ad9c9440d592e4d53d6bec9961b4b22e25387d70'
Hendrik Leppkes [Sat, 1 Oct 2016 13:03:20 +0000 (15:03 +0200)]
Merge commit 'ad9c9440d592e4d53d6bec9961b4b22e25387d70'

* commit 'ad9c9440d592e4d53d6bec9961b4b22e25387d70':
  qsvenc: support getting the session from an AVHWFramesContext

This commit is a noop, as it needs to be fully re-implemented for our
qsv components.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
7 years agoMerge commit 'a0524d9b1e1bb0012207584f067096df7792df6c'
Hendrik Leppkes [Sat, 1 Oct 2016 13:02:32 +0000 (15:02 +0200)]
Merge commit 'a0524d9b1e1bb0012207584f067096df7792df6c'

* commit 'a0524d9b1e1bb0012207584f067096df7792df6c':
  qsvdec: support getting the session from an AVHWFramesContext

This commit is a noop, as it needs to be fully re-implemented for our qsv
components.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
7 years agodoc/libav-merge: complete TODO section
Clément Bœsch [Sun, 25 Sep 2016 17:34:36 +0000 (19:34 +0200)]
doc/libav-merge: complete TODO section

7 years agofate: Add regression test for Ticket 186
Michael Niedermayer [Fri, 30 Sep 2016 23:41:41 +0000 (01:41 +0200)]
fate: Add regression test for Ticket 186

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agofate: Add fate-svq3-watermark
Michael Niedermayer [Fri, 30 Sep 2016 23:36:55 +0000 (01:36 +0200)]
fate: Add fate-svq3-watermark

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/hlsenc: support mkdir_p for use_localtime_mkdir
Steven Liu [Wed, 28 Sep 2016 08:09:05 +0000 (16:09 +0800)]
avformat/hlsenc: support mkdir_p for use_localtime_mkdir

when use use_localtime_mkdir to create multi level dir,
ffmpeg give error message:
ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -c copy -use_localtime 1
 -use_localtime_mkdir 1 -hls_segment_filename '%Y%m%d/file-%Y%m%d/%s.ts'
out.m3u8
error message:
Could not create directory 20160926/file-20160926 with use_localtime_mkdir
add mkdir_p for support the multi level dir

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Zuo Genyu <1515161258@qq.com> (Windows)
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
7 years agodoc/examples: build http_multiclient example
Clément Bœsch [Fri, 30 Sep 2016 17:35:28 +0000 (19:35 +0200)]
doc/examples: build http_multiclient example

7 years agodoc/examples/gitignore: add forgotten qsvdec entry
Clément Bœsch [Fri, 30 Sep 2016 17:35:07 +0000 (19:35 +0200)]
doc/examples/gitignore: add forgotten qsvdec entry

7 years agobuild: remove references to inexistant avcodec example
Clément Bœsch [Fri, 30 Sep 2016 17:34:35 +0000 (19:34 +0200)]
build: remove references to inexistant avcodec example

7 years agodoc/examples/http_multiclient: fix mixed declarations and code
Clément Bœsch [Fri, 30 Sep 2016 17:33:35 +0000 (19:33 +0200)]
doc/examples/http_multiclient: fix mixed declarations and code

7 years agodoc/examples/http_multiclient: fix compilation
Clément Bœsch [Fri, 30 Sep 2016 17:33:03 +0000 (19:33 +0200)]
doc/examples/http_multiclient: fix compilation

Fixes error: no previous prototype for ‘process_client’ [-Werror=missing-prototypes]

7 years agobuild: fix avio_dir_cmd and avio_reading example dependencies
Clément Bœsch [Fri, 30 Sep 2016 17:32:13 +0000 (19:32 +0200)]
build: fix avio_dir_cmd and avio_reading example dependencies

7 years agobuild: sort EXAMPLE_LIST
Clément Bœsch [Fri, 30 Sep 2016 17:31:30 +0000 (19:31 +0200)]
build: sort EXAMPLE_LIST

7 years agoavutil/hwcontext_cuda: use proper synchronization flag
Timo Rothenpieler [Thu, 29 Sep 2016 18:40:23 +0000 (20:40 +0200)]
avutil/hwcontext_cuda: use proper synchronization flag

7 years agoavcodec/cuvid: make use of new av_hwdevice_ctx_create api
Timo Rothenpieler [Thu, 29 Sep 2016 17:40:42 +0000 (19:40 +0200)]
avcodec/cuvid: make use of new av_hwdevice_ctx_create api

7 years agoavcodec/cuvid: support a pre-initialized hw_frames_ctx
Timo Rothenpieler [Thu, 29 Sep 2016 16:58:49 +0000 (18:58 +0200)]
avcodec/cuvid: support a pre-initialized hw_frames_ctx

7 years agoavcodec/cuvid: use actual frame size for buffer allocation
Timo Rothenpieler [Thu, 29 Sep 2016 16:56:39 +0000 (18:56 +0200)]
avcodec/cuvid: use actual frame size for buffer allocation

7 years agoavformat/tee: Copy interrupt callback and flags to slave
Jan Sebechlebsky [Fri, 12 Aug 2016 20:30:03 +0000 (22:30 +0200)]
avformat/tee: Copy interrupt callback and flags to slave

Copy interrupt callback to slave format context to allow
user to interrupt IO. Copy format flags as well.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
7 years agoffmpeg_cuvid: make use of new av_hwdevice_ctx_create api
Timo Rothenpieler [Thu, 29 Sep 2016 09:11:24 +0000 (11:11 +0200)]
ffmpeg_cuvid: make use of new av_hwdevice_ctx_create api

7 years agoffmpeg: pass the hwaccel frames context to the decoder
Anton Khirnov [Thu, 29 Sep 2016 08:29:10 +0000 (10:29 +0200)]
ffmpeg: pass the hwaccel frames context to the decoder

7 years agolavf/movenc: Put correct display aspect ratio in ARES atom.
Carl Eugen Hoyos [Thu, 29 Sep 2016 13:41:17 +0000 (15:41 +0200)]
lavf/movenc: Put correct display aspect ratio in ARES atom.

7 years agolavf/mov: Read display aspect ratio from ares atom also for dnxhd.
Carl Eugen Hoyos [Thu, 29 Sep 2016 13:29:03 +0000 (15:29 +0200)]
lavf/mov: Read display aspect ratio from ares atom also for dnxhd.

Fixes aspect ratio of sample in ticket #2125.
Fixes aspect ratio of sample in ticket #5325.

7 years agoChangelog: Mention edts support.
Carl Eugen Hoyos [Thu, 29 Sep 2016 12:44:08 +0000 (14:44 +0200)]
Changelog: Mention edts support.

7 years agomovenc: Add support for writing language codes into ISML manifests
Jan Ekström [Mon, 26 Sep 2016 22:10:22 +0000 (01:10 +0300)]
movenc: Add support for writing language codes into ISML manifests

Streaming servers appear to ignore all other language metadata.

Signed-off-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agolavf/mov.c: Make audio timestamps strictly monotonically increasing inside an edit...
Sasi Inguva [Mon, 26 Sep 2016 16:56:26 +0000 (09:56 -0700)]
lavf/mov.c: Make audio timestamps strictly monotonically increasing inside an edit list.

Fixes gapless decoding. Adjust skip_samples field correctly in case of DISCARDed audio frames.

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavc/utils.c: Subtract skip_samples when frame is DISCARDed.
Sasi Inguva [Tue, 27 Sep 2016 01:41:01 +0000 (18:41 -0700)]
lavc/utils.c: Subtract skip_samples when frame is DISCARDed.

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoffmpeg_vaapi: fix choice of decoder_format
Moritz Barsnick [Tue, 27 Sep 2016 12:21:49 +0000 (14:21 +0200)]
ffmpeg_vaapi: fix choice of decoder_format

The check could previously never evaluate to true, probably due to
a typo.

Reported-By: Mihai Chindea <mihai.chindea@uti.eu.com>
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Tested-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agodoc/muxers: fix hlsenc options examples error
Steven Liu [Wed, 28 Sep 2016 10:12:38 +0000 (18:12 +0800)]
doc/muxers: fix hlsenc options examples error

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
7 years agodoc/codecs.texi: fix and expand color related options
James Almer [Wed, 28 Sep 2016 20:14:33 +0000 (17:14 -0300)]
doc/codecs.texi: fix and expand color related options

Found-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agomovenc: use similar logic to DASH when writing bit rate to ISML
Jan Ekström [Tue, 27 Sep 2016 23:14:23 +0000 (02:14 +0300)]
movenc: use similar logic to DASH when writing bit rate to ISML

This way, in case of bit rate not being set, max_bitrate will be
used instead. This enables, for example, re-using max_bitrate
information from the input or doing transcoding with a rate
control mode that is not bit rate based.

Signed-off-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavfilter/vf_colorspace: fix range for output colorspace option
James Almer [Wed, 28 Sep 2016 20:24:42 +0000 (17:24 -0300)]
avfilter/vf_colorspace: fix range for output colorspace option

Rreviewed-by: BBB
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/concatdec: don't call open_file when seek position within a file
raymondzheng1412@gmail.com [Fri, 23 Sep 2016 03:48:40 +0000 (11:48 +0800)]
avformat/concatdec: don't call open_file when seek position within a file

7 years agoavutil/hwcontext: use CONFIG_QSV instead of CONFIG_LIBMFX for qsv
James Almer [Wed, 28 Sep 2016 18:12:29 +0000 (15:12 -0300)]
avutil/hwcontext: use CONFIG_QSV instead of CONFIG_LIBMFX for qsv

See "[FFmpeg-devel] [PATCH] hwcontext: add a QSV implementation"

Suggested-by: nablet developer <sdk@nablet.com>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoffmpeg_cuvid: Don't unnecessarily include nvcuvid.h
Philip Langdale [Wed, 28 Sep 2016 17:42:40 +0000 (10:42 -0700)]
ffmpeg_cuvid: Don't unnecessarily include nvcuvid.h

7 years agoMerge commit '59e7361cc791e5103be1712dc59a2055f118d0da'
James Almer [Wed, 28 Sep 2016 16:30:27 +0000 (13:30 -0300)]
Merge commit '59e7361cc791e5103be1712dc59a2055f118d0da'

* commit '59e7361cc791e5103be1712dc59a2055f118d0da':
  hwcontext: add a QSV implementation

Conflicts:
    doc/APIchanges
    libavutil/version.h

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '6f19bbcf8532d018d8d6d82e000738d0ac2385c9'
James Almer [Wed, 28 Sep 2016 16:26:12 +0000 (13:26 -0300)]
Merge commit '6f19bbcf8532d018d8d6d82e000738d0ac2385c9'

* commit '6f19bbcf8532d018d8d6d82e000738d0ac2385c9':
  qsvdec: move reading the user-provided session to qsv_decode_init()

Conflicts:
    libavcodec/qsvdec.c

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit 'e85f6f7f8d037c0af0f294000718d9ba22753baa'
James Almer [Wed, 28 Sep 2016 16:22:00 +0000 (13:22 -0300)]
Merge commit 'e85f6f7f8d037c0af0f294000718d9ba22753baa'

* commit 'e85f6f7f8d037c0af0f294000718d9ba22753baa':
  lavc: allow using AVCodecContext.hw_frames_ctx for decoding

Conflicts:
    doc/APIchanges
    libavcodec/version.h

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '40dd5166d2ba4f9035b93748840e408cd8be40e5'
James Almer [Wed, 28 Sep 2016 16:19:07 +0000 (13:19 -0300)]
Merge commit '40dd5166d2ba4f9035b93748840e408cd8be40e5'

* commit '40dd5166d2ba4f9035b93748840e408cd8be40e5':
  truemotion2rt: Use ff_set_dimensions

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit 'a8164323374e86ce5f93759230868c98356833a2'
James Almer [Wed, 28 Sep 2016 16:12:18 +0000 (13:12 -0300)]
Merge commit 'a8164323374e86ce5f93759230868c98356833a2'

* commit 'a8164323374e86ce5f93759230868c98356833a2':
  pixdesc: Add new SMPTE 431, 432, and 2085 color properties

Conflicts:
    libavcodec/options_table.h
    libavcodec/version.h
    libavutil/pixdesc.c
    libavutil/pixfmt.h
    libavutil/version.h

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '5d560d38deca1e4705e6d3784d737363b9c830fe'
James Almer [Wed, 28 Sep 2016 16:09:26 +0000 (13:09 -0300)]
Merge commit '5d560d38deca1e4705e6d3784d737363b9c830fe'

* commit '5d560d38deca1e4705e6d3784d737363b9c830fe':
  pixfmt: Add ARIB STD-B76 color transfer characteristic

See 785038c92cc7fc1da437576382083246ca598fce

Conflicts:
    libavcodec/options_table.h
    libavcodec/version.h
    libavutil/pixdesc.c
    libavutil/version.h

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '6ed0f70f97c882813199b3bafd724ceeb43659de'
James Almer [Wed, 28 Sep 2016 15:59:07 +0000 (12:59 -0300)]
Merge commit '6ed0f70f97c882813199b3bafd724ceeb43659de'

* commit '6ed0f70f97c882813199b3bafd724ceeb43659de':
  avconv: factor out initializing stream parameters for streamcopy

Conflicts:
    ffmpeg.c

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '5fa255b65c7887cc913f097aed1b581fbf1a8745'
James Almer [Wed, 28 Sep 2016 15:57:58 +0000 (12:57 -0300)]
Merge commit '5fa255b65c7887cc913f097aed1b581fbf1a8745'

* commit '5fa255b65c7887cc913f097aed1b581fbf1a8745':
  avconv: initialize output framerate earlier

Skipping this for now. It's not needed until several committs ahead,
and should be carefully implemented.

Merged-by: James Almer <jamrial@gmail.com>
7 years agolavc/8bps: Fix 32bit output of 24bit video.
Carl Eugen Hoyos [Wed, 28 Sep 2016 15:49:39 +0000 (17:49 +0200)]
lavc/8bps: Fix 32bit output of 24bit video.

Regression since / partial revert of ba3bb53b

7 years agolavf/mpegtsenc: Set min PID for data pkt to 0x0010.
Sylvain Laurent [Sat, 24 Sep 2016 10:01:34 +0000 (12:01 +0200)]
lavf/mpegtsenc: Set min PID for data pkt to 0x0010.

Fixes ticket #1673.

7 years agoavcodec/nvenc: nicely align AVOptions
Timo Rothenpieler [Wed, 28 Sep 2016 14:08:09 +0000 (16:08 +0200)]
avcodec/nvenc: nicely align AVOptions

7 years agoavcodec/nvenc: Extended rate-control support as provided by SDK 7
Yogender Gupta [Sat, 24 Sep 2016 15:55:00 +0000 (17:55 +0200)]
avcodec/nvenc: Extended rate-control support as provided by SDK 7

Merged from libav commit by Yogender Gupta:
https://git.libav.org/?p=libav.git;a=commitdiff;h=70de2ea4261f860457a04e3d0c58c5543f403325

7 years agoavcodec/nvenc: add HEVC REXT profile
Timo Rothenpieler [Wed, 28 Sep 2016 12:21:03 +0000 (14:21 +0200)]
avcodec/nvenc: add HEVC REXT profile

7 years agoavcodec/nvenc: Make sure that enum and array index match
Timo Rothenpieler [Wed, 28 Sep 2016 11:52:47 +0000 (13:52 +0200)]
avcodec/nvenc: Make sure that enum and array index match

Based on libav commits by Luca Barbato and Yogender Gupta:
https://git.libav.org/?p=libav.git;a=commit;h=352741b5ead1543d775ccf6040f33023e4491186
https://git.libav.org/?p=libav.git;a=commit;h=e02e2515b24bfc37ede6ca1744696230be55e50b

7 years agoavformat/avidec: Check nb_streams in read_gab2_sub()
Michael Niedermayer [Wed, 28 Sep 2016 14:14:08 +0000 (16:14 +0200)]
avformat/avidec: Check nb_streams in read_gab2_sub()

Fixes null pointer dereference
Fixes: 1/null_point.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/avidec: Remove ancient assert
Michael Niedermayer [Wed, 28 Sep 2016 13:47:12 +0000 (15:47 +0200)]
avformat/avidec: Remove ancient assert

This assert can with crafted files fail, a warning is already printed
for this case.

Fixes assertion failure
Fixes:1/assert.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavc/qdm2: increase code clarity
Adriano Pallavicino [Tue, 27 Sep 2016 18:22:20 +0000 (20:22 +0200)]
lavc/qdm2: increase code clarity

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agolavc/movtextdec.c: Avoid infinite loop on invalid data.
Sasi Inguva [Wed, 28 Sep 2016 02:23:20 +0000 (19:23 -0700)]
lavc/movtextdec.c: Avoid infinite loop on invalid data.

Signed-off-by: Sasi Inguva <isasi@google.com>
7 years agoffprobe: don't use AVStream.codec to set decoder framerate
James Almer [Tue, 27 Sep 2016 01:56:52 +0000 (22:56 -0300)]
ffprobe: don't use AVStream.codec to set decoder framerate

Also don't set time_base. It's deprecated for decoding and avcodec_open2()
will overwrite it

Reviewed-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/matroskadec: set AVCodecParameters.field_order on progressive video
James Almer [Tue, 27 Sep 2016 17:48:33 +0000 (14:48 -0300)]
avformat/matroskadec: set AVCodecParameters.field_order on progressive video

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/matroskadec: retain error codes in matroska_resync() and matroska_read_packet()
Sophia Wang [Tue, 27 Sep 2016 19:00:29 +0000 (12:00 -0700)]
avformat/matroskadec: retain error codes in matroska_resync() and matroska_read_packet()

Signed-off-by: Sophia Wang <skw@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agodoc/filters: blend terminates on longest input
Mulvya [Sat, 24 Sep 2016 03:35:27 +0000 (09:05 +0530)]
doc/filters: blend terminates on longest input

Signed-off-by: Mulvya <mulvya@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
7 years agoffmpeg: stop using AVStream.codec on stream copy
James Almer [Tue, 27 Sep 2016 13:10:44 +0000 (10:10 -0300)]
ffmpeg: stop using AVStream.codec on stream copy

This commit is based on commit 35c8580 from Anton Khirnov <anton@khirnov.net>
which was skipped in b8945c4.

The avcodec_copy_context() call in the encode path is left in place for now
as AVStream.codec is apparently still required even after porting ffmpeg to
the new bsf API.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat: add av_stream_get_codec_timebase()
James Almer [Tue, 27 Sep 2016 13:07:14 +0000 (10:07 -0300)]
avformat: add av_stream_get_codec_timebase()

This will allow ffmpeg.c to stop using AVStream.codec in some cases

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoswr: Update version & APIChanges for swr_build_matrix()
Michael Niedermayer [Tue, 27 Sep 2016 13:26:13 +0000 (15:26 +0200)]
swr: Update version & APIChanges for swr_build_matrix()

Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoswresample: Add swr_build_matrix()
Michael Niedermayer [Wed, 17 Aug 2016 23:08:50 +0000 (01:08 +0200)]
swresample: Add swr_build_matrix()

API and Doxy documentation is taken from avresample_build_matrix()
Fixes: Ticket5780

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoswresample: Use double and float for matrixes for best quality and speed
Michael Niedermayer [Wed, 17 Aug 2016 23:07:32 +0000 (01:07 +0200)]
swresample: Use double and float for matrixes for best quality and speed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agodoc: Mention -dn in the "Stream selection" paragraph.
Carl Eugen Hoyos [Tue, 27 Sep 2016 07:07:17 +0000 (09:07 +0200)]
doc: Mention -dn in the "Stream selection" paragraph.

There is no "Data options" paragraph.
Requested-by: ilker tezcan
7 years agoffprobe: don't access AVCodecContext.pkt_timebase directly
James Almer [Tue, 27 Sep 2016 01:45:39 +0000 (22:45 -0300)]
ffprobe: don't access AVCodecContext.pkt_timebase directly

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/ansi: Check dimensions
Michael Niedermayer [Mon, 26 Sep 2016 18:25:59 +0000 (20:25 +0200)]
avcodec/ansi: Check dimensions

Fixes: 1.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/mpegvideo_enc: fix memory leak
Timo Rothenpieler [Sun, 25 Sep 2016 13:41:47 +0000 (15:41 +0200)]
avcodec/mpegvideo_enc: fix memory leak

When the input frames contain side data, it will accumulate endlessly in
the coded frame, as av_frame_copy_props will append any new side data.

Fixes ticket #5799.

7 years agolavf/movenc: Allow to disable writing the timecode track.
Carl Eugen Hoyos [Mon, 26 Sep 2016 06:50:48 +0000 (08:50 +0200)]
lavf/movenc: Allow to disable writing the timecode track.

Fixes ticket #5492.

7 years agoavcodec/hevc: Add YUV420P10 to vaapi hardware decode - permits hardware decoding...
Jean-Yves Simon [Tue, 9 Aug 2016 15:15:30 +0000 (17:15 +0200)]
avcodec/hevc: Add YUV420P10 to vaapi hardware decode - permits hardware decoding of HEVC Main 10 on AMD RX 480

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoffmpeg: fix memleak of bitstream filter context on failure
James Almer [Sat, 24 Sep 2016 18:03:42 +0000 (15:03 -0300)]
ffmpeg: fix memleak of bitstream filter context on failure

Increase the nb_bitstream_filters value as soon as the context is allocated, so
if option parsing fails the last context is actually freed.

Reviewed-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoffmpeg: fix memleak of encoder options AVDictionary on failure
James Almer [Sat, 24 Sep 2016 17:59:01 +0000 (14:59 -0300)]
ffmpeg: fix memleak of encoder options AVDictionary on failure

Reviewed-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/Makefile: Fix mlpenc dependencies
James Almer [Sun, 25 Sep 2016 19:12:18 +0000 (16:12 -0300)]
avcodec/Makefile: Fix mlpenc dependencies

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/avidec: remove warning about deprecated declarations
James Almer [Sun, 25 Sep 2016 19:03:21 +0000 (16:03 -0300)]
avformat/avidec: remove warning about deprecated declarations

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agodoc/libav-merge: change gmane link to a ffmpeg.org one
Clément Bœsch [Sun, 25 Sep 2016 17:38:27 +0000 (19:38 +0200)]
doc/libav-merge: change gmane link to a ffmpeg.org one

7 years agodoc: move out merge script to tools
Clément Bœsch [Sun, 25 Sep 2016 17:26:39 +0000 (19:26 +0200)]
doc: move out merge script to tools

7 years agodoc: remove codecpar mention in libav-merge.txt
Clément Bœsch [Sun, 25 Sep 2016 17:17:39 +0000 (19:17 +0200)]
doc: remove codecpar mention in libav-merge.txt

7 years agoMerge commit '1e93c1e30ff0e8bf6094a426ca60f005e9cdaed3'
Clément Bœsch [Sun, 25 Sep 2016 17:15:44 +0000 (19:15 +0200)]
Merge commit '1e93c1e30ff0e8bf6094a426ca60f005e9cdaed3'

* commit '1e93c1e30ff0e8bf6094a426ca60f005e9cdaed3':
  avconv: do not set encoder options when streamcopy is used

This chunk was removed in 955b818cf947473ec94a3fe8aa7f408b119fbbc9
already.

Merged-by: Clément Bœsch <u@pkh.me>
7 years agolavd/sdl2: add sdl alias
Josh de Kock [Sun, 25 Sep 2016 11:55:16 +0000 (12:55 +0100)]
lavd/sdl2: add sdl alias

This commit also adds an sdl alias for the configure script.

7 years agolavd/sdl2: remove unused code
Josh de Kock [Sat, 24 Sep 2016 17:57:55 +0000 (18:57 +0100)]
lavd/sdl2: remove unused code

7 years agoavformat/avidec: Fix memleak with dv in avi
Michael Niedermayer [Sun, 25 Sep 2016 09:56:11 +0000 (11:56 +0200)]
avformat/avidec: Fix memleak with dv in avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoffmpeg: Fix bistream typos
Michael Niedermayer [Sun, 25 Sep 2016 01:29:07 +0000 (03:29 +0200)]
ffmpeg: Fix bistream typos

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec: fix vc1dsp dependencies
Xiaolei Yu [Sun, 25 Sep 2016 10:56:55 +0000 (18:56 +0800)]
avcodec: fix vc1dsp dependencies

7 years agolavf/utils: Avoid an overflow for huge negative durations.
Carl Eugen Hoyos [Sat, 24 Sep 2016 11:07:39 +0000 (13:07 +0200)]
lavf/utils: Avoid an overflow for huge negative durations.

Fixes ticket #5135.

7 years agoavcodec/nvenc: use AVERROR_BUFFER_TOO_SMALL instead of ENOBUFS
James Almer [Sat, 24 Sep 2016 18:31:00 +0000 (15:31 -0300)]
avcodec/nvenc: use AVERROR_BUFFER_TOO_SMALL instead of ENOBUFS

Should fix compilation with mingw32

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavfilter/tests/integral: Remove unused variables
Michael Niedermayer [Sat, 24 Sep 2016 17:31:55 +0000 (19:31 +0200)]
avfilter/tests/integral: Remove unused variables

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoffmpeg: switch to the new BSF API
Clément Bœsch [Wed, 21 Sep 2016 13:39:16 +0000 (15:39 +0200)]
ffmpeg: switch to the new BSF API

This commit is initially largely based on commit 4426540 from Anton
Khirnov <anton@khirnov.net> and two following fixes (80fb19b and
fe7b21c) which were previously skipped respectively in 98e3153c9ee36e,
and 7fe7cdc.

mpeg4-bsf-unpack-bframes FATE reference is updated because the bsf
filter now actually fixes the extradata (mpeg4_unpack_bframes_init()
changing one byte is now honored on the output extradata).

The FATE references for remove_extra change because the packet flags
were wrong and the keyframes weren't marked, causing the bsf relying on
these proprieties to not actually work as intended.

The following was fixed by James Almer:

The filter option arguments are now also parsed correctly.

A hack to propagate extradata changed by bitstream filters after the
first av_bsf_receive_packet() call is added to maintain the current
behavior. This was previously done by av_bitstream_filter_filter() and
is needed for the aac_adtstoasc bsf.

The exit_on_error was not being checked anymore, and led to an exit
error in the last frame of h264_mp4toannexb test. Restoring this
behaviour prevents erroring out. The test is still changed as a result
due to the badly filtered frame now not being written after the failure.

Signed-off-by: Clément Bœsch <u@pkh.me>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agolavd/sdl2: Fix 32bit rgb formats on little-endian hardware.
Carl Eugen Hoyos [Sat, 24 Sep 2016 16:56:40 +0000 (18:56 +0200)]
lavd/sdl2: Fix 32bit rgb formats on little-endian hardware.

7 years agolavd/sdl2: Move unsupported formats SDL_PIXELFORMAT_xxx888 updwards.
Carl Eugen Hoyos [Sat, 24 Sep 2016 16:35:15 +0000 (18:35 +0200)]
lavd/sdl2: Move unsupported formats SDL_PIXELFORMAT_xxx888 updwards.

There is a paragraph for unsupported SDL formats.

7 years agolavf/aacdec: Do not autodetect a single frame inside the file.
Carl Eugen Hoyos [Sat, 24 Sep 2016 13:09:27 +0000 (15:09 +0200)]
lavf/aacdec: Do not autodetect a single frame inside the file.

7 years agolavd: drop SDL1 device and SDL1 support
Josh de Kock [Thu, 22 Sep 2016 18:20:24 +0000 (19:20 +0100)]
lavd: drop SDL1 device and SDL1 support

Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agoffplay: add SDL2 support
Marton Balint [Tue, 23 Feb 2016 20:43:41 +0000 (20:43 +0000)]
ffplay: add SDL2 support

This commit also drops SDL1 support for ffplay.

Tested-by: James Almer <jamrial@gmail.com> (Windows, mingw-w64)
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agolavd/opengl: use SDL2
Lukasz Marek [Sun, 18 Sep 2016 17:13:12 +0000 (19:13 +0200)]
lavd/opengl: use SDL2

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agoMAINTAINERS: update my entries
Josh de Kock [Wed, 14 Sep 2016 21:43:33 +0000 (22:43 +0100)]
MAINTAINERS: update my entries

Acked-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agolavd: Add SDL2 output device
Josh de Kock [Wed, 24 Feb 2016 23:31:02 +0000 (23:31 +0000)]
lavd: Add SDL2 output device

Acked-by: Michael Niedermayer
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agolavfi: add nlmeans filter
Clément Bœsch [Wed, 30 Sep 2015 18:29:30 +0000 (20:29 +0200)]
lavfi: add nlmeans filter

Fixes Ticket #4910

7 years agoavformat/hls: Fix handling of EXT-X-BYTERANGE streams over 2GB
Anssi Hannula [Sat, 24 Sep 2016 06:29:03 +0000 (09:29 +0300)]
avformat/hls: Fix handling of EXT-X-BYTERANGE streams over 2GB

Replace uses of atoi() with strtoll() when trying to read values into
int64_t variables.

Fixes Kodi trac #16926:
http://trac.kodi.tv/ticket/16926

7 years agoavformat/hlsenc: refine EXT-X-BYTERANGE support for segments
Steven Liu [Sun, 18 Sep 2016 23:00:42 +0000 (07:00 +0800)]
avformat/hlsenc: refine EXT-X-BYTERANGE support for segments

refine EXT-X-BYTERANGE tag,
the spec link:
https://tools.ietf.org/html/draft-pantos-http-live-streaming-19#section-4.3.2.2
the apple doc:
https://developer.apple.com/library/ios/technotes/tn2288/_index.html#
//apple_ref/doc/uid/DTS40012238-CH1-BYTE_RANGE_SUPPORT_FOR_SEGMENTS

command line:
./ffmpeg -i ~/Movies/objectC/a.mp4 -c copy -f hls -hls_time 7
 -hls_list_size 0 -hls_segment_size 2500000 -t 40 output-test.m3u8
output:
localhost:ffmpeg liuqi$ ll *.ts ;cat output-test.m3u8
 -rw-r--r--  1 liuqi  staff  2792176  9 12 14:44 output-test0.ts
 -rw-r--r--  1 liuqi  staff  3112528  9 12 14:44 output-test3.ts
 -rw-r--r--  1 liuqi  staff  3377420  9 12 14:44 output-test6.ts
 -rw-r--r--  1 liuqi  staff  1228016  9 12 14:44 output-test7.ts
 #EXTM3U
 #EXT-X-VERSION:4
 #EXT-X-TARGETDURATION:10
 #EXT-X-MEDIA-SEQUENCE:0
 #EXTINF:9.021000,
 #EXT-X-BYTERANGE:1334988@0
 output-test0.ts
 #EXTINF:3.000000,
 #EXT-X-BYTERANGE:721356@1334988
 output-test0.ts
 #EXTINF:3.000000,
 #EXT-X-BYTERANGE:735832@2056344
 output-test0.ts
 #EXTINF:6.000000,
 #EXT-X-BYTERANGE:1645940@0
 output-test3.ts
 #EXTINF:3.000000,
 #EXT-X-BYTERANGE:715152@1645940
 output-test3.ts
 #EXTINF:3.000000,
 #EXT-X-BYTERANGE:751436@2361092
 output-test3.ts
 #EXTINF:9.000000,
 #EXT-X-BYTERANGE:3377420@0
 output-test6.ts
 #EXTINF:3.960000,
 #EXT-X-BYTERANGE:1228016@0
 output-test7.ts
 #EXT-X-ENDLIST
 localhost:ffmpeg liuqi$

 ticket-id: #5839

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>