Commit Graph

266 Commits

Author SHA1 Message Date
wm4
cdd6f059a6 avcodec, avutil: allow more control about how samples are skipped
Add CODEC_FLAG2_SKIP_MANUAL (exposed as "skip_manual"), which makes
the decoder export sample skip information via side data, instead
of applying it automatically. The format of the side data is the
same as AV_PKT_DATA_SKIP_SAMPLES, but since AVPacket and AVFrame
side data constants overlap, AV_FRAME_DATA_SKIP_SAMPLES needs to
be introduced.

This is useful for applications which want to do the timestamp
calculations manually, or which actually want to retrieve the
padding.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 20:21:00 +02:00
Michael Niedermayer
0d92b0d5f4 avutil/avstring: Factor av_match_list() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 18:51:05 +02:00
Nicolas George
eb7a6d0813 lavu/bprint: add const to av_bprint_is_complete() argument. 2014-09-21 19:42:21 +02:00
James Almer
95a064f530 avutil: remove obsolete FF_API_OLD_OPENCL cruft
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-15 15:50:17 -03:00
James Almer
af7d260626 avutil: remove obsolete FF_API_LLS1 cruft
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-15 15:50:10 -03:00
Reimar Döffinger
8fc9bd0d32 dict.c: Free non-strduped av_dict_set arguments on error.
Unfortunately this was not explicitly documented and thus
might be risky.
But all uses I could find in FFmpeg and one in VLC had a memleak
in these cases, and I could not find any that relied on the previous
behaviour.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-23 15:28:48 +02:00
Clément Bœsch
980a5b01fd avutil/motion_vector.h: fix coordinate types
See b0352b1997 for more information on the
feature.
2014-08-21 12:27:34 +02:00
Clément Bœsch
b0352b1997 avcodec: export motion vectors in frame side data on demand
The reasoning behind this addition is that various third party
applications are interested in getting some motion information out of a
video "for free" when it is available.

It was considered to export other information as well (such as the intra
information about the block, or the quantization) but the structure
might have ended up into a half full-generic, half full of codec
specific cruft. If more information is necessary, it should either be
added in the "flags" field of the AVMotionVector structure, or in
another side-data.

This commit also includes an example exporting them in a CSV stream.
2014-08-18 14:13:57 +02:00
Reimar Döffinger
c2829dc925 dict.c: Add av_dict_set_int helper function.
This allows getting rid of the many, slightly differing, implementations
of basically the same thing.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-16 14:30:18 +02:00
Michael Niedermayer
c8571c61ec Merge commit '8ddc32629a6d6be77256694c9e322dde134609f3'
* commit '8ddc32629a6d6be77256694c9e322dde134609f3':
  mem: add av_strndup() for duplicating substrings

Conflicts:
	libavutil/mem.c
	libavutil/mem.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 00:29:06 +02:00
Michael Niedermayer
2ba4577809 Merge commit 'a8c104a511f97e4ea617df73b31737e28a8a5126'
* commit 'a8c104a511f97e4ea617df73b31737e28a8a5126':
  AVOption: add support for dictionary types.

Conflicts:
	libavutil/opt.c
	libavutil/opt.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 22:39:54 +02:00
Anton Khirnov
8ddc32629a mem: add av_strndup() for duplicating substrings 2014-08-13 17:24:18 +00:00
Andrew Stone
a8c104a511 AVOption: add support for dictionary types.
In order to support metadata being set as an option, it's necessary to be able
to set dictionaries as values.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:07:40 +00:00
Michael Niedermayer
78eaaa857e Merge commit 'fb1ddcdc8f51b9d261ae8e9c26b91e81f7b6bf45'
* commit 'fb1ddcdc8f51b9d261ae8e9c26b91e81f7b6bf45':
  avresample: Introduce AVFrame-based API

Conflicts:
	libavresample/utils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 18:20:37 +02:00
Luca Barbato
fb1ddcdc8f avresample: Introduce AVFrame-based API 2014-08-10 14:26:37 +02:00
Michael Niedermayer
287602f9d8 Merge commit '472f9ed312ec784f7c72876b77163f4741880d05'
* commit '472f9ed312ec784f7c72876b77163f4741880d05':
  Remove obsolete FF_API_AVFRAME_COLORSPACE cruft.

Conflicts:
	libavcodec/utils.c
	libavutil/frame.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 01:29:24 +02:00
Michael Niedermayer
a57ece0cb4 Merge commit '1985c2e75c607ac51bfd8dc87d2957a5edf2b6f8'
* commit '1985c2e75c607ac51bfd8dc87d2957a5edf2b6f8':
  Bump major versions of all libraries.

Conflicts:
	doc/APIchanges
	libavcodec/version.h
	libavdevice/version.h
	libavfilter/version.h
	libavformat/version.h
	libavutil/version.h
	libswscale/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 00:26:45 +02:00
Michael Niedermayer
5e1832c29c avutil: delay removial of FF_API_GET_CHANNEL_LAYOUT_COMPAT
avoids fate failure of join filter

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-09 23:19:54 +02:00
Michael Niedermayer
c89afc9acf delay removial of FF_API_CODEC_ID, FF_API_OLD_AVOPTIONS and FF_API_OLD_ENCODE_VIDEO
This prevents a build failure when bumping.
the uses could easily be updated / removed, if people prefer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-09 23:19:16 +02:00
Michael Niedermayer
3e41d2e612 Merge commit 'f4c444e17d137c786f0ed2da0e5943df505d5f9e'
* commit 'f4c444e17d137c786f0ed2da0e5943df505d5f9e':
  Postpone API-incompatible changes until the next bump.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-09 22:19:45 +02:00
Anton Khirnov
472f9ed312 Remove obsolete FF_API_AVFRAME_COLORSPACE cruft. 2014-08-09 16:59:13 +00:00
Anton Khirnov
1985c2e75c Bump major versions of all libraries. 2014-08-09 16:58:33 +00:00
Anton Khirnov
f4c444e17d Postpone API-incompatible changes until the next bump. 2014-08-09 16:57:10 +00:00
Clément Bœsch
28a2107a8d avutil: add pixelutils API 2014-08-05 21:05:52 +02:00
Michael Niedermayer
6017c98036 Merge commit 'e9abafca278f87e1ecc6d50091d99b73ff63c9a6'
* commit 'e9abafca278f87e1ecc6d50091d99b73ff63c9a6':
  avutil: add AV_PIX_FMT_YA16 pixel format

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:12:24 +02:00
Michael Niedermayer
4c8bc6fdee Merge commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5'
* commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5':
  avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/raw.c
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	libavutil/version.h
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 21:48:00 +02:00
Michael Niedermayer
073c074447 Merge commit 'd2962e9f89cca6ff40f0c9d5ffc9c4397b8b1b26'
* commit 'd2962e9f89cca6ff40f0c9d5ffc9c4397b8b1b26':
  pixdesc: Support pixelformat aliases

Conflicts:
	doc/APIchanges
	libavutil/pixdesc.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 21:32:03 +02:00
Vittorio Giovara
e9abafca27 avutil: add AV_PIX_FMT_YA16 pixel format 2014-08-04 12:55:08 +01:00
Vittorio Giovara
e96c3b81ca avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8
The rationale is that you have a packed format in form
<greyscale sample> <alpha sample> <greyscale sample> <alpha sample>
and shortening greyscale to 'G' might make one thing about Greenscale instead.
An alias pixel format and color space name are provided for compatibility.
2014-08-04 12:55:08 +01:00
Luca Barbato
d2962e9f89 pixdesc: Support pixelformat aliases
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-08-04 12:55:07 +01:00
Michael Niedermayer
22a0249deb Merge commit 'bb41115d56930b9f5d59e79dca254d1201246967'
* commit 'bb41115d56930b9f5d59e79dca254d1201246967':
  imgutils: Do not declare avpriv_set_systematic_pal2 in the public header

Conflicts:
	libavutil/internal.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 12:41:15 +02:00
Diego Biurrun
bb41115d56 imgutils: Do not declare avpriv_set_systematic_pal2 in the public header 2014-08-04 02:52:33 -07:00
Kieran Kunhya
2a3c36e920 Deprecate AFD field and add AFD as side-data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 05:36:44 +02:00
Kieran Kunhya
1ef9e83764 avcodec: Deprecate dtg_active_format field in favor of avframe side-data
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-03 15:43:02 -07:00
Michael Niedermayer
ba3e3311ef avutil/frame: add av_frame_side_data_name()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-30 19:19:22 +02:00
Michael Niedermayer
31e0b5d3cb Merge commit '69e7336b8e16ee65226fc20381baf537f4b125e6'
* commit '69e7336b8e16ee65226fc20381baf537f4b125e6':
  avstring: Expose the simple name match function

Conflicts:
	libavutil/avstring.c
	libavutil/avstring.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-29 20:24:42 +02:00
Luca Barbato
69e7336b8e avstring: Expose the simple name match function
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-07-29 17:46:29 +02:00
Stefano Sabatini
f3e886c7df lavu/eval: add clip function 2014-07-17 11:29:01 +02:00
Michael Niedermayer
c67690f854 Merge commit 'a54f03bf07da964a1b04b03b85bc39deba76efa4'
* commit 'a54f03bf07da964a1b04b03b85bc39deba76efa4':
  display: add matrix flip api

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 23:57:20 +02:00
Vittorio Giovara
a54f03bf07 display: add matrix flip api 2014-07-09 10:14:12 -04:00
Andrey Utkin
fcd1f6bc9d avutil/bprint: Add av_bprint_fd_contents()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 21:28:18 +02:00
Timothy Gu
0201ce002c avutil: fix version macros doxygen module
Without this patch, "Library Version Macros" module is not visible on
libavutil homepage in `make apidoc`.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 20:54:19 +02:00
Michael Niedermayer
faa1d4b134 Merge commit 'ab72eda15e98197cf148abc08574206cfde0d9b0'
* commit 'ab72eda15e98197cf148abc08574206cfde0d9b0':
  pixfmt: mark the reserved values

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 01:09:38 +02:00
Vittorio Giovara
ab72eda15e pixfmt: mark the reserved values 2014-06-23 17:39:03 -04:00
Michael Niedermayer
0dceefc5fa Merge commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2'
* commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2':
  Add av_image_check_sar() and use it to validate SAR

Conflicts:
	libavcodec/dpx.c
	libavcodec/dvdec.c
	libavcodec/ffv1dec.c
	libavcodec/utils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 22:20:28 +02:00
Justin Ruggles
9e500efdbe Add av_image_check_sar() and use it to validate SAR 2014-06-20 10:39:33 -04:00
Michael Niedermayer
00759d71a2 avutil/opt: add av_opt_copy()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 20:49:18 +02:00
Michael Niedermayer
6e8e9f1e51 Merge commit '8c02adc62d71dfbb079a04753d8c16152c49de88'
* commit '8c02adc62d71dfbb079a04753d8c16152c49de88':
  lavu: add all color-related enums to AVFrame

Conflicts:
	libavcodec/avcodec.h
	libavutil/frame.c
	libavutil/frame.h
	libavutil/version.h

The version check is changed so they are available with the current ABI
FFmpeg libs should have no problems with added fields, nor should any
application using the libs, and we regularly added fields in the past.
We also moved 2 of these fields to AVFrame already previously without issues.

See: a80e622924
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 13:18:32 +02:00
wm4
8c02adc62d lavu: add all color-related enums to AVFrame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-01 08:22:02 +02:00
Nicolas George
55cc60cd6d lavu: add thread message API. 2014-05-26 11:40:15 +02:00