[FFmpeg-cvslog] Bump major versions of all libraries

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 16 15:37:51 2017 -0400| [07a2b155949eb267cdfc7805f42c7b3375f9c7c5] | 
committer: Vittorio Giovara

Bump major versions of all libraries

This disables everything that was deprecated at least 18 months ago.

Readjust the minimum API version as needed, postponing any
API-incompatible changes until the next bump.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07a2b155949eb267cdfc7805f42c7b3375f9c7c5
---

 libavcodec/version.h| 22 +++---
 libavdevice/version.h   |  4 ++--
 libavfilter/version.h   |  4 ++--
 libavformat/version.h   | 12 ++--
 libavresample/version.h |  2 +-
 libavutil/version.h | 12 ++--
 libswscale/version.h|  2 +-
 7 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/libavcodec/version.h b/libavcodec/version.h
index f169793c15..2b9290316c 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,9 +27,9 @@
 
 #include "libavutil/version.h"
 
-#define LIBAVCODEC_VERSION_MAJOR 57
-#define LIBAVCODEC_VERSION_MINOR 37
-#define LIBAVCODEC_VERSION_MICRO  1
+#define LIBAVCODEC_VERSION_MAJOR 58
+#define LIBAVCODEC_VERSION_MINOR  0
+#define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -141,28 +141,28 @@
 #define FF_API_AUDIOENC_DELAY(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_AVCTX_TIMEBASE
-#define FF_API_AVCTX_TIMEBASE(LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_AVCTX_TIMEBASE(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_MPV_OPT
-#define FF_API_MPV_OPT   (LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_MPV_OPT   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_STREAM_CODEC_TAG
-#define FF_API_STREAM_CODEC_TAG  (LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_STREAM_CODEC_TAG  (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_QUANT_BIAS
-#define FF_API_QUANT_BIAS(LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_QUANT_BIAS(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_RC_STRATEGY
-#define FF_API_RC_STRATEGY   (LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_RC_STRATEGY   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_CODED_FRAME
-#define FF_API_CODED_FRAME   (LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_CODED_FRAME   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_MOTION_EST
-#define FF_API_MOTION_EST(LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_MOTION_EST(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_WITHOUT_PREFIX
-#define FF_API_WITHOUT_PREFIX(LIBAVCODEC_VERSION_MAJOR < 59)
+#define FF_API_WITHOUT_PREFIX(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_SIDEDATA_ONLY_PKT
 #define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)
diff --git a/libavdevice/version.h b/libavdevice/version.h
index a5297320da..1bcb32c4c9 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -27,8 +27,8 @@
 
 #include "libavutil/version.h"
 
-#define LIBAVDEVICE_VERSION_MAJOR 56
-#define LIBAVDEVICE_VERSION_MINOR  1
+#define LIBAVDEVICE_VERSION_MAJOR 57
+#define LIBAVDEVICE_VERSION_MINOR  0
 #define LIBAVDEVICE_VERSION_MICRO  0
 
 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 969f8101cd..9a0a2c90ad 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -29,8 +29,8 @@
 
 #include "libavutil/version.h"
 
-#define LIBAVFILTER_VERSION_MAJOR  6
-#define LIBAVFILTER_VERSION_MINOR  9
+#define LIBAVFILTER_VERSION_MAJOR  7
+#define LIBAVFILTER_VERSION_MINOR  0
 #define LIBAVFILTER_VERSION_MICRO  0
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavformat/version.h b/libavformat/version.h
index 34650f6ec3..7103b5d969 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -29,9 +29,9 @@
 
 #include "libavutil/version.h"
 
-#define LIBAVFORMAT_VERSION_MAJOR 57
-#define LIBAVFORMAT_VERSION_MINOR 11
-#define LIBAVFORMAT_VERSION_MICRO  4
+#define LIBAVFORMAT_VERSION_MAJOR 58
+#define LIBAVFORMAT_VERSION_MINOR  0
+#define LIBAVFORMAT_VERSION_MICRO  0
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
@@ -58,13 +58,13 @@
 #define FF_API_LAVF_CODEC_TB(LIBAVFORMAT_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_LAVF_FMT_RAWPICTURE
-#define FF_API_LAVF_FMT_RAWPICTURE  (LIBAVFORMAT_VERSION_MAJOR < 58)
+#define FF_API_LAVF_FMT_RAWPICTURE  (LIBAVFORMAT_VERSION_MAJOR < 59)
 #endif
 #ifndef FF_API_COMPUTE_PKT_FIELDS2
-#define FF_API_COMPUTE_PKT_FIELDS2  (LIBAVFORMAT_VERS

[FFmpeg-cvslog] lavfi: Drop deprecated way of passing options for a few filters

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 12:38:32 2016 -0500| [88fd836a015a5f3380df74592e440e7d1e5b8000] | 
committer: Vittorio Giovara

lavfi: Drop deprecated way of passing options for a few filters

Deprecated in 02/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88fd836a015a5f3380df74592e440e7d1e5b8000
---

 libavfilter/af_channelmap.c |  7 -
 libavfilter/af_join.c   |  8 -
 libavfilter/avfilter.c  | 76 -
 libavfilter/buffersrc.c |  8 -
 libavfilter/version.h   |  3 --
 libavfilter/vf_aspect.c | 46 ---
 6 files changed, 148 deletions(-)

diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 572549808f..e214bdbcc1 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -150,13 +150,6 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
 else
 mode = MAP_PAIR_STR_STR;
 }
-#if FF_API_OLD_FILTER_OPTS
-if (strchr(mapping, ',')) {
-av_log(ctx, AV_LOG_WARNING, "This syntax is deprecated, use "
-   "'|' to separate the mappings.\n");
-separator = ',';
-}
-#endif
 }
 
 if (mode != MAP_NONE) {
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 4d86c8b357..b61033f7a2 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -104,14 +104,6 @@ static int parse_maps(AVFilterContext *ctx)
 char separator = '|';
 char *cur  = s->map;
 
-#if FF_API_OLD_FILTER_OPTS
-if (cur && strchr(cur, ',')) {
-av_log(ctx, AV_LOG_WARNING, "This syntax is deprecated, use '|' to "
-   "separate the mappings.\n");
-separator = ',';
-}
-#endif
-
 while (cur && *cur) {
 char *sep, *next, *p;
 uint64_t in_channel = 0, out_channel = 0;
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 99531e5690..d9c204e766 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -624,87 +624,11 @@ int avfilter_init_str(AVFilterContext *filter, const char 
*args)
 return AVERROR(EINVAL);
 }
 
-#if FF_API_OLD_FILTER_OPTS
-if (!strcmp(filter->filter->name, "scale") &&
-strchr(args, ':') && strchr(args, ':') < strchr(args, '=')) {
-/* old w:h:flags= syntax */
-char *copy = av_strdup(args);
-char *p;
-
-av_log(filter, AV_LOG_WARNING, "The ::flags= option "
-   "syntax is deprecated. Use either :: or "
-   "w=:h=:flags=.\n");
-
-if (!copy) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
-
-p = strrchr(copy, ':');
-if (p) {
-*p++ = 0;
-ret = av_dict_parse_string(&options, p, "=", ":", 0);
-}
-if (ret >= 0)
-ret = process_unnamed_options(filter, &options, copy);
-av_freep(©);
-
-if (ret < 0)
-goto fail;
-} else
-#endif
-
 if (strchr(args, '=')) {
 /* assume a list of key1=value1:key2=value2:... */
 ret = av_dict_parse_string(&options, args, "=", ":", 0);
 if (ret < 0)
 goto fail;
-#if FF_API_OLD_FILTER_OPTS
-} else if (!strcmp(filter->filter->name, "format") ||
-   !strcmp(filter->filter->name, "noformat")   ||
-   !strcmp(filter->filter->name, "frei0r") ||
-   !strcmp(filter->filter->name, "frei0r_src") ||
-   !strcmp(filter->filter->name, "ocv")) {
-/* a hack for compatibility with the old syntax
- * replace colons with |s */
-char *copy = av_strdup(args);
-char *p= copy;
-int nb_leading = 0; // number of leading colons to skip
-
-if (!copy) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
-
-if (!strcmp(filter->filter->name, "frei0r") ||
-!strcmp(filter->filter->name, "ocv"))
-nb_leading = 1;
-else if (!strcmp(filter->filter->name, "frei0r_src"))
-nb_leading = 3;
-
-while (nb_leading--) {
-p = strchr(p, ':');
-if (!p) {
-p = copy + strlen(copy);
-break;
-}
-p++;
-}

[FFmpeg-cvslog] lavfi: Drop deprecated functions to open a filter or a filterchain

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 12:41:49 2016 -0500| [c5c7cfd5e80d4c36568c01cc40abfde341657ad9] | 
committer: Vittorio Giovara

lavfi: Drop deprecated functions to open a filter or a filterchain

Deprecated in 03/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5c7cfd5e80d4c36568c01cc40abfde341657ad9
---

 libavfilter/avfilter.c  |  8 
 libavfilter/avfilter.h  | 30 --
 libavfilter/avfiltergraph.c | 17 -
 libavfilter/version.h   |  3 ---
 4 files changed, 58 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index d9c204e766..d6bddef4a0 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -475,14 +475,6 @@ err:
 return NULL;
 }
 
-#if FF_API_AVFILTER_OPEN
-int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char 
*inst_name)
-{
-*filter_ctx = ff_filter_alloc(filter, inst_name);
-return *filter_ctx ? 0 : AVERROR(ENOMEM);
-}
-#endif
-
 static void free_link(AVFilterLink *link)
 {
 if (!link)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 568480dd3e..babcec66f2 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -479,22 +479,6 @@ attribute_deprecated
 AVFilter **av_filter_next(AVFilter **filter);
 #endif
 
-#if FF_API_AVFILTER_OPEN
-/**
- * Create a filter instance.
- *
- * @param filter_ctx put here a pointer to the created filter context
- * on success, NULL on failure
- * @param filterthe filter to create an instance of
- * @param inst_name Name to give to the new instance. Can be NULL for none.
- * @return >= 0 in case of success, a negative error code otherwise
- * @deprecated use avfilter_graph_alloc_filter() instead
- */
-attribute_deprecated
-int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char 
*inst_name);
-#endif
-
-
 #if FF_API_AVFILTER_INIT_FILTER
 /**
  * Initialize a filter.
@@ -691,20 +675,6 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph 
*graph,
  */
 AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name);
 
-#if FF_API_AVFILTER_OPEN
-/**
- * Add an existing filter instance to a filter graph.
- *
- * @param graphctx  the filter graph
- * @param filter the filter to be added
- *
- * @deprecated use avfilter_graph_alloc_filter() to allocate a filter in a
- * filter graph
- */
-attribute_deprecated
-int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext 
*filter);
-#endif
-
 /**
  * Create and add a filter instance into an existing graph.
  * The filter instance is created from the filter filt and inited
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 5053e3c37a..58ede68a31 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -116,23 +116,6 @@ void avfilter_graph_free(AVFilterGraph **graph)
 av_freep(graph);
 }
 
-#if FF_API_AVFILTER_OPEN
-int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
-{
-AVFilterContext **filters = av_realloc(graph->filters,
-   sizeof(*filters) * 
(graph->nb_filters + 1));
-if (!filters)
-return AVERROR(ENOMEM);
-
-graph->filters = filters;
-graph->filters[graph->nb_filters++] = filter;
-
-filter->graph = graph;
-
-return 0;
-}
-#endif
-
 int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter 
*filt,
  const char *name, const char *args, void 
*opaque,
  AVFilterGraph *graph_ctx)
diff --git a/libavfilter/version.h b/libavfilter/version.h
index bb437efa02..540ac48f9b 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -49,9 +49,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_AVFILTER_OPEN
-#define FF_API_AVFILTER_OPEN(LIBAVFILTER_VERSION_MAJOR < 7)
-#endif
 #ifndef FF_API_AVFILTER_INIT_FILTER
 #define FF_API_AVFILTER_INIT_FILTER (LIBAVFILTER_VERSION_MAJOR < 7)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavfi: Drop deprecated filter initialization

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 12:43:19 2016 -0500| [52067b3c0e5ddbcf7021a093420798420351a9e2] | 
committer: Vittorio Giovara

lavfi: Drop deprecated filter initialization

Deprecated in 03/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52067b3c0e5ddbcf7021a093420798420351a9e2
---

 libavfilter/avfilter.c |  7 ---
 libavfilter/avfilter.h | 15 ---
 libavfilter/version.h  |  3 ---
 3 files changed, 25 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index d6bddef4a0..439eee4dd4 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -561,13 +561,6 @@ static int process_unnamed_options(AVFilterContext *ctx, 
AVDictionary **options,
 return 0;
 }
 
-#if FF_API_AVFILTER_INIT_FILTER
-int avfilter_init_filter(AVFilterContext *filter, const char *args, void 
*opaque)
-{
-return avfilter_init_str(filter, args);
-}
-#endif
-
 int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
 {
 int ret = 0;
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index babcec66f2..6537a83407 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -479,21 +479,6 @@ attribute_deprecated
 AVFilter **av_filter_next(AVFilter **filter);
 #endif
 
-#if FF_API_AVFILTER_INIT_FILTER
-/**
- * Initialize a filter.
- *
- * @param filter the filter to initialize
- * @param args   A string of parameters to use when initializing the filter.
- *   The format and meaning of this string varies by filter.
- * @param opaque Any extra non-string data needed by the filter. The meaning
- *   of this parameter varies by filter.
- * @return   zero on success
- */
-attribute_deprecated
-int avfilter_init_filter(AVFilterContext *filter, const char *args, void 
*opaque);
-#endif
-
 /**
  * Initialize a filter with the supplied parameters.
  *
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 540ac48f9b..ef2b34cc6f 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -49,9 +49,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_AVFILTER_INIT_FILTER
-#define FF_API_AVFILTER_INIT_FILTER (LIBAVFILTER_VERSION_MAJOR < 7)
-#endif
 #ifndef FF_API_OLD_FILTER_REGISTER
 #define FF_API_OLD_FILTER_REGISTER  (LIBAVFILTER_VERSION_MAJOR < 7)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavfi: Drop deprecated filter registration

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 13:42:27 2016 -0500| [8e18328b18e69b38a5feae5d10ad01b403a205b6] | 
committer: Vittorio Giovara

lavfi: Drop deprecated filter registration

Deprecated in 04/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e18328b18e69b38a5feae5d10ad01b403a205b6
---

 libavfilter/avfilter.c | 11 ---
 libavfilter/avfilter.h | 18 --
 libavfilter/version.h  |  3 ---
 3 files changed, 32 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 439eee4dd4..3ae7a591db 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -324,17 +324,6 @@ const AVFilter *avfilter_next(const AVFilter *prev)
 return prev ? prev->next : first_filter;
 }
 
-#if FF_API_OLD_FILTER_REGISTER
-AVFilter **av_filter_next(AVFilter **filter)
-{
-return filter ? &(*filter)->next : &first_filter;
-}
-
-void avfilter_uninit(void)
-{
-}
-#endif
-
 int avfilter_pad_count(const AVFilterPad *pads)
 {
 int count;
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 6537a83407..96d3e31863 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -430,12 +430,6 @@ int avfilter_config_links(AVFilterContext *filter);
 /** Initialize the filter system. Register all builtin filters. */
 void avfilter_register_all(void);
 
-#if FF_API_OLD_FILTER_REGISTER
-/** Uninitialize the filter system. Unregister all filters. */
-attribute_deprecated
-void avfilter_uninit(void);
-#endif
-
 /**
  * Register a filter. This is only needed if you plan to use
  * avfilter_get_by_name later to lookup the AVFilter structure by name. A
@@ -467,18 +461,6 @@ AVFilter *avfilter_get_by_name(const char *name);
  */
 const AVFilter *avfilter_next(const AVFilter *prev);
 
-#if FF_API_OLD_FILTER_REGISTER
-/**
- * If filter is NULL, returns a pointer to the first registered filter pointer,
- * if filter is non-NULL, returns the next pointer after filter.
- * If the returned pointer points to NULL, the last registered filter
- * was already reached.
- * @deprecated use avfilter_next()
- */
-attribute_deprecated
-AVFilter **av_filter_next(AVFilter **filter);
-#endif
-
 /**
  * Initialize a filter with the supplied parameters.
  *
diff --git a/libavfilter/version.h b/libavfilter/version.h
index ef2b34cc6f..4f3da2bd10 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -49,9 +49,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_OLD_FILTER_REGISTER
-#define FF_API_OLD_FILTER_REGISTER  (LIBAVFILTER_VERSION_MAJOR < 7)
-#endif
 #ifndef FF_API_NOCONST_GET_NAME
 #define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 7)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavfi: Drop deprecated non-const filter retrieval

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 13:58:30 2016 -0500| [96a47364d1cf346a5d0437e054b1b10d44d8d969] | 
committer: Vittorio Giovara

lavfi: Drop deprecated non-const filter retrieval

Deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96a47364d1cf346a5d0437e054b1b10d44d8d969
---

 libavfilter/avfilter.c  | 5 +
 libavfilter/avfilter.h  | 5 +
 libavfilter/avfiltergraph.c | 4 ++--
 libavfilter/graphparser.c   | 2 +-
 libavfilter/version.h   | 4 
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 3ae7a591db..83c1a7c20d 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -292,10 +292,7 @@ int ff_poll_frame(AVFilterLink *link)
 
 static AVFilter *first_filter;
 
-#if !FF_API_NOCONST_GET_NAME
-const
-#endif
-AVFilter *avfilter_get_by_name(const char *name)
+const AVFilter *avfilter_get_by_name(const char *name)
 {
 const AVFilter *f = NULL;
 
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 96d3e31863..6df69dbbbf 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -449,10 +449,7 @@ int avfilter_register(AVFilter *filter);
  * @return the filter definition, if any matching one is registered.
  * NULL if none found.
  */
-#if !FF_API_NOCONST_GET_NAME
-const
-#endif
-AVFilter *avfilter_get_by_name(const char *name);
+const AVFilter *avfilter_get_by_name(const char *name);
 
 /**
  * Iterate over all registered filters.
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 58ede68a31..a0f797e283 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -293,7 +293,7 @@ static int query_formats(AVFilterGraph *graph, AVClass 
*log_ctx)
 
 if (convert_needed) {
 AVFilterContext *convert;
-AVFilter *filter;
+const AVFilter *filter;
 AVFilterLink *inlink, *outlink;
 char scale_args[256];
 char inst_name[30];
@@ -759,7 +759,7 @@ static int graph_insert_fifos(AVFilterGraph *graph, AVClass 
*log_ctx)
 for (j = 0; j < f->nb_inputs; j++) {
 AVFilterLink *link = f->inputs[j];
 AVFilterContext *fifo_ctx;
-AVFilter *fifo;
+const AVFilter *fifo;
 char name[32];
 
 if (!link->dstpad->needs_fifo)
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index da499b52c9..4c75c045f1 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -131,7 +131,7 @@ static void append_sws_flags(const char **args, const char 
*sws_opts, char *tmp)
 static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int 
index,
  const char *filt_name, const char *args, void 
*log_ctx)
 {
-AVFilter *filt;
+const AVFilter *filt;
 char inst_name[30];
 char tmp_args[TMP_ARGS_SIZE];
 int ret;
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 4f3da2bd10..62fc97dd27 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -49,8 +49,4 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_NOCONST_GET_NAME
-#define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 7)
-#endif
-
 #endif /* AVFILTER_VERSION_H */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavf: Drop deprecated bitexact functionality

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:11:14 2016 -0500| [5e71299758d3aa7c93c3cca618a8e048a9483794] | 
committer: Vittorio Giovara

lavf: Drop deprecated bitexact functionality

Deprecated in 05/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e71299758d3aa7c93c3cca618a8e048a9483794
---

 libavformat/mux.c | 7 ---
 libavformat/version.h | 3 ---
 2 files changed, 10 deletions(-)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index a85c3c79db..dfda89d983 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -99,13 +99,6 @@ static int init_muxer(AVFormatContext *s, AVDictionary 
**options)
 if ((ret = av_opt_set_dict(s, &tmp)) < 0)
 goto fail;
 
-#if FF_API_LAVF_BITEXACT && FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
-if (s->nb_streams && s->streams[0]->codec->flags & AV_CODEC_FLAG_BITEXACT)
-s->flags |= AVFMT_FLAG_BITEXACT;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 // some sanity checks
 if (s->nb_streams == 0 && !(of->flags & AVFMT_NOSTREAMS)) {
 av_log(s, AV_LOG_ERROR, "no streams\n");
diff --git a/libavformat/version.h b/libavformat/version.h
index 7103b5d969..26f5c75991 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -48,9 +48,6 @@
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
  */
-#ifndef FF_API_LAVF_BITEXACT
-#define FF_API_LAVF_BITEXACT(LIBAVFORMAT_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_LAVF_FRAC
 #define FF_API_LAVF_FRAC(LIBAVFORMAT_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavf: Drop deprecated AVFract type and related field

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:13:58 2016 -0500| [263358e0c9e7ffaa965fdbe986c8b18381d2b24a] | 
committer: Vittorio Giovara

lavf: Drop deprecated AVFract type and related field

Deprecated in 05/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=263358e0c9e7ffaa965fdbe986c8b18381d2b24a
---

 libavformat/avformat.h | 21 -
 libavformat/version.h  |  3 ---
 2 files changed, 24 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 547b88b2f1..1bf66b15d1 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -374,19 +374,6 @@ int av_get_packet(AVIOContext *s, AVPacket *pkt, int size);
  */
 int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);
 
-#if FF_API_LAVF_FRAC
-/*/
-/* fractional numbers for exact pts handling */
-
-/**
- * The exact value of the fractional number is: 'val + num / den'.
- * num is assumed to be 0 <= num < den.
- */
-typedef struct AVFrac {
-int64_t val, num, den;
-} AVFrac;
-#endif
-
 /*/
 /* input/output formats */
 
@@ -713,14 +700,6 @@ typedef struct AVStream {
 #endif
 void *priv_data;
 
-#if FF_API_LAVF_FRAC
-/**
- * @deprecated this field is unused
- */
-attribute_deprecated
-struct AVFrac pts;
-#endif
-
 /**
  * This is the fundamental unit of time (in seconds) in terms
  * of which frame timestamps are represented.
diff --git a/libavformat/version.h b/libavformat/version.h
index 26f5c75991..dad38d1180 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -48,9 +48,6 @@
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
  */
-#ifndef FF_API_LAVF_FRAC
-#define FF_API_LAVF_FRAC(LIBAVFORMAT_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_LAVF_CODEC_TB
 #define FF_API_LAVF_CODEC_TB(LIBAVFORMAT_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavf: Drop deprecated hint to set muxer timebase

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:16:21 2016 -0500| [63fe79a3368cc53e6faf7fa265a9a1a8bec46a88] | 
committer: Vittorio Giovara

lavf: Drop deprecated hint to set muxer timebase

Deprecated in 05/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63fe79a3368cc53e6faf7fa265a9a1a8bec46a88
---

 libavformat/mux.c | 11 ---
 libavformat/version.h |  4 +---
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index dfda89d983..cc92f2a960 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -110,17 +110,6 @@ static int init_muxer(AVFormatContext *s, AVDictionary 
**options)
 st  = s->streams[i];
 par = st->codecpar;
 
-#if FF_API_LAVF_CODEC_TB && FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
-if (!st->time_base.num && st->codec->time_base.num) {
-av_log(s, AV_LOG_WARNING, "Using AVStream.codec.time_base as a "
-   "timebase hint to the muxer is deprecated. Set "
-   "AVStream.time_base instead.\n");
-avpriv_set_pts_info(st, 64, st->codec->time_base.num, 
st->codec->time_base.den);
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 #if FF_API_LAVF_AVCTX
 FF_DISABLE_DEPRECATION_WARNINGS
 if (st->codecpar->codec_type == AVMEDIA_TYPE_UNKNOWN &&
diff --git a/libavformat/version.h b/libavformat/version.h
index dad38d1180..7060375c1a 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -48,9 +48,7 @@
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
  */
-#ifndef FF_API_LAVF_CODEC_TB
-#define FF_API_LAVF_CODEC_TB(LIBAVFORMAT_VERSION_MAJOR < 58)
-#endif
+
 #ifndef FF_API_LAVF_FMT_RAWPICTURE
 #define FF_API_LAVF_FMT_RAWPICTURE  (LIBAVFORMAT_VERSION_MAJOR < 59)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated chroma subsample function

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:24:57 2016 -0500| [bc143ce1ac3f8cd851a7e6be69d9a1fbe6b633b6] | 
committer: Vittorio Giovara

lavc: Drop deprecated chroma subsample function

Deprecated in 11/2012.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc143ce1ac3f8cd851a7e6be69d9a1fbe6b633b6
---

 libavcodec/avcodec.h| 6 --
 libavcodec/imgconvert.c | 9 -
 libavcodec/version.h| 3 ---
 3 files changed, 18 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 1e2b13e0d7..5f83a36ea0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4900,12 +4900,6 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, 
int height, int width,
  */
 
 /**
- * @deprecated Use av_pix_fmt_get_chroma_sub_sample
- */
-
-void attribute_deprecated avcodec_get_chroma_sub_sample(enum AVPixelFormat 
pix_fmt, int *h_shift, int *v_shift);
-
-/**
  * Return a value representing the fourCC code associated to the
  * pixel format pix_fmt, or 0 if no associated fourCC code can be
  * found.
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 4667a4fb52..9c8fab59a3 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -33,15 +33,6 @@
 #include "libavutil/internal.h"
 #include "libavutil/imgutils.h"
 
-#if FF_API_GETCHROMA
-void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, 
int *v_shift)
-{
-const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
-*h_shift = desc->log2_chroma_w;
-*v_shift = desc->log2_chroma_h;
-}
-#endif
-
 static int is_gray(const AVPixFmtDescriptor *desc)
 {
 return desc->nb_components - (desc->flags & AV_PIX_FMT_FLAG_ALPHA) == 1;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 2b9290316c..98c93d3bc6 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_GETCHROMA
-#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_MISSING_SAMPLE
 #define FF_API_MISSING_SAMPLE(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated missing sample log function

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:27:30 2016 -0500| [0337adfab5d14a17bf4d5060aa0425e4049a9862] | 
committer: Vittorio Giovara

lavc: Drop deprecated missing sample log function

Deprecated in 01/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0337adfab5d14a17bf4d5060aa0425e4049a9862
---

 libavcodec/avcodec.h | 30 --
 libavcodec/utils.c   | 29 -
 libavcodec/version.h |  3 ---
 3 files changed, 62 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5f83a36ea0..9f7057e840 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -5310,36 +5310,6 @@ void av_fast_padded_malloc(void *ptr, unsigned int 
*size, size_t min_size);
  */
 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
 
-#if FF_API_MISSING_SAMPLE
-/**
- * Log a generic warning message about a missing feature. This function is
- * intended to be used internally by Libav (libavcodec, libavformat, etc.)
- * only, and would normally not be used by applications.
- * @param[in] avc a pointer to an arbitrary struct of which the first field is
- * a pointer to an AVClass struct
- * @param[in] feature string containing the name of the missing feature
- * @param[in] want_sample indicates if samples are wanted which exhibit this 
feature.
- * If want_sample is non-zero, additional verbiage will be added to the log
- * message which tells the user how to report samples to the development
- * mailing list.
- * @deprecated Use avpriv_report_missing_feature() instead.
- */
-attribute_deprecated
-void av_log_missing_feature(void *avc, const char *feature, int want_sample);
-
-/**
- * Log a generic warning message asking for a sample. This function is
- * intended to be used internally by Libav (libavcodec, libavformat, etc.)
- * only, and would normally not be used by applications.
- * @param[in] avc a pointer to an arbitrary struct of which the first field is
- * a pointer to an AVClass struct
- * @param[in] msg string containing an optional message, or NULL if no message
- * @deprecated Use avpriv_request_sample() instead.
- */
-attribute_deprecated
-void av_log_ask_for_sample(void *avc, const char *msg, ...) 
av_printf_format(2, 3);
-#endif /* FF_API_MISSING_SAMPLE */
-
 /**
  * Register the hardware accelerator hwaccel.
  */
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ea4d5fa312..8a481dd025 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1359,35 +1359,6 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, 
int a, int b)
 return i;
 }
 
-#if FF_API_MISSING_SAMPLE
-FF_DISABLE_DEPRECATION_WARNINGS
-void av_log_missing_feature(void *avc, const char *feature, int want_sample)
-{
-av_log(avc, AV_LOG_WARNING, "%s is not implemented. Update your Libav "
-"version to the newest one from Git. If the problem still "
-"occurs, it means that your file has a feature which has not "
-"been implemented.\n", feature);
-if(want_sample)
-av_log_ask_for_sample(avc, NULL);
-}
-
-void av_log_ask_for_sample(void *avc, const char *msg, ...)
-{
-va_list argument_list;
-
-va_start(argument_list, msg);
-
-if (msg)
-av_vlog(avc, AV_LOG_WARNING, msg, argument_list);
-av_log(avc, AV_LOG_WARNING, "If you want to help, upload a sample "
-"of this file to ftp://upload.libav.org/incoming/ "
-"and contact the libav-devel mailing list.\n");
-
-va_end(argument_list);
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif /* FF_API_MISSING_SAMPLE */
-
 static AVHWAccel *first_hwaccel = NULL;
 
 void av_register_hwaccel(AVHWAccel *hwaccel)
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 98c93d3bc6..95b8ed6391 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_MISSING_SAMPLE
-#define FF_API_MISSING_SAMPLE(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_LOWRES
 #define FF_API_LOWRES(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated lowres option

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:28:30 2016 -0500| [b748c280e59cac468ed36cbbe5e71d5ebd434020] | 
committer: Vittorio Giovara

lavc: Drop deprecated lowres option

Deprecated in 04/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b748c280e59cac468ed36cbbe5e71d5ebd434020
---

 libavcodec/avcodec.h | 14 --
 libavcodec/version.h |  3 ---
 2 files changed, 17 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 9f7057e840..35051313fa 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2810,17 +2810,6 @@ typedef struct AVCodecContext {
  */
 int bits_per_raw_sample;
 
-#if FF_API_LOWRES
-/**
- * low resolution decoding, 1-> 1/2 size, 2->1/4 size
- * - encoding: unused
- * - decoding: Set by user.
- *
- * @deprecated use decoder private options instead
- */
-attribute_deprecated int lowres;
-#endif
-
 #if FF_API_CODED_FRAME
 /**
  * the picture in the bitstream
@@ -3237,9 +3226,6 @@ typedef struct AVCodec {
 const int *supported_samplerates;   ///< array of supported audio 
samplerates, or NULL if unknown, array is terminated by 0
 const enum AVSampleFormat *sample_fmts; ///< array of supported sample 
formats, or NULL if unknown, array is terminated by -1
 const uint64_t *channel_layouts; ///< array of support channel 
layouts, or NULL if unknown. array is terminated by 0
-#if FF_API_LOWRES
-attribute_deprecated uint8_t max_lowres; ///< maximum value for lowres 
supported by the decoder
-#endif
 const AVClass *priv_class;  ///< AVClass for the private 
context
 const AVProfile *profiles;  ///< array of recognized profiles, 
or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
 
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 95b8ed6391..e720012088 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_LOWRES
-#define FF_API_LOWRES(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_CAP_VDPAU
 #define FF_API_CAP_VDPAU (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated VDPAU codec capability

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:30:09 2016 -0500| [7b917041184874e7d7cba4450813de7e0bb28a33] | 
committer: Vittorio Giovara

lavc: Drop deprecated VDPAU codec capability

Deprecated in 07/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b917041184874e7d7cba4450813de7e0bb28a33
---

 libavcodec/avcodec.h |  6 --
 libavcodec/vdpau.h   | 34 --
 libavcodec/version.h |  3 ---
 3 files changed, 43 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 35051313fa..f5711baa35 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1046,12 +1046,6 @@ typedef struct RcOverride{
  * This can be used to prevent truncation of the last audio samples.
  */
 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
-#if FF_API_CAP_VDPAU
-/**
- * Codec can export data for HW decoding (VDPAU).
- */
-#define CODEC_CAP_HWACCEL_VDPAU0x0080
-#endif
 /**
  * Codec can output multiple frames per AVPacket
  * Normally demuxers return one frame at a time, demuxers which do not do
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index acd63ccfaf..2f4fa86ba4 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -194,40 +194,6 @@ attribute_deprecated
 int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile);
 #endif
 
-#if FF_API_CAP_VDPAU
-/** @brief The videoSurface is used for rendering. */
-#define FF_VDPAU_STATE_USED_FOR_RENDER 1
-
-/**
- * @brief The videoSurface is needed for reference/prediction.
- * The codec manipulates this.
- */
-#define FF_VDPAU_STATE_USED_FOR_REFERENCE 2
-
-/**
- * @brief This structure is used as a callback between the Libav
- * decoder (vd_) and presentation (vo_) module.
- * This is used for defining a video frame containing surface,
- * picture parameter, bitstream information etc which are passed
- * between the Libav decoder and its clients.
- */
-struct vdpau_render_state {
-VdpVideoSurface surface; ///< Used as rendered surface, never changed.
-
-int state; ///< Holds FF_VDPAU_STATE_* values.
-
-/** picture parameter information for all supported codecs */
-union AVVDPAUPictureInfo info;
-
-/** Describe size/location of the compressed video data.
-Set to 0 when freeing bitstream_buffers. */
-int bitstream_buffers_allocated;
-int bitstream_buffers_used;
-/** The user is responsible for freeing this buffer using av_freep(). */
-VdpBitstreamBuffer *bitstream_buffers;
-};
-#endif
-
 /* @}*/
 
 #endif /* AVCODEC_VDPAU_H */
diff --git a/libavcodec/version.h b/libavcodec/version.h
index e720012088..3d7e47c729 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_CAP_VDPAU
-#define FF_API_CAP_VDPAU (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_BUFS_VDPAU
 #define FF_API_BUFS_VDPAU(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated VDPAU buffer fields

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:31:25 2016 -0500| [5c1585c4c3b5281835d784c5daef0069915ccd57] | 
committer: Vittorio Giovara

lavc: Drop deprecated VDPAU buffer fields

Deprecated in 07/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c1585c4c3b5281835d784c5daef0069915ccd57
---

 libavcodec/vdpau.h   | 44 
 libavcodec/version.h |  3 ---
 2 files changed, 47 deletions(-)

diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 2f4fa86ba4..a5d31cb37b 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -56,15 +56,6 @@
 #include "avcodec.h"
 #include "version.h"
 
-#if FF_API_BUFS_VDPAU
-union AVVDPAUPictureInfo {
-VdpPictureInfoH264h264;
-VdpPictureInfoMPEG1Or2mpeg;
-VdpPictureInfoVC1  vc1;
-VdpPictureInfoMPEG4Part2 mpeg4;
-};
-#endif
-
 /**
  * This structure is used to share data between the libavcodec library and
  * the client video application.
@@ -92,41 +83,6 @@ typedef struct AVVDPAUContext {
  * Set by the user.
  */
 VdpDecoderRender *render;
-
-#if FF_API_BUFS_VDPAU
-/**
- * VDPAU picture information
- *
- * Set by libavcodec.
- */
-attribute_deprecated
-union AVVDPAUPictureInfo info;
-
-/**
- * Allocated size of the bitstream_buffers table.
- *
- * Set by libavcodec.
- */
-attribute_deprecated
-int bitstream_buffers_allocated;
-
-/**
- * Useful bitstream buffers in the bitstream buffers table.
- *
- * Set by libavcodec.
- */
-attribute_deprecated
-int bitstream_buffers_used;
-
-   /**
- * Table of bitstream buffers.
- * The user is responsible for freeing this buffer using av_freep().
- *
- * Set by libavcodec.
- */
-attribute_deprecated
-VdpBitstreamBuffer *bitstream_buffers;
-#endif
 } AVVDPAUContext;
 
 /**
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3d7e47c729..033909a1e4 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_BUFS_VDPAU
-#define FF_API_BUFS_VDPAU(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_VOXWARE
 #define FF_API_VOXWARE   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated voxware codec entry

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 14:33:00 2016 -0500| [1146bb3babca3973e88005d267cd06210d6ac075] | 
committer: Vittorio Giovara

lavc: Drop deprecated voxware codec entry

Deprecated in 08/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1146bb3babca3973e88005d267cd06210d6ac075
---

 libavcodec/avcodec.h| 3 ---
 libavcodec/codec_desc.c | 9 -
 libavcodec/version.h| 3 ---
 3 files changed, 15 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f5711baa35..3a007fad1a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -531,9 +531,6 @@ enum AVCodecID {
 AV_CODEC_ID_MLP,
 AV_CODEC_ID_GSM_MS, /* as found in WAV */
 AV_CODEC_ID_ATRAC3,
-#if FF_API_VOXWARE
-AV_CODEC_ID_VOXWARE,
-#endif
 AV_CODEC_ID_APE,
 AV_CODEC_ID_NELLYMOSER,
 AV_CODEC_ID_MUSEPACK8,
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index dd243c2f0c..8b9ec40e59 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -2161,15 +2161,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
 .long_name = NULL_IF_CONFIG_SMALL("ATRAC3 (Adaptive TRansform Acoustic 
Coding 3)"),
 .props = AV_CODEC_PROP_LOSSY,
 },
-#if FF_API_VOXWARE
-{
-.id= AV_CODEC_ID_VOXWARE,
-.type  = AVMEDIA_TYPE_AUDIO,
-.name  = "voxware",
-.long_name = NULL_IF_CONFIG_SMALL("Voxware RT29 Metasound"),
-.props = AV_CODEC_PROP_LOSSY,
-},
-#endif
 {
 .id= AV_CODEC_ID_APE,
 .type  = AVMEDIA_TYPE_AUDIO,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 033909a1e4..1f06483211 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_VOXWARE
-#define FF_API_VOXWARE   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_SET_DIMENSIONS
 #define FF_API_SET_DIMENSIONS(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated way of setting codec dimensions

2017-10-21 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:11:06 2016 -0500| [6dca24cd1d570b806b5a3fdaef9d3c8608942a81] | 
committer: Vittorio Giovara

lavc: Drop deprecated way of setting codec dimensions

Deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dca24cd1d570b806b5a3fdaef9d3c8608942a81
---

 libavcodec/avcodec.h | 8 
 libavcodec/utils.c   | 7 ---
 libavcodec/version.h | 3 ---
 3 files changed, 18 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3a007fad1a..11a3280eb8 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4937,14 +4937,6 @@ enum AVPixelFormat avcodec_default_get_format(struct 
AVCodecContext *s, const en
  * @}
  */
 
-#if FF_API_SET_DIMENSIONS
-/**
- * @deprecated this function is not supposed to be used from outside of lavc
- */
-attribute_deprecated
-void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
-#endif
-
 /**
  * Put a string representing the codec tag codec_tag in buf.
  *
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8a481dd025..6cef65083d 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -125,13 +125,6 @@ unsigned avcodec_get_edge_width(void)
 }
 #endif
 
-#if FF_API_SET_DIMENSIONS
-void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
-{
-ff_set_dimensions(s, width, height);
-}
-#endif
-
 int ff_set_dimensions(AVCodecContext *s, int width, int height)
 {
 int ret = av_image_check_size(width, height, 0, s);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 1f06483211..a12c322f49 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_SET_DIMENSIONS
-#define FF_API_SET_DIMENSIONS(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_DEBUG_MV
 #define FF_API_DEBUG_MV  (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated debug mv functionality

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:13:43 2016 -0500| [8933ac2079644fb09916f1875c569103aefe84b1] | 
committer: Vittorio Giovara

lavc: Drop deprecated debug mv functionality

Deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8933ac2079644fb09916f1875c569103aefe84b1
---

 libavcodec/avcodec.h   | 21 -
 libavcodec/options_table.h | 13 -
 libavcodec/version.h   |  3 ---
 3 files changed, 37 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 11a3280eb8..b77f940d30 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2655,12 +2655,6 @@ typedef struct AVCodecContext {
 #define FF_DEBUG_BITSTREAM   4
 #define FF_DEBUG_MB_TYPE 8
 #define FF_DEBUG_QP  16
-#if FF_API_DEBUG_MV
-/**
- * @deprecated this option does nothing
- */
-#define FF_DEBUG_MV  32
-#endif
 #define FF_DEBUG_DCT_COEFF   0x0040
 #define FF_DEBUG_SKIP0x0080
 #define FF_DEBUG_STARTCODE   0x0100
@@ -2670,24 +2664,9 @@ typedef struct AVCodecContext {
 #define FF_DEBUG_ER  0x0400
 #define FF_DEBUG_MMCO0x0800
 #define FF_DEBUG_BUGS0x1000
-#if FF_API_DEBUG_MV
-#define FF_DEBUG_VIS_QP  0x2000
-#define FF_DEBUG_VIS_MB_TYPE 0x4000
-#endif
 #define FF_DEBUG_BUFFERS 0x8000
 #define FF_DEBUG_THREADS 0x0001
 
-#if FF_API_DEBUG_MV
-/**
- * @deprecated this option does not have any effect
- */
-attribute_deprecated
-int debug_mv;
-#define FF_DEBUG_VIS_MV_P_FOR  0x0001 // visualize forward predicted MVs 
of P-frames
-#define FF_DEBUG_VIS_MV_B_FOR  0x0002 // visualize forward predicted MVs 
of B-frames
-#define FF_DEBUG_VIS_MV_B_BACK 0x0004 // visualize backward predicted MVs 
of B-frames
-#endif
-
 /**
  * Error recognition; may misdetect some more or less valid parts as 
errors.
  * - encoding: unused
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 3ac53fb748..445515f0ee 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -247,9 +247,6 @@ static const AVOption avcodec_options[] = {
 {"bitstream", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BITSTREAM }, 
INT_MIN, INT_MAX, V|D, "debug"},
 {"mb_type", "macroblock (MB) type", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"},
 {"qp", "per-block quantization parameter (QP)", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_QP }, INT_MIN, INT_MAX, V|D, "debug"},
-#if FF_API_DEBUG_MV
-{"mv", "motion vector", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MV }, INT_MIN, 
INT_MAX, V|D, "debug"},
-#endif
 {"dct_coeff", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_DCT_COEFF }, 
INT_MIN, INT_MAX, V|D, "debug"},
 {"skip", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_SKIP }, INT_MIN, 
INT_MAX, V|D, "debug"},
 {"startcode", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_STARTCODE }, 
INT_MIN, INT_MAX, V|D, "debug"},
@@ -259,18 +256,8 @@ static const AVOption avcodec_options[] = {
 {"er", "error recognition", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_ER }, 
INT_MIN, INT_MAX, V|D, "debug"},
 {"mmco", "memory management control operations (H.264)", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_DEBUG_MMCO }, INT_MIN, INT_MAX, V|D, "debug"},
 {"bugs", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BUGS }, INT_MIN, 
INT_MAX, V|D, "debug"},
-#if FF_API_DEBUG_MV
-{"vis_qp", "visualize quantization parameter (QP), lower QP are tinted 
greener", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_QP }, INT_MIN, INT_MAX, 
V|D, "debug"},
-{"vis_mb_type", "visualize block types", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_VIS_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"},
-#endif
 {"buffers", "picture buffer allocations", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_BUFFERS }, INT_MIN, INT_MAX, V|D, "debug"},
 {"thread_ops", "threading operations", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_THREADS }, INT_MIN, INT_MAX, V|D, "debug"},
-#if FF_API_DEBUG_MV
-{"vismv", "visualize motion vectors (MVs)", OFFSET(debug_mv), AV_OPT_TYPE_INT, 
{.i64 = DEFAULT }, 0, INT_MAX, V|D, "debug_mv"},
-{"pf", "forward predicted MVs of P-frames", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_VIS_MV_P_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"},
-{"bf", "forward predicted MVs of B-frames", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_VIS_MV_B_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"},
-{"bb", "backward predicted MVs of B-frames", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_DEBUG_VIS_MV_B_BACK }, INT_

[FFmpeg-cvslog] lavc: Drop deprecated workaround bugs options

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:19:58 2016 -0500| [0c7986df444273b0e53d3992ba9cc1108bd6a386] | 
committer: Vittorio Giovara

lavc: Drop deprecated workaround bugs options

Illegal ac_vlc and old msmpeg4 detection deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c7986df444273b0e53d3992ba9cc1108bd6a386
---

 libavcodec/avcodec.h   | 6 --
 libavcodec/options_table.h | 6 --
 libavcodec/version.h   | 6 --
 3 files changed, 18 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b77f940d30..5ed3801d75 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2596,16 +2596,10 @@ typedef struct AVCodecContext {
  */
 int workaround_bugs;
 #define FF_BUG_AUTODETECT   1  ///< autodetection
-#if FF_API_OLD_MSMPEG4
-#define FF_BUG_OLD_MSMPEG4  2
-#endif
 #define FF_BUG_XVID_ILACE   4
 #define FF_BUG_UMP4 8
 #define FF_BUG_NO_PADDING   16
 #define FF_BUG_AMV  32
-#if FF_API_AC_VLC
-#define FF_BUG_AC_VLC   0  ///< Will be removed, libavcodec can now 
handle these non-compliant files by default.
-#endif
 #define FF_BUG_QPEL_CHROMA  64
 #define FF_BUG_STD_QPEL 128
 #define FF_BUG_QPEL_CHROMA2 256
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 445515f0ee..92fad60969 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -135,16 +135,10 @@ static const AVOption avcodec_options[] = {
 {"codec_tag", NULL, OFFSET(codec_tag), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 
INT_MIN, INT_MAX},
 {"bug", "work around not autodetected encoder bugs", OFFSET(workaround_bugs), 
AV_OPT_TYPE_FLAGS, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"},
 {"autodetect", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AUTODETECT }, 
INT_MIN, INT_MAX, V|D, "bug"},
-#if FF_API_OLD_MSMPEG4
-{"old_msmpeg4", "some old lavc-generated MSMPEG4v3 files (no autodetection)", 
0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_OLD_MSMPEG4 }, INT_MIN, INT_MAX, V|D, 
"bug"},
-#endif
 {"xvid_ilace", "Xvid interlacing bug (autodetected if FOURCC == XVIX)", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_BUG_XVID_ILACE }, INT_MIN, INT_MAX, V|D, "bug"},
 {"ump4", "(autodetected if FOURCC == UMP4)", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_BUG_UMP4 }, INT_MIN, INT_MAX, V|D, "bug"},
 {"no_padding", "padding bug (autodetected)", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_BUG_NO_PADDING }, INT_MIN, INT_MAX, V|D, "bug"},
 {"amv", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AMV }, INT_MIN, INT_MAX, 
V|D, "bug"},
-#if FF_API_AC_VLC
-{"ac_vlc", "illegal VLC bug (autodetected per FOURCC)", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_BUG_AC_VLC }, INT_MIN, INT_MAX, V|D, "bug"},
-#endif
 {"qpel_chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_QPEL_CHROMA }, 
INT_MIN, INT_MAX, V|D, "bug"},
 {"std_qpel", "old standard qpel (autodetected per FOURCC/version)", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_BUG_STD_QPEL }, INT_MIN, INT_MAX, V|D, "bug"},
 {"qpel_chroma2", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_QPEL_CHROMA2 }, 
INT_MIN, INT_MAX, V|D, "bug"},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 1f738a778a..225ee52a64 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,12 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_AC_VLC
-#define FF_API_AC_VLC(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
-#ifndef FF_API_OLD_MSMPEG4
-#define FF_API_OLD_MSMPEG4   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_ASPECT_EXTENDED
 #define FF_API_ASPECT_EXTENDED   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated architectures symbols

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:27:16 2016 -0500| [0871e233d9161e7f3554bcad19dabc9e15e1] | 
committer: Vittorio Giovara

lavc: Drop deprecated architectures symbols

Alpha deprecated in 11/2013.
Sh4 and sparc deprecated in 01/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0871e233d9161e7f3554bcad19dabc9e15e1
---

 libavcodec/avcodec.h   | 9 -
 libavcodec/options_table.h | 6 --
 libavcodec/version.h   | 9 -
 3 files changed, 24 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 76c86eb6ba..1eb3ac6f4a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2734,9 +2734,6 @@ typedef struct AVCodecContext {
 #define FF_IDCT_SIMPLEMMX 3
 #define FF_IDCT_ARM   7
 #define FF_IDCT_ALTIVEC   8
-#if FF_API_ARCH_SH4
-#define FF_IDCT_SH4   9
-#endif
 #define FF_IDCT_SIMPLEARM 10
 #if FF_API_UNUSED_MEMBERS
 #define FF_IDCT_IPP   13
@@ -2747,14 +2744,8 @@ typedef struct AVCodecContext {
 #endif /* FF_API_IDCT_XVIDMMX */
 #define FF_IDCT_SIMPLEARMV5TE 16
 #define FF_IDCT_SIMPLEARMV6   17
-#if FF_API_ARCH_SPARC
-#define FF_IDCT_SIMPLEVIS 18
-#endif
 #define FF_IDCT_FAAN  20
 #define FF_IDCT_SIMPLENEON22
-#if FF_API_ARCH_ALPHA
-#define FF_IDCT_SIMPLEALPHA   23
-#endif
 
 /**
  * bits per sample/pixel from the demuxer (needed for huffyuv).
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 92fad60969..7257791292 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -205,16 +205,10 @@ static const AVOption avcodec_options[] = {
 {"simplemmx", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEMMX }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
 {"arm", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_ARM }, INT_MIN, INT_MAX, 
V|E|D, "idct"},
 {"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_ALTIVEC }, INT_MIN, 
INT_MAX, V|E|D, "idct"},
-#if FF_API_ARCH_SH4
-{"sh4", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SH4 }, INT_MIN, INT_MAX, 
V|E|D, "idct"},
-#endif
 {"simplearm", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARM }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simplearmv5te", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV5TE }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simplearmv6", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV6 }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simpleneon", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLENEON }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
-#if FF_API_ARCH_ALPHA
-{"simplealpha", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEALPHA }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
-#endif
 #if FF_API_UNUSED_MEMBERS
 {"ipp", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_IPP }, INT_MIN, INT_MAX, 
V|E|D, "idct"},
 #endif /* FF_API_UNUSED_MEMBERS */
diff --git a/libavcodec/version.h b/libavcodec/version.h
index bc8bdad0f4..6f69f2d59c 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_ARCH_ALPHA
-#define FF_API_ARCH_ALPHA(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_XVMC
 #define FF_API_XVMC  (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
@@ -74,12 +71,6 @@
 #ifndef FF_API_EMU_EDGE
 #define FF_API_EMU_EDGE  (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
-#ifndef FF_API_ARCH_SH4
-#define FF_API_ARCH_SH4  (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
-#ifndef FF_API_ARCH_SPARC
-#define FF_API_ARCH_SPARC(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_UNUSED_MEMBERS
 #define FF_API_UNUSED_MEMBERS(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated extended aspect ratio symbol

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:22:05 2016 -0500| [c06e73929199c4bdbb32ffb3d81c27ea57dd1458] | 
committer: Vittorio Giovara

lavc: Drop deprecated extended aspect ratio symbol

Deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c06e73929199c4bdbb32ffb3d81c27ea57dd1458
---

 libavcodec/avcodec.h | 4 
 libavcodec/h263.h| 2 --
 libavcodec/version.h | 3 ---
 3 files changed, 9 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5ed3801d75..76c86eb6ba 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1620,10 +1620,6 @@ typedef struct AVCodecContext {
  */
 int coded_width, coded_height;
 
-#if FF_API_ASPECT_EXTENDED
-#define FF_ASPECT_EXTENDED 15
-#endif
-
 /**
  * the number of pictures in a group of pictures, or 0 for intra_only
  * - encoding: Set by user.
diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 3e54204f0f..ce697da20e 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -31,9 +31,7 @@
 #include "h263data.h"
 #include "rl.h"
 
-#if !FF_API_ASPECT_EXTENDED
 #define FF_ASPECT_EXTENDED 15
-#endif
 #define INT_BIT (CHAR_BIT * sizeof(int))
 
 // The defines below define the number of bits that are read at once for
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 225ee52a64..bc8bdad0f4 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_ASPECT_EXTENDED
-#define FF_API_ASPECT_EXTENDED   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_ARCH_ALPHA
 #define FF_API_ARCH_ALPHA(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated error rate option

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:41:20 2016 -0500| [72dc7ddd18fe54ee68aec71590c3202ad009a8fc] | 
committer: Vittorio Giovara

lavc: Drop deprecated error rate option

Deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72dc7ddd18fe54ee68aec71590c3202ad009a8fc
---

 libavcodec/avcodec.h   | 9 -
 libavcodec/mpegvideo_enc.c | 7 ---
 libavcodec/options_table.h | 3 ---
 libavcodec/version.h   | 3 ---
 4 files changed, 22 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8567c8b28f..f596ad3051 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2958,15 +2958,6 @@ typedef struct AVCodecContext {
 uint8_t *subtitle_header;
 int subtitle_header_size;
 
-#if FF_API_ERROR_RATE
-/**
- * @deprecated use the 'error_rate' private AVOption of the mpegvideo
- * encoders
- */
-attribute_deprecated
-int error_rate;
-#endif
-
 #if FF_API_VBV_DELAY
 /**
  * VBV delay coded in the last frame (in periods of a 27 MHz clock).
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 40c044d703..4d72c01ec9 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -874,13 +874,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 if (ff_rate_control_init(s) < 0)
 return -1;
 
-#if FF_API_ERROR_RATE
-FF_DISABLE_DEPRECATION_WARNINGS
-if (avctx->error_rate)
-s->error_rate = avctx->error_rate;
-FF_ENABLE_DEPRECATION_WARNINGS;
-#endif
-
 #if FF_API_NORMALIZE_AQP
 FF_DISABLE_DEPRECATION_WARNINGS
 if (avctx->flags & CODEC_FLAG_NORMALIZE_AQP)
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 5e3540d2dd..7531af0471 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -313,9 +313,6 @@ static const AVOption avcodec_options[] = {
 #endif
 {"rc_init_occupancy", "number of bits which should be loaded into the rc 
buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), 
AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
 {"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, 
UINT_MAX, V|A|E|D, "flags2"},
-#if FF_API_ERROR_RATE
-{"error", NULL, OFFSET(error_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 
INT_MIN, INT_MAX, V|E},
-#endif
 {"threads", NULL, OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 
INT_MAX, V|E|D, "threads"},
 {"auto", "autodetect a suitable number of threads to use", 0, 
AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"},
 #if FF_API_MPV_OPT
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 986e697bc9..cfed83160f 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_ERROR_RATE
-#define FF_API_ERROR_RATE(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_QSCALE_TYPE
 #define FF_API_QSCALE_TYPE   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated public symbols

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:42:00 2016 -0500| [cbebc3251bc2544b469e0dcb176bc04779d8866c] | 
committer: Vittorio Giovara

lavc: Drop deprecated public symbols

qscale types and maximum number of bframes deprecated in 10/2013.
Negative linesizes deprecated in 11/2013.
xvidmmx deprecated in 08/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbebc3251bc2544b469e0dcb176bc04779d8866c
---

 libavcodec/avcodec.h   | 23 ---
 libavcodec/options_table.h |  3 ---
 libavcodec/version.h   | 12 
 3 files changed, 38 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f596ad3051..6311acf628 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -730,13 +730,6 @@ typedef struct RcOverride{
 float quality_factor;
 } RcOverride;
 
-#if FF_API_MAX_BFRAMES
-/**
- * @deprecated there is no libavcodec-wide limit on the number of B-frames
- */
-#define FF_MAX_B_FRAMES 16
-#endif
-
 /* encoding support
These flags can be passed in AVCodecContext.flags before initialization.
Note: Not everything is supported yet.
@@ -1057,12 +1050,6 @@ typedef struct RcOverride{
  * Codec should fill in channel configuration and samplerate instead of 
container
  */
 #define CODEC_CAP_CHANNEL_CONF 0x0400
-#if FF_API_NEG_LINESIZES
-/**
- * @deprecated no codecs use this capability
- */
-#define CODEC_CAP_NEG_LINESIZES0x0800
-#endif
 /**
  * Codec supports frame-level multithreading.
  */
@@ -1178,13 +1165,6 @@ typedef struct AVCPBProperties {
 uint64_t vbv_delay;
 } AVCPBProperties;
 
-#if FF_API_QSCALE_TYPE
-#define FF_QSCALE_TYPE_MPEG1 0
-#define FF_QSCALE_TYPE_MPEG2 1
-#define FF_QSCALE_TYPE_H264  2
-#define FF_QSCALE_TYPE_VP56  3
-#endif
-
 /**
  * The decoder will keep a reference to the frame and may reuse it later.
  */
@@ -2722,9 +2702,6 @@ typedef struct AVCodecContext {
 #define FF_IDCT_IPP   13
 #endif /* FF_API_UNUSED_MEMBERS */
 #define FF_IDCT_XVID  14
-#if FF_API_IDCT_XVIDMMX
-#define FF_IDCT_XVIDMMX   14
-#endif /* FF_API_IDCT_XVIDMMX */
 #define FF_IDCT_SIMPLEARMV5TE 16
 #define FF_IDCT_SIMPLEARMV6   17
 #define FF_IDCT_FAAN  20
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 7531af0471..c95e55265f 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -213,9 +213,6 @@ static const AVOption avcodec_options[] = {
 {"ipp", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_IPP }, INT_MIN, INT_MAX, 
V|E|D, "idct"},
 #endif /* FF_API_UNUSED_MEMBERS */
 {"xvid", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVID }, INT_MIN, INT_MAX, 
V|E|D, "idct"},
-#if FF_API_IDCT_XVIDMMX
-{"xvidmmx", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVID }, INT_MIN, 
INT_MAX, V|E|D, "idct"},
-#endif /* FF_API_IDCT_XVIDMMX */
 {"faani", "floating point AAN IDCT", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_IDCT_FAAN }, INT_MIN, INT_MAX, V|D|E, "idct"},
 {"slice_count", NULL, OFFSET(slice_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 
INT_MIN, INT_MAX},
 {"ec", "set error concealment strategy", OFFSET(error_concealment), 
AV_OPT_TYPE_FLAGS, {.i64 = 3 }, INT_MIN, INT_MAX, V|D, "ec"},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index cfed83160f..db14d7bf97 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,30 +47,18 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_QSCALE_TYPE
-#define FF_API_QSCALE_TYPE   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_MB_TYPE
 #define FF_API_MB_TYPE   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
-#ifndef FF_API_MAX_BFRAMES
-#define FF_API_MAX_BFRAMES   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_FAST_MALLOC
 #define FF_API_FAST_MALLOC   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
-#ifndef FF_API_NEG_LINESIZES
-#define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_EMU_EDGE
 #define FF_API_EMU_EDGE  (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_UNUSED_MEMBERS
 #define FF_API_UNUSED_MEMBERS(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
-#ifndef FF_API_IDCT_XVIDMMX
-#define FF_API_IDCT_XVIDMMX  (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_INPUT_PRESERVED
 #define FF_API_INPUT_PRESERVED   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated macroblock type symbols

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:43:14 2016 -0500| [da5ba26b9e25f408e8d2f9428c9eca699f11a7db] | 
committer: Vittorio Giovara

lavc: Drop deprecated macroblock type symbols

Deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da5ba26b9e25f408e8d2f9428c9eca699f11a7db
---

 libavcodec/avcodec.h   | 26 --
 libavcodec/mpegutils.h |  2 --
 libavcodec/version.h   |  3 ---
 3 files changed, 31 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 6311acf628..6fd76b5329 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1072,32 +1072,6 @@ typedef struct RcOverride{
 #define CODEC_CAP_VARIABLE_FRAME_SIZE 0x1
 #endif /* FF_API_WITHOUT_PREFIX */
 
-#if FF_API_MB_TYPE
-//The following defines may change, don't expect compatibility if you use them.
-#define MB_TYPE_INTRA4x4   0x0001
-#define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
-#define MB_TYPE_INTRA_PCM  0x0004 //FIXME H.264-specific
-#define MB_TYPE_16x16  0x0008
-#define MB_TYPE_16x8   0x0010
-#define MB_TYPE_8x16   0x0020
-#define MB_TYPE_8x80x0040
-#define MB_TYPE_INTERLACED 0x0080
-#define MB_TYPE_DIRECT20x0100 //FIXME
-#define MB_TYPE_ACPRED 0x0200
-#define MB_TYPE_GMC0x0400
-#define MB_TYPE_SKIP   0x0800
-#define MB_TYPE_P0L0   0x1000
-#define MB_TYPE_P1L0   0x2000
-#define MB_TYPE_P0L1   0x4000
-#define MB_TYPE_P1L1   0x8000
-#define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
-#define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
-#define MB_TYPE_L0L1   (MB_TYPE_L0   | MB_TYPE_L1)
-#define MB_TYPE_QUANT  0x0001
-#define MB_TYPE_CBP0x0002
-// Note bits 24-31 are reserved for codec specific use (H.264 ref0, MPEG-1 
0mv, ...)
-#endif
-
 /**
  * Pan Scan area.
  * This specifies the area which should be displayed.
diff --git a/libavcodec/mpegutils.h b/libavcodec/mpegutils.h
index 60f971222e..960999c928 100644
--- a/libavcodec/mpegutils.h
+++ b/libavcodec/mpegutils.h
@@ -48,7 +48,6 @@
 #define MAX_FCODE7
 
 /* MB types */
-#if !FF_API_MB_TYPE
 #define MB_TYPE_INTRA4x4   (1 <<  0)
 #define MB_TYPE_INTRA16x16 (1 <<  1) // FIXME H.264-specific
 #define MB_TYPE_INTRA_PCM  (1 <<  2) // FIXME H.264-specific
@@ -70,7 +69,6 @@
 #define MB_TYPE_L0L1   (MB_TYPE_L0   | MB_TYPE_L1)
 #define MB_TYPE_QUANT  (1 << 16)
 #define MB_TYPE_CBP(1 << 17)
-#endif
 
 #define MB_TYPE_INTRAMB_TYPE_INTRA4x4 // default mb_type if there is just 
one type
 
diff --git a/libavcodec/version.h b/libavcodec/version.h
index db14d7bf97..da2d5e5328 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_MB_TYPE
-#define FF_API_MB_TYPE   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_FAST_MALLOC
 #define FF_API_FAST_MALLOC   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated av_fast_malloc() compatibility

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:45:20 2016 -0500| [06c20d3e32c33c4da6d9fbc43aebaeb38c45b859] | 
committer: Vittorio Giovara

lavc: Drop deprecated av_fast_malloc() compatibility

Deprecated in 10/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06c20d3e32c33c4da6d9fbc43aebaeb38c45b859
---

 libavcodec/avcodec.h | 5 -
 libavcodec/version.h | 3 ---
 2 files changed, 8 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 6fd76b5329..86632f28b8 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -41,11 +41,6 @@
 
 #include "version.h"
 
-#if FF_API_FAST_MALLOC
-// to provide fast_*alloc
-#include "libavutil/mem.h"
-#endif
-
 /**
  * @defgroup libavc Encoding/Decoding Library
  * @{
diff --git a/libavcodec/version.h b/libavcodec/version.h
index da2d5e5328..3fca559fc0 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_FAST_MALLOC
-#define FF_API_FAST_MALLOC   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_EMU_EDGE
 #define FF_API_EMU_EDGE  (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated emu edge functionality

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:47:35 2016 -0500| [b3739599bda740ac12d3dde31a331b744df99123] | 
committer: Vittorio Giovara

lavc: Drop deprecated emu edge functionality

Deprecated in 01/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3739599bda740ac12d3dde31a331b744df99123
---

 libavcodec/avcodec.h   | 22 --
 libavcodec/options_table.h |  3 ---
 libavcodec/utils.c |  7 ---
 libavcodec/version.h   |  3 ---
 4 files changed, 35 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 86632f28b8..a5f0dade72 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -947,13 +947,6 @@ typedef struct RcOverride{
 #define CODEC_FLAG_PASS1   0x0200   ///< Use internal 2pass 
ratecontrol in first pass mode.
 #define CODEC_FLAG_PASS2   0x0400   ///< Use internal 2pass 
ratecontrol in second pass mode.
 #define CODEC_FLAG_GRAY0x2000   ///< Only decode/encode grayscale.
-#if FF_API_EMU_EDGE
-/**
- * @deprecated edges are not used/required anymore. I.e. this flag is now 
always
- * set.
- */
-#define CODEC_FLAG_EMU_EDGE0x4000
-#endif
 #define CODEC_FLAG_PSNR0x8000   ///< error[?] variables will be 
set during encoding.
 #define CODEC_FLAG_TRUNCATED   0x0001 /** Input bitstream might be 
truncated at a random
   location instead of only at 
frame boundaries. */
@@ -4025,21 +4018,6 @@ AVCodec *avcodec_find_decoder_by_name(const char *name);
  */
 int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
 
-#if FF_API_EMU_EDGE
-/**
- * Return the amount of padding in pixels which the get_buffer callback must
- * provide around the edge of the image for codecs which do not have the
- * CODEC_FLAG_EMU_EDGE flag.
- *
- * @return Required padding in pixels.
- *
- * @deprecated CODEC_FLAG_EMU_EDGE is deprecated, so this function is no longer
- * needed
- */
-attribute_deprecated
-unsigned avcodec_get_edge_width(void);
-#endif
-
 /**
  * Modify width and height values so that they will result in a memory
  * buffer that is acceptable for the codec if you do not use any horizontal
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index c95e55265f..ebd77d4c80 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -62,9 +62,6 @@ static const AVOption avcodec_options[] = {
 {"pass1", "use internal 2-pass ratecontrol in first  pass mode", 0, 
AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"},
 {"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, 
AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
 {"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = 
AV_CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"},
-#if FF_API_EMU_EDGE
-{"emu_edge", "do not draw edges", 0, AV_OPT_TYPE_CONST, {.i64 = 
CODEC_FLAG_EMU_EDGE }, INT_MIN, INT_MAX, 0, "flags"},
-#endif
 {"psnr", "error[?] variables will be set during encoding", 0, 
AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, 
"flags"},
 {"truncated", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, 
INT_MIN, INT_MAX, 0, "flags"},
 #if FF_API_NORMALIZE_AQP
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 6cef65083d..61bb09b031 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -118,13 +118,6 @@ av_cold void avcodec_register(AVCodec *codec)
 codec->init_static_data(codec);
 }
 
-#if FF_API_EMU_EDGE
-unsigned avcodec_get_edge_width(void)
-{
-return EDGE_WIDTH;
-}
-#endif
-
 int ff_set_dimensions(AVCodecContext *s, int width, int height)
 {
 int ret = av_image_check_size(width, height, 0, s);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3fca559fc0..cafc6e8ba0 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_EMU_EDGE
-#define FF_API_EMU_EDGE  (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_UNUSED_MEMBERS
 #define FF_API_UNUSED_MEMBERS(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated unused public members

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:55:32 2016 -0500| [302554835e39b79b977ed60c9afe81b44590dfef] | 
committer: Vittorio Giovara

lavc: Drop deprecated unused public members

Deprecated in 07/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=302554835e39b79b977ed60c9afe81b44590dfef
---

 libavcodec/avcodec.h   | 18 --
 libavcodec/options_table.h | 12 
 libavcodec/version.h   |  3 ---
 3 files changed, 33 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index a5f0dade72..f8ab537104 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2023,15 +2023,6 @@ typedef struct AVCodecContext {
 int chromaoffset;
 #endif
 
-#if FF_API_UNUSED_MEMBERS
-/**
- * Multiplied by qscale for each frame and added to scene_change_score.
- * - encoding: Set by user.
- * - decoding: unused
- */
-attribute_deprecated int scenechange_factor;
-#endif
-
 /**
  * Note: Value depends upon the compare function used for fullpel ME.
  * - encoding: Set by user.
@@ -2377,9 +2368,6 @@ typedef struct AVCodecContext {
 #define FF_CODER_TYPE_AC1
 #define FF_CODER_TYPE_RAW   2
 #define FF_CODER_TYPE_RLE   3
-#if FF_API_UNUSED_MEMBERS
-#define FF_CODER_TYPE_DEFLATE   4
-#endif /* FF_API_UNUSED_MEMBERS */
 /**
  * @deprecated use encoder private options instead
  */
@@ -2573,9 +2561,6 @@ typedef struct AVCodecContext {
 #define FF_DEBUG_DCT_COEFF   0x0040
 #define FF_DEBUG_SKIP0x0080
 #define FF_DEBUG_STARTCODE   0x0100
-#if FF_API_UNUSED_MEMBERS
-#define FF_DEBUG_PTS 0x0200
-#endif /* FF_API_UNUSED_MEMBERS */
 #define FF_DEBUG_ER  0x0400
 #define FF_DEBUG_MMCO0x0800
 #define FF_DEBUG_BUGS0x1000
@@ -2660,9 +2645,6 @@ typedef struct AVCodecContext {
 #define FF_IDCT_ARM   7
 #define FF_IDCT_ALTIVEC   8
 #define FF_IDCT_SIMPLEARM 10
-#if FF_API_UNUSED_MEMBERS
-#define FF_IDCT_IPP   13
-#endif /* FF_API_UNUSED_MEMBERS */
 #define FF_IDCT_XVID  14
 #define FF_IDCT_SIMPLEARMV5TE 16
 #define FF_IDCT_SIMPLEARMV6   17
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index ebd77d4c80..e29440e597 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -206,9 +206,6 @@ static const AVOption avcodec_options[] = {
 {"simplearmv5te", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV5TE }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simplearmv6", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV6 }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simpleneon", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLENEON }, 
INT_MIN, INT_MAX, V|E|D, "idct"},
-#if FF_API_UNUSED_MEMBERS
-{"ipp", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_IPP }, INT_MIN, INT_MAX, 
V|E|D, "idct"},
-#endif /* FF_API_UNUSED_MEMBERS */
 {"xvid", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVID }, INT_MIN, INT_MAX, 
V|E|D, "idct"},
 {"faani", "floating point AAN IDCT", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_IDCT_FAAN }, INT_MIN, INT_MAX, V|D|E, "idct"},
 {"slice_count", NULL, OFFSET(slice_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 
INT_MIN, INT_MAX},
@@ -232,9 +229,6 @@ static const AVOption avcodec_options[] = {
 {"dct_coeff", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_DCT_COEFF }, 
INT_MIN, INT_MAX, V|D, "debug"},
 {"skip", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_SKIP }, INT_MIN, 
INT_MAX, V|D, "debug"},
 {"startcode", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_STARTCODE }, 
INT_MIN, INT_MAX, V|D, "debug"},
-#if FF_API_UNUSED_MEMBERS
-{"pts", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_PTS }, INT_MIN, INT_MAX, 
V|D, "debug"},
-#endif /* FF_API_UNUSED_MEMBERS */
 {"er", "error recognition", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_ER }, 
INT_MIN, INT_MAX, V|D, "debug"},
 {"mmco", "memory management control operations (H.264)", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_DEBUG_MMCO }, INT_MIN, INT_MAX, V|D, "debug"},
 {"bugs", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BUGS }, INT_MIN, 
INT_MAX, V|D, "debug"},
@@ -280,9 +274,6 @@ static const AVOption avcodec_options[] = {
 {"ac", "arithmetic coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_AC }, 
INT_MIN, INT_MAX, V|E, "coder"},
 {"raw", "raw (no encoding)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RAW 
}, INT_MIN, INT_MAX, V|E, "coder"},
 {"rle", "run-length coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RLE }, 
INT_MIN, INT_MAX, V|E, "coder"},
-#if FF_API_UNUSED_MEMBERS
-{"deflate", "deflate-based coder", 0, AV_OPT_TYP

[FFmpeg-cvslog] lavc: Drop deprecated codec flags

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 15:57:18 2016 -0500| [bb45d11282d93af0e8d4c8fd6bc6405f7439a940] | 
committer: Vittorio Giovara

lavc: Drop deprecated codec flags

Deprecated between 04/2014 - 05/2015.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb45d11282d93af0e8d4c8fd6bc6405f7439a940
---

 libavcodec/avcodec.h   | 158 -
 libavcodec/libxvid.c   |   6 --
 libavcodec/mpegvideo_enc.c |  14 
 libavcodec/options_table.h |  12 
 libavcodec/version.h   |  15 -
 5 files changed, 205 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f8ab537104..f7c879604e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -657,18 +657,6 @@ typedef struct AVCodecDescriptor {
  */
 #define AV_INPUT_BUFFER_MIN_SIZE 16384
 
-#if FF_API_WITHOUT_PREFIX
-/**
- * @deprecated use AV_INPUT_BUFFER_PADDING_SIZE instead
- */
-#define FF_INPUT_BUFFER_PADDING_SIZE 8
-
-/**
- * @deprecated use AV_INPUT_BUFFER_MIN_SIZE instead
- */
-#define FF_MIN_BUFFER_SIZE 16384
-#endif /* FF_API_WITHOUT_PREFIX */
-
 /**
  * @ingroup lavc_encoding
  * motion estimation type.
@@ -914,152 +902,6 @@ typedef struct RcOverride{
  */
 #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
 
-#if FF_API_WITHOUT_PREFIX
-/**
- * Allow decoders to produce frames with data planes that are not aligned
- * to CPU requirements (e.g. due to cropping).
- */
-#define CODEC_FLAG_UNALIGNED 0x0001
-#define CODEC_FLAG_QSCALE 0x0002  ///< Use fixed qscale.
-#define CODEC_FLAG_4MV0x0004  ///< 4 MV per MB allowed / advanced 
prediction for H.263.
-#define CODEC_FLAG_OUTPUT_CORRUPT 0x0008 ///< Output even those frames that 
might be corrupted
-#define CODEC_FLAG_QPEL   0x0010  ///< Use qpel MC.
-#if FF_API_GMC
-/**
- * @deprecated use the "gmc" private option of the libxvid encoder
- */
-#define CODEC_FLAG_GMC0x0020  ///< Use GMC.
-#endif
-#if FF_API_MV0
-/**
- * @deprecated use the flag "mv0" in the "mpv_flags" private option of the
- * mpegvideo encoders
- */
-#define CODEC_FLAG_MV00x0040
-#endif
-#if FF_API_INPUT_PRESERVED
-/**
- * @deprecated passing reference-counted frames to the encoders replaces this
- * flag
- */
-#define CODEC_FLAG_INPUT_PRESERVED 0x0100
-#endif
-#define CODEC_FLAG_PASS1   0x0200   ///< Use internal 2pass 
ratecontrol in first pass mode.
-#define CODEC_FLAG_PASS2   0x0400   ///< Use internal 2pass 
ratecontrol in second pass mode.
-#define CODEC_FLAG_GRAY0x2000   ///< Only decode/encode grayscale.
-#define CODEC_FLAG_PSNR0x8000   ///< error[?] variables will be 
set during encoding.
-#define CODEC_FLAG_TRUNCATED   0x0001 /** Input bitstream might be 
truncated at a random
-  location instead of only at 
frame boundaries. */
-#if FF_API_NORMALIZE_AQP
-/**
- * @deprecated use the flag "naq" in the "mpv_flags" private option of the
- * mpegvideo encoders
- */
-#define CODEC_FLAG_NORMALIZE_AQP  0x0002
-#endif
-#define CODEC_FLAG_INTERLACED_DCT 0x0004 ///< Use interlaced DCT.
-#define CODEC_FLAG_LOW_DELAY  0x0008 ///< Force low delay.
-#define CODEC_FLAG_GLOBAL_HEADER  0x0040 ///< Place global headers in 
extradata instead of every keyframe.
-#define CODEC_FLAG_BITEXACT   0x0080 ///< Use only bitexact stuff 
(except (I)DCT).
-/* Fx : Flag for H.263+ extra options */
-#define CODEC_FLAG_AC_PRED0x0100 ///< H.263 advanced intra coding 
/ MPEG-4 AC prediction
-#define CODEC_FLAG_LOOP_FILTER0x0800 ///< loop filter
-#define CODEC_FLAG_INTERLACED_ME  0x2000 ///< interlaced motion estimation
-#define CODEC_FLAG_CLOSED_GOP 0x8000
-#define CODEC_FLAG2_FAST  0x0001 ///< Allow non spec compliant 
speedup tricks.
-#define CODEC_FLAG2_NO_OUTPUT 0x0004 ///< Skip bitstream encoding.
-#define CODEC_FLAG2_LOCAL_HEADER  0x0008 ///< Place global headers at 
every keyframe instead of in extradata.
-#define CODEC_FLAG2_IGNORE_CROP   0x0001 ///< Discard cropping information 
from SPS.
-
-#define CODEC_FLAG2_CHUNKS0x8000 ///< Input bitstream might be 
truncated at a packet boundaries instead of only at frame boundaries.
-
-/* Unsupported options :
- *  Syntax Arithmetic coding (SAC)
- *  Reference Picture Selection
- *  Independent Segment Decoding */
-/* /Fx */
-/* codec capabilities */
-
-#define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< Decoder can use draw_horiz_band 
callback.
-/**
- * Codec uses get_buffer() for allocating buffers and supports custom 
allocators.
- * If not set, it might not use get_buffer() at all or use operations that
- * assume the buffer was allocated by avcodec_default_get_buffer.
- */
-#define CODEC_CAP_DR1 0x0002
-#define CODEC_CAP_TRUNCATE

[FFmpeg-cvslog] lavc: Drop deprecated avctx codec name

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 17:08:15 2016 -0500| [4476027d93680cd88d2f75ef1cef5b0c276a8704] | 
committer: Vittorio Giovara

lavc: Drop deprecated avctx codec name

Deprecated in 04/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4476027d93680cd88d2f75ef1cef5b0c276a8704
---

 libavcodec/avcodec.h | 7 ---
 libavcodec/version.h | 3 ---
 2 files changed, 10 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f7c879604e..e1f5d8ff6e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1219,13 +1219,6 @@ typedef struct AVCodecContext {
 
 enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
 const struct AVCodec  *codec;
-#if FF_API_CODEC_NAME
-/**
- * @deprecated this field is not used for anything in libavcodec
- */
-attribute_deprecated
-char codec_name[32];
-#endif
 enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
 
 /**
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 04f701430e..99aa9bf8cc 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_CODEC_NAME
-#define FF_API_CODEC_NAME(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_AFD
 #define FF_API_AFD   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated global afd field

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 16 15:51:56 2017 -0400| [5182a28b5de060c51c21b36053ab205bfe31] | 
committer: Vittorio Giovara

lavc: Drop deprecated global afd field

Deprecated in 08/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5182a28b5de060c51c21b36053ab205bfe31
---

 libavcodec/avcodec.h   | 20 
 libavcodec/mpeg12dec.c |  5 -
 libavcodec/options_table.h |  3 ---
 libavcodec/pthread_frame.c |  5 -
 libavcodec/version.h   |  3 ---
 5 files changed, 36 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index e1f5d8ff6e..2366acf93c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1675,26 +1675,6 @@ typedef struct AVCodecContext {
  */
 int me_subpel_quality;
 
-#if FF_API_AFD
-/**
- * DTG active format information (additional aspect ratio
- * information only used in DVB MPEG-2 transport streams)
- * 0 if not set.
- *
- * - encoding: unused
- * - decoding: Set by decoder.
- * @deprecated Deprecated in favor of AVSideData
- */
-attribute_deprecated int dtg_active_format;
-#define FF_DTG_AFD_SAME 8
-#define FF_DTG_AFD_4_3  9
-#define FF_DTG_AFD_16_9 10
-#define FF_DTG_AFD_14_9 11
-#define FF_DTG_AFD_4_3_SP_14_9  13
-#define FF_DTG_AFD_16_9_SP_14_9 14
-#define FF_DTG_AFD_SP_4_3   15
-#endif /* FF_API_AFD */
-
 /**
  * maximum motion estimation search range in subpel units
  * If 0 then no limit.
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 528a4ed16d..6702ad1ed7 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2176,11 +2176,6 @@ static void mpeg_decode_user_data(AVCodecContext *avctx,
 if (flags & 0x40) {
 if (buf_end - p < 1)
 return;
-#if FF_API_AFD
-FF_DISABLE_DEPRECATION_WARNINGS
-avctx->dtg_active_format = p[0] & 0x0f;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif /* FF_API_AFD */
 s1->has_afd = 1;
 s1->afd = p[0] & 0x0f;
 }
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 1d15422a11..7a8ef3d4a9 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -247,9 +247,6 @@ static const AVOption avcodec_options[] = {
 {"chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_CHROMA }, INT_MIN, 
INT_MAX, V|E, "cmp_func"},
 {"pre_dia_size", "diamond type & size for motion estimation pre-pass", 
OFFSET(pre_dia_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, 
V|E},
 {"subq", "sub-pel motion estimation quality", OFFSET(me_subpel_quality), 
AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E},
-#if FF_API_AFD
-{"dtg_active_format", NULL, OFFSET(dtg_active_format), AV_OPT_TYPE_INT, {.i64 
= DEFAULT }, INT_MIN, INT_MAX},
-#endif
 {"me_range", "limit motion vectors range (1023 for DivX player)", 
OFFSET(me_range), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
 #if FF_API_QUANT_BIAS
 {"ibias", "intra quant bias", OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.i64 
= FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E},
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 65a04d8e90..6d14a878a4 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -238,11 +238,6 @@ static int update_context_from_thread(AVCodecContext *dst, 
AVCodecContext *src,
 
 dst->bits_per_coded_sample = src->bits_per_coded_sample;
 dst->sample_aspect_ratio   = src->sample_aspect_ratio;
-#if FF_API_AFD
-FF_DISABLE_DEPRECATION_WARNINGS
-dst->dtg_active_format = src->dtg_active_format;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif /* FF_API_AFD */
 
 dst->profile = src->profile;
 dst->level   = src->level;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 99aa9bf8cc..45c2dbd560 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_AFD
-#define FF_API_AFD   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_AUDIOENC_DELAY
 #define FF_API_AUDIOENC_DELAY(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated way of setting audio delay on encode

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 16 15:55:18 2017 -0400| [48bb0da050329e5111b00a12dfc154b7e78fb3a3] | 
committer: Vittorio Giovara

lavc: Drop deprecated way of setting audio delay on encode

Deprecated in 08/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=48bb0da050329e5111b00a12dfc154b7e78fb3a3
---

 libavcodec/encode.c  | 4 
 libavcodec/utils.c   | 5 -
 libavcodec/version.h | 3 ---
 3 files changed, 12 deletions(-)

diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index fc27a070e1..9bb7ae5bde 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -194,10 +194,6 @@ int attribute_align_arg 
avcodec_encode_audio2(AVCodecContext *avctx,
 end:
 av_frame_free(&padded_frame);
 
-#if FF_API_AUDIOENC_DELAY
-avctx->delay = avctx->initial_padding;
-#endif
-
 return ret;
 }
 
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 61bb09b031..a6408cecbb 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -646,11 +646,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 }
 }
 
-#if FF_API_AUDIOENC_DELAY
-if (av_codec_is_encoder(avctx->codec))
-avctx->delay = avctx->initial_padding;
-#endif
-
 if (av_codec_is_decoder(avctx->codec)) {
 /* validate channel layout from the decoder */
 if (avctx->channel_layout) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 45c2dbd560..b60e9715aa 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_AUDIOENC_DELAY
-#define FF_API_AUDIOENC_DELAY(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_AVCTX_TIMEBASE
 #define FF_API_AVCTX_TIMEBASE(LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated time_base variable for decoding

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 16 15:56:59 2017 -0400| [c43a96fe16e6a6ea091e64ca271f0788f4a0bea9] | 
committer: Vittorio Giovara

lavc: Drop deprecated time_base variable for decoding

Deprecated in 10/2015.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c43a96fe16e6a6ea091e64ca271f0788f4a0bea9
---

 libavcodec/decode.c   | 5 -
 libavcodec/mpegvideo_parser.c | 5 -
 libavcodec/utils.c| 5 -
 libavcodec/version.h  | 3 ---
 4 files changed, 18 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index f4088cdae8..e4f6a0d727 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -354,11 +354,6 @@ static int decode_simple_internal(AVCodecContext *avctx, 
AVFrame *frame)
 if (ret >= 0 && avctx->codec->type == AVMEDIA_TYPE_VIDEO)
 ret = pkt->size;
 
-#if FF_API_AVCTX_TIMEBASE
-if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
-avctx->time_base = av_inv_q(avctx->framerate);
-#endif
-
 if (avctx->internal->draining && !got_frame)
 avci->draining_done = 1;
 
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 500d1240ef..f883b5f819 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -163,11 +163,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext 
*s,
 s->coded_width  = FFALIGN(pc->width,  16);
 s->coded_height = FFALIGN(pc->height, 16);
 }
-
-#if FF_API_AVCTX_TIMEBASE
-if (avctx->framerate.num)
-avctx->time_base = av_inv_q(avctx->framerate);
-#endif
 }
 
 static int mpegvideo_parse(AVCodecParserContext *s,
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a6408cecbb..bc421f67f8 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -663,11 +663,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 ret = AVERROR(EINVAL);
 goto free_and_end;
 }
-
-#if FF_API_AVCTX_TIMEBASE
-if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
-avctx->time_base = av_inv_q(avctx->framerate);
-#endif
 }
 end:
 if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init) 
{
diff --git a/libavcodec/version.h b/libavcodec/version.h
index b60e9715aa..f53bdb5ccc 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_AVCTX_TIMEBASE
-#define FF_API_AVCTX_TIMEBASE(LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_MPV_OPT
 #define FF_API_MPV_OPT   (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: Drop deprecated options moved to private contexts

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 16 16:03:38 2017 -0400| [94eed68ace9f2416af8457fcbf142b175928c06b] | 
committer: Vittorio Giovara

lavc: Drop deprecated options moved to private contexts

Deprecated in 10/2014 and 07/2015.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94eed68ace9f2416af8457fcbf142b175928c06b
---

 libavcodec/avcodec.h   | 114 -
 libavcodec/dnxhdenc.c  |   6 ---
 libavcodec/internal.h  |   2 -
 libavcodec/libvpxenc.c |   9 
 libavcodec/libx264.c   |  21 +
 libavcodec/libxavs.c   |  26 ---
 libavcodec/libxvid.c   |  24 --
 libavcodec/motion_est.c|  19 
 libavcodec/mpegvideo.h |   3 --
 libavcodec/mpegvideo_enc.c |  48 ---
 libavcodec/options.c   |  15 --
 libavcodec/options_table.h |  46 --
 libavcodec/svq1enc.c   |  13 --
 libavcodec/version.h   |  12 -
 14 files changed, 1 insertion(+), 357 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2366acf93c..4bcead7106 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -658,25 +658,6 @@ typedef struct AVCodecDescriptor {
 #define AV_INPUT_BUFFER_MIN_SIZE 16384
 
 /**
- * @ingroup lavc_encoding
- * motion estimation type.
- * @deprecated use codec private option instead
- */
-#if FF_API_MOTION_EST
-enum Motion_Est_ID {
-ME_ZERO = 1,///< no search, that is use 0,0 vector whenever one is 
needed
-ME_FULL,
-ME_LOG,
-ME_PHODS,
-ME_EPZS,///< enhanced predictive zonal search
-ME_X1,  ///< reserved for experiments
-ME_HEX, ///< hexagon based search
-ME_UMH, ///< uneven multi-hexagon search
-ME_TESA,///< transformed exhaustive search algorithm
-};
-#endif
-
-/**
  * @ingroup lavc_decoding
  */
 enum AVDiscard{
@@ -1412,14 +1393,6 @@ typedef struct AVCodecContext {
  */
 enum AVPixelFormat pix_fmt;
 
-#if FF_API_MOTION_EST
-/**
- * This option does nothing
- * @deprecated use codec private options instead
- */
-attribute_deprecated int me_method;
-#endif
-
 /**
  * If non NULL, 'draw_horiz_band' is called by the libavcodec
  * decoder to draw a horizontal band. It improves cache usage. Not
@@ -1479,12 +1452,6 @@ typedef struct AVCodecContext {
  */
 float b_quant_factor;
 
-#if FF_API_RC_STRATEGY
-/** @deprecated use codec private option instead */
-attribute_deprecated int rc_strategy;
-#define FF_RC_STRATEGY_XVID 1
-#endif
-
 #if FF_API_PRIVATE_OPT
 /** @deprecated use encoder private options instead */
 attribute_deprecated
@@ -1684,19 +1651,6 @@ typedef struct AVCodecContext {
  */
 int me_range;
 
-#if FF_API_QUANT_BIAS
-/**
- * @deprecated use encoder private option instead
- */
-attribute_deprecated int intra_quant_bias;
-#define FF_DEFAULT_QUANT_BIAS 99
-
-/**
- * @deprecated use encoder private option instead
- */
-attribute_deprecated int inter_quant_bias;
-#endif
-
 /**
  * slice flags
  * - encoding: unused
@@ -1741,20 +1695,6 @@ typedef struct AVCodecContext {
 int noise_reduction;
 #endif
 
-#if FF_API_MPV_OPT
-/**
- * @deprecated this field is unused
- */
-attribute_deprecated
-int me_threshold;
-
-/**
- * @deprecated this field is unused
- */
-attribute_deprecated
-int mb_threshold;
-#endif
-
 /**
  * precision of the intra DC coefficient - 8
  * - encoding: Set by user.
@@ -1776,14 +1716,6 @@ typedef struct AVCodecContext {
  */
 int skip_bottom;
 
-#if FF_API_MPV_OPT
-/**
- * @deprecated use encoder private options instead
- */
-attribute_deprecated
-float border_masking;
-#endif
-
 /**
  * minimum MB Lagrange multiplier
  * - encoding: Set by user.
@@ -2096,19 +2028,6 @@ typedef struct AVCodecContext {
  */
 int max_qdiff;
 
-#if FF_API_MPV_OPT
-/**
- * @deprecated use encoder private options instead
- */
-attribute_deprecated
-float rc_qsquish;
-
-attribute_deprecated
-float rc_qmod_amp;
-attribute_deprecated
-int rc_qmod_freq;
-#endif
-
 /**
  * decoder bitstream buffer size
  * - encoding: Set by user.
@@ -2124,14 +2043,6 @@ typedef struct AVCodecContext {
 int rc_override_count;
 RcOverride *rc_override;
 
-#if FF_API_MPV_OPT
-/**
- * @deprecated use encoder private options instead
- */
-attribute_deprecated
-const char *rc_eq;
-#endif
-
 /**
  * maximum bitrate
  * - encoding: Set by user.
@@ -2146,17 +2057,6 @@ typedef struct AVCodecContext {
  */
 int rc_min_rate;
 
-#if FF_API_MPV_OPT
-/**
- * @deprecated use encoder private options instead
- */
-attribute_deprecated
-float rc_buffer_aggressivity;
-
-attribute_deprecated
-   

[FFmpeg-cvslog] lavc: Drop deprecated stream codec tag

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 16 16:21:54 2017 -0400| [0648dec19db83bc8c87814d195e32cbad5698a40] | 
committer: Vittorio Giovara

lavc: Drop deprecated stream codec tag

Deprecated in 07/2015.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0648dec19db83bc8c87814d195e32cbad5698a40
---

 libavcodec/avcodec.h   | 8 
 libavcodec/options_table.h | 3 ---
 libavcodec/version.h   | 5 +
 libavutil/version.h| 4 ++--
 4 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4bcead7106..1c58fe2d68 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1217,14 +1217,6 @@ typedef struct AVCodecContext {
  */
 unsigned int codec_tag;
 
-#if FF_API_STREAM_CODEC_TAG
-/**
- * @deprecated this field is unused
- */
-attribute_deprecated
-unsigned int stream_codec_tag;
-#endif
-
 void *priv_data;
 
 /**
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 8868cea5e3..925ef376f3 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -233,9 +233,6 @@ static const AVOption avcodec_options[] = {
 {"simple", "use mbcmp (default)", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"},
 {"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS 
}, INT_MIN, INT_MAX, V|E, "mbd"},
 {"rd", "use best rate distortion", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"},
-#if FF_API_STREAM_CODEC_TAG
-{"stream_codec_tag", NULL, OFFSET(stream_codec_tag), AV_OPT_TYPE_INT, {.i64 = 
DEFAULT }, INT_MIN, INT_MAX},
-#endif
 #if FF_API_PRIVATE_OPT
 {"sc_threshold", "scene change threshold", OFFSET(scenechange_threshold), 
AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
 #endif
diff --git a/libavcodec/version.h b/libavcodec/version.h
index e79701ecaa..4fb0a97a27 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,11 +47,8 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_STREAM_CODEC_TAG
-#define FF_API_STREAM_CODEC_TAG  (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_CODED_FRAME
-#define FF_API_CODED_FRAME   (LIBAVCODEC_VERSION_MAJOR < 58)
+#define FF_API_CODED_FRAME   (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
 #ifndef FF_API_SIDEDATA_ONLY_PKT
 #define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)
diff --git a/libavutil/version.h b/libavutil/version.h
index 904d387411..5ac2c831ed 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -91,10 +91,10 @@
 #define FF_API_CRYPTO_CONTEXT   (LIBAVUTIL_VERSION_MAJOR < 57)
 #endif
 #ifndef FF_API_PLUS1_MINUS1
-#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 56)
+#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 57)
 #endif
 #ifndef FF_API_ERROR_FRAME
-#define FF_API_ERROR_FRAME  (LIBAVUTIL_VERSION_MAJOR < 56)
+#define FF_API_ERROR_FRAME  (LIBAVUTIL_VERSION_MAJOR < 57)
 #endif
 #ifndef FF_API_VAAPI
 #define FF_API_VAAPI(LIBAVUTIL_VERSION_MAJOR < 57)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavu: Drop deprecated VDPAU pixel formats

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 17:13:33 2016 -0500| [dd343fd986459f467a2d1d70c26101dff1d47d68] | 
committer: Vittorio Giovara

lavu: Drop deprecated VDPAU pixel formats

Deprecated in 07/2013.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd343fd986459f467a2d1d70c26101dff1d47d68
---

 libavutil/pixdesc.c | 38 --
 libavutil/pixfmt.h  | 10 --
 libavutil/version.h |  3 ---
 3 files changed, 51 deletions(-)

diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index e4e5674a66..815e084155 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -822,44 +822,6 @@ static const AVPixFmtDescriptor 
av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
 },
 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
 },
-#if FF_API_VDPAU
-[AV_PIX_FMT_VDPAU_H264] = {
-.name = "vdpau_h264",
-.log2_chroma_w = 1,
-.log2_chroma_h = 1,
-.flags = AV_PIX_FMT_FLAG_HWACCEL,
-},
-[AV_PIX_FMT_VDPAU_MPEG1] = {
-.name = "vdpau_mpeg1",
-.log2_chroma_w = 1,
-.log2_chroma_h = 1,
-.flags = AV_PIX_FMT_FLAG_HWACCEL,
-},
-[AV_PIX_FMT_VDPAU_MPEG2] = {
-.name = "vdpau_mpeg2",
-.log2_chroma_w = 1,
-.log2_chroma_h = 1,
-.flags = AV_PIX_FMT_FLAG_HWACCEL,
-},
-[AV_PIX_FMT_VDPAU_WMV3] = {
-.name = "vdpau_wmv3",
-.log2_chroma_w = 1,
-.log2_chroma_h = 1,
-.flags = AV_PIX_FMT_FLAG_HWACCEL,
-},
-[AV_PIX_FMT_VDPAU_VC1] = {
-.name = "vdpau_vc1",
-.log2_chroma_w = 1,
-.log2_chroma_h = 1,
-.flags = AV_PIX_FMT_FLAG_HWACCEL,
-},
-[AV_PIX_FMT_VDPAU_MPEG4] = {
-.name = "vdpau_mpeg4",
-.log2_chroma_w = 1,
-.log2_chroma_h = 1,
-.flags = AV_PIX_FMT_FLAG_HWACCEL,
-},
-#endif
 [AV_PIX_FMT_RGB48BE] = {
 .name = "rgb48be",
 .nb_components = 3,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 0b7582576b..3c670fc9d4 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -92,13 +92,6 @@ enum AVPixelFormat {
 AV_PIX_FMT_YUV440P,   ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y 
samples)
 AV_PIX_FMT_YUVJ440P,  ///< planar YUV 4:4:0 full scale (JPEG), deprecated 
in favor of AV_PIX_FMT_YUV440P and setting color_range
 AV_PIX_FMT_YUVA420P,  ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 
2x2 Y & A samples)
-#if FF_API_VDPAU
-AV_PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains 
a vdpau_render_state struct which contains the bitstream of the slices as well 
as various fields extracted from headers
-AV_PIX_FMT_VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] 
contains a vdpau_render_state struct which contains the bitstream of the slices 
as well as various fields extracted from headers
-AV_PIX_FMT_VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] 
contains a vdpau_render_state struct which contains the bitstream of the slices 
as well as various fields extracted from headers
-AV_PIX_FMT_VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a 
vdpau_render_state struct which contains the bitstream of the slices as well as 
various fields extracted from headers
-AV_PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a 
vdpau_render_state struct which contains the bitstream of the slices as well as 
various fields extracted from headers
-#endif
 AV_PIX_FMT_RGB48BE,   ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 
2-byte value for each R/G/B component is stored as big-endian
 AV_PIX_FMT_RGB48LE,   ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 
2-byte value for each R/G/B component is stored as little-endian
 
@@ -127,9 +120,6 @@ enum AVPixelFormat {
 AV_PIX_FMT_YUV422P16BE,  ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample 
per 2x1 Y samples), big-endian
 AV_PIX_FMT_YUV444P16LE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample 
per 1x1 Y samples), little-endian
 AV_PIX_FMT_YUV444P16BE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample 
per 1x1 Y samples), big-endian
-#if FF_API_VDPAU
-AV_PIX_FMT_VDPAU_MPEG4,  ///< MPEG-4 HW decoding with VDPAU, data[0] 
contains a vdpau_render_state struct which contains the bitstream of the slices 
as well as various fields extracted from headers
-#endif
 AV_PIX_FMT_DXVA2_VLD,///< HW decoding through DXVA2, Picture.data[3] 
contains a LPDIRECT3DSURFACE9 pointer
 
 AV_PIX_FMT_RGB444LE,  ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), 
little-endian, most significant bits to 0
diff --git a/libavutil/version.h b/libavutil/version.h
index 5ac2c831ed..3b2280cecd 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -78,9 +78,6 @@
  * @{
  */
 
-#ifndef FF_API_VDPAU
-#

[FFmpeg-cvslog] lavu: Drop deprecated option type

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Dec  5 17:22:49 2016 -0500| [619a433eca2c5655c41b799e0b06380020fb1498] | 
committer: Vittorio Giovara

lavu: Drop deprecated option type

Deprecated in 02/2014.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=619a433eca2c5655c41b799e0b06380020fb1498
---

 libavutil/opt.h | 3 ---
 libavutil/version.h | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/libavutil/opt.h b/libavutil/opt.h
index a65c4f41ba..b68a396da7 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -263,9 +263,6 @@ typedef struct AVOption {
 int flags;
 #define AV_OPT_FLAG_ENCODING_PARAM  1   ///< a generic parameter which can be 
set by the user for muxing or encoding
 #define AV_OPT_FLAG_DECODING_PARAM  2   ///< a generic parameter which can be 
set by the user for demuxing or decoding
-#if FF_API_OPT_TYPE_METADATA
-#define AV_OPT_FLAG_METADATA4   ///< some data extracted or inserted 
into the file like title, comment, ...
-#endif
 #define AV_OPT_FLAG_AUDIO_PARAM 8
 #define AV_OPT_FLAG_VIDEO_PARAM 16
 #define AV_OPT_FLAG_SUBTITLE_PARAM  32
diff --git a/libavutil/version.h b/libavutil/version.h
index 3b2280cecd..d11e8d10f2 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -78,9 +78,6 @@
  * @{
  */
 
-#ifndef FF_API_OPT_TYPE_METADATA
-#define FF_API_OPT_TYPE_METADATA(LIBAVUTIL_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_DLOG
 #define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 56)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavu: Drop deprecated av_dlog macro

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 16 15:30:58 2017 -0400| [35cf146a33ce41a1adb6c9bd5a0827eacb1b6bfc] | 
committer: Vittorio Giovara

lavu: Drop deprecated av_dlog macro

Deprecated in 05/2015.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35cf146a33ce41a1adb6c9bd5a0827eacb1b6bfc
---

 libavutil/log.h | 14 --
 libavutil/version.h |  3 ---
 2 files changed, 17 deletions(-)

diff --git a/libavutil/log.h b/libavutil/log.h
index d4daea9c1a..ce00bccc7b 100644
--- a/libavutil/log.h
+++ b/libavutil/log.h
@@ -249,20 +249,6 @@ void av_log_default_callback(void *avcl, int level, const 
char *fmt,
  */
 const char* av_default_item_name(void* ctx);
 
-#if FF_API_DLOG
-/**
- * av_dlog macros
- * @deprecated unused
- * Useful to print debug messages that shouldn't get compiled in normally.
- */
-
-#ifdef DEBUG
-#define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
-#else
-#define av_dlog(pctx, ...)
-#endif
-#endif /* FF_API_DLOG */
-
 /**
  * Skip repeated messages, this requires the user app to use av_log() instead 
of
  * (f)printf as the 2 would otherwise interfere and lead to
diff --git a/libavutil/version.h b/libavutil/version.h
index d11e8d10f2..b8425ea2c8 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -78,9 +78,6 @@
  * @{
  */
 
-#ifndef FF_API_DLOG
-#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_CRYPTO_CONTEXT
 #define FF_API_CRYPTO_CONTEXT   (LIBAVUTIL_VERSION_MAJOR < 57)
 #endif

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] spherical: Change types of bounding and pad to uint32_t

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Mar 14 17:50:48 2017 -0400| [5f90ad99bb7e53383fefab5107b861e4c4600700] | 
committer: Vittorio Giovara

spherical: Change types of bounding and pad to uint32_t

These values are defined to be 32bit in the specification,
so it makes more sense to store them as fixed width.

Based on a patch by Micahel Niedermayer .

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f90ad99bb7e53383fefab5107b861e4c4600700
---

 libavformat/dump.c|  2 +-
 libavformat/matroskadec.c |  6 +++---
 libavformat/mov.c |  7 +++
 libavutil/spherical.h | 10 +-
 4 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 7514aee7ac..c56895628d 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -339,7 +339,7 @@ static void dump_spherical(void *ctx, AVCodecParameters 
*par, AVPacketSideData *
  &l, &t, &r, &b);
 av_log(ctx, AV_LOG_INFO, "[%zu, %zu, %zu, %zu] ", l, t, r, b);
 } else if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
-av_log(ctx, AV_LOG_INFO, "[pad %zu] ", spherical->padding);
+av_log(ctx, AV_LOG_INFO, "[pad %"PRIu32"] ", spherical->padding);
 }
 }
 
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4fbf4b9a96..c6e1a190a8 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1601,8 +1601,8 @@ static int mkv_parse_video_projection(AVStream *st, const 
MatroskaTrack *track)
 AVSphericalMapping *spherical;
 enum AVSphericalProjection projection;
 size_t spherical_size;
-size_t l = 0, t = 0, r = 0, b = 0;
-size_t padding = 0;
+uint32_t l = 0, t = 0, r = 0, b = 0;
+uint32_t padding = 0;
 int ret;
 GetByteContext gb;
 
@@ -1627,7 +1627,7 @@ static int mkv_parse_video_projection(AVStream *st, const 
MatroskaTrack *track)
 if (b >= UINT_MAX - t || r >= UINT_MAX - l) {
 av_log(NULL, AV_LOG_ERROR,
"Invalid bounding rectangle coordinates "
-   "%zu,%zu,%zu,%zu\n", l, t, r, b);
+   "%"PRIu32",%"PRIu32",%"PRIu32",%"PRIu32"\n", l, t, r, 
b);
 return AVERROR_INVALIDDATA;
 }
 } else if (track->video.projection.private.size != 0) {
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c6e7a38398..1c1857eaf9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3237,9 +3237,8 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 MOVStreamContext *sc;
 int size, version, layout;
 int32_t yaw, pitch, roll;
-size_t l = 0, t = 0, r = 0, b = 0;
-size_t padding = 0;
-uint32_t tag;
+uint32_t l = 0, t = 0, r = 0, b = 0;
+uint32_t tag, padding = 0;
 enum AVSphericalProjection projection;
 
 if (c->fc->nb_streams < 1)
@@ -3335,7 +3334,7 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 if (b >= UINT_MAX - t || r >= UINT_MAX - l) {
 av_log(c->fc, AV_LOG_ERROR,
"Invalid bounding rectangle coordinates "
-   "%zu,%zu,%zu,%zu\n", l, t, r, b);
+   "%"PRIu32",%"PRIu32",%"PRIu32",%"PRIu32"\n", l, t, r, b);
 return AVERROR_INVALIDDATA;
 }
 
diff --git a/libavutil/spherical.h b/libavutil/spherical.h
index e7fc1d69fb..fd662cf676 100644
--- a/libavutil/spherical.h
+++ b/libavutil/spherical.h
@@ -164,10 +164,10 @@ typedef struct AVSphericalMapping {
  *   projection type (@ref AV_SPHERICAL_EQUIRECTANGULAR_TILE),
  *   and should be ignored in all other cases.
  */
-size_t bound_left;   ///< Distance from the left edge
-size_t bound_top;///< Distance from the top edge
-size_t bound_right;  ///< Distance from the right edge
-size_t bound_bottom; ///< Distance from the bottom edge
+uint32_t bound_left;   ///< Distance from the left edge
+uint32_t bound_top;///< Distance from the top edge
+uint32_t bound_right;  ///< Distance from the right edge
+uint32_t bound_bottom; ///< Distance from the bottom edge
 /**
  * @}
  */
@@ -179,7 +179,7 @@ typedef struct AVSphericalMapping {
  *   (@ref AV_SPHERICAL_CUBEMAP), and should be ignored in all other
  *   cases.
  */
-size_t padding;
+uint32_t padding;
 } AVSphericalMapping;
 
 /**

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vf_showinfo: Display spherical properties

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Mar 15 17:55:18 2017 -0400| [883ce264d9ffc5bdaf477e09ee155b03339c46a6] | 
committer: Vittorio Giovara

vf_showinfo: Display spherical properties

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=883ce264d9ffc5bdaf477e09ee155b03339c46a6
---

 libavfilter/vf_showinfo.c | 41 +
 1 file changed, 41 insertions(+)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index b44f3d2bf2..d5605e6922 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -29,6 +29,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/internal.h"
 #include "libavutil/pixdesc.h"
+#include "libavutil/spherical.h"
 #include "libavutil/stereo3d.h"
 
 #include "avfilter.h"
@@ -39,6 +40,43 @@ typedef struct ShowInfoContext {
 unsigned int frame;
 } ShowInfoContext;
 
+static void dump_spherical(AVFilterContext *ctx, AVFrame *frame, 
AVFrameSideData *sd)
+{
+AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data;
+double yaw, pitch, roll;
+
+av_log(ctx, AV_LOG_INFO, "spherical information: ");
+if (sd->size < sizeof(*spherical)) {
+av_log(ctx, AV_LOG_INFO, "invalid data");
+return;
+}
+
+if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR)
+av_log(ctx, AV_LOG_INFO, "equirectangular ");
+else if (spherical->projection == AV_SPHERICAL_CUBEMAP)
+av_log(ctx, AV_LOG_INFO, "cubemap ");
+else if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE)
+av_log(ctx, AV_LOG_INFO, "tiled equirectangular ");
+else {
+av_log(ctx, AV_LOG_WARNING, "unknown");
+return;
+}
+
+yaw = ((double)spherical->yaw) / (1 << 16);
+pitch = ((double)spherical->pitch) / (1 << 16);
+roll = ((double)spherical->roll) / (1 << 16);
+av_log(ctx, AV_LOG_INFO, "(%f/%f/%f) ", yaw, pitch, roll);
+
+if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
+size_t l, t, r, b;
+av_spherical_tile_bounds(spherical, frame->width, frame->height,
+ &l, &t, &r, &b);
+av_log(ctx, AV_LOG_INFO, "[%zu, %zu, %zu, %zu] ", l, t, r, b);
+} else if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
+av_log(ctx, AV_LOG_INFO, "[pad %"PRIu32"] ", spherical->padding);
+}
+}
+
 static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd)
 {
 AVStereo3D *stereo;
@@ -105,6 +143,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*frame)
 case AV_FRAME_DATA_A53_CC:
 av_log(ctx, AV_LOG_INFO, "A/53 closed captions (%d bytes)", 
sd->size);
 break;
+case AV_FRAME_DATA_SPHERICAL:
+dump_spherical(ctx, frame, sd);
+break;
 case AV_FRAME_DATA_STEREO3D:
 dump_stereo3d(ctx, sd);
 break;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vf_showinfo: Simplify reporting stereo3d information

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Mar 15 17:39:53 2017 -0400| [3f128fc4a3fa1ef8a87974eb5484a997a84868fe] | 
committer: Vittorio Giovara

vf_showinfo: Simplify reporting stereo3d information

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f128fc4a3fa1ef8a87974eb5484a997a84868fe
---

 libavfilter/vf_showinfo.c | 14 +-
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 204ff7a857..b44f3d2bf2 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -51,19 +51,7 @@ static void dump_stereo3d(AVFilterContext *ctx, 
AVFrameSideData *sd)
 
 stereo = (AVStereo3D *)sd->data;
 
-av_log(ctx, AV_LOG_INFO, "type - ");
-switch (stereo->type) {
-case AV_STEREO3D_2D:  av_log(ctx, AV_LOG_INFO, "2D");  
   break;
-case AV_STEREO3D_SIDEBYSIDE:  av_log(ctx, AV_LOG_INFO, "side by 
side");   break;
-case AV_STEREO3D_TOPBOTTOM:   av_log(ctx, AV_LOG_INFO, "top and 
bottom"); break;
-case AV_STEREO3D_FRAMESEQUENCE:   av_log(ctx, AV_LOG_INFO, "frame 
alternate");break;
-case AV_STEREO3D_CHECKERBOARD:av_log(ctx, AV_LOG_INFO, 
"checkerboard");   break;
-case AV_STEREO3D_LINES:   av_log(ctx, AV_LOG_INFO, 
"interleaved lines");  break;
-case AV_STEREO3D_COLUMNS: av_log(ctx, AV_LOG_INFO, 
"interleaved columns");break;
-case AV_STEREO3D_SIDEBYSIDE_QUINCUNX: av_log(ctx, AV_LOG_INFO, "side by 
side "
-   "(quincunx 
subsampling)"); break;
-default:  av_log(ctx, AV_LOG_WARNING, 
"unknown"); break;
-}
+av_log(ctx, AV_LOG_INFO, "type - %s", av_stereo3d_type_name(stereo->type));
 
 if (stereo->flags & AV_STEREO3D_FLAG_INVERT)
 av_log(ctx, AV_LOG_INFO, " (inverted)");

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] APIchanges: Update bump dates

2017-10-23 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Mar 23 10:39:11 2017 +0100| [083ea8768121ee800893e124b08483011b798919] | 
committer: Vittorio Giovara

APIchanges: Update bump dates

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=083ea8768121ee800893e124b08483011b798919
---

 doc/APIchanges | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index c6a5d82b99..a0ca3b7ac0 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,13 +2,13 @@ Never assume the API of libav* to be stable unless at least 1 
month has passed
 since the last major version increase.
 
 The last version increases were:
-libavcodec:2015-08-28
-libavdevice:   2015-08-28
-libavfilter:   2015-08-28
-libavformat:   2015-08-28
-libavresample: 2015-08-28
-libswscale:2015-08-28
-libavutil: 2015-08-28
+libavcodec:2017-03-23
+libavdevice:   2017-03-23
+libavfilter:   2017-03-23
+libavformat:   2017-03-23
+libavresample: 2017-03-23
+libswscale:2017-03-23
+libavutil: 2017-03-23
 
 
 API changes, most recent first:

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavfi: Drop unused and empty header file

2017-10-26 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Apr  5 15:35:26 2017 +0200| [f5950b8fd61ec85e0ad8790bea56b37ceea19436] | 
committer: Vittorio Giovara

lavfi: Drop unused and empty header file

This header was public but deprecated on 2013-04-11 (lavfi 3.8.0).

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f5950b8fd61ec85e0ad8790bea56b37ceea19436
---

 libavfilter/Makefile|  1 -
 libavfilter/avfiltergraph.h | 29 -
 2 files changed, 30 deletions(-)

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index c8d1515d2c..348ad92116 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -2,7 +2,6 @@ NAME = avfilter
 DESC = Libav video filtering library
 
 HEADERS = avfilter.h\
-  avfiltergraph.h   \
   buffersink.h  \
   buffersrc.h   \
   version.h \
diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h
deleted file mode 100644
index 47174efc6c..00
--- a/libavfilter/avfiltergraph.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Filter graphs
- * copyright (c) 2007 Bobby Bingham
- *
- * This file is part of Libav.
- *
- * Libav is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * Libav is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_AVFILTERGRAPH_H
-#define AVFILTER_AVFILTERGRAPH_H
-
-#include "avfilter.h"
-#include "libavutil/log.h"
-
-
-#endif /* AVFILTER_AVFILTERGRAPH_H */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] filtfmts-test: Mark filter as const

2017-10-26 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Apr  4 17:56:34 2017 +0200| [839010aca9713b5cd6ebe7a1db7e805c3625b168] | 
committer: Vittorio Giovara

filtfmts-test: Mark filter as const

libavfilter/tests/filtfmts.c:57:18: warning:
  assigning to 'AVFilter *' (aka 'struct AVFilter *') from
  'const AVFilter *' (aka 'const struct AVFilter *') discards qualifiers
  [-Wincompatible-pointer-types-discards-qualifiers]

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=839010aca9713b5cd6ebe7a1db7e805c3625b168
---

 libavfilter/tests/filtfmts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/tests/filtfmts.c b/libavfilter/tests/filtfmts.c
index cc04654222..6bd8237e31 100644
--- a/libavfilter/tests/filtfmts.c
+++ b/libavfilter/tests/filtfmts.c
@@ -28,7 +28,7 @@
 
 int main(int argc, char **argv)
 {
-AVFilter *filter;
+const AVFilter *filter;
 AVFilterContext *filter_ctx;
 AVFilterGraph *graph_ctx;
 const char *filter_name;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] decode: Initialize ret before using it

2017-10-26 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Apr  3 21:58:15 2017 +0200| [efddf2c09aed7400c73ecf327f86a4d0452b94b5] | 
committer: Vittorio Giovara

decode: Initialize ret before using it

libavcodec/decode.c:608:9: warning: variable 'ret' is
  used uninitialized whenever 'if' condition is false

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efddf2c09aed7400c73ecf327f86a4d0452b94b5
---

 libavcodec/decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index e4f6a0d727..8aa27095b6 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -590,7 +590,7 @@ static int compat_decode(AVCodecContext *avctx, AVFrame 
*frame,
  int *got_frame, AVPacket *pkt)
 {
 AVCodecInternal *avci = avctx->internal;
-int ret;
+int ret = 0;
 
 av_assert0(avci->compat_decode_consumed == 0);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] mlp: Rename the channel layout variable

2017-10-30 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Apr 25 16:26:56 2017 -0400| [1f6e5dd4d4dd9c02371ad211049d27edb6d95286] | 
committer: Vittorio Giovara

mlp: Rename the channel layout variable

Purely cosmetic change, will make code more readable once the new
channel layout takes over.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f6e5dd4d4dd9c02371ad211049d27edb6d95286
---

 libavcodec/mlpdec.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index a606213f97..9ce32c832e 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -67,7 +67,7 @@ typedef struct SubStream {
 /// For each channel output by the matrix, the output channel to map it to
 uint8_t ch_assign[MAX_CHANNELS];
 /// The channel layout for this substream
-uint64_tch_layout;
+uint64_tmask;
 /// The matrix encoding mode for this substream
 enum AVMatrixEncoding matrix_encoding;
 
@@ -383,17 +383,17 @@ static int read_major_sync(MLPDecodeContext *m, 
BitstreamContext *bc)
  * major sync. */
 if (m->avctx->codec_id == AV_CODEC_ID_MLP) {
 if ((substr = (mh.num_substreams > 1)))
-m->substream[0].ch_layout = AV_CH_LAYOUT_STEREO;
-m->substream[substr].ch_layout = mh.channel_layout_mlp;
+m->substream[0].mask = AV_CH_LAYOUT_STEREO;
+m->substream[substr].mask = mh.channel_layout_mlp;
 } else {
 if ((substr = (mh.num_substreams > 1)))
-m->substream[0].ch_layout = AV_CH_LAYOUT_STEREO;
+m->substream[0].mask = AV_CH_LAYOUT_STEREO;
 if (mh.num_substreams > 2)
 if (mh.channel_layout_thd_stream2)
-m->substream[2].ch_layout = mh.channel_layout_thd_stream2;
+m->substream[2].mask = mh.channel_layout_thd_stream2;
 else
-m->substream[2].ch_layout = mh.channel_layout_thd_stream1;
-m->substream[substr].ch_layout = mh.channel_layout_thd_stream1;
+m->substream[2].mask = mh.channel_layout_thd_stream1;
+m->substream[substr].mask = mh.channel_layout_thd_stream1;
 }
 
 /* Parse the TrueHD decoder channel modifiers and set each substream's
@@ -511,12 +511,12 @@ static int read_restart_header(MLPDecodeContext *m, 
BitstreamContext *bc,
 s->max_channel= max_channel;
 s->max_matrix_channel = max_matrix_channel;
 
-if (m->avctx->request_channel_layout && (s->ch_layout & 
m->avctx->request_channel_layout) ==
+if (m->avctx->request_channel_layout && (s->mask & 
m->avctx->request_channel_layout) ==
 m->avctx->request_channel_layout && m->max_decoded_substream > substr) 
{
 av_log(m->avctx, AV_LOG_DEBUG,
"Extracting %d-channel downmix (0x%"PRIx64") from substream %d. 
"
"Further substreams will be skipped.\n",
-   s->max_channel + 1, s->ch_layout, substr);
+   s->max_channel + 1, s->mask, substr);
 m->max_decoded_substream = substr;
 }
 
@@ -543,9 +543,9 @@ static int read_restart_header(MLPDecodeContext *m, 
BitstreamContext *bc,
 for (ch = 0; ch <= s->max_matrix_channel; ch++) {
 int ch_assign = bitstream_read(bc, 6);
 if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD) {
-uint64_t channel = thd_channel_layout_extract_channel(s->ch_layout,
+uint64_t channel = thd_channel_layout_extract_channel(s->mask,
   ch_assign);
-ch_assign = av_get_channel_layout_channel_index(s->ch_layout,
+ch_assign = av_get_channel_layout_channel_index(s->mask,
 channel);
 }
 if (ch_assign < 0 || ch_assign > s->max_matrix_channel) {
@@ -587,7 +587,7 @@ static int read_restart_header(MLPDecodeContext *m, 
BitstreamContext *bc,
 
 if (substr == m->max_decoded_substream) {
 m->avctx->channels   = s->max_matrix_channel + 1;
-m->avctx->channel_layout = s->ch_layout;
+m->avctx->channel_layout = s->mask;
 m->dsp.mlp_pack_output = m->dsp.mlp_select_pack_output(s->ch_assign,
s->output_shift,

s->max_matrix_channel,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] mlp: Factor out channel layout subset checks

2017-10-30 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Apr 25 16:26:58 2017 -0400| [94c54d97e7f4fe90570c323803f2bdf6246c1010] | 
committer: Vittorio Giovara

mlp: Factor out channel layout subset checks

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94c54d97e7f4fe90570c323803f2bdf6246c1010
---

 libavcodec/mlp_parser.c | 22 +++---
 libavcodec/mlp_parser.h |  2 ++
 libavcodec/mlpdec.c |  4 ++--
 3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index fb9ede8702..7d73058e4c 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -120,6 +120,11 @@ static uint64_t truehd_layout(int chanmap)
 return layout;
 }
 
+int ff_mlp_channel_layout_subset(uint64_t channel_layout, uint64_t mask)
+{
+return channel_layout && ((channel_layout & mask) == channel_layout);
+}
+
 static int mlp_get_major_sync_size(const uint8_t * buf, int bufsize)
 {
 int has_extension, extensions = 0;
@@ -331,6 +336,8 @@ static int mlp_parse(AVCodecParserContext *s,
 } else {
 BitstreamContext bc;
 MLPHeaderInfo mh;
+int stereo_requested = 
ff_mlp_channel_layout_subset(avctx->request_channel_layout,
+
AV_CH_LAYOUT_STEREO);
 
 bitstream_init8(&bc, buf + 4, buf_size - 4);
 if (ff_mlp_read_major_sync(avctx, &mh, &bc) < 0)
@@ -346,10 +353,7 @@ static int mlp_parse(AVCodecParserContext *s,
 
 if (mh.stream_type == 0xbb) {
 /* MLP stream */
-if (avctx->request_channel_layout &&
-(avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
-avctx->request_channel_layout &&
-mh.num_substreams > 1) {
+if (stereo_requested && mh.num_substreams > 1) {
 avctx->channels   = 2;
 avctx->channel_layout = AV_CH_LAYOUT_STEREO;
 } else {
@@ -358,16 +362,12 @@ static int mlp_parse(AVCodecParserContext *s,
 }
 } else { /* mh.stream_type == 0xba */
 /* TrueHD stream */
-if (avctx->request_channel_layout &&
-(avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
-avctx->request_channel_layout &&
-mh.num_substreams > 1) {
+if (stereo_requested && mh.num_substreams > 1) {
 avctx->channels   = 2;
 avctx->channel_layout = AV_CH_LAYOUT_STEREO;
 } else if (!mh.channels_thd_stream2 ||
-   (avctx->request_channel_layout &&
-(avctx->request_channel_layout & 
mh.channel_layout_thd_stream1) ==
-avctx->request_channel_layout)) {
+   
ff_mlp_channel_layout_subset(avctx->request_channel_layout,
+
mh.channel_layout_thd_stream1)) {
 avctx->channels   = mh.channels_thd_stream1;
 avctx->channel_layout = mh.channel_layout_thd_stream1;
 } else {
diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
index 871b96db20..946f4d240c 100644
--- a/libavcodec/mlp_parser.h
+++ b/libavcodec/mlp_parser.h
@@ -63,4 +63,6 @@ typedef struct MLPHeaderInfo
 
 int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, BitstreamContext *bc);
 
+int ff_mlp_channel_layout_subset(uint64_t channel_layout, uint64_t mask);
+
 #endif /* AVCODEC_MLP_PARSER_H */
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 9ce32c832e..fa94f6f5b4 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -511,8 +511,8 @@ static int read_restart_header(MLPDecodeContext *m, 
BitstreamContext *bc,
 s->max_channel= max_channel;
 s->max_matrix_channel = max_matrix_channel;
 
-if (m->avctx->request_channel_layout && (s->mask & 
m->avctx->request_channel_layout) ==
-m->avctx->request_channel_layout && m->max_decoded_substream > substr) 
{
+if (ff_mlp_channel_layout_subset(m->avctx->request_channel_layout, 
s->mask) &&
+m->max_decoded_substream > substr) {
 av_log(m->avctx, AV_LOG_DEBUG,
"Extracting %d-channel downmix (0x%"PRIx64") from substream %d. 
"
"Further substreams will be skipped.\n",

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] mlp: Drop ff_ prefix from a static function

2017-10-30 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Apr 25 16:26:57 2017 -0400| [cea7fd9afb8488a6c48f7d7ee38602e1fd3dd425] | 
committer: Vittorio Giovara

mlp: Drop ff_ prefix from a static function

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cea7fd9afb8488a6c48f7d7ee38602e1fd3dd425
---

 libavcodec/mlp_parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index e9ba840200..fb9ede8702 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -120,7 +120,7 @@ static uint64_t truehd_layout(int chanmap)
 return layout;
 }
 
-static int ff_mlp_get_major_sync_size(const uint8_t * buf, int bufsize)
+static int mlp_get_major_sync_size(const uint8_t * buf, int bufsize)
 {
 int has_extension, extensions = 0;
 int size = 28;
@@ -150,7 +150,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, 
BitstreamContext *bc)
 
 assert(bitstream_tell(bc) == 0);
 
-header_size = ff_mlp_get_major_sync_size(bc->buffer, bc->size_in_bits >> 
3);
+header_size = mlp_get_major_sync_size(bc->buffer, bc->size_in_bits >> 3);
 if (header_size < 0 || bc->size_in_bits < header_size << 3) {
 av_log(log, AV_LOG_ERROR, "packet too short, unable to read major 
sync\n");
 return -1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avfoundation: update to use AVCodecParameters

2017-10-30 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Apr 26 11:31:28 2017 -0400| [85c2bf9d2cc7dad3d5c6dc79f802a74efa8d8fce] | 
committer: Vittorio Giovara

avfoundation: update to use AVCodecParameters

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85c2bf9d2cc7dad3d5c6dc79f802a74efa8d8fce
---

 libavdevice/avfoundation_dec.m | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavdevice/avfoundation_dec.m b/libavdevice/avfoundation_dec.m
index f01484c48f..e87f3a502e 100644
--- a/libavdevice/avfoundation_dec.m
+++ b/libavdevice/avfoundation_dec.m
@@ -449,11 +449,11 @@ static int get_video_config(AVFormatContext *s)
 image_buffer  = ctx->current_frame;
 image_buffer_size = CVImageBufferGetEncodedSize(image_buffer);
 
-stream->codec->codec_id   = AV_CODEC_ID_RAWVIDEO;
-stream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-stream->codec->width  = (int)image_buffer_size.width;
-stream->codec->height = (int)image_buffer_size.height;
-stream->codec->pix_fmt= av_get_pix_fmt(ctx->pixel_format);
+stream->codecpar->codec_id   = AV_CODEC_ID_RAWVIDEO;
+stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+stream->codecpar->width  = (int)image_buffer_size.width;
+stream->codecpar->height = (int)image_buffer_size.height;
+stream->codecpar->format = av_get_pix_fmt(ctx->pixel_format);
 
 CFRelease(ctx->current_frame);
 ctx->current_frame = nil;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] aac_ac3_parser: Drop in-parser downmix functionality

2017-10-30 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Apr 26 11:08:17 2017 -0400| [dd3aa85b68c017c419acb0c39ff6aa890ce89e87] | 
committer: Vittorio Giovara

aac_ac3_parser: Drop in-parser downmix functionality

request_channel_layout is a decoder option and it makes no sense
to have it in a parser.

This feature was needed in the past when the decoder was allowed
to reuse the avctx from the demuxer. Nowadays the decoder receives
only the parameters from it, already containing the real channel
layout (and the correct request_channel_layout option).

After initialization the decoder overwrites the channel layout
with the downmixed one that is actually output, so there is no need
to preserve this functionality in the parser.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd3aa85b68c017c419acb0c39ff6aa890ce89e87
---

 libavcodec/aac_ac3_parser.c | 16 ++--
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index 806a826ea0..a754f4a957 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -82,20 +82,8 @@ get_next:
seconds is still correct (as is the number of bits in the frame). */
 if (avctx->codec_id != AV_CODEC_ID_AAC) {
 avctx->sample_rate = s->sample_rate;
-
-/* (E-)AC-3: allow downmixing to stereo or mono */
-if (s->channels > 1 &&
-avctx->request_channel_layout == AV_CH_LAYOUT_MONO) {
-avctx->channels   = 1;
-avctx->channel_layout = AV_CH_LAYOUT_MONO;
-} else if (s->channels > 2 &&
-   avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {
-avctx->channels   = 2;
-avctx->channel_layout = AV_CH_LAYOUT_STEREO;
-} else {
-avctx->channels = s->channels;
-avctx->channel_layout = s->channel_layout;
-}
+avctx->channels = s->channels;
+avctx->channel_layout = s->channel_layout;
 s1->duration = s->samples;
 avctx->audio_service_type = s->service_type;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] mlp_parser: Drop in-parser downmix functionality

2017-10-30 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Apr 26 11:08:17 2017 -0400| [970c76f32283bddf3a5afd24fe52db7a96186244] | 
committer: Vittorio Giovara

mlp_parser: Drop in-parser downmix functionality

request_channel_layout is a decoder option and it makes no sense
to have it in a parser.

This feature was needed in the past when the decoder was allowed
to reuse the avctx from the demuxer. Nowadays the decoder receives
only the parameters from it, already containing the real channel
layout (and the correct request_channel_layout option).

After initialization the decoder overwrites the channel layout
with the downmixed one that is actually output, so there is no need
to preserve this functionality in the parser.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=970c76f32283bddf3a5afd24fe52db7a96186244
---

 libavcodec/mlp_parser.c | 23 +++
 libavcodec/mlp_parser.h |  2 --
 libavcodec/mlpdec.c |  7 ++-
 3 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 7d73058e4c..bff6258cba 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -120,11 +120,6 @@ static uint64_t truehd_layout(int chanmap)
 return layout;
 }
 
-int ff_mlp_channel_layout_subset(uint64_t channel_layout, uint64_t mask)
-{
-return channel_layout && ((channel_layout & mask) == channel_layout);
-}
-
 static int mlp_get_major_sync_size(const uint8_t * buf, int bufsize)
 {
 int has_extension, extensions = 0;
@@ -336,8 +331,6 @@ static int mlp_parse(AVCodecParserContext *s,
 } else {
 BitstreamContext bc;
 MLPHeaderInfo mh;
-int stereo_requested = 
ff_mlp_channel_layout_subset(avctx->request_channel_layout,
-
AV_CH_LAYOUT_STEREO);
 
 bitstream_init8(&bc, buf + 4, buf_size - 4);
 if (ff_mlp_read_major_sync(avctx, &mh, &bc) < 0)
@@ -353,21 +346,11 @@ static int mlp_parse(AVCodecParserContext *s,
 
 if (mh.stream_type == 0xbb) {
 /* MLP stream */
-if (stereo_requested && mh.num_substreams > 1) {
-avctx->channels   = 2;
-avctx->channel_layout = AV_CH_LAYOUT_STEREO;
-} else {
-avctx->channels   = mh.channels_mlp;
-avctx->channel_layout = mh.channel_layout_mlp;
-}
+avctx->channels   = mh.channels_mlp;
+avctx->channel_layout = mh.channel_layout_mlp;
 } else { /* mh.stream_type == 0xba */
 /* TrueHD stream */
-if (stereo_requested && mh.num_substreams > 1) {
-avctx->channels   = 2;
-avctx->channel_layout = AV_CH_LAYOUT_STEREO;
-} else if (!mh.channels_thd_stream2 ||
-   
ff_mlp_channel_layout_subset(avctx->request_channel_layout,
-
mh.channel_layout_thd_stream1)) {
+if (!mh.channels_thd_stream2) {
 avctx->channels   = mh.channels_thd_stream1;
 avctx->channel_layout = mh.channel_layout_thd_stream1;
 } else {
diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
index 946f4d240c..871b96db20 100644
--- a/libavcodec/mlp_parser.h
+++ b/libavcodec/mlp_parser.h
@@ -63,6 +63,4 @@ typedef struct MLPHeaderInfo
 
 int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, BitstreamContext *bc);
 
-int ff_mlp_channel_layout_subset(uint64_t channel_layout, uint64_t mask);
-
 #endif /* AVCODEC_MLP_PARSER_H */
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index fa94f6f5b4..4f6675a3ca 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -178,6 +178,11 @@ static const uint64_t thd_channel_order[] = {
 AV_CH_LOW_FREQUENCY_2,   // LFE2
 };
 
+static int mlp_channel_layout_subset(uint64_t channel_layout, uint64_t mask)
+{
+return channel_layout && ((channel_layout & mask) == channel_layout);
+}
+
 static uint64_t thd_channel_layout_extract_channel(uint64_t channel_layout,
int index)
 {
@@ -511,7 +516,7 @@ static int read_restart_header(MLPDecodeContext *m, 
BitstreamContext *bc,
 s->max_channel= max_channel;
 s->max_matrix_channel = max_matrix_channel;
 
-if (ff_mlp_channel_layout_subset(m->avctx->request_channel_layout, 
s->mask) &&
+if (mlp_channel_layout_subset(m->avctx->request_channel_layout, s->mask) &&
 m->max_decoded_substream > substr) {
 av_log(m->avctx, AV_LOG_DEBUG,
"Extracting %d-channel downmix (0x%"PRIx64") from substream %d. 
"

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] dvbsubdec: Free subrect memory on allocation error

2017-11-06 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Jun 13 11:35:16 2017 -0400| [a594f17f83a1ffdc1eec18818208fe39487dd5d7] | 
committer: Vittorio Giovara

dvbsubdec: Free subrect memory on allocation error

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a594f17f83a1ffdc1eec18818208fe39487dd5d7
---

 libavcodec/dvbsubdec.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 63523b765e..b97ff8027b 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1293,6 +1293,10 @@ static int dvbsub_display_end_segment(AVCodecContext 
*avctx, const uint8_t *buf,
 for (i = 0; i < sub->num_rects; i++) {
 sub->rects[i] = av_mallocz(sizeof(*sub->rects[i]));
 if (!sub->rects[i]) {
+int j;
+for (j = 0; j < i; j ++)
+av_free(sub->rects[j]);
+av_free(sub->rects);
 return AVERROR(ENOMEM);
 }
 }
@@ -1335,6 +1339,8 @@ static int dvbsub_display_end_segment(AVCodecContext 
*avctx, const uint8_t *buf,
 
 rect->data[1] = av_mallocz(AVPALETTE_SIZE);
 if (!rect->data[1]) {
+for (i = 0; i < sub->num_rects; i++)
+av_free(sub->rects[i]);
 av_free(sub->rects);
 return AVERROR(ENOMEM);
 }
@@ -1343,6 +1349,8 @@ static int dvbsub_display_end_segment(AVCodecContext 
*avctx, const uint8_t *buf,
 rect->data[0] = av_malloc(region->buf_size);
 if (!rect->data[0]) {
 av_free(rect->data[1]);
+for (i = 0; i < sub->num_rects; i++)
+av_free(sub->rects[i]);
 av_free(sub->rects);
 return AVERROR(ENOMEM);
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] hevc: Add support for alternative transfer characterics SEI

2017-11-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Jun  9 17:27:22 2017 -0400| [969f215957b25ec014aeed6e440ecb450e6927c1] | 
committer: Vittorio Giovara

hevc: Add support for alternative transfer characterics SEI

The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=969f215957b25ec014aeed6e440ecb450e6927c1
---

 libavcodec/hevc_sei.c | 9 +
 libavcodec/hevc_sei.h | 7 +++
 libavcodec/hevcdec.c  | 6 ++
 3 files changed, 22 insertions(+)

diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 153d211b4b..0a5d4440bf 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -86,6 +86,13 @@ static int 
decode_nal_sei_display_orientation(HEVCSEIDisplayOrientation *s, GetB
 return 0;
 }
 
+static int decode_nal_sei_alternative_transfer(HEVCSEIAlternativeTransfer *s, 
GetBitContext *gb)
+{
+s->present = 1;
+s->preferred_transfer_characteristics = get_bits(gb, 8);
+return 0;
+}
+
 static int decode_nal_sei_prefix(GetBitContext *gb, void *logctx, HEVCSEI *s,
  int type, int size)
 {
@@ -96,6 +103,8 @@ static int decode_nal_sei_prefix(GetBitContext *gb, void 
*logctx, HEVCSEI *s,
 return decode_nal_sei_frame_packing_arrangement(&s->frame_packing, gb);
 case HEVC_SEI_TYPE_DISPLAY_ORIENTATION:
 return decode_nal_sei_display_orientation(&s->display_orientation, gb);
+case HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS:
+return decode_nal_sei_alternative_transfer(&s->alternative_transfer, 
gb);
 default:
 av_log(logctx, AV_LOG_DEBUG, "Skipped PREFIX SEI %d\n", type);
 skip_bits_long(gb, 8 * size);
diff --git a/libavcodec/hevc_sei.h b/libavcodec/hevc_sei.h
index b699fef45d..e4aeac1fbe 100644
--- a/libavcodec/hevc_sei.h
+++ b/libavcodec/hevc_sei.h
@@ -54,6 +54,7 @@ typedef enum {
 HEVC_SEI_TYPE_REGION_REFRESH_INFO  = 134,
 HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO   = 137,
 HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO = 144,
+HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
 } HEVC_SEI_Type;
 
 typedef struct HEVCSEIPictureHash {
@@ -74,10 +75,16 @@ typedef struct HEVCSEIDisplayOrientation {
 int hflip, vflip;
 } HEVCSEIDisplayOrientation;
 
+typedef struct HEVCSEIAlternativeTransfer {
+int present;
+int preferred_transfer_characteristics;
+} HEVCSEIAlternativeTransfer;
+
 typedef struct HEVCSEI {
 HEVCSEIPictureHash picture_hash;
 HEVCSEIFramePacking frame_packing;
 HEVCSEIDisplayOrientation display_orientation;
+HEVCSEIAlternativeTransfer alternative_transfer;
 } HEVCSEI;
 
 int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s,
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 7a9182af9b..ac0b1a3c1d 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2407,6 +2407,12 @@ static int set_side_data(HEVCContext *s)
s->sei.display_orientation.vflip);
 }
 
+if (s->sei.alternative_transfer.present &&
+
av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics)
 &&
+s->sei.alternative_transfer.preferred_transfer_characteristics != 
AVCOL_TRC_UNSPECIFIED) {
+s->avctx->color_trc = 
s->sei.alternative_transfer.preferred_transfer_characteristics;
+}
+
 return 0;
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] hevc: Make sure to update the current frame transfer characteristic

2017-11-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Jul 20 14:43:53 2017 +0200| [ce1a99d870c05b639512920cd3a1dee3e41d323f] | 
committer: Vittorio Giovara

hevc: Make sure to update the current frame transfer characteristic

Otherwise the first decoded frame will still be tagged with the
original transfer instead of the alternative one.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce1a99d870c05b639512920cd3a1dee3e41d323f
---

 libavcodec/hevcdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index ac0b1a3c1d..f6bbb7051e 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2410,7 +2410,7 @@ static int set_side_data(HEVCContext *s)
 if (s->sei.alternative_transfer.present &&
 
av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics)
 &&
 s->sei.alternative_transfer.preferred_transfer_characteristics != 
AVCOL_TRC_UNSPECIFIED) {
-s->avctx->color_trc = 
s->sei.alternative_transfer.preferred_transfer_characteristics;
+s->avctx->color_trc = out->color_trc = 
s->sei.alternative_transfer.preferred_transfer_characteristics;
 }
 
 return 0;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] pixfmt: Support chroma-derived and ictcp color matrices

2017-11-10 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Aug  8 16:30:32 2017 +0200| [538e50875105c9d4a04bc4ed4a217e87f422137e] | 
committer: Vittorio Giovara

pixfmt: Support chroma-derived and ictcp color matrices

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=538e50875105c9d4a04bc4ed4a217e87f422137e
---

 libavutil/pixdesc.c | 3 +++
 libavutil/pixfmt.h  | 3 +++
 libavutil/version.h | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 7fa6dd7c0b..b168ac7d0b 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -1806,6 +1806,9 @@ static const char * const color_space_names[] = {
 [AVCOL_SPC_BT2020_NCL] = "bt2020nc",
 [AVCOL_SPC_BT2020_CL] = "bt2020c",
 [AVCOL_SPC_SMPTE2085] = "smpte2085",
+[AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc",
+[AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c",
+[AVCOL_SPC_ICTCP] = "ictcp",
 };
 
 static const char * const chroma_location_names[] = {
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 2ba7ad1c88..bcbb378378 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -384,6 +384,9 @@ enum AVColorSpace {
 AVCOL_SPC_BT2020_NCL  = 9,  ///< ITU-R BT2020 non-constant luminance system
 AVCOL_SPC_BT2020_CL   = 10, ///< ITU-R BT2020 constant luminance system
 AVCOL_SPC_SMPTE2085   = 11, ///< SMPTE 2085, Y'D'zD'x
+AVCOL_SPC_CHROMA_DERIVED_NCL = 12, ///< Chromaticity-derived non-constant 
luminance system
+AVCOL_SPC_CHROMA_DERIVED_CL = 13, ///< Chromaticity-derived constant 
luminance system
+AVCOL_SPC_ICTCP   = 14, ///< ITU-R BT.2100-0, ICtCp
 AVCOL_SPC_NB,   ///< Not part of ABI
 };
 
diff --git a/libavutil/version.h b/libavutil/version.h
index 62fb38a27a..5d0bb61124 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -54,7 +54,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR 56
-#define LIBAVUTIL_VERSION_MINOR  4
+#define LIBAVUTIL_VERSION_MINOR  5
 #define LIBAVUTIL_VERSION_MICRO  0
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] h264: Add support for alternative transfer characterics SEI

2017-11-10 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Aug  8 16:06:29 2017 +0200| [ebf3b9e8a875eb12312460aee505118791ef805f] | 
committer: Vittorio Giovara

h264: Add support for alternative transfer characterics SEI

The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ebf3b9e8a875eb12312460aee505118791ef805f
---

 libavcodec/h264_sei.c   | 11 +++
 libavcodec/h264_sei.h   |  7 +++
 libavcodec/h264_slice.c |  6 ++
 3 files changed, 24 insertions(+)

diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 3ca2b7a6cd..03fca9017f 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -346,6 +346,14 @@ static int 
decode_display_orientation(H264SEIDisplayOrientation *h,
 return 0;
 }
 
+static int decode_alternative_transfer(H264SEIAlternativeTransfer *h,
+   GetBitContext *gb)
+{
+h->present = 1;
+h->preferred_transfer_characteristics = get_bits(gb, 8);
+return 0;
+}
+
 int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb,
const H264ParamSets *ps, void *logctx)
 {
@@ -396,6 +404,9 @@ int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb,
 case H264_SEI_TYPE_DISPLAY_ORIENTATION:
 ret = decode_display_orientation(&h->display_orientation, gb);
 break;
+case H264_SEI_TYPE_ALTERNATIVE_TRANSFER:
+ret = decode_alternative_transfer(&h->alternative_transfer, gb);
+break;
 default:
 av_log(logctx, AV_LOG_DEBUG, "unknown SEI type %d\n", type);
 skip_bits(gb, 8 * size);
diff --git a/libavcodec/h264_sei.h b/libavcodec/h264_sei.h
index ce9768ec3d..f6ac6034da 100644
--- a/libavcodec/h264_sei.h
+++ b/libavcodec/h264_sei.h
@@ -33,6 +33,7 @@ typedef enum {
 H264_SEI_TYPE_RECOVERY_POINT = 6,   ///< recovery point (frame # 
to decoder sync)
 H264_SEI_TYPE_FRAME_PACKING  = 45,  ///< frame packing arrangement
 H264_SEI_TYPE_DISPLAY_ORIENTATION= 47,  ///< display orientation
+H264_SEI_TYPE_ALTERNATIVE_TRANSFER   = 147, ///< alternative transfer
 } H264_SEI_Type;
 
 /**
@@ -115,6 +116,11 @@ typedef struct H264SEIDisplayOrientation {
 int hflip, vflip;
 } H264SEIDisplayOrientation;
 
+typedef struct H264SEIAlternativeTransfer {
+int present;
+int preferred_transfer_characteristics;
+} H264SEIAlternativeTransfer;
+
 typedef struct H264SEIContext {
 H264SEIPictureTiming picture_timing;
 H264SEIAFD afd;
@@ -124,6 +130,7 @@ typedef struct H264SEIContext {
 H264SEIBufferingPeriod buffering_period;
 H264SEIFramePacking frame_packing;
 H264SEIDisplayOrientation display_orientation;
+H264SEIAlternativeTransfer alternative_transfer;
 } H264SEIContext;
 
 struct H264ParamSets;
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index c6309b298c..5dd01d836e 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1154,6 +1154,12 @@ static int h264_export_frame_props(H264Context *h)
 a53->a53_caption_size = 0;
 }
 
+if (h->sei.alternative_transfer.present &&
+
av_color_transfer_name(h->sei.alternative_transfer.preferred_transfer_characteristics)
 &&
+h->sei.alternative_transfer.preferred_transfer_characteristics != 
AVCOL_TRC_UNSPECIFIED) {
+h->avctx->color_trc = cur->f->color_trc = 
h->sei.alternative_transfer.preferred_transfer_characteristics;
+}
+
 return 0;
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] pixdesc: Add API to map color property names to enum values

2017-11-11 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Sep 21 13:23:21 2017 +0200| [2b50847e0f8f8894bfa74aa1c5a63e90a9867b45] | 
committer: Vittorio Giovara

pixdesc: Add API to map color property names to enum values

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b50847e0f8f8894bfa74aa1c5a63e90a9867b45
---

 doc/APIchanges  |  5 +
 libavutil/pixdesc.c | 64 +
 libavutil/pixdesc.h | 25 +
 libavutil/version.h |  2 +-
 4 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index ed90be890d..fa27007f44 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,11 @@ libavutil: 2017-03-23
 
 API changes, most recent first:
 
+2017-xx-xx - xxx - lavu 56.6.0 - pixdesc.h
+  Add av_color_range_from_name(), av_color_primaries_from_name(),
+  av_color_transfer_from_name(), av_color_space_from_name(), and
+  av_chroma_location_from_name().
+
 2016-xx-xx - xxx - lavf 58.1.0 - avio.h
   Add avio_read_partial().
 
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index b168ac7d0b..957f99fdaa 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -2013,27 +2013,91 @@ const char *av_color_range_name(enum AVColorRange range)
 color_range_names[range] : NULL;
 }
 
+int av_color_range_from_name(const char *name)
+{
+int i;
+
+for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) {
+size_t len = strlen(color_range_names[i]);
+if (!strncmp(color_range_names[i], name, len))
+return i;
+}
+
+return AVERROR(EINVAL);
+}
+
 const char *av_color_primaries_name(enum AVColorPrimaries primaries)
 {
 return (unsigned) primaries < AVCOL_PRI_NB ?
 color_primaries_names[primaries] : NULL;
 }
 
+int av_color_primaries_from_name(const char *name)
+{
+int i;
+
+for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) {
+size_t len = strlen(color_primaries_names[i]);
+if (!strncmp(color_primaries_names[i], name, len))
+return i;
+}
+
+return AVERROR(EINVAL);
+}
+
 const char *av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
 {
 return (unsigned) transfer < AVCOL_TRC_NB ?
 color_transfer_names[transfer] : NULL;
 }
 
+int av_color_transfer_from_name(const char *name)
+{
+int i;
+
+for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) {
+size_t len = strlen(color_transfer_names[i]);
+if (!strncmp(color_transfer_names[i], name, len))
+return i;
+}
+
+return AVERROR(EINVAL);
+}
+
 const char *av_color_space_name(enum AVColorSpace space)
 {
 return (unsigned) space < AVCOL_SPC_NB ?
 color_space_names[space] : NULL;
 }
 
+int av_color_space_from_name(const char *name)
+{
+int i;
+
+for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) {
+size_t len = strlen(color_space_names[i]);
+if (!strncmp(color_space_names[i], name, len))
+return i;
+}
+
+return AVERROR(EINVAL);
+}
+
 const char *av_chroma_location_name(enum AVChromaLocation location)
 {
 return (unsigned) location < AVCHROMA_LOC_NB ?
 chroma_location_names[location] : NULL;
 }
 
+int av_chroma_location_from_name(const char *name)
+{
+int i;
+
+for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) {
+size_t len = strlen(chroma_location_names[i]);
+if (!strncmp(chroma_location_names[i], name, len))
+return i;
+}
+
+return AVERROR(EINVAL);
+}
diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
index 3bb10f777a..4e8a29e607 100644
--- a/libavutil/pixdesc.h
+++ b/libavutil/pixdesc.h
@@ -298,23 +298,48 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum 
AVPixelFormat pix_fmt);
 const char *av_color_range_name(enum AVColorRange range);
 
 /**
+ * @return the AVColorRange value for name or an AVError if not found.
+ */
+int av_color_range_from_name(const char *name);
+
+/**
  * @return the name for provided color primaries or NULL if unknown.
  */
 const char *av_color_primaries_name(enum AVColorPrimaries primaries);
 
 /**
+ * @return the AVColorPrimaries value for name or an AVError if not found.
+ */
+int av_color_primaries_from_name(const char *name);
+
+/**
  * @return the name for provided color transfer or NULL if unknown.
  */
 const char *av_color_transfer_name(enum AVColorTransferCharacteristic 
transfer);
 
 /**
+ * @return the AVColorTransferCharacteristic value for name or an AVError if 
not found.
+ */
+int av_color_transfer_from_name(const char *name);
+
+/**
  * @return the name for provided color space or NULL if unknown.
  */
 const char *av_color_space_name(enum AVColorSpace space);
 
 /**
+ * @return the AVColorSpace value for name or an AVError if not found.
+ */
+int av_color_space_from_name(const char *name);
+
+/**
  * @return the name for provi

[FFmpeg-cvslog] vf_zscale: Relax color properties maximum bounds

2017-11-28 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Nov 28 13:55:47 2017 -0500| [3e0560b054dd4f548f41e5fb69b6350858e6d88d] | 
committer: Vittorio Giovara

vf_zscale: Relax color properties maximum bounds

This simplifies adding new values, which are already validated elsewhere.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e0560b054dd4f548f41e5fb69b6350858e6d88d
---

 libavfilter/vf_zscale.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index 09fd842fe5..972f720ee6 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -735,8 +735,8 @@ static const AVOption zscale_options[] = {
 { "unknown",  0,   0, AV_OPT_TYPE_CONST, 
{.i64 = -1}, 0, 0, FLAGS, "range" },
 { "tv",   0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_RANGE_LIMITED}, 0, 0, FLAGS, "range" },
 { "pc",   0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_RANGE_FULL},0, 0, FLAGS, "range" },
-{ "primaries", "set color primaries", OFFSET(primaries), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, ZIMG_PRIMARIES_ST432_1, FLAGS, "primaries" },
-{ "p", "set color primaries", OFFSET(primaries), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, ZIMG_PRIMARIES_ST432_1, FLAGS, "primaries" },
+{ "primaries", "set color primaries", OFFSET(primaries), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, INT_MAX, FLAGS, "primaries" },
+{ "p", "set color primaries", OFFSET(primaries), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, INT_MAX, FLAGS, "primaries" },
 { "input",0,   0, AV_OPT_TYPE_CONST, 
{.i64 = -1}, 0, 0, FLAGS, "primaries" },
 { "709",  0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_PRIMARIES_709}, 0, 0, FLAGS, "primaries" },
 { "unspecified",  0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0, FLAGS, "primaries" },
@@ -749,8 +749,8 @@ static const AVOption zscale_options[] = {
 { "smpte240m",0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_PRIMARIES_240M},0, 0, FLAGS, "primaries" },
 { "bt2020",   0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_PRIMARIES_2020},0, 0, FLAGS, "primaries" },
 { "smpte432", 0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_PRIMARIES_ST432_1}, 0, 0, FLAGS, "primaries" },
-{ "transfer", "set transfer characteristic", OFFSET(trc), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, ZIMG_TRANSFER_ARIB_B67, FLAGS, "transfer" },
-{ "t","set transfer characteristic", OFFSET(trc), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, ZIMG_TRANSFER_ARIB_B67, FLAGS, "transfer" },
+{ "transfer", "set transfer characteristic", OFFSET(trc), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, INT_MAX, FLAGS, "transfer" },
+{ "t","set transfer characteristic", OFFSET(trc), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, INT_MAX, FLAGS, "transfer" },
 { "input",0,   0, AV_OPT_TYPE_CONST, 
{.i64 = -1}, 0, 0, FLAGS, "transfer" },
 { "709",  0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_TRANSFER_709}, 0, 0, FLAGS, "transfer" },
 { "unspecified",  0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0, FLAGS, "transfer" },
@@ -767,8 +767,8 @@ static const AVOption zscale_options[] = {
 { "smpte2084",0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_TRANSFER_ST2084},  0, 0, FLAGS, "transfer" },
 { "iec61966-2-1", 0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0, FLAGS, "transfer" },
 { "arib-std-b67", 0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_TRANSFER_ARIB_B67},0, 0, FLAGS, "transfer" },
-{ "matrix", "set colorspace matrix", OFFSET(colorspace), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, ZIMG_MATRIX_2020_CL, FLAGS, "matrix" },
-{ "m",  "set colorspace matrix", OFFSET(colorspace), AV_OPT_TYPE_INT, 
{.i64 = -1}, -1, ZIMG_MATRIX_2020_CL, FLAGS, "matrix" },
+{ "matrix", "set colorspace

[FFmpeg-cvslog] vf_zscale: Add more supported input properties

2017-11-28 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Nov 28 13:56:06 2017 -0500| [002db7d49ada290db15334b7b41fa27eb376ec5c] | 
committer: Vittorio Giovara

vf_zscale: Add more supported input properties

Bump the minimum version necessary in the configure file.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=002db7d49ada290db15334b7b41fa27eb376ec5c
---

 configure   |  2 +-
 libavfilter/vf_zscale.c | 51 +
 2 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 6748ef8bc9..28902d41f5 100755
--- a/configure
+++ b/configure
@@ -5929,7 +5929,7 @@ enabled libx265   && require_pkg_config libx265 
x265 x265.h x265_api_get
  require_cpp_condition x265.h "X265_BUILD >= 68"
 enabled libxavs   && require libxavs "stdint.h xavs.h" 
xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
 enabled libxvid   && require libxvid xvid.h xvid_global -lxvidcore
-enabled libzimg   && require_pkg_config libzimg "zimg >= 2.3.0" zimg.h 
zimg_get_api_version
+enabled libzimg   && require_pkg_config libzimg "zimg >= 2.6.2" zimg.h 
zimg_get_api_version
 enabled libzmq&& require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
 enabled libzvbi   && require_pkg_config libzvbi zvbi-0.2 libzvbi.h 
vbi_decoder_new &&
  { check_cpp_condition libzvbi.h 
"VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && 
VBI_VERSION_MICRO >= 28" ||
diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index 972f720ee6..865910bd87 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -353,16 +353,26 @@ static int convert_matrix(enum AVColorSpace colorspace)
 return ZIMG_MATRIX_709;
 case AVCOL_SPC_UNSPECIFIED:
 return ZIMG_MATRIX_UNSPECIFIED;
+case AVCOL_SPC_FCC:
+return ZIMG_MATRIX_FCC;
 case AVCOL_SPC_BT470BG:
 return ZIMG_MATRIX_470BG;
 case AVCOL_SPC_SMPTE170M:
 return ZIMG_MATRIX_170M;
+case AVCOL_SPC_SMPTE240M:
+return ZIMG_MATRIX_240M;
 case AVCOL_SPC_YCGCO:
 return ZIMG_MATRIX_YCGCO;
 case AVCOL_SPC_BT2020_NCL:
 return ZIMG_MATRIX_2020_NCL;
 case AVCOL_SPC_BT2020_CL:
 return ZIMG_MATRIX_2020_CL;
+case AVCOL_SPC_CHROMA_DERIVED_NCL:
+return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
+case AVCOL_SPC_CHROMA_DERIVED_CL:
+return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
+case AVCOL_SPC_ICTCP:
+return ZIMG_MATRIX_ICTCP;
 }
 return ZIMG_MATRIX_UNSPECIFIED;
 }
@@ -374,10 +384,22 @@ static int convert_trc(enum AVColorTransferCharacteristic 
color_trc)
 return ZIMG_TRANSFER_UNSPECIFIED;
 case AVCOL_TRC_BT709:
 return ZIMG_TRANSFER_709;
+case AVCOL_TRC_GAMMA22:
+return ZIMG_TRANSFER_470_M;
+case AVCOL_TRC_GAMMA28:
+return ZIMG_TRANSFER_470_BG;
 case AVCOL_TRC_SMPTE170M:
 return ZIMG_TRANSFER_601;
+case AVCOL_TRC_SMPTE240M:
+return ZIMG_TRANSFER_240M;
 case AVCOL_TRC_LINEAR:
 return ZIMG_TRANSFER_LINEAR;
+case AVCOL_TRC_LOG:
+return ZIMG_TRANSFER_LOG_100;
+case AVCOL_TRC_LOG_SQRT:
+return ZIMG_TRANSFER_LOG_316;
+case AVCOL_TRC_IEC61966_2_4:
+return ZIMG_TRANSFER_IEC_61966_2_4;
 case AVCOL_TRC_BT2020_10:
 return ZIMG_TRANSFER_2020_10;
 case AVCOL_TRC_BT2020_12:
@@ -399,14 +421,26 @@ static int convert_primaries(enum AVColorPrimaries 
color_primaries)
 return ZIMG_PRIMARIES_UNSPECIFIED;
 case AVCOL_PRI_BT709:
 return ZIMG_PRIMARIES_709;
+case AVCOL_PRI_BT470M:
+return ZIMG_PRIMARIES_470_M;
+case AVCOL_PRI_BT470BG:
+return ZIMG_PRIMARIES_470_BG;
 case AVCOL_PRI_SMPTE170M:
 return ZIMG_PRIMARIES_170M;
 case AVCOL_PRI_SMPTE240M:
 return ZIMG_PRIMARIES_240M;
+case AVCOL_PRI_FILM:
+return ZIMG_PRIMARIES_FILM;
 case AVCOL_PRI_BT2020:
 return ZIMG_PRIMARIES_2020;
+case AVCOL_PRI_SMPTE428:
+return ZIMG_PRIMARIES_ST428;
+case AVCOL_PRI_SMPTE431:
+return ZIMG_PRIMARIES_ST431_2;
 case AVCOL_PRI_SMPTE432:
 return ZIMG_PRIMARIES_ST432_1;
+case AVCOL_PRI_JEDEC_P22:
+return ZIMG_PRIMARIES_EBU3213_E;
 }
 return ZIMG_PRIMARIES_UNSPECIFIED;
 }
@@ -745,10 +779,16 @@ static const AVOption zscale_options[] = {
 { "2020", 0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_PRIMARIES_2020},0, 0, FLAGS, "primaries" },
 { "unknown",  0,   0, AV_OPT_TYPE_CONST, 
{.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0, FLAGS, "pr

[FFmpeg-cvslog] mov: Support mdcv and clli boxes for mastering display an color light level

2017-11-28 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Oct  4 14:47:54 2017 -0400| [10db42f117ed5cb5b662eef619ee6a92d868095a] | 
committer: Vittorio Giovara

mov: Support mdcv and clli boxes for mastering display an color light level

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10db42f117ed5cb5b662eef619ee6a92d868095a
---

 libavformat/mov.c | 71 +++
 1 file changed, 71 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index f6c86635b1..b3b800f898 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5081,6 +5081,51 @@ static int mov_read_smdm(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 return 0;
 }
 
+static int mov_read_mdcv(MOVContext *c, AVIOContext *pb, MOVAtom atom)
+{
+MOVStreamContext *sc;
+const int mapping[3] = {1, 2, 0};
+const int chroma_den = 5;
+const int luma_den = 1;
+int i;
+
+if (c->fc->nb_streams < 1)
+return AVERROR_INVALIDDATA;
+
+sc = c->fc->streams[c->fc->nb_streams - 1]->priv_data;
+
+if (atom.size < 24) {
+av_log(c->fc, AV_LOG_ERROR, "Invalid Mastering Display Color Volume 
box\n");
+return AVERROR_INVALIDDATA;
+}
+
+sc->mastering = av_mastering_display_metadata_alloc();
+if (!sc->mastering)
+return AVERROR(ENOMEM);
+
+for (i = 0; i < 3; i++) {
+const int j = mapping[i];
+sc->mastering->display_primaries[j][0].num = avio_rb16(pb);
+sc->mastering->display_primaries[j][0].den = chroma_den;
+sc->mastering->display_primaries[j][1].num = avio_rb16(pb);
+sc->mastering->display_primaries[j][1].den = chroma_den;
+}
+sc->mastering->white_point[0].num = avio_rb16(pb);
+sc->mastering->white_point[0].den = chroma_den;
+sc->mastering->white_point[1].num = avio_rb16(pb);
+sc->mastering->white_point[1].den = chroma_den;
+
+sc->mastering->max_luminance.num = avio_rb32(pb);
+sc->mastering->max_luminance.den = luma_den;
+sc->mastering->min_luminance.num = avio_rb32(pb);
+sc->mastering->min_luminance.den = luma_den;
+
+sc->mastering->has_luminance = 1;
+sc->mastering->has_primaries = 1;
+
+return 0;
+}
+
 static int mov_read_coll(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
 MOVStreamContext *sc;
@@ -5113,6 +5158,30 @@ static int mov_read_coll(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 return 0;
 }
 
+static int mov_read_clli(MOVContext *c, AVIOContext *pb, MOVAtom atom)
+{
+MOVStreamContext *sc;
+
+if (c->fc->nb_streams < 1)
+return AVERROR_INVALIDDATA;
+
+sc = c->fc->streams[c->fc->nb_streams - 1]->priv_data;
+
+if (atom.size < 4) {
+av_log(c->fc, AV_LOG_ERROR, "Empty Content Light Level Info box\n");
+return AVERROR_INVALIDDATA;
+}
+
+sc->coll = av_content_light_metadata_alloc(&sc->coll_size);
+if (!sc->coll)
+return AVERROR(ENOMEM);
+
+sc->coll->MaxCLL  = avio_rb16(pb);
+sc->coll->MaxFALL = avio_rb16(pb);
+
+return 0;
+}
+
 static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
 AVStream *st;
@@ -5921,6 +5990,8 @@ static const MOVParseTableEntry mov_default_parse_table[] 
= {
 { MKTAG('S','m','D','m'), mov_read_smdm },
 { MKTAG('C','o','L','L'), mov_read_coll },
 { MKTAG('v','p','c','C'), mov_read_vpcc },
+{ MKTAG('m','d','c','v'), mov_read_mdcv },
+{ MKTAG('c','l','l','i'), mov_read_clli },
 { 0, NULL }
 };
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] prores: Always assume limited range

2017-11-28 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Sep 27 15:52:52 2017 -0400| [755207dc53d6d18a4a9e07ffb0d3a10f75836f79] | 
committer: Vittorio Giovara

prores: Always assume limited range

As defined by the specification.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=755207dc53d6d18a4a9e07ffb0d3a10f75836f79
---

 libavcodec/proresdec_lgpl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index bc5bdb5a4d..c86d433f50 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -177,6 +177,7 @@ static int decode_frame_header(ProresContext *ctx, const 
uint8_t *buf,
 avctx->color_primaries = buf[14];
 avctx->color_trc   = buf[15];
 avctx->colorspace  = buf[16];
+avctx->color_range = AVCOL_RANGE_MPEG;
 
 ctx->qmat_changed = 0;
 ptr   = buf + 20;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] stereo3d: Support view type for frame sequence type

2017-11-29 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Sep 25 15:09:21 2017 +0200| [99e9697e3a12ab4a6638a36b95edafd6a98f9eaa] | 
committer: Vittorio Giovara

stereo3d: Support view type for frame sequence type

Implement detection in h264 and hevc and insertion in framepack filter.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99e9697e3a12ab4a6638a36b95edafd6a98f9eaa
---

 doc/APIchanges |  3 +++
 libavcodec/h264_sei.c  |  7 ---
 libavcodec/h264_sei.h  |  1 +
 libavcodec/h264_slice.c|  7 +++
 libavcodec/hevc_sei.c  |  9 +
 libavcodec/hevc_sei.h  |  1 +
 libavcodec/hevcdec.c   |  7 +++
 libavfilter/vf_framepack.c |  2 ++
 libavutil/stereo3d.h   | 24 
 libavutil/version.h|  2 +-
 10 files changed, 55 insertions(+), 8 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 9f3a1f2465..a7ecbcdaae 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil: 2017-03-23
 
 API changes, most recent first:
 
+2017-xx-xx - xxx - lavu 56.7.0 - stereo3d.h
+  Add view field to AVStereo3D structure and AVStereo3DView enum.
+
 2017-xx-xx - xxx - lavc 58.5.0 - avcodec.h
   Add avcodec_get_hw_frames_parameters().
 
diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 03fca9017f..da5d33c36c 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -314,10 +314,11 @@ static int 
decode_frame_packing_arrangement(H264SEIFramePacking *h,
 h->quincunx_subsampling   = get_bits1(gb);
 h->content_interpretation_type= get_bits(gb, 6);
 
-// the following skips: spatial_flipping_flag, frame0_flipped_flag,
-// field_views_flag, current_frame_is_frame0_flag,
+// spatial_flipping_flag, frame0_flipped_flag, field_views_flag
+skip_bits(gb, 3);
+h->current_frame_is_frame0_flag = get_bits1(gb);
 // frame0_self_contained_flag, frame1_self_contained_flag
-skip_bits(gb, 6);
+skip_bits(gb, 2);
 
 if (!h->quincunx_subsampling && h->arrangement_type != 5)
 skip_bits(gb, 16);  // frame[01]_grid_position_[xy]
diff --git a/libavcodec/h264_sei.h b/libavcodec/h264_sei.h
index f6ac6034da..c3a19dd831 100644
--- a/libavcodec/h264_sei.h
+++ b/libavcodec/h264_sei.h
@@ -108,6 +108,7 @@ typedef struct H264SEIFramePacking {
 int arrangement_type;
 int content_interpretation_type;
 int quincunx_subsampling;
+int current_frame_is_frame0_flag;
 } H264SEIFramePacking;
 
 typedef struct H264SEIDisplayOrientation {
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 5dd01d836e..1b968ebd50 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1112,6 +1112,13 @@ static int h264_export_frame_props(H264Context *h)
 
 if (fp->content_interpretation_type == 2)
 stereo->flags = AV_STEREO3D_FLAG_INVERT;
+
+if (fp->arrangement_type == 5) {
+if (fp->current_frame_is_frame0_flag)
+stereo->view = AV_STEREO3D_VIEW_LEFT;
+else
+stereo->view = AV_STEREO3D_VIEW_RIGHT;
+}
 }
 
 if (h->sei.display_orientation.present &&
diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 0a5d4440bf..2bf170601d 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -57,10 +57,11 @@ static int 
decode_nal_sei_frame_packing_arrangement(HEVCSEIFramePacking *s, GetB
 s->quincunx_subsampling   = get_bits1(gb);
 s->content_interpretation_type= get_bits(gb, 6);
 
-// the following skips spatial_flipping_flag frame0_flipped_flag
-// field_views_flag current_frame_is_frame0_flag
-// frame0_self_contained_flag frame1_self_contained_flag
-skip_bits(gb, 6);
+// spatial_flipping_flag, frame0_flipped_flag, field_views_flag
+skip_bits(gb, 3);
+s->current_frame_is_frame0_flag = get_bits1(gb);
+// frame0_self_contained_flag, frame1_self_contained_flag
+skip_bits(gb, 2);
 
 if (!s->quincunx_subsampling && s->arrangement_type != 5)
 skip_bits(gb, 16);  // frame[01]_grid_position_[xy]
diff --git a/libavcodec/hevc_sei.h b/libavcodec/hevc_sei.h
index e4aeac1fbe..8d4f5df69f 100644
--- a/libavcodec/hevc_sei.h
+++ b/libavcodec/hevc_sei.h
@@ -67,6 +67,7 @@ typedef struct HEVCSEIFramePacking {
 int arrangement_type;
 int content_interpretation_type;
 int quincunx_subsampling;
+int current_frame_is_frame0_flag;
 } HEVCSEIFramePacking;
 
 typedef struct HEVCSEIDisplayOrientation {
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index a1619cf4bd..f1d1c77497 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2397,6 +2397,13 @@ static int set_side_data(HEVCContext *s)
 
 if (s->sei.frame_packing.conte

[FFmpeg-cvslog] prores: Always assume limited range

2017-11-29 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Sep 27 17:28:55 2017 -0400| [45d7be7f930cf707ead07416e10e2d0e061e99ce] | 
committer: Vittorio Giovara

prores: Always assume limited range

As defined by the specification.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45d7be7f930cf707ead07416e10e2d0e061e99ce
---

 libavcodec/proresdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index 8a53719d9f..1659927e66 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -176,6 +176,7 @@ static int decode_frame_header(ProresContext *ctx, const 
uint8_t *buf,
 avctx->color_primaries = buf[14];
 avctx->color_trc   = buf[15];
 avctx->colorspace  = buf[16];
+avctx->color_range = AVCOL_RANGE_MPEG;
 
 ctx->qmat_changed = 0;
 ptr   = buf + 20;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vf_zscale: Fix alpha destination graph for floating point pixel formats

2017-12-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Thu 
Dec  7 16:32:22 2017 -0500| [bc38c8f4424982617a92d1cefa7fdcb640a80234] | 
committer: Vittorio Giovara

vf_zscale: Fix alpha destination graph for floating point pixel formats

This was setting the input pixel type instead of the output one,
leading to incorrect data being fed to the library.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc38c8f4424982617a92d1cefa7fdcb640a80234
---

 libavfilter/vf_zscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index 865910bd87..6e1d36cb4c 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -615,7 +615,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
 s->alpha_dst_format.width = out->width;
 s->alpha_dst_format.height = out->height;
 s->alpha_dst_format.depth = odesc->comp[0].depth;
-s->alpha_dst_format.pixel_type = (desc->flags & 
AV_PIX_FMT_FLAG_FLOAT) ? ZIMG_PIXEL_FLOAT : odesc->comp[0].depth > 8 ? 
ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE;
+s->alpha_dst_format.pixel_type = (odesc->flags & 
AV_PIX_FMT_FLAG_FLOAT) ? ZIMG_PIXEL_FLOAT : odesc->comp[0].depth > 8 ? 
ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE;
 s->alpha_dst_format.color_family = ZIMG_COLOR_GREY;
 
 zimg_filter_graph_free(s->alpha_graph);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] cfhd: Do not initialize context size

2016-03-29 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Mar 29 16:03:44 2016 +0200| [7888ae8266d8f721cc443fe3aa627d350ca01204] | 
committer: Michael Niedermayer

cfhd: Do not initialize context size

Otherwise probing and stream analisys will report a correct coded size
but an empty visible size.

Approved by: kieran
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7888ae8266d8f721cc443fe3aa627d350ca01204
---

 libavcodec/cfhd.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index a33cc71..d369568 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -43,8 +43,6 @@ static av_cold int cfhd_decode_init(AVCodecContext *avctx)
 
 avctx->bits_per_raw_sample = 10;
 s->avctx   = avctx;
-avctx->width   = 0;
-avctx->height  = 0;
 
 return ff_cfhd_init_vlcs(s);
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] img2: Drop av_ prefix for a static function

2016-04-11 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Feb 23 19:44:18 2016 -0500| [fa55addd23c2f168163175aee17adb125c2c0710] | 
committer: Vittorio Giovara

img2: Drop av_ prefix for a static function

This prefix is reserved for public functions only.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa55addd23c2f168163175aee17adb125c2c0710
---

 libavformat/img2.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/img2.c b/libavformat/img2.c
index 9f462d0..3cfc08e 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -82,7 +82,7 @@ static const IdStrMap img_tags[] = {
 { AV_CODEC_ID_NONE,   NULL   }
 };
 
-static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str)
+static enum AVCodecID str2id(const IdStrMap *tags, const char *str)
 {
 str = strrchr(str, '.');
 if (!str)
@@ -100,5 +100,5 @@ static enum AVCodecID av_str2id(const IdStrMap *tags, const 
char *str)
 
 enum AVCodecID ff_guess_image2_codec(const char *filename)
 {
-return av_str2id(img_tags, filename);
+return str2id(img_tags, filename);
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vc1dec: Drop commented out cruft

2016-04-11 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Feb 24 14:40:16 2016 -0500| [35b1cd343cd703c1b0fc926dc43a92141a357380] | 
committer: Vittorio Giovara

vc1dec: Drop commented out cruft

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35b1cd343cd703c1b0fc926dc43a92141a357380
---

 libavcodec/vc1dec.c |8 
 1 file changed, 8 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index d65c68a..2cd7a03 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -352,14 +352,6 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 v->mv_f_next[0] = v->mv_f_next_base + s->b8_stride + 1;
 v->mv_f_next[1] = v->mv_f_next[0] + (s->b8_stride * (mb_height * 2 + 
1) + s->mb_stride * (mb_height + 1) * 2);
 
-/* Init coded blocks info */
-if (v->profile == PROFILE_ADVANCED) {
-//if (alloc_bitplane(&v->over_flags_plane, s->mb_width, s->mb_height) 
< 0)
-//return -1;
-//if (alloc_bitplane(&v->ac_pred_plane, s->mb_width, s->mb_height) < 0)
-//return -1;
-}
-
 ff_intrax8_common_init(&v->x8,s);
 
 if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == 
AV_CODEC_ID_VC1IMAGE) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vc1dec: Properly call deinit function on error

2016-04-11 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Feb 24 14:40:17 2016 -0500| [f91d94bdfc3f5f83ff0be4d19d10d0a35697386f] | 
committer: Vittorio Giovara

vc1dec: Properly call deinit function on error

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f91d94bdfc3f5f83ff0be4d19d10d0a35697386f
---

 libavcodec/vc1dec.c |   16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 2cd7a03..2ccbbd5 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -362,20 +362,14 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || 
!v->over_flags_plane ||
 !v->block || !v->cbp_base || !v->ttblk_base || !v->is_intra_base || 
!v->luma_mv_base ||
 !v->mb_type_base) {
-av_freep(&v->mv_type_mb_plane);
-av_freep(&v->direct_mb_plane);
-av_freep(&v->acpred_plane);
-av_freep(&v->over_flags_plane);
-av_freep(&v->block);
-av_freep(&v->cbp_base);
-av_freep(&v->ttblk_base);
-av_freep(&v->is_intra_base);
-av_freep(&v->luma_mv_base);
-av_freep(&v->mb_type_base);
-return AVERROR(ENOMEM);
+goto error;
 }
 
 return 0;
+
+error:
+ff_vc1_decode_end(s->avctx);
+return AVERROR(ENOMEM);
 }
 
 av_cold void ff_vc1_init_transposed_scantables(VC1Context *v)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vc1dec: Fix leak on error for array allocations

2016-04-11 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Feb 24 14:40:18 2016 -0500| [01f0e6a0c9270f1d5bef08459a6f167cf55e0596] | 
committer: Vittorio Giovara

vc1dec: Fix leak on error for array allocations

The deinit function in the 'error' section will correctly free
everything.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01f0e6a0c9270f1d5bef08459a6f167cf55e0596
---

 libavcodec/vc1dec.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 2ccbbd5..9d0f890 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -355,8 +355,11 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 ff_intrax8_common_init(&v->x8,s);
 
 if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == 
AV_CODEC_ID_VC1IMAGE) {
-for (i = 0; i < 4; i++)
-if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) 
return -1;
+for (i = 0; i < 4; i++) {
+v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width);
+if (!v->sr_rows[i >> 1][i & 1])
+goto error;
+}
 }
 
 if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || 
!v->over_flags_plane ||

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vc1dec: Check group allocations separatedly

2016-04-11 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Feb 24 14:40:19 2016 -0500| [e66fa35392cd45d0a80774cd057fb765d60def43] | 
committer: Vittorio Giovara

vc1dec: Check group allocations separatedly

This avoids accessing NULL pointers in case of error.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e66fa35392cd45d0a80774cd057fb765d60def43
---

 libavcodec/vc1dec.c |   25 +++--
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 9d0f890..ce55493 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -324,31 +324,50 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 v->fieldtx_plane= av_mallocz(s->mb_stride * mb_height);
 v->acpred_plane = av_malloc (s->mb_stride * mb_height);
 v->over_flags_plane = av_malloc (s->mb_stride * mb_height);
+if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->forward_mb_plane ||
+!v->fieldtx_plane || !v->acpred_plane || !v->over_flags_plane)
+goto error;
 
 v->n_allocated_blks = s->mb_width + 2;
 v->block= av_malloc(sizeof(*v->block) * v->n_allocated_blks);
 v->cbp_base = av_malloc(sizeof(v->cbp_base[0]) * 2 * s->mb_stride);
+if (!v->block || !v->cbp_base)
+goto error;
 v->cbp  = v->cbp_base + s->mb_stride;
 v->ttblk_base   = av_malloc(sizeof(v->ttblk_base[0]) * 2 * 
s->mb_stride);
+if (!v->ttblk_base)
+goto error;
 v->ttblk= v->ttblk_base + s->mb_stride;
 v->is_intra_base= av_mallocz(sizeof(v->is_intra_base[0]) * 2 * 
s->mb_stride);
+if (!v->is_intra_base)
+goto error;
 v->is_intra = v->is_intra_base + s->mb_stride;
 v->luma_mv_base = av_malloc(sizeof(v->luma_mv_base[0]) * 2 * 
s->mb_stride);
+if (!v->luma_mv_base)
+goto error;
 v->luma_mv  = v->luma_mv_base + s->mb_stride;
 
 /* allocate block type info in that way so it could be used with 
s->block_index[] */
 v->mb_type_base = av_malloc(s->b8_stride * (mb_height * 2 + 1) + 
s->mb_stride * (mb_height + 1) * 2);
+if (!v->mb_type_base)
+goto error;
 v->mb_type[0]   = v->mb_type_base + s->b8_stride + 1;
 v->mb_type[1]   = v->mb_type_base + s->b8_stride * (mb_height * 2 + 1) + 
s->mb_stride + 1;
 v->mb_type[2]   = v->mb_type[1] + s->mb_stride * (mb_height + 1);
 
 /* allocate memory to store block level MV info */
 v->blk_mv_type_base = av_mallocz( s->b8_stride * (mb_height * 2 + 1) + 
s->mb_stride * (mb_height + 1) * 2);
+if (!v->blk_mv_type_base)
+goto error;
 v->blk_mv_type  = v->blk_mv_type_base + s->b8_stride + 1;
 v->mv_f_base= av_mallocz(2 * (s->b8_stride * (mb_height * 2 + 1) + 
s->mb_stride * (mb_height + 1) * 2));
+if (!v->mv_f_base)
+goto error;
 v->mv_f[0]  = v->mv_f_base + s->b8_stride + 1;
 v->mv_f[1]  = v->mv_f[0] + (s->b8_stride * (mb_height * 2 + 1) + 
s->mb_stride * (mb_height + 1) * 2);
 v->mv_f_next_base   = av_mallocz(2 * (s->b8_stride * (mb_height * 2 + 1) + 
s->mb_stride * (mb_height + 1) * 2));
+if (!v->mv_f_next_base)
+goto error;
 v->mv_f_next[0] = v->mv_f_next_base + s->b8_stride + 1;
 v->mv_f_next[1] = v->mv_f_next[0] + (s->b8_stride * (mb_height * 2 + 
1) + s->mb_stride * (mb_height + 1) * 2);
 
@@ -362,12 +381,6 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 }
 }
 
-if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || 
!v->over_flags_plane ||
-!v->block || !v->cbp_base || !v->ttblk_base || !v->is_intra_base || 
!v->luma_mv_base ||
-!v->mb_type_base) {
-goto error;
-}
-
 return 0;
 
 error:

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] fate: Add test for indeo2 with delta frames

2016-04-13 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Wed 
Feb 24 15:45:49 2016 -0500| [b39ab8549a53e2fc7978ab9db50e5c2ba6a6602d] | 
committer: Diego Biurrun

fate: Add test for indeo2 with delta frames

Signed-off-by: Diego Biurrun 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b39ab8549a53e2fc7978ab9db50e5c2ba6a6602d
---

 tests/fate/indeo.mak|   12 +++-
 tests/ref/fate/indeo2-delta |  115 +++
 tests/ref/fate/{indeo2 => indeo2-intra} |0
 3 files changed, 124 insertions(+), 3 deletions(-)

diff --git a/tests/fate/indeo.mak b/tests/fate/indeo.mak
index e725a6b..6beb1f0 100644
--- a/tests/fate/indeo.mak
+++ b/tests/fate/indeo.mak
@@ -1,5 +1,11 @@
-FATE_INDEO-$(call DEMDEC, AVI, INDEO2) += fate-indeo2
-fate-indeo2: CMD = framecrc -i $(TARGET_SAMPLES)/rt21/VPAR0026.AVI
+FATE_INDEO2 += fate-indeo2-delta
+fate-indeo2-delta: CMD = framecrc -i $(TARGET_SAMPLES)/rt21/ISKATE.AVI -an
+
+FATE_INDEO2 += fate-indeo2-intra
+fate-indeo2-intra: CMD = framecrc -i $(TARGET_SAMPLES)/rt21/VPAR0026.AVI
+
+FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, INDEO2) += $(FATE_INDEO2)
+fate-indeo2: $(FATE_INDEO2)
 
 FATE_INDEO-$(call DEMDEC, MOV, INDEO3) += fate-indeo3
 fate-indeo3: CMD = framecrc -i $(TARGET_SAMPLES)/iv32/cubes.mov
@@ -14,4 +20,4 @@ FATE_INDEO-$(call DEMDEC, AVI, INDEO5) += fate-indeo5
 fate-indeo5: CMD = framecrc -i 
$(TARGET_SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an
 
 FATE_SAMPLES_AVCONV += $(FATE_INDEO-yes)
-fate-indeo: $(FATE_INDEO-yes)
+fate-indeo: $(FATE_INDEO2) $(FATE_INDEO-yes)
diff --git a/tests/ref/fate/indeo2-delta b/tests/ref/fate/indeo2-delta
new file mode 100644
index 000..c197dcc
--- /dev/null
+++ b/tests/ref/fate/indeo2-delta
@@ -0,0 +1,115 @@
+#tb 0: 16567/25
+0,  0,  0,1,21600, 0xa3e914dd
+0,  1,  1,1,21600, 0x367eb420
+0,  2,  2,1,21600, 0x527488e2
+0,  3,  3,1,21600, 0x5e704dcb
+0,  4,  4,1,21600, 0xfbfb35d4
+0,  5,  5,1,21600, 0xf6e168de
+0,  6,  6,1,21600, 0x0b589818
+0,  7,  7,1,21600, 0xc67b2dbd
+0,  8,  8,1,21600, 0x002f4994
+0,  9,  9,1,21600, 0xe3a476f2
+0, 10, 10,1,21600, 0xbc5f0f39
+0, 11, 11,1,21600, 0xef095e3a
+0, 12, 12,1,21600, 0x6bb4f515
+0, 13, 13,1,21600, 0x1be1f0fa
+0, 14, 14,1,21600, 0x0d855464
+0, 15, 15,1,21600, 0x6711b47d
+0, 16, 16,1,21600, 0x14cb2640
+0, 17, 17,1,21600, 0x5b794027
+0, 18, 18,1,21600, 0xf8cfab3c
+0, 19, 19,1,21600, 0xe639b0c2
+0, 20, 20,1,21600, 0x403b3d7b
+0, 21, 21,1,21600, 0x364cbb6f
+0, 22, 22,1,21600, 0xadff6c72
+0, 23, 23,1,21600, 0x76c85b52
+0, 24, 24,1,21600, 0xbe85ec80
+0, 25, 25,1,21600, 0x1e9f9e50
+0, 26, 26,1,21600, 0xbd31bd82
+0, 27, 27,1,21600, 0x4445a12a
+0, 28, 28,1,21600, 0x08f25888
+0, 29, 29,1,21600, 0x73d45696
+0, 30, 30,1,21600, 0xbc681a10
+0, 31, 31,1,21600, 0x03f502be
+0, 32, 32,1,21600, 0x9206a757
+0, 33, 33,1,21600, 0x3ed5e1be
+0, 34, 34,1,21600, 0x76b636a9
+0, 35, 35,1,21600, 0x7d40ccb0
+0, 36, 36,1,21600, 0xa2955499
+0, 37, 37,1,21600, 0xf4b20c86
+0, 38, 38,1,21600, 0xe497d681
+0, 39, 39,1,21600, 0x831ef973
+0, 40, 40,1,21600, 0x43aa78e6
+0, 41, 41,1,21600, 0x26e4bdb6
+0, 42, 42,1,21600, 0xd04e9feb
+0, 43, 43,1,21600, 0x08ef4b58
+0, 44, 44,1,21600, 0x30b84cc3
+0, 45, 45,1,21600, 0x04e1dec0
+0, 46, 46,1,21600, 0xed4f24d5
+0, 47, 47,1,21600, 0xcc9f8d4c
+0, 48, 48,1,21600, 0x402ff69a
+0, 49, 49,1,21600, 0xd77a4e7b
+0, 50, 50,1,21600, 0xe614de71
+0, 51, 51,1,21600, 0x18daccbd
+0, 52, 52,1,21600, 0x87e896d1
+0, 53, 53,1,21600, 0x51d76264
+0, 54, 54,   

[FFmpeg-cvslog] mov: Trim dref absolute path

2016-04-13 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Mon 
Feb 15 21:44:07 2016 -0500| [d40cb726d271b0284642a1ba159eb26a5c579f77] | 
committer: Vittorio Giovara

mov: Trim dref absolute path

Samples produced by Omneon (Harmonic) store external references with
paths ending with 0s. Such movs cannot be loaded properly since every
0 is converted to '/', to keep the same parsing code for dref type 2
and type 18: this makes the external reference point to a non-existing
direactory, rather than to the actual referenced file.

Add a brief trimming loop that drops all ending 0s before trying to
parse the external reference path.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d40cb726d271b0284642a1ba159eb26a5c579f77
---

 libavformat/mov.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0dee5ec..a556aa7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -554,6 +554,13 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 memmove(dref->path, dref->path+volume_len, len);
 dref->path[len] = 0;
 }
+// trim string of any ending zeros
+for (j = len - 1; j >= 0; j--) {
+if (dref->path[j] == 0)
+len--;
+else
+break;
+}
 for (j = 0; j < len; j++)
 if (dref->path[j] == ':' || dref->path[j] == 0)
 dref->path[j] = '/';

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vdpau: Add missing deprecation guards

2016-04-13 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Mar  1 15:34:23 2016 -0500| [e10b7ef2fe56603fb1baac6b20fd6bd0a3fdd0d0] | 
committer: Vittorio Giovara

vdpau: Add missing deprecation guards

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e10b7ef2fe56603fb1baac6b20fd6bd0a3fdd0d0
---

 libavcodec/vdpau.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index dd48c04..bf5f8d9 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -317,6 +317,7 @@ int ff_vdpau_add_buffer(struct vdpau_picture_context 
*pic_ctx,
 return 0;
 }
 
+#if FF_API_VDPAU_PROFILE
 int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile)
 {
 #define PROFILE(prof)  \
@@ -363,6 +364,7 @@ do {   \
 return AVERROR(EINVAL);
 #undef PROFILE
 }
+#endif /* FF_API_VDPAU_PROFILE */
 
 AVVDPAUContext *av_vdpau_alloc_context(void)
 {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] indeo4: Rework stream analysis report

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Mar 19 17:07:37 2016 -0400| [6202e2fede75df92cbc374a3f7d6893d0c5ac721] | 
committer: Vittorio Giovara

indeo4: Rework stream analysis report

* Change log level from error to debug
* Print report after the first decoded frame, not at the end of decoding
* Drop macro guard and use a context variable instead

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6202e2fede75df92cbc374a3f7d6893d0c5ac721
---

 libavcodec/indeo4.c |   11 +--
 libavcodec/ivi.c|   33 -
 libavcodec/ivi.h|4 +---
 3 files changed, 18 insertions(+), 30 deletions(-)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 64ed8cd..4ec09dc 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -119,17 +119,13 @@ static int decode_pic_hdr(IVI45DecContext *ctx, 
AVCodecContext *avctx)
 return AVERROR_INVALIDDATA;
 }
 
-#if IVI4_STREAM_ANALYSER
 if (ctx->frame_type == IVI4_FRAMETYPE_BIDIR)
 ctx->has_b_frames = 1;
-#endif
 
 ctx->transp_status = get_bits1(&ctx->gb);
-#if IVI4_STREAM_ANALYSER
 if (ctx->transp_status) {
 ctx->has_transp = 1;
 }
-#endif
 
 /* unknown bit: Mac decoder ignores this bit, XANIM returns error */
 if (get_bits1(&ctx->gb)) {
@@ -166,9 +162,7 @@ static int decode_pic_hdr(IVI45DecContext *ctx, 
AVCodecContext *avctx)
 if (get_bits1(&ctx->gb)) {
 pic_conf.tile_height = scale_tile_size(pic_conf.pic_height, 
get_bits(&ctx->gb, 4));
 pic_conf.tile_width  = scale_tile_size(pic_conf.pic_width,  
get_bits(&ctx->gb, 4));
-#if IVI4_STREAM_ANALYSER
 ctx->uses_tiling = 1;
-#endif
 } else {
 pic_conf.tile_height = pic_conf.pic_height;
 pic_conf.tile_width  = pic_conf.pic_width;
@@ -293,10 +287,8 @@ static int decode_band_hdr(IVI45DecContext *ctx, 
IVIBandDesc *band,
band->is_halfpel);
 return AVERROR_INVALIDDATA;
 }
-#if IVI4_STREAM_ANALYSER
 if (!band->is_halfpel)
 ctx->uses_fullpel = 1;
-#endif
 
 band->checksum_present = get_bits1(&ctx->gb);
 if (band->checksum_present)
@@ -328,10 +320,8 @@ static int decode_band_hdr(IVI45DecContext *ctx, 
IVIBandDesc *band,
 return AVERROR_PATCHWELCOME;
 }
 
-#if IVI4_STREAM_ANALYSER
 if ((transform_id >= 0 && transform_id <= 2) || transform_id == 10)
 ctx->uses_haar = 1;
-#endif
 
 band->inv_transform = transforms[transform_id].inv_trans;
 band->dc_transform  = transforms[transform_id].dc_trans;
@@ -640,6 +630,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
 ctx->is_nonnull_frame = is_nonnull_frame;
 
 ctx->is_indeo4 = 1;
+ctx->show_indeo4_info = 1;
 
 ctx->dst_buf   = 0;
 ctx->ref_buf   = 1;
diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c
index 9762eeb..caa3fe6 100644
--- a/libavcodec/ivi.c
+++ b/libavcodec/ivi.c
@@ -1133,6 +1133,22 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void 
*data, int *got_frame,
 }
 }
 
+if (ctx->show_indeo4_info) {
+if (ctx->is_scalable)
+av_log(avctx, AV_LOG_DEBUG, "This video uses scalability mode\n");
+if (ctx->uses_tiling)
+av_log(avctx, AV_LOG_DEBUG, "This video uses local decoding\n");
+if (ctx->has_b_frames)
+av_log(avctx, AV_LOG_DEBUG, "This video contains B-frames\n");
+if (ctx->has_transp)
+av_log(avctx, AV_LOG_DEBUG, "Transparency mode is enabled\n");
+if (ctx->uses_haar)
+av_log(avctx, AV_LOG_DEBUG, "This video uses Haar transform\n");
+if (ctx->uses_fullpel)
+av_log(avctx, AV_LOG_DEBUG, "This video uses fullpel motion 
vectors\n");
+ctx->show_indeo4_info = 0;
+}
+
 return buf_size;
 }
 
@@ -1148,23 +1164,6 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
 if (ctx->mb_vlc.cust_tab.table)
 ff_free_vlc(&ctx->mb_vlc.cust_tab);
 
-#if IVI4_STREAM_ANALYSER
-if (ctx->is_indeo4) {
-if (ctx->is_scalable)
-av_log(avctx, AV_LOG_ERROR, "This video uses scalability mode!\n");
-if (ctx->uses_tiling)
-av_log(avctx, AV_LOG_ERROR, "This video uses local decoding!\n");
-if (ctx->has_b_frames)
-av_log(avctx, AV_LOG_ERROR, "This video contains B-frames!\n");
-if (ctx->has_transp)
-av_log(avctx, AV_LOG_ERROR, "Transparency mode is enabled!\n");
-if (ctx->uses_haar)
-av_log(avctx, AV_LOG_ERROR, "This video uses Haar transform!\n");
-if (ctx->uses_fullpel)
-av_log(avctx, AV_LOG_ERROR, "This video uses fu

[FFmpeg-cvslog] indeo4: Consistently initialize variables

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Mar 19 18:07:21 2016 -0400| [64250d94b74d3fd47cc8b1611f48daf6a6ed804a] | 
committer: Vittorio Giovara

indeo4: Consistently initialize variables

Avoid using multiple variables for the same purpose.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64250d94b74d3fd47cc8b1611f48daf6a6ed804a
---

 libavcodec/indeo4.c |9 +++--
 libavcodec/ivi.h|3 +--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 4ec09dc..217311f 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -122,10 +122,7 @@ static int decode_pic_hdr(IVI45DecContext *ctx, 
AVCodecContext *avctx)
 if (ctx->frame_type == IVI4_FRAMETYPE_BIDIR)
 ctx->has_b_frames = 1;
 
-ctx->transp_status = get_bits1(&ctx->gb);
-if (ctx->transp_status) {
-ctx->has_transp = 1;
-}
+ctx->has_transp = get_bits1(&ctx->gb);
 
 /* unknown bit: Mac decoder ignores this bit, XANIM returns error */
 if (get_bits1(&ctx->gb)) {
@@ -159,10 +156,10 @@ static int decode_pic_hdr(IVI45DecContext *ctx, 
AVCodecContext *avctx)
 }
 
 /* Decode tile dimensions. */
-if (get_bits1(&ctx->gb)) {
+ctx->uses_tiling = get_bits1(&ctx->gb);
+if (ctx->uses_tiling) {
 pic_conf.tile_height = scale_tile_size(pic_conf.pic_height, 
get_bits(&ctx->gb, 4));
 pic_conf.tile_width  = scale_tile_size(pic_conf.pic_width,  
get_bits(&ctx->gb, 4));
-ctx->uses_tiling = 1;
 } else {
 pic_conf.tile_height = pic_conf.pic_height;
 pic_conf.tile_width  = pic_conf.pic_width;
diff --git a/libavcodec/ivi.h b/libavcodec/ivi.h
index c403739..9b4824b 100644
--- a/libavcodec/ivi.h
+++ b/libavcodec/ivi.h
@@ -218,7 +218,6 @@ typedef struct IVI45DecContext {
 int prev_frame_type; ///< frame type of the previous frame
 uint32_tdata_size;   ///< size of the frame data in bytes from 
picture header
 int is_scalable;
-int transp_status;   ///< transparency mode status: 1 - enabled
 const uint8_t   *frame_data; ///< input frame data pointer
 int inter_scal;  ///< signals a sequence of scalable inter 
frames
 uint32_tframe_size;  ///< frame size in bytes
@@ -250,7 +249,7 @@ typedef struct IVI45DecContext {
 
 int show_indeo4_info;
 uint8_t has_b_frames;
-uint8_t has_transp;
+uint8_t has_transp;  ///< transparency mode status: 1 - enabled
 uint8_t uses_tiling;
 uint8_t uses_haar;
 uint8_t uses_fullpel;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] nuv: Use the correct context for av_image_check_size

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Mar 19 21:38:27 2016 -0400| [709c0f79d8032fcf733bfe58e79ca7ff0858c8bc] | 
committer: Vittorio Giovara

nuv: Use the correct context for av_image_check_size

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=709c0f79d8032fcf733bfe58e79ca7ff0858c8bc
---

 libavformat/nuv.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 7fc339a..492f68f 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -198,7 +198,7 @@ static int nuv_header(AVFormatContext *s)
 return AVERROR(ENOMEM);
 ctx->v_id = vst->index;
 
-ret = av_image_check_size(width, height, 0, ctx);
+ret = av_image_check_size(width, height, 0, s);
 if (ret < 0)
 return ret;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Move error resilience out of intrax8

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 20:51:44 2016 -0500| [0c6a70873fc6e43194b471d112c30823b6c8d0b4] | 
committer: Vittorio Giovara

intrax8: Move error resilience out of intrax8

The intrax8 decoding process does not imply any kind of error
resilience, and the only call present is more related to how mpegvideo
works rather than anything else.

Therefore have the parent decoders carry out er when actually needed.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c6a70873fc6e43194b471d112c30823b6c8d0b4
---

 configure  |3 +--
 libavcodec/intrax8.c   |   10 ++
 libavcodec/vc1_block.c |4 
 libavcodec/wmv2dec.c   |4 
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index ba1fd47..578a48d 100755
--- a/configure
+++ b/configure
@@ -1860,7 +1860,6 @@ error_resilience_select="me_cmp"
 faandct_deps="faan fdctdsp"
 faanidct_deps="faan idctdsp"
 h264dsp_select="startcode"
-intrax8_select="error_resilience"
 mdct_select="fft"
 rdft_select="fft"
 me_cmp_select="fdctdsp idctdsp pixblockdsp"
@@ -2083,7 +2082,7 @@ wmav2_encoder_select="mdct sinewin wma_freqs"
 wmavoice_decoder_select="lsp rdft dct mdct sinewin"
 wmv1_decoder_select="h263_decoder"
 wmv1_encoder_select="h263_encoder"
-wmv2_decoder_select="blockdsp h263_decoder idctdsp intrax8 videodsp wmv2dsp"
+wmv2_decoder_select="blockdsp error_resilience h263_decoder idctdsp intrax8 
videodsp wmv2dsp"
 wmv2_encoder_select="h263_encoder wmv2dsp"
 wmv3_decoder_select="vc1_decoder"
 wmv3image_decoder_select="wmv3_decoder"
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 3cd84dc..45fff96 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -22,7 +22,6 @@
  */
 
 #include "avcodec.h"
-#include "error_resilience.h"
 #include "get_bits.h"
 #include "idctdsp.h"
 #include "mpegvideo.h"
@@ -718,8 +717,8 @@ av_cold void ff_intrax8_common_end(IntraX8Context * w)
 /**
  * Decode single IntraX8 frame.
  * The parent codec must fill s->loopfilter and s->gb (bitstream).
- * The parent codec must call ff_mpv_frame_start(), ff_er_frame_start() before 
calling this function.
- * The parent codec must call ff_er_frame_end(), ff_mpv_frame_end() after 
calling this function.
+ * The parent codec must call ff_mpv_frame_start() before calling this 
function.
+ * The parent codec must call ff_mpv_frame_end() after calling this function.
  * This function does not use ff_mpv_decode_mb().
  * @param w pointer to IntraX8Context
  * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
@@ -745,8 +744,6 @@ int ff_intrax8_decode_picture(IntraX8Context * const w, int 
dquant, int quant_of
 }
 x8_reset_vlc_tables(w);
 
-s->resync_mb_x=0;
-s->resync_mb_y=0;
 
 for(s->mb_y=0; s->mb_y < s->mb_height*2; s->mb_y++){
 x8_init_block_index(s);
@@ -785,8 +782,5 @@ int ff_intrax8_decode_picture(IntraX8Context * const w, int 
dquant, int quant_of
 }
 
 error:
-ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y,
-(s->mb_x>>1)-1, (s->mb_y>>1)-1,
-ER_MB_END );
 return 0;
 }
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 4588af4..8b46260 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -3023,6 +3023,10 @@ void ff_vc1_decode_blocks(VC1Context *v)
 v->s.esc3_level_length = 0;
 if (v->x8_type) {
 ff_intrax8_decode_picture(&v->x8, 2*v->pq + v->halfpq, v->pq * 
!v->pquantizer);
+
+ff_er_add_slice(&v->s.er, 0, 0,
+(v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,
+ER_MB_END);
 } else {
 v->cur_blk_idx =  0;
 v->left_blk_idx= -1;
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index c71fd3d..ca8afe6 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -229,6 +229,10 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext 
*s)
 
 if (w->j_type) {
 ff_intrax8_decode_picture(&w->x8, 2 * s->qscale, (s->qscale - 1) | 1);
+
+ff_er_add_slice(&w->s.er, 0, 0,
+(w->s.mb_x >> 1) - 1, (w->s.mb_y >> 1) - 1,
+ER_MB_END);
 return 1;
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Wrap multiline macros in do{}while(0) clauses

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 18:26:24 2016 -0500| [750562549ceef268b29b94f6a887d9cf331a8c78] | 
committer: Vittorio Giovara

intrax8: Wrap multiline macros in do{}while(0) clauses

These macros are treated like functions, the wrapping simplifies error
checking and avoids deeply nested ifs in the following commit.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=750562549ceef268b29b94f6a887d9cf331a8c78
---

 libavcodec/intrax8.c |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 45fff96..4887643 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -61,7 +61,7 @@ static av_cold void x8_vlc_init(void){
 
 static VLC_TYPE table[28150][2];
 
-#define  init_ac_vlc(dst,src) \
+#define  init_ac_vlc(dst,src) do { \
 dst.table = &table[offset]; \
 dst.table_allocated = sizes[sizeidx]; \
 offset += sizes[sizeidx++]; \
@@ -69,7 +69,8 @@ static av_cold void x8_vlc_init(void){
   AC_VLC_BITS,77, \
   &src[1],4,2, \
   &src[0],4,2, \
-  INIT_VLC_USE_NEW_STATIC)
+  INIT_VLC_USE_NEW_STATIC); \
+} while(0)
 //set ac tables
 for(i=0;i<8;i++){
 init_ac_vlc( j_ac_vlc[0][0][i], x8_ac0_highquant_table[i][0] );
@@ -80,7 +81,7 @@ static av_cold void x8_vlc_init(void){
 #undef init_ac_vlc
 
 //set dc tables
-#define init_dc_vlc(dst,src) \
+#define init_dc_vlc(dst,src) do { \
 dst.table = &table[offset]; \
 dst.table_allocated = sizes[sizeidx]; \
 offset += sizes[sizeidx++]; \
@@ -88,7 +89,8 @@ static av_cold void x8_vlc_init(void){
 DC_VLC_BITS,34, \
 &src[1],4,2, \
 &src[0],4,2, \
-INIT_VLC_USE_NEW_STATIC);
+INIT_VLC_USE_NEW_STATIC); \
+} while(0)
 for(i=0;i<8;i++){
 init_dc_vlc( j_dc_vlc[0][i], x8_dc_highquant_table[i][0]);
 init_dc_vlc( j_dc_vlc[1][i], x8_dc_lowquant_table [i][0]);
@@ -96,7 +98,7 @@ static av_cold void x8_vlc_init(void){
 #undef init_dc_vlc
 
 //set orient tables
-#define init_or_vlc(dst,src) \
+#define init_or_vlc(dst,src) do { \
 dst.table = &table[offset]; \
 dst.table_allocated = sizes[sizeidx]; \
 offset += sizes[sizeidx++]; \
@@ -104,12 +106,13 @@ static av_cold void x8_vlc_init(void){
 OR_VLC_BITS,12, \
 &src[1],4,2, \
 &src[0],4,2, \
-INIT_VLC_USE_NEW_STATIC);
+INIT_VLC_USE_NEW_STATIC); \
+} while(0)
 for(i=0;i<2;i++){
 init_or_vlc( j_orient_vlc[0][i], x8_orient_highquant_table[i][0]);
 }
 for(i=0;i<4;i++){
-init_or_vlc( j_orient_vlc[1][i], x8_orient_lowquant_table [i][0])
+init_or_vlc( j_orient_vlc[1][i], x8_orient_lowquant_table [i][0]);
 }
 if (offset != sizeof(table)/sizeof(VLC_TYPE)/2)
 av_log(NULL, AV_LOG_ERROR, "table size %i does not match needed %i\n", 
(int)(sizeof(table)/sizeof(VLC_TYPE)/2), offset);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Move a comment to the place it corresponds

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Feb 23 11:29:38 2016 -0500| [42244ce07a1f4f5108ae86d50fe72db785d483ed] | 
committer: Vittorio Giovara

intrax8: Move a comment to the place it corresponds

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42244ce07a1f4f5108ae86d50fe72db785d483ed
---

 libavcodec/intrax8.c |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 4887643..b951684 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -152,11 +152,11 @@ static inline int x8_get_orient_vlc(IntraX8Context * w){
 return get_vlc2(&s->gb, w->j_orient_vlc->table, OR_VLC_BITS, OR_VLC_MTD);
 }
 
-#define extra_bits(eb) (eb)
-#define extra_run   (0xFF<<8)
-#define extra_level (0x00<<8)
-#define   run_offset(r)((r)<<16)
-#define level_offset(l)((l)<<24)
+#define extra_bits(eb)  (eb)// 3 bits
+#define extra_run   (0xFF << 8) // 1 bit
+#define extra_level (0x00 << 8) // 1 bit
+#define run_offset(r)   ((r) << 16) // 6 bits
+#define level_offset(l) ((l) << 24) // 5 bits
 static const uint32_t ac_decode_table[]={
 /*46*/ extra_bits(3) |  extra_run  | run_offset(16) | level_offset( 0),
 /*47*/ extra_bits(3) |  extra_run  | run_offset(24) | level_offset( 0),
@@ -193,7 +193,6 @@ static const uint32_t ac_decode_table[]={
 /*71*/ extra_bits(2) | extra_level | run_offset( 1) | level_offset( 3),
 /*72*/ extra_bits(3) | extra_level | run_offset( 1) | level_offset( 7),
 };
-//extra_bits = 3bits; extra_run/level = 1 bit; run_offset = 6bits; 
level_offset = 5 bits;
 #undef extra_bits
 #undef extra_run
 #undef extra_level

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Move documentation from implementation to header file

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 01:34:18 2016 -0500| [ad8aa8e6c648b61f01b9f106f27b9d4f3d094345] | 
committer: Vittorio Giovara

intrax8: Move documentation from implementation to header file

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad8aa8e6c648b61f01b9f106f27b9d4f3d094345
---

 libavcodec/intrax8.c |   20 
 libavcodec/intrax8.h |   22 ++
 2 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index cbcf9aa..6c168ec 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -739,12 +739,6 @@ static void x8_init_block_index(MpegEncContext *s)
 s->dest[2] += (s->mb_y & (~1)) * uvlinesize << 2;
 }
 
-/**
- * Initialize IntraX8 frame decoder.
- * Requires valid MpegEncContext with valid s->mb_width before calling.
- * @param w pointer to IntraX8Context
- * @param s pointer to MpegEncContext of the parent codec
- */
 av_cold void ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
 {
 w->s = s;
@@ -764,25 +758,11 @@ av_cold void ff_intrax8_common_init(IntraX8Context *w, 
MpegEncContext *const s)
 ff_intrax8dsp_init(&w->dsp);
 }
 
-/**
- * Destroy IntraX8 frame structure.
- * @param w pointer to IntraX8Context
- */
 av_cold void ff_intrax8_common_end(IntraX8Context *w)
 {
 av_freep(&w->prediction_table);
 }
 
-/**
- * Decode single IntraX8 frame.
- * The parent codec must fill s->loopfilter and s->gb (bitstream).
- * The parent codec must call ff_mpv_frame_start() before calling this 
function.
- * The parent codec must call ff_mpv_frame_end() after calling this function.
- * This function does not use ff_mpv_decode_mb().
- * @param w pointer to IntraX8Context
- * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
- * @param quant_offset offset away from zero
- */
 int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
   int quant_offset)
 {
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index 83e984b..3339bc6 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -56,8 +56,30 @@ typedef struct IntraX8Context {
 int est_run;
 } IntraX8Context;
 
+/**
+ * Initialize IntraX8 frame decoder.
+ * Requires valid MpegEncContext with valid s->mb_width before calling.
+ * @param w pointer to IntraX8Context
+ * @param s pointer to MpegEncContext of the parent codec
+ */
 void ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s);
+
+/**
+ * Destroy IntraX8 frame structure.
+ * @param w pointer to IntraX8Context
+ */
 void ff_intrax8_common_end(IntraX8Context *w);
+
+/**
+ * Decode single IntraX8 frame.
+ * The parent codec must fill s->loopfilter and s->gb (bitstream).
+ * The parent codec must call ff_mpv_frame_start() before calling this 
function.
+ * The parent codec must call ff_mpv_frame_end() after calling this function.
+ * This function does not use ff_mpv_decode_mb().
+ * @param w pointer to IntraX8Context
+ * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
+ * @param quant_offset offset away from zero
+ */
 int ff_intrax8_decode_picture(IntraX8Context *w, int quant, int halfpq);
 
 #endif /* AVCODEC_INTRAX8_H */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Check and propagate errors from ff_intrax8_common_init

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 17:37:11 2016 -0500| [0372e73f917e72c40b09270f771046fc142be4a7] | 
committer: Vittorio Giovara

intrax8: Check and propagate errors from ff_intrax8_common_init

This allows dropping an afterwards redundant assert.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0372e73f917e72c40b09270f771046fc142be4a7
---

 libavcodec/intrax8.c |   20 +++-
 libavcodec/intrax8.h |3 ++-
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 6c168ec..b961395 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -45,7 +45,7 @@ static VLC j_ac_vlc[2][2][8];  // [quant < 13], [intra / 
inter], [select]
 static VLC j_dc_vlc[2][8]; // [quant], [select]
 static VLC j_orient_vlc[2][4]; // [quant], [select]
 
-static av_cold void x8_vlc_init(void)
+static av_cold int x8_vlc_init(void)
 {
 int i;
 int offset = 0;
@@ -114,9 +114,13 @@ static av_cold void x8_vlc_init(void)
 init_or_vlc(j_orient_vlc[1][i], x8_orient_lowquant_table[i][0]);
 #undef init_or_vlc
 
-if (offset != sizeof(table)/sizeof(VLC_TYPE)/2)
+if (offset != sizeof(table) / sizeof(VLC_TYPE) / 2) {
 av_log(NULL, AV_LOG_ERROR, "table size %zd does not match needed %i\n",
sizeof(table) / sizeof(VLC_TYPE) / 2, offset);
+return AVERROR_INVALIDDATA;
+}
+
+return 0;
 }
 
 static void x8_reset_vlc_tables(IntraX8Context *w)
@@ -739,14 +743,18 @@ static void x8_init_block_index(MpegEncContext *s)
 s->dest[2] += (s->mb_y & (~1)) * uvlinesize << 2;
 }
 
-av_cold void ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
+av_cold int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
 {
+int ret = x8_vlc_init();
+if (ret < 0)
+return ret;
+
 w->s = s;
-x8_vlc_init();
-assert(s->mb_width > 0);
 
 // two rows, 2 blocks per cannon mb
 w->prediction_table = av_mallocz(s->mb_width * 2 * 2);
+if (!w->prediction_table)
+return AVERROR(ENOMEM);
 
 ff_init_scantable(s->idsp.idct_permutation, &w->scantable[0],
   ff_wmv1_scantable[0]);
@@ -756,6 +764,8 @@ av_cold void ff_intrax8_common_init(IntraX8Context *w, 
MpegEncContext *const s)
   ff_wmv1_scantable[3]);
 
 ff_intrax8dsp_init(&w->dsp);
+
+return 0;
 }
 
 av_cold void ff_intrax8_common_end(IntraX8Context *w)
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index 3339bc6..f69f03e 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -61,8 +61,9 @@ typedef struct IntraX8Context {
  * Requires valid MpegEncContext with valid s->mb_width before calling.
  * @param w pointer to IntraX8Context
  * @param s pointer to MpegEncContext of the parent codec
+ * @return 0 on success, a negative AVERROR value on error
  */
-void ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s);
+int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s);
 
 /**
  * Destroy IntraX8 frame structure.

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] vc1dec: wmv2dec: Validate ff_intrax8_common_init return value

2016-04-17 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 17:43:24 2016 -0500| [d909f43b5c773a73c8d526638744547ba4aa8c59] | 
committer: Vittorio Giovara

vc1dec: wmv2dec: Validate ff_intrax8_common_init return value

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d909f43b5c773a73c8d526638744547ba4aa8c59
---

 libavcodec/vc1dec.c  |   10 ++
 libavcodec/wmv2dec.c |4 +---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 51f5c42..c67fffa 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -314,7 +314,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx)
 av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 {
 MpegEncContext *s = &v->s;
-int i;
+int i, ret = AVERROR(ENOMEM);
 int mb_height = FFALIGN(s->mb_height, 2);
 
 /* Allocate mb bitplanes */
@@ -371,8 +371,6 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 v->mv_f_next[0] = v->mv_f_next_base + s->b8_stride + 1;
 v->mv_f_next[1] = v->mv_f_next[0] + (s->b8_stride * (mb_height * 2 + 
1) + s->mb_stride * (mb_height + 1) * 2);
 
-ff_intrax8_common_init(&v->x8,s);
-
 if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == 
AV_CODEC_ID_VC1IMAGE) {
 for (i = 0; i < 4; i++) {
 v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width);
@@ -381,11 +379,15 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 }
 }
 
+ret = ff_intrax8_common_init(&v->x8, s);
+if (ret < 0)
+goto error;
+
 return 0;
 
 error:
 ff_vc1_decode_end(s->avctx);
-return AVERROR(ENOMEM);
+return ret;
 }
 
 av_cold void ff_vc1_init_transposed_scantables(VC1Context *v)
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index ca8afe6..5bfedbd 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -471,9 +471,7 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
 
 ff_wmv2_common_init(w);
 
-ff_intrax8_common_init(&w->x8, &w->s);
-
-return 0;
+return ff_intrax8_common_init(&w->x8, &w->s);
 }
 
 static av_cold int wmv2_decode_end(AVCodecContext *avctx)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Use local destination buffers

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 20:18:49 2016 -0500| [922b7e6d86e6197dfa5ebde602dd12cc66fb5f1f] | 
committer: Vittorio Giovara

intrax8: Use local destination buffers

These buffers are just a way to store frame pointers and be able to
modify them without touching the original ones.

The two dependent decoders (WMV2 and VC1) do not need special care for
these fields: the former does not seem to use the dest buffers, while
the latter reinits them every time to the current frame data buffers.

So only keep a local copy rather than the one from mpegvideo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=922b7e6d86e6197dfa5ebde602dd12cc66fb5f1f
---

 libavcodec/intrax8.c |   35 ++-
 libavcodec/intrax8.h |1 +
 2 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 54d067c..7c52392 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -335,7 +335,7 @@ static int x8_setup_spatial_predictor(IntraX8Context *const 
w, const int chroma)
 int sum;
 int quant;
 
-w->dsp.setup_spatial_compensation(s->dest[chroma], s->sc.edge_emu_buffer,
+w->dsp.setup_spatial_compensation(w->dest[chroma], s->sc.edge_emu_buffer,
   s->current_picture.f->linesize[chroma > 
0],
   &range, &sum, w->edges);
 if (chroma) {
@@ -671,7 +671,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 dc_level += (w->predicted_dc * divide_quant + (1 << 12)) >> 13;
 
 dsp_x8_put_solidcolor(av_clip_uint8((dc_level * dc_quant + 4) >> 
3),
-  s->dest[chroma],
+  w->dest[chroma],
   s->current_picture.f->linesize[!!chroma]);
 
 goto block_placed;
@@ -696,15 +696,15 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 }
 
 if (w->flat_dc) {
-dsp_x8_put_solidcolor(w->predicted_dc, s->dest[chroma],
+dsp_x8_put_solidcolor(w->predicted_dc, w->dest[chroma],
   s->current_picture.f->linesize[!!chroma]);
 } else {
 w->dsp.spatial_compensation[w->orient](s->sc.edge_emu_buffer,
-   s->dest[chroma],
+   w->dest[chroma],

s->current_picture.f->linesize[!!chroma]);
 }
 if (!zeros_only)
-s->idsp.idct_add(s->dest[chroma],
+s->idsp.idct_add(w->dest[chroma],
  s->current_picture.f->linesize[!!chroma],
  s->block[0]);
 
@@ -713,7 +713,7 @@ block_placed:
 x8_update_predictions(w, w->orient, n);
 
 if (s->loop_filter) {
-uint8_t *ptr = s->dest[chroma];
+uint8_t *ptr = w->dest[chroma];
 int linesize = s->current_picture.f->linesize[!!chroma];
 
 if (!((w->edges & 2) || (zeros_only && (w->orient | 4) == 4)))
@@ -726,21 +726,22 @@ block_placed:
 }
 
 // FIXME maybe merge with ff_*
-static void x8_init_block_index(MpegEncContext *s)
+static void x8_init_block_index(IntraX8Context *w)
 {
+MpegEncContext *const s = w->s;
 // not s->linesize as this would be wrong for field pics
 // not that IntraX8 has interlacing support ;)
 const int linesize   = s->current_picture.f->linesize[0];
 const int uvlinesize = s->current_picture.f->linesize[1];
 
-s->dest[0] = s->current_picture.f->data[0];
-s->dest[1] = s->current_picture.f->data[1];
-s->dest[2] = s->current_picture.f->data[2];
+w->dest[0] = s->current_picture.f->data[0];
+w->dest[1] = s->current_picture.f->data[1];
+w->dest[2] = s->current_picture.f->data[2];
 
-s->dest[0] +=  s->mb_y * linesize   << 3;
+w->dest[0] +=  s->mb_y * linesize   << 3;
 // chroma blocks are on add rows
-s->dest[1] += (s->mb_y & (~1)) * uvlinesize << 2;
-s->dest[2] += (s->mb_y & (~1)) * uvlinesize << 2;
+w->dest[1] += (s->mb_y & (~1)) * uvlinesize << 2;
+w->dest[2] += (s->mb_y & (~1)) * uvlinesize << 2;
 }
 
 av_cold int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
@@ -796,7 +797,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int 
dquant,
 x8_reset_vlc_tables(w);
 
 for (s->mb_y = 0; s->mb_y < s->mb_height * 2; s->mb_y++) {
-x8_init_block_index(s);
+x8_init_block_index(w);
 mb_xy = (s->mb_y >> 1) * s->mb_stride;
 
 fo

[FFmpeg-cvslog] intrax8: Make x8_init_block_index not use mpegvideo fields

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 17:57:09 2016 -0500| [65127450add50c3bca307edc0517d2e8382717a0] | 
committer: Vittorio Giovara

intrax8: Make x8_init_block_index not use mpegvideo fields

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=65127450add50c3bca307edc0517d2e8382717a0
---

 libavcodec/intrax8.c |   23 +++
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 7c52392..a1c046e 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -726,22 +726,21 @@ block_placed:
 }
 
 // FIXME maybe merge with ff_*
-static void x8_init_block_index(IntraX8Context *w)
+static void x8_init_block_index(IntraX8Context *w, AVFrame *frame, int mb_y)
 {
-MpegEncContext *const s = w->s;
-// not s->linesize as this would be wrong for field pics
+// not parent codec linesize as this would be wrong for field pics
 // not that IntraX8 has interlacing support ;)
-const int linesize   = s->current_picture.f->linesize[0];
-const int uvlinesize = s->current_picture.f->linesize[1];
+const int linesize   = frame->linesize[0];
+const int uvlinesize = frame->linesize[1];
 
-w->dest[0] = s->current_picture.f->data[0];
-w->dest[1] = s->current_picture.f->data[1];
-w->dest[2] = s->current_picture.f->data[2];
+w->dest[0] = frame->data[0];
+w->dest[1] = frame->data[1];
+w->dest[2] = frame->data[2];
 
-w->dest[0] +=  s->mb_y * linesize   << 3;
+w->dest[0] +=  mb_y * linesize   << 3;
 // chroma blocks are on add rows
-w->dest[1] += (s->mb_y & (~1)) * uvlinesize << 2;
-w->dest[2] += (s->mb_y & (~1)) * uvlinesize << 2;
+w->dest[1] += (mb_y & (~1)) * uvlinesize << 2;
+w->dest[2] += (mb_y & (~1)) * uvlinesize << 2;
 }
 
 av_cold int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
@@ -797,7 +796,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int 
dquant,
 x8_reset_vlc_tables(w);
 
 for (s->mb_y = 0; s->mb_y < s->mb_height * 2; s->mb_y++) {
-x8_init_block_index(w);
+x8_init_block_index(w, s->current_picture.f, s->mb_y);
 mb_xy = (s->mb_y >> 1) * s->mb_stride;
 
 for (s->mb_x = 0; s->mb_x < s->mb_width * 2; s->mb_x++) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Keep a reference to the context idctdsp

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 18:12:06 2016 -0500| [68127e1bf8037a6e0acd6401cc8c5da950e3fa0a] | 
committer: Vittorio Giovara

intrax8: Keep a reference to the context idctdsp

Use it instead of the embedded mpegvideo one. Update init function
signature to load it directly from the callers.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68127e1bf8037a6e0acd6401cc8c5da950e3fa0a
---

 configure|1 +
 libavcodec/intrax8.c |   14 --
 libavcodec/intrax8.h |6 +-
 libavcodec/vc1dec.c  |2 +-
 libavcodec/wmv2dec.c |2 +-
 5 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/configure b/configure
index a68a5d7..99b9405 100755
--- a/configure
+++ b/configure
@@ -1863,6 +1863,7 @@ error_resilience_select="me_cmp"
 faandct_deps="faan fdctdsp"
 faanidct_deps="faan idctdsp"
 h264dsp_select="startcode"
+intrax8_select="idctdsp"
 mdct_select="fft"
 rdft_select="fft"
 me_cmp_select="fdctdsp idctdsp pixblockdsp"
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index a1c046e..0082591 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -492,7 +492,7 @@ static void x8_ac_compensation(IntraX8Context *const w, 
const int direction,
 {
 MpegEncContext *const s = w->s;
 int t;
-#define B(x, y) s->block[0][s->idsp.idct_permutation[(x) + (y) * 8]]
+#define B(x, y) s->block[0][w->idsp.idct_permutation[(x) + (y) * 8]]
 #define T(x)  ((x) * dc_level + 0x8000) >> 16;
 switch (direction) {
 case 0:
@@ -704,7 +704,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)

s->current_picture.f->linesize[!!chroma]);
 }
 if (!zeros_only)
-s->idsp.idct_add(w->dest[chroma],
+w->idsp.idct_add(w->dest[chroma],
  s->current_picture.f->linesize[!!chroma],
  s->block[0]);
 
@@ -743,12 +743,14 @@ static void x8_init_block_index(IntraX8Context *w, 
AVFrame *frame, int mb_y)
 w->dest[2] += (mb_y & (~1)) * uvlinesize << 2;
 }
 
-av_cold int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
+av_cold int ff_intrax8_common_init(IntraX8Context *w, IDCTDSPContext *idsp,
+   MpegEncContext *const s)
 {
 int ret = x8_vlc_init();
 if (ret < 0)
 return ret;
 
+w->idsp = *idsp;
 w->s = s;
 
 // two rows, 2 blocks per cannon mb
@@ -756,11 +758,11 @@ av_cold int ff_intrax8_common_init(IntraX8Context *w, 
MpegEncContext *const s)
 if (!w->prediction_table)
 return AVERROR(ENOMEM);
 
-ff_init_scantable(s->idsp.idct_permutation, &w->scantable[0],
+ff_init_scantable(w->idsp.idct_permutation, &w->scantable[0],
   ff_wmv1_scantable[0]);
-ff_init_scantable(s->idsp.idct_permutation, &w->scantable[1],
+ff_init_scantable(w->idsp.idct_permutation, &w->scantable[1],
   ff_wmv1_scantable[2]);
-ff_init_scantable(s->idsp.idct_permutation, &w->scantable[2],
+ff_init_scantable(w->idsp.idct_permutation, &w->scantable[2],
   ff_wmv1_scantable[3]);
 
 ff_intrax8dsp_init(&w->dsp);
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index e2532f8..ef88d83 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -21,6 +21,7 @@
 
 #include "get_bits.h"
 #include "mpegvideo.h"
+#include "idctdsp.h"
 #include "intrax8dsp.h"
 
 typedef struct IntraX8Context {
@@ -37,6 +38,7 @@ typedef struct IntraX8Context {
 // set by the caller codec
 MpegEncContext *s;
 IntraX8DSPContext dsp;
+IDCTDSPContext idsp;
 int quant;
 int dquant;
 int qsum;
@@ -61,10 +63,12 @@ typedef struct IntraX8Context {
  * Initialize IntraX8 frame decoder.
  * Requires valid MpegEncContext with valid s->mb_width before calling.
  * @param w pointer to IntraX8Context
+ * @param idsp pointer to IDCTDSPContext
  * @param s pointer to MpegEncContext of the parent codec
  * @return 0 on success, a negative AVERROR value on error
  */
-int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s);
+int ff_intrax8_common_init(IntraX8Context *w, IDCTDSPContext *idsp,
+   MpegEncContext *const s);
 
 /**
  * Destroy IntraX8 frame structure.
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index c67fffa..9e64a6b 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -379,7 +379,7 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 }
 }
 
-ret = ff_intrax8_common_init(&v->x8, s);
+ret = ff_intrax8_common_init(&v->x8, &s->idsp, s);
 if (ret < 0)
 goto error;
 
diff --git 

[FFmpeg-cvslog] intrax8: Reference the current AVCodecContext

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 00:43:22 2016 -0500| [1eaae7abb8f208fefb4e8b9e983e61b2499206a3] | 
committer: Vittorio Giovara

intrax8: Reference the current AVCodecContext

It will be needed to initialize BlockDSP in the next commit.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1eaae7abb8f208fefb4e8b9e983e61b2499206a3
---

 libavcodec/intrax8.c |4 +++-
 libavcodec/intrax8.h |5 -
 libavcodec/vc1dec.c  |2 +-
 libavcodec/wmv2dec.c |2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index f23ab81..b35d252 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -737,13 +737,15 @@ static void x8_init_block_index(IntraX8Context *w, 
AVFrame *frame, int mb_y)
 w->dest[2] += (mb_y & (~1)) * uvlinesize << 2;
 }
 
-av_cold int ff_intrax8_common_init(IntraX8Context *w, IDCTDSPContext *idsp,
+av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
+   IntraX8Context *w, IDCTDSPContext *idsp,
MpegEncContext *const s)
 {
 int ret = x8_vlc_init();
 if (ret < 0)
 return ret;
 
+w->avctx = avctx;
 w->idsp = *idsp;
 w->s = s;
 
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index f07349f..7a0eaf7 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -35,6 +35,7 @@ typedef struct IntraX8Context {
 // set by ff_intrax8_common_init
 uint8_t *prediction_table; // 2 * (mb_w * 2)
 ScanTable scantable[3];
+AVCodecContext *avctx;
 
 // set by the caller codec
 MpegEncContext *s;
@@ -67,12 +68,14 @@ typedef struct IntraX8Context {
 /**
  * Initialize IntraX8 frame decoder.
  * Requires valid MpegEncContext with valid s->mb_width before calling.
+ * @param avctx pointer to AVCodecContext
  * @param w pointer to IntraX8Context
  * @param idsp pointer to IDCTDSPContext
  * @param s pointer to MpegEncContext of the parent codec
  * @return 0 on success, a negative AVERROR value on error
  */
-int ff_intrax8_common_init(IntraX8Context *w, IDCTDSPContext *idsp,
+int ff_intrax8_common_init(AVCodecContext *avctx,
+   IntraX8Context *w, IDCTDSPContext *idsp,
MpegEncContext *const s);
 
 /**
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 9e64a6b..250d72a 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -379,7 +379,7 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 }
 }
 
-ret = ff_intrax8_common_init(&v->x8, &s->idsp, s);
+ret = ff_intrax8_common_init(s->avctx, &v->x8, &s->idsp, s);
 if (ret < 0)
 goto error;
 
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index d7828ad..0560d95 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -473,7 +473,7 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
 
 ff_wmv2_common_init(w);
 
-return ff_intrax8_common_init(&w->x8, &w->s.idsp, &w->s);
+return ff_intrax8_common_init(avctx, &w->x8, &w->s.idsp, &w->s);
 }
 
 static av_cold int wmv2_decode_end(AVCodecContext *avctx)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 19:59:51 2016 -0500| [577393321c389ad2973bec6168a8045c94a9e099] | 
committer: Vittorio Giovara

intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture

Helps in decoupling this code from mpegvideo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=577393321c389ad2973bec6168a8045c94a9e099
---

 libavcodec/intrax8.c   |5 +++--
 libavcodec/intrax8.h   |7 +--
 libavcodec/vc1_block.c |3 ++-
 libavcodec/wmv2dec.c   |3 ++-
 4 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 0082591..a3e21a3 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -712,7 +712,7 @@ block_placed:
 if (!chroma)
 x8_update_predictions(w, w->orient, n);
 
-if (s->loop_filter) {
+if (w->loopfilter) {
 uint8_t *ptr = w->dest[chroma];
 int linesize = s->current_picture.f->linesize[!!chroma];
 
@@ -776,7 +776,7 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w)
 }
 
 int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
-  int quant_offset)
+  int quant_offset, int loopfilter)
 {
 MpegEncContext *const s = w->s;
 int mb_xy;
@@ -786,6 +786,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int 
dquant,
 w->dquant = dquant;
 w->quant  = dquant >> 1;
 w->qsum   = quant_offset;
+w->loopfilter = loopfilter;
 
 w->divide_quant_dc_luma = ((1 << 16) + (w->quant >> 1)) / w->quant;
 if (w->quant < 5) {
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index ef88d83..f73cfcd 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -42,6 +42,7 @@ typedef struct IntraX8Context {
 int quant;
 int dquant;
 int qsum;
+int loopfilter;
 
 // calculated per frame
 int quant_dc_chroma;
@@ -78,14 +79,16 @@ void ff_intrax8_common_end(IntraX8Context *w);
 
 /**
  * Decode single IntraX8 frame.
- * The parent codec must fill s->loopfilter and s->gb (bitstream).
+ * The parent codec must fill s->gb (bitstream).
  * The parent codec must call ff_mpv_frame_start() before calling this 
function.
  * The parent codec must call ff_mpv_frame_end() after calling this function.
  * This function does not use ff_mpv_decode_mb().
  * @param w pointer to IntraX8Context
  * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
  * @param quant_offset offset away from zero
+ * @param loopfilter enable filter after decoding a block
  */
-int ff_intrax8_decode_picture(IntraX8Context *w, int quant, int halfpq);
+int ff_intrax8_decode_picture(IntraX8Context *w, int quant, int halfpq,
+  int loopfilter);
 
 #endif /* AVCODEC_INTRAX8_H */
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 8b46260..4dab0ef 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -3022,7 +3022,8 @@ void ff_vc1_decode_blocks(VC1Context *v)
 
 v->s.esc3_level_length = 0;
 if (v->x8_type) {
-ff_intrax8_decode_picture(&v->x8, 2*v->pq + v->halfpq, v->pq * 
!v->pquantizer);
+ff_intrax8_decode_picture(&v->x8, 2 * v->pq + v->halfpq,
+  v->pq * !v->pquantizer, v->s.loop_filter);
 
 ff_er_add_slice(&v->s.er, 0, 0,
 (v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 03b949e..738d33d 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -228,7 +228,8 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext 
*s)
 s->picture_number++; // FIXME ?
 
 if (w->j_type) {
-ff_intrax8_decode_picture(&w->x8, 2 * s->qscale, (s->qscale - 1) | 1);
+ff_intrax8_decode_picture(&w->x8, 2 * s->qscale, (s->qscale - 1) | 1,
+  s->loop_filter);
 
 ff_er_add_slice(&w->s.er, 0, 0,
 (w->s.mb_x >> 1) - 1, (w->s.mb_y >> 1) - 1,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Pass the output frame to the decoding function

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 20:33:12 2016 -0500| [eaeba6f241e0de0e797be10f8fda967ef8489e64] | 
committer: Vittorio Giovara

intrax8: Pass the output frame to the decoding function

Helps in decoupling this code from mpegvideo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eaeba6f241e0de0e797be10f8fda967ef8489e64
---

 libavcodec/intrax8.c   |   21 +++--
 libavcodec/intrax8.h   |7 +--
 libavcodec/vc1_block.c |5 +++--
 libavcodec/wmv2dec.c   |3 ++-
 4 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index a3e21a3..a05c533 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -336,7 +336,7 @@ static int x8_setup_spatial_predictor(IntraX8Context *const 
w, const int chroma)
 int quant;
 
 w->dsp.setup_spatial_compensation(w->dest[chroma], s->sc.edge_emu_buffer,
-  s->current_picture.f->linesize[chroma > 
0],
+  w->frame->linesize[chroma > 0],
   &range, &sum, w->edges);
 if (chroma) {
 w->orient = w->chroma_orient;
@@ -672,7 +672,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 
 dsp_x8_put_solidcolor(av_clip_uint8((dc_level * dc_quant + 4) >> 
3),
   w->dest[chroma],
-  s->current_picture.f->linesize[!!chroma]);
+  w->frame->linesize[!!chroma]);
 
 goto block_placed;
 }
@@ -697,15 +697,15 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 
 if (w->flat_dc) {
 dsp_x8_put_solidcolor(w->predicted_dc, w->dest[chroma],
-  s->current_picture.f->linesize[!!chroma]);
+  w->frame->linesize[!!chroma]);
 } else {
 w->dsp.spatial_compensation[w->orient](s->sc.edge_emu_buffer,
w->dest[chroma],
-   
s->current_picture.f->linesize[!!chroma]);
+   w->frame->linesize[!!chroma]);
 }
 if (!zeros_only)
 w->idsp.idct_add(w->dest[chroma],
- s->current_picture.f->linesize[!!chroma],
+ w->frame->linesize[!!chroma],
  s->block[0]);
 
 block_placed:
@@ -714,7 +714,7 @@ block_placed:
 
 if (w->loopfilter) {
 uint8_t *ptr = w->dest[chroma];
-int linesize = s->current_picture.f->linesize[!!chroma];
+int linesize = w->frame->linesize[!!chroma];
 
 if (!((w->edges & 2) || (zeros_only && (w->orient | 4) == 4)))
 w->dsp.h_loop_filter(ptr, linesize, w->quant);
@@ -775,8 +775,8 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w)
 av_freep(&w->prediction_table);
 }
 
-int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
-  int quant_offset, int loopfilter)
+int ff_intrax8_decode_picture(IntraX8Context *const w, Picture *pict,
+  int dquant, int quant_offset, int loopfilter)
 {
 MpegEncContext *const s = w->s;
 int mb_xy;
@@ -786,6 +786,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int 
dquant,
 w->dquant = dquant;
 w->quant  = dquant >> 1;
 w->qsum   = quant_offset;
+w->frame  = pict->f;
 w->loopfilter = loopfilter;
 
 w->divide_quant_dc_luma = ((1 << 16) + (w->quant >> 1)) / w->quant;
@@ -799,7 +800,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int 
dquant,
 x8_reset_vlc_tables(w);
 
 for (s->mb_y = 0; s->mb_y < s->mb_height * 2; s->mb_y++) {
-x8_init_block_index(w, s->current_picture.f, s->mb_y);
+x8_init_block_index(w, w->frame, s->mb_y);
 mb_xy = (s->mb_y >> 1) * s->mb_stride;
 
 for (s->mb_x = 0; s->mb_x < s->mb_width * 2; s->mb_x++) {
@@ -828,7 +829,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int 
dquant,
 /* emulate MB info in the relevant tables */
 s->mbskip_table[mb_xy] = 0;
 s->mbintra_table[mb_xy]= 1;
-s->current_picture.qscale_table[mb_xy] = w->quant;
+pict->qscale_table[mb_xy] = w->quant;
 mb_xy++;
 }
 w->dest[0] += 8;
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index f73cfcd..f087b9f 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -23,6 +23,7 @@
 #includ

[FFmpeg-cvslog] intrax8: Use a constant buffer instead of a ScratchpadContext

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 19 20:50:00 2016 -0500| [65f14128c4bcf8fcd9d3ba1e20b7a22057c9cfb0] | 
committer: Vittorio Giovara

intrax8: Use a constant buffer instead of a ScratchpadContext

The size of the block is fixed (8x8 plus padding).

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=65f14128c4bcf8fcd9d3ba1e20b7a22057c9cfb0
---

 libavcodec/intrax8.c |5 ++---
 libavcodec/intrax8.h |1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index a05c533..f5bf795 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -330,12 +330,11 @@ static int x8_get_dc_rlf(IntraX8Context *const w, const 
int mode,
 
 static int x8_setup_spatial_predictor(IntraX8Context *const w, const int 
chroma)
 {
-MpegEncContext *const s = w->s;
 int range;
 int sum;
 int quant;
 
-w->dsp.setup_spatial_compensation(w->dest[chroma], s->sc.edge_emu_buffer,
+w->dsp.setup_spatial_compensation(w->dest[chroma], w->scratchpad,
   w->frame->linesize[chroma > 0],
   &range, &sum, w->edges);
 if (chroma) {
@@ -699,7 +698,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 dsp_x8_put_solidcolor(w->predicted_dc, w->dest[chroma],
   w->frame->linesize[!!chroma]);
 } else {
-w->dsp.spatial_compensation[w->orient](s->sc.edge_emu_buffer,
+w->dsp.spatial_compensation[w->orient](w->scratchpad,
w->dest[chroma],
w->frame->linesize[!!chroma]);
 }
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index f087b9f..f30801e 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -51,6 +51,7 @@ typedef struct IntraX8Context {
 int divide_quant_dc_luma;
 int divide_quant_dc_chroma;
 uint8_t *dest[3];
+uint8_t scratchpad[42]; // size of the block is fixed (8x8 plus padding)
 
 // changed per block
 int edges;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Add a local BlockDSPContext and initialize it

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 00:46:49 2016 -0500| [159323897f545e7405fb9db234e0ba123e174376] | 
committer: Vittorio Giovara

intrax8: Add a local BlockDSPContext and initialize it

Helps in decoupling this code from mpegvideo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=159323897f545e7405fb9db234e0ba123e174376
---

 configure|2 +-
 libavcodec/intrax8.c |3 ++-
 libavcodec/intrax8.h |2 ++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 99b9405..e5f5046 100755
--- a/configure
+++ b/configure
@@ -1863,7 +1863,7 @@ error_resilience_select="me_cmp"
 faandct_deps="faan fdctdsp"
 faanidct_deps="faan idctdsp"
 h264dsp_select="startcode"
-intrax8_select="idctdsp"
+intrax8_select="blockdsp idctdsp"
 mdct_select="fft"
 rdft_select="fft"
 me_cmp_select="fdctdsp idctdsp pixblockdsp"
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index b35d252..e7eda24 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -587,7 +587,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 int sign;
 
 assert(w->orient < 12);
-s->bdsp.clear_block(s->block[0]);
+w->bdsp.clear_block(s->block[0]);
 
 if (chroma)
 dc_mode = 2;
@@ -762,6 +762,7 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
   ff_wmv1_scantable[3]);
 
 ff_intrax8dsp_init(&w->dsp);
+ff_blockdsp_init(&w->bdsp, avctx);
 
 return 0;
 }
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index 7a0eaf7..44954e1 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -19,6 +19,7 @@
 #ifndef AVCODEC_INTRAX8_H
 #define AVCODEC_INTRAX8_H
 
+#include "blockdsp.h"
 #include "get_bits.h"
 #include "mpegvideo.h"
 #include "idctdsp.h"
@@ -41,6 +42,7 @@ typedef struct IntraX8Context {
 MpegEncContext *s;
 IntraX8DSPContext dsp;
 IDCTDSPContext idsp;
+BlockDSPContext bdsp;
 int quant;
 int dquant;
 int qsum;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Keep a reference to the GetBitContext reader

2016-04-24 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 00:23:48 2016 -0500| [8072345e9f86d88fbc4a15c17cb03f1e4701c9a5] | 
committer: Vittorio Giovara

intrax8: Keep a reference to the GetBitContext reader

Helps in decoupling this code from mpegvideo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8072345e9f86d88fbc4a15c17cb03f1e4701c9a5
---

 libavcodec/intrax8.c   |   35 ---
 libavcodec/intrax8.h   |4 +++-
 libavcodec/vc1_block.c |2 +-
 libavcodec/wmv2dec.c   |2 +-
 4 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index f5bf795..f23ab81 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -132,7 +132,6 @@ static void x8_reset_vlc_tables(IntraX8Context *w)
 
 static inline void x8_select_ac_table(IntraX8Context *const w, int mode)
 {
-MpegEncContext *const s = w->s;
 int table_index;
 
 assert(mode < 4);
@@ -140,7 +139,7 @@ static inline void x8_select_ac_table(IntraX8Context *const 
w, int mode)
 if (w->j_ac_vlc[mode])
 return;
 
-table_index   = get_bits(&s->gb, 3);
+table_index   = get_bits(w->gb, 3);
 // 2 modes use same tables
 w->j_ac_vlc[mode] = &j_ac_vlc[w->quant < 13][mode >> 1][table_index];
 
@@ -149,16 +148,14 @@ static inline void x8_select_ac_table(IntraX8Context 
*const w, int mode)
 
 static inline int x8_get_orient_vlc(IntraX8Context *w)
 {
-MpegEncContext *const s = w->s;
-
 if (!w->j_orient_vlc) {
-int table_index = get_bits(&s->gb, 1 + (w->quant < 13));
+int table_index = get_bits(w->gb, 1 + (w->quant < 13));
 w->j_orient_vlc = &j_orient_vlc[w->quant < 13][table_index];
 }
 assert(w->j_orient_vlc);
 assert(w->j_orient_vlc->table);
 
-return get_vlc2(&s->gb, w->j_orient_vlc->table, OR_VLC_BITS, OR_VLC_MTD);
+return get_vlc2(w->gb, w->j_orient_vlc->table, OR_VLC_BITS, OR_VLC_MTD);
 }
 
 #define extra_bits(eb)  (eb)// 3 bits
@@ -211,11 +208,10 @@ static const uint32_t ac_decode_table[] = {
 static void x8_get_ac_rlf(IntraX8Context *const w, const int mode,
   int *const run, int *const level, int *const final)
 {
-MpegEncContext *const s = w->s;
 int i, e;
 
 //x8_select_ac_table(w, mode);
-i = get_vlc2(&s->gb, w->j_ac_vlc[mode]->table, AC_VLC_BITS, AC_VLC_MTD);
+i = get_vlc2(w->gb, w->j_ac_vlc[mode]->table, AC_VLC_BITS, AC_VLC_MTD);
 
 if (i < 46) { // [0-45]
 int t, l;
@@ -254,7 +250,7 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const 
int mode,
 i -= 46;
 sm = ac_decode_table[i];
 
-e= get_bits(&s->gb, sm & 0xF);
+e= get_bits(w->gb, sm & 0xF);
 sm >>= 8;   // 3bits
 mask = sm & 0xff;
 sm >>= 8;   // 1bit
@@ -271,13 +267,13 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const 
int mode,
 };
 
 (*final) = !(i & 1);
-e= get_bits(&s->gb, 5); // get the extra bits
+e= get_bits(w->gb, 5); // get the extra bits
 (*run)   = crazy_mix_runlevel[e] >> 4;
 (*level) = crazy_mix_runlevel[e] & 0x0F;
 } else {
-(*level) = get_bits(&s->gb, 7 - 3 * (i & 1));
-(*run)   = get_bits(&s->gb, 6);
-(*final) = get_bits1(&s->gb);
+(*level) = get_bits(w->gb, 7 - 3 * (i & 1));
+(*run)   = get_bits(w->gb, 6);
+(*final) = get_bits1(w->gb);
 }
 return;
 }
@@ -292,19 +288,18 @@ static const uint8_t dc_index_offset[] = {
 static int x8_get_dc_rlf(IntraX8Context *const w, const int mode,
  int *const level, int *const final)
 {
-MpegEncContext *const s = w->s;
 int i, e, c;
 
 assert(mode < 3);
 if (!w->j_dc_vlc[mode]) {
-int table_index = get_bits(&s->gb, 3);
+int table_index = get_bits(w->gb, 3);
 // 4 modes, same table
 w->j_dc_vlc[mode] = &j_dc_vlc[w->quant < 13][table_index];
 }
 assert(w->j_dc_vlc);
 assert(w->j_dc_vlc[mode]->table);
 
-i = get_vlc2(&s->gb, w->j_dc_vlc[mode]->table, DC_VLC_BITS, DC_VLC_MTD);
+i = get_vlc2(w->gb, w->j_dc_vlc[mode]->table, DC_VLC_BITS, DC_VLC_MTD);
 
 /* (i >= 17) { i -= 17; final =1; } */
 c= i > 16;
@@ -318,7 +313,7 @@ static int x8_get_dc_rlf(IntraX8Context *const w, const int 
mode,
 c  = (i + 1) >> 1; // hackish way to calculate dc_extra_sbits[]
 c -= c > 1;
 
-e = get_bits(&s->gb, c); // get the extra bits
+e = get_bits(w->gb, c); // get the extra bits
 i = dc_index_offset[i] + (

[FFmpeg-cvslog] intrax8: Pass macroblock size to ff_intrax8_common_init

2016-05-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 01:09:40 2016 -0500| [d0540fd02171a6233d2016b199d013299debf7e3] | 
committer: Vittorio Giovara

intrax8: Pass macroblock size to ff_intrax8_common_init

Helps in decoupling this code from mpegvideo.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0540fd02171a6233d2016b199d013299debf7e3
---

 libavcodec/intrax8.c |   18 +++---
 libavcodec/intrax8.h |7 +++
 libavcodec/vc1dec.c  |4 +++-
 libavcodec/wmv2dec.c |3 ++-
 4 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index e7eda24..a0be10c 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -399,7 +399,7 @@ static void x8_get_prediction_chroma(IntraX8Context *const 
w)
 
 w->edges  = 1 * (!(s->mb_x >> 1));
 w->edges |= 2 * (!(s->mb_y >> 1));
-w->edges |= 4 * (s->mb_x >= (2 * s->mb_width - 1)); // mb_x for chroma 
would always be odd
+w->edges |= 4 * (s->mb_x >= (2 * w->mb_width - 1)); // mb_x for chroma 
would always be odd
 
 w->raw_orient = 0;
 // lut_co[8] = {inv,4,8,8, inv,4,8,8} <- => {1,1,0,0;1,1,0,0} => 0xCC
@@ -418,7 +418,7 @@ static void x8_get_prediction(IntraX8Context *const w)
 
 w->edges  = 1 * (!s->mb_x);
 w->edges |= 2 * (!s->mb_y);
-w->edges |= 4 * (s->mb_x >= (2 * s->mb_width - 1));
+w->edges |= 4 * (s->mb_x >= (2 * w->mb_width - 1));
 
 switch (w->edges & 3) {
 case 0:
@@ -739,6 +739,7 @@ static void x8_init_block_index(IntraX8Context *w, AVFrame 
*frame, int mb_y)
 
 av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
IntraX8Context *w, IDCTDSPContext *idsp,
+   int mb_width, int mb_height,
MpegEncContext *const s)
 {
 int ret = x8_vlc_init();
@@ -747,10 +748,14 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
 
 w->avctx = avctx;
 w->idsp = *idsp;
+s->mb_x = 0;
+s->mb_y = 0;
+w->mb_width  = mb_width;
+w->mb_height = mb_height;
 w->s = s;
 
 // two rows, 2 blocks per cannon mb
-w->prediction_table = av_mallocz(s->mb_width * 2 * 2);
+w->prediction_table = av_mallocz(w->mb_width * 2 * 2);
 if (!w->prediction_table)
 return AVERROR(ENOMEM);
 
@@ -798,11 +803,10 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, 
Picture *pict,
 }
 x8_reset_vlc_tables(w);
 
-for (s->mb_y = 0; s->mb_y < s->mb_height * 2; s->mb_y++) {
+for (s->mb_y = 0; s->mb_y < w->mb_height * 2; s->mb_y++) {
 x8_init_block_index(w, w->frame, s->mb_y);
-mb_xy = (s->mb_y >> 1) * s->mb_stride;
-
-for (s->mb_x = 0; s->mb_x < s->mb_width * 2; s->mb_x++) {
+mb_xy = (s->mb_y >> 1) * (w->mb_width + 1);
+for (s->mb_x = 0; s->mb_x < w->mb_width * 2; s->mb_x++) {
 x8_get_prediction(w);
 if (x8_setup_spatial_predictor(w, 0))
 goto error;
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index 44954e1..d640cdf 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -65,6 +65,10 @@ typedef struct IntraX8Context {
 int chroma_orient;
 int orient;
 int est_run;
+
+// block props
+int mb_x, mb_y;
+int mb_width, mb_height;
 } IntraX8Context;
 
 /**
@@ -73,11 +77,14 @@ typedef struct IntraX8Context {
  * @param avctx pointer to AVCodecContext
  * @param w pointer to IntraX8Context
  * @param idsp pointer to IDCTDSPContext
+ * @param mb_width macroblock width
+ * @param mb_height macroblock height
  * @param s pointer to MpegEncContext of the parent codec
  * @return 0 on success, a negative AVERROR value on error
  */
 int ff_intrax8_common_init(AVCodecContext *avctx,
IntraX8Context *w, IDCTDSPContext *idsp,
+   int mb_width, int mb_height,
MpegEncContext *const s);
 
 /**
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 250d72a..d1a99d7 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -379,7 +379,9 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 }
 }
 
-ret = ff_intrax8_common_init(s->avctx, &v->x8, &s->idsp, s);
+ret = ff_intrax8_common_init(s->avctx, &v->x8, &s->idsp,
+ s->mb_width, s->mb_height,
+ s);
 if (ret < 0)
 goto error;
 
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 0560d95..db32689 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -473,7 +473,8 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
 
 ff_wmv2_common_init

[FFmpeg-cvslog] intrax8: Drop MB emulation code

2016-05-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 02:28:03 2016 -0500| [9b57995cdd489a4cff51dcc1a1f08ac77ec5a58c] | 
committer: Vittorio Giovara

intrax8: Drop MB emulation code

This is already performed in init_context_frame().

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b57995cdd489a4cff51dcc1a1f08ac77ec5a58c
---

 libavcodec/intrax8.c |3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 3bd8807..4e30a9e 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -828,9 +828,6 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, 
Picture *pict,
 w->dest[1] += 8;
 w->dest[2] += 8;
 
-/* emulate MB info in the relevant tables */
-s->mbskip_table[mb_xy] = 0;
-s->mbintra_table[mb_xy]= 1;
 pict->qscale_table[mb_xy] = w->quant;
 mb_xy++;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] intrax8: Use the generic horizband function

2016-05-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 01:25:03 2016 -0500| [c2084ffcbfc11d1b6ed3a4a0df9cafd56fbb896f] | 
committer: Vittorio Giovara

intrax8: Use the generic horizband function

This is assuming that intrax8 has no support for interlacing
Carry over lowdelay value in ff_intrax8_decode_picture.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2084ffcbfc11d1b6ed3a4a0df9cafd56fbb896f
---

 libavcodec/intrax8.c   |8 ++--
 libavcodec/intrax8.h   |3 ++-
 libavcodec/vc1_block.c |2 +-
 libavcodec/wmv2dec.c   |2 +-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index b4cac16..209b857 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -29,6 +29,7 @@
 #include "intrax8huf.h"
 #include "intrax8.h"
 #include "intrax8dsp.h"
+#include "mpegutils.h"
 
 #define MAX_TABLE_DEPTH(table_bits, max_bits) \
 ((max_bits + table_bits - 1) / table_bits)
@@ -772,7 +773,8 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w)
 
 int ff_intrax8_decode_picture(IntraX8Context *const w, Picture *pict,
   GetBitContext *gb, int *mb_x, int *mb_y,
-  int dquant, int quant_offset, int loopfilter)
+  int dquant, int quant_offset,
+  int loopfilter, int lowdelay)
 {
 MpegEncContext *const s = w->s;
 int mb_xy;
@@ -834,7 +836,9 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, 
Picture *pict,
 w->dest[0] += 8;
 }
 if (w->mb_y & 1)
-ff_mpeg_draw_horiz_band(s, (w->mb_y - 1) * 8, 16);
+ff_draw_horiz_band(w->avctx, w->frame, w->frame,
+   (w->mb_y - 1) * 8, 16,
+   PICT_FRAME, 0, lowdelay);
 }
 
 error:
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index d6d..3fb9857 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -109,6 +109,7 @@ void ff_intrax8_common_end(IntraX8Context *w);
  */
 int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict,
   GetBitContext *gb, int *mb_x, int *mb_y,
-  int quant, int halfpq, int loopfilter);
+  int quant, int halfpq,
+  int loopfilter, int lowdelay);
 
 #endif /* AVCODEC_INTRAX8_H */
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 1fac828..1ce0612 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -3025,7 +3025,7 @@ void ff_vc1_decode_blocks(VC1Context *v)
 ff_intrax8_decode_picture(&v->x8, &v->s.current_picture,
   &v->s.gb, &v->s.mb_x, &v->s.mb_y,
   2 * v->pq + v->halfpq, v->pq * 
!v->pquantizer,
-  v->s.loop_filter);
+  v->s.loop_filter, v->s.low_delay);
 
 ff_er_add_slice(&v->s.er, 0, 0,
 (v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 845acf6..7bf8388 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -231,7 +231,7 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext 
*s)
 ff_intrax8_decode_picture(&w->x8, &s->current_picture,
   &s->gb, &s->mb_x, &s->mb_y,
   2 * s->qscale, (s->qscale - 1) | 1,
-  s->loop_filter);
+  s->loop_filter, s->low_delay);
 
 ff_er_add_slice(&w->s.er, 0, 0,
 (w->s.mb_x >> 1) - 1, (w->s.mb_y >> 1) - 1,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] fate: Add test for WMV2 with jframes

2016-05-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 16:44:35 2016 -0500| [9f4d99138df434a73b097c997fb4cafc65f4ff54] | 
committer: Vittorio Giovara

fate: Add test for WMV2 with jframes

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f4d99138df434a73b097c997fb4cafc65f4ff54
---

 tests/fate/microsoft.mak|3 +
 tests/ref/fate/wmv8-intrax8 |  475 +++
 2 files changed, 478 insertions(+)

diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak
index 30bd35a..4a67468 100644
--- a/tests/fate/microsoft.mak
+++ b/tests/fate/microsoft.mak
@@ -38,6 +38,9 @@ fate-wmv8-drm-nodec: CMD = framecrc -cryptokey 
137381538c84c068111902a59c5cf6c34
 FATE_SAMPLES_AVCONV-$(call DEMDEC, ASF, WMV3) += $(FATE_WMV8_DRM)
 fate-wmv8_drm: $(FATE_WMV8_DRM)
 
+FATE_SAMPLES_AVCONV-$(call DEMDEC, ASF, WMV2) += fate-wmv8-intrax8
+fate-wmv8-intrax8: CMD = framecrc -flags +bitexact -i 
$(TARGET_SAMPLES)/wmv8/wmv8_x8intra.wmv -an
+
 FATE_VC1-$(CONFIG_VC1_DEMUXER) += fate-vc1_sa00040
 fate-vc1_sa00040: CMD = framecrc -i $(TARGET_SAMPLES)/vc1/SA00040.vc1
 
diff --git a/tests/ref/fate/wmv8-intrax8 b/tests/ref/fate/wmv8-intrax8
new file mode 100644
index 000..103e8da
--- /dev/null
+++ b/tests/ref/fate/wmv8-intrax8
@@ -0,0 +1,475 @@
+#tb 0: 1/1000
+0,  0,  0,0,   115200, 0x03fbd838
+0,200,200,0,   115200, 0x8911d86f
+0,266,266,0,   115200, 0x7c5dd82e
+0,333,333,0,   115200, 0x7c5ed82e
+0,   2000,   2000,0,   115200, 0xd323d838
+0,   2066,   2066,0,   115200, 0x6e7479ab
+0,   2133,   2133,0,   115200, 0x14674bf6
+0,   2200,   2200,0,   115200, 0x074c2e3d
+0,   2266,   2266,0,   115200, 0x9b3025ef
+0,   2333,   2333,0,   115200, 0x76882dae
+0,   2400,   2400,0,   115200, 0xedf3421b
+0,   2466,   2466,0,   115200, 0xb5378486
+0,   2533,   2533,0,   115200, 0xc4a53420
+0,   2600,   2600,0,   115200, 0x559cb60f
+0,   2666,   2666,0,   115200, 0xcc034ddd
+0,   2733,   2733,0,   115200, 0xb77b7779
+0,   2800,   2800,0,   115200, 0x0ad9c3e6
+0,   2866,   2866,0,   115200, 0x4e673027
+0,   2933,   2933,0,   115200, 0x54717979
+0,   3000,   3000,0,   115200, 0xf9e557c9
+0,   3066,   3066,0,   115200, 0xbdcf6358
+0,   3133,   3133,0,   115200, 0xd55c7bb7
+0,   3200,   3200,0,   115200, 0x78d171e7
+0,   3266,   3266,0,   115200, 0x28715816
+0,   ,   ,0,   115200, 0x58740b8a
+0,   3400,   3400,0,   115200, 0x86c10f18
+0,   3466,   3466,0,   115200, 0x903918f9
+0,   3533,   3533,0,   115200, 0x7f742394
+0,   3600,   3600,0,   115200, 0xd3a91d44
+0,   3666,   3666,0,   115200, 0x24452563
+0,   3733,   3733,0,   115200, 0x1b0c320e
+0,   3800,   3800,0,   115200, 0x3a493c8e
+0,   3866,   3866,0,   115200, 0xebe445ec
+0,   3933,   3933,0,   115200, 0xd2c54c8c
+0,   4000,   4000,0,   115200, 0x4aa15593
+0,   4066,   4066,0,   115200, 0x19a35cc1
+0,   4133,   4133,0,   115200, 0x968c6ee7
+0,   4200,   4200,0,   115200, 0x9f7c7808
+0,   4266,   4266,0,   115200, 0xa23980ee
+0,   4333,   4333,0,   115200, 0xcf3089c3
+0,   4400,   4400,0,   115200, 0x43f78d5c
+0,   4466,   4466,0,   115200, 0x43caa1d4
+0,   4533,   4533,0,   115200, 0x025594c3
+0,   4600,   4600,0,   115200, 0x5ec8a11c
+0,   4666,   4666,0,   115200, 0x7f2a959b
+0,   4733,   4733,0,   115200, 0xc602852d
+0,   4800,   4800,0,   115200, 0x67737ef5
+0,   4866,   4866,0,   115200, 0x81e06efe
+0,   4933,   4933,0,   115200, 0xdb0a484f
+0,   5000,   5000,0,   115200, 0xf30e4418
+0,   5066,   5066,0,   115200, 0xbdd1310d
+0,   5133,   5133,0,   115200, 0x0d2a58ca
+0,   5200,   5200,0,   115200, 0xa428b4ba
+0,   5266,   5266,0,   115200, 0x4b850596
+0,   5333,   5333,0,   115200, 0x38d3ecc0
+0,   5400,   5400,0,   115200, 0x6bb0ed23
+0,   5466,   5466,0,   115200, 0xb56eedaf
+0,   5533,   5533,0,   115200, 0xde81f828
+0,   5600,   5600,0,   115200, 0x334abf89
+0,   5666,   5666,0,   115200, 0x8e8ebd78
+0,   5733,   5733,0,   115200, 0x96ba99c8
+0,   5800,   5800,0,   115200, 0x2c8e0abd
+0,   5866,   5866,  

[FFmpeg-cvslog] intrax8: Keep a reference to the decoder blocks

2016-05-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 01:57:47 2016 -0500| [9fa888c02801fff2e8817c24068f5296bbe6] | 
committer: Vittorio Giovara

intrax8: Keep a reference to the decoder blocks

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9fa888c02801fff2e8817c24068f5296bbe6
---

 libavcodec/intrax8.c |   31 ---
 libavcodec/intrax8.h |6 ++
 libavcodec/vc1dec.c  |1 +
 libavcodec/wmv2dec.c |1 +
 4 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 209b857..3bd8807 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -480,9 +480,8 @@ static void x8_get_prediction(IntraX8Context *const w)
 static void x8_ac_compensation(IntraX8Context *const w, const int direction,
const int dc_level)
 {
-MpegEncContext *const s = w->s;
 int t;
-#define B(x, y) s->block[0][w->idsp.idct_permutation[(x) + (y) * 8]]
+#define B(x, y) w->block[0][w->idsp.idct_permutation[(x) + (y) * 8]]
 #define T(x)  ((x) * dc_level + 0x8000) >> 16;
 switch (direction) {
 case 0:
@@ -526,7 +525,7 @@ static void x8_ac_compensation(IntraX8Context *const w, 
const int direction,
 t= T(1084); // g
 B(1, 1) += t;
 
-s->block_last_index[0] = FFMAX(s->block_last_index[0], 7 * 8);
+w->block_last_index[0] = FFMAX(w->block_last_index[0], 7 * 8);
 break;
 case 1:
 B(0, 1) -= T(6269);
@@ -534,7 +533,7 @@ static void x8_ac_compensation(IntraX8Context *const w, 
const int direction,
 B(0, 5) -= T(172);
 B(0, 7) -= T(73);
 
-s->block_last_index[0] = FFMAX(s->block_last_index[0], 7 * 8);
+w->block_last_index[0] = FFMAX(w->block_last_index[0], 7 * 8);
 break;
 case 2:
 B(1, 0) -= T(6269);
@@ -542,7 +541,7 @@ static void x8_ac_compensation(IntraX8Context *const w, 
const int direction,
 B(5, 0) -= T(172);
 B(7, 0) -= T(73);
 
-s->block_last_index[0] = FFMAX(s->block_last_index[0], 7);
+w->block_last_index[0] = FFMAX(w->block_last_index[0], 7);
 break;
 }
 #undef B
@@ -572,8 +571,6 @@ static const int16_t quant_table[64] = {
 
 static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma)
 {
-MpegEncContext *const s = w->s;
-
 uint8_t *scantable;
 int final, run, level;
 int ac_mode, dc_mode, est_run, dc_level;
@@ -583,7 +580,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 int sign;
 
 assert(w->orient < 12);
-w->bdsp.clear_block(s->block[0]);
+w->bdsp.clear_block(w->block[0]);
 
 if (chroma)
 dc_mode = 2;
@@ -644,12 +641,12 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 if (use_quant_matrix)
 level = (level * quant_table[pos]) >> 8;
 
-s->block[0][scantable[pos]] = level;
+w->block[0][scantable[pos]] = level;
 } while (!final);
 
-s->block_last_index[0] = pos;
+w->block_last_index[0] = pos;
 } else { // DC only
-s->block_last_index[0] = 0;
+w->block_last_index[0] = 0;
 if (w->flat_dc && ((unsigned) (dc_level + 1)) < 3) { // [-1; 1]
 int32_t divide_quant = !chroma ? w->divide_quant_dc_luma
: w->divide_quant_dc_chroma;
@@ -669,9 +666,9 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 zeros_only = (dc_level == 0);
 }
 if (!chroma)
-s->block[0][0] = dc_level * w->quant;
+w->block[0][0] = dc_level * w->quant;
 else
-s->block[0][0] = dc_level * w->quant_dc_chroma;
+w->block[0][0] = dc_level * w->quant_dc_chroma;
 
 // there is !zero_only check in the original, but dc_level check is enough
 if ((unsigned int) (dc_level + 1) >= 3 && (w->edges & 3) != 3) {
@@ -681,7 +678,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 direction = (0x6A017C >> (w->orient * 2)) & 3;
 if (direction != 3) {
 // modify block_last[]
-x8_ac_compensation(w, direction, s->block[0][0]);
+x8_ac_compensation(w, direction, w->block[0][0]);
 }
 }
 
@@ -696,7 +693,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, 
const int chroma)
 if (!zeros_only)
 w->idsp.idct_add(w->dest[chroma],
  w->frame->linesize[!!chroma],
- s->block[0]);
+ w->block[0]);
 
 block_placed:
 if (!chroma)
@@ -735,6 +732,8 @@ static void x8_init_block_index(IntraX8Context *w, AVFrame 
*frame)
 
 av_cold int ff_intrax8_common_init(AVCodecCon

[FFmpeg-cvslog] intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture

2016-05-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Fri 
Feb 26 00:04:36 2016 -0500| [b1268e0f032a3af3912fe3fb8d3855e12d7ea83b] | 
committer: Vittorio Giovara

intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture

These values need to be updated with the last macroblock position,
so keep them as pointers.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b1268e0f032a3af3912fe3fb8d3855e12d7ea83b
---

 libavcodec/intrax8.c   |   65 
 libavcodec/intrax8.h   |4 ++-
 libavcodec/vc1_block.c |3 ++-
 libavcodec/wmv2dec.c   |3 ++-
 4 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index a0be10c..b4cac16 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -384,9 +384,7 @@ static int x8_setup_spatial_predictor(IntraX8Context *const 
w, const int chroma)
 static void x8_update_predictions(IntraX8Context *const w, const int orient,
   const int est_run)
 {
-MpegEncContext *const s = w->s;
-
-w->prediction_table[s->mb_x * 2 + (s->mb_y & 1)] = (est_run << 2) + 1 * 
(orient == 4) + 2 * (orient == 8);
+w->prediction_table[w->mb_x * 2 + (w->mb_y & 1)] = (est_run << 2) + 1 * 
(orient == 4) + 2 * (orient == 8);
 /*
  * y = 2n + 0 -> // 0 2 4
  * y = 2n + 1 -> // 1 3 5
@@ -395,11 +393,9 @@ static void x8_update_predictions(IntraX8Context *const w, 
const int orient,
 
 static void x8_get_prediction_chroma(IntraX8Context *const w)
 {
-MpegEncContext *const s = w->s;
-
-w->edges  = 1 * (!(s->mb_x >> 1));
-w->edges |= 2 * (!(s->mb_y >> 1));
-w->edges |= 4 * (s->mb_x >= (2 * w->mb_width - 1)); // mb_x for chroma 
would always be odd
+w->edges  = 1 * (!(w->mb_x >> 1));
+w->edges |= 2 * (!(w->mb_y >> 1));
+w->edges |= 4 * (w->mb_x >= (2 * w->mb_width - 1)); // mb_x for chroma 
would always be odd
 
 w->raw_orient = 0;
 // lut_co[8] = {inv,4,8,8, inv,4,8,8} <- => {1,1,0,0;1,1,0,0} => 0xCC
@@ -408,29 +404,28 @@ static void x8_get_prediction_chroma(IntraX8Context 
*const w)
 return;
 }
 // block[x - 1][y | 1 - 1)]
-w->chroma_orient = (w->prediction_table[2 * s->mb_x - 2] & 0x03) << 2;
+w->chroma_orient = (w->prediction_table[2 * w->mb_x - 2] & 0x03) << 2;
 }
 
 static void x8_get_prediction(IntraX8Context *const w)
 {
-MpegEncContext *const s = w->s;
 int a, b, c, i;
 
-w->edges  = 1 * (!s->mb_x);
-w->edges |= 2 * (!s->mb_y);
-w->edges |= 4 * (s->mb_x >= (2 * w->mb_width - 1));
+w->edges  = 1 * (!w->mb_x);
+w->edges |= 2 * (!w->mb_y);
+w->edges |= 4 * (w->mb_x >= (2 * w->mb_width - 1));
 
 switch (w->edges & 3) {
 case 0:
 break;
 case 1:
 // take the one from the above block[0][y - 1]
-w->est_run = w->prediction_table[!(s->mb_y & 1)] >> 2;
+w->est_run = w->prediction_table[!(w->mb_y & 1)] >> 2;
 w->orient  = 1;
 return;
 case 2:
 // take the one from the previous block[x - 1][0]
-w->est_run = w->prediction_table[2 * s->mb_x - 2] >> 2;
+w->est_run = w->prediction_table[2 * w->mb_x - 2] >> 2;
 w->orient  = 2;
 return;
 case 3:
@@ -439,15 +434,15 @@ static void x8_get_prediction(IntraX8Context *const w)
 return;
 }
 // no edge cases
-b = w->prediction_table[2 * s->mb_x + !(s->mb_y & 1)]; // block[x
][y - 1]
-a = w->prediction_table[2 * s->mb_x - 2 +  (s->mb_y & 1)]; // block[x - 
1][y]
-c = w->prediction_table[2 * s->mb_x - 2 + !(s->mb_y & 1)]; // block[x - 
1][y - 1]
+b = w->prediction_table[2 * w->mb_x + !(w->mb_y & 1)]; // block[x
][y - 1]
+a = w->prediction_table[2 * w->mb_x - 2 +  (w->mb_y & 1)]; // block[x - 
1][y]
+c = w->prediction_table[2 * w->mb_x - 2 + !(w->mb_y & 1)]; // block[x - 
1][y - 1]
 
 w->est_run = FFMIN(b, a);
 /* This condition has nothing to do with w->edges, even if it looks
  * similar it would trigger if e.g. x = 3; y = 2;
  * I guess somebody wrote something wrong and it became standard. */
-if ((s->mb_x & s->mb_y) != 0)
+if ((w->mb_x & w->mb_y) != 0)
 w->est_run = FFMIN(c, w->est_run);
 w->est_run >>= 2;
 
@@ -720,7 +715,7 @@ block_placed:
 }
 
 // FIXME maybe merge with ff_*
-static void x8_init_block_index(IntraX8Context *w, AVFrame *frame, int mb_y)
+static void x8_init_block_index(IntraX8Context *w, AVFrame *frame)
 {
 // not parent codec linesize as this would be wrong for field pics
 //

[FFmpeg-cvslog] intrax8: Remove mpegvideo dependency

2016-05-07 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Feb 20 02:29:43 2016 -0500| [ca8c7591735c0f80cc29e31e2e92cb10228e14c7] | 
committer: Vittorio Giovara

intrax8: Remove mpegvideo dependency

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca8c7591735c0f80cc29e31e2e92cb10228e14c7
---

 libavcodec/intrax8.c |7 +--
 libavcodec/intrax8.h |   10 +-
 libavcodec/vc1dec.c  |3 +--
 libavcodec/wmv2dec.c |2 +-
 4 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 3d396b8..4d8d5c8 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -24,7 +24,6 @@
 #include "avcodec.h"
 #include "get_bits.h"
 #include "idctdsp.h"
-#include "mpegvideo.h"
 #include "msmpeg4data.h"
 #include "intrax8huf.h"
 #include "intrax8.h"
@@ -734,8 +733,7 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
IntraX8Context *w, IDCTDSPContext *idsp,
int16_t (*block)[64],
int block_last_index[12],
-   int mb_width, int mb_height,
-   MpegEncContext *const s)
+   int mb_width, int mb_height)
 {
 int ret = x8_vlc_init();
 if (ret < 0)
@@ -747,7 +745,6 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
 w->mb_height = mb_height;
 w->block = block;
 w->block_last_index = block_last_index;
-w->s = s;
 
 // two rows, 2 blocks per cannon mb
 w->prediction_table = av_mallocz(w->mb_width * 2 * 2);
@@ -777,9 +774,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, 
Picture *pict,
   int dquant, int quant_offset,
   int loopfilter, int lowdelay)
 {
-MpegEncContext *const s = w->s;
 int mb_xy;
-assert(s);
 
 w->gb = gb;
 w->dquant = dquant;
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index ebc9a79..ad172b1 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -21,7 +21,6 @@
 
 #include "blockdsp.h"
 #include "get_bits.h"
-#include "mpegvideo.h"
 #include "idctdsp.h"
 #include "intrax8dsp.h"
 #include "mpegpicture.h"
@@ -41,7 +40,6 @@ typedef struct IntraX8Context {
 int16_t (*block)[64];
 
 // set by the caller codec
-MpegEncContext *s;
 IntraX8DSPContext dsp;
 IDCTDSPContext idsp;
 BlockDSPContext bdsp;
@@ -75,7 +73,6 @@ typedef struct IntraX8Context {
 
 /**
  * Initialize IntraX8 frame decoder.
- * Requires valid MpegEncContext with valid s->mb_width before calling.
  * @param avctx pointer to AVCodecContext
  * @param w pointer to IntraX8Context
  * @param idsp pointer to IDCTDSPContext
@@ -83,15 +80,13 @@ typedef struct IntraX8Context {
  * @param block_last_index pointer to index array
  * @param mb_width macroblock width
  * @param mb_height macroblock height
- * @param s pointer to MpegEncContext of the parent codec
  * @return 0 on success, a negative AVERROR value on error
  */
 int ff_intrax8_common_init(AVCodecContext *avctx,
IntraX8Context *w, IDCTDSPContext *idsp,
int16_t (*block)[64],
int block_last_index[12],
-   int mb_width, int mb_height,
-   MpegEncContext *const s);
+   int mb_width, int mb_height);
 
 /**
  * Destroy IntraX8 frame structure.
@@ -101,9 +96,6 @@ void ff_intrax8_common_end(IntraX8Context *w);
 
 /**
  * Decode single IntraX8 frame.
- * The parent codec must call ff_mpv_frame_start() before calling this 
function.
- * The parent codec must call ff_mpv_frame_end() after calling this function.
- * This function does not use ff_mpv_decode_mb().
  * @param w pointer to IntraX8Context
  * @param pict the output Picture containing an AVFrame
  * @param gb open bitstream reader
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index f72b6c6..d1ac5c3 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -381,8 +381,7 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
 
 ret = ff_intrax8_common_init(s->avctx, &v->x8, &s->idsp,
  s->block, s->block_last_index,
- s->mb_width, s->mb_height,
- s);
+ s->mb_width, s->mb_height);
 if (ret < 0)
 goto error;
 
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index f01a743..e1f86d8 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -476,7 +476,7 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
 
 return ff_intrax8_common_init(avctx, &w->

[FFmpeg-cvslog] rscc: Add extended pixel format support

2016-05-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Mar 29 20:04:07 2016 +0200| [51dc4de1218a81ee8e5b3f941839c5e3125a6d4b] | 
committer: Vittorio Giovara

rscc: Add extended pixel format support

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51dc4de1218a81ee8e5b3f941839c5e3125a6d4b
---

 libavcodec/rscc.c |   45 +
 1 file changed, 37 insertions(+), 8 deletions(-)

diff --git a/libavcodec/rscc.c b/libavcodec/rscc.c
index c54482f..4a91783 100644
--- a/libavcodec/rscc.c
+++ b/libavcodec/rscc.c
@@ -31,7 +31,7 @@
  * and it can be deflated or not. Similarly, pixel data comes after the header
  * and a variable size value, and it can be deflated or just raw.
  *
- * Supports: BGRA
+ * Supports: BGRA, BGR24, RGB555, RGB8
  */
 
 #include 
@@ -57,6 +57,7 @@ typedef struct RsccContext {
 AVFrame *reference;
 Tile *tiles;
 unsigned int tiles_size;
+int component_size;
 
 /* zlib interaction */
 uint8_t *inflated_buf;
@@ -80,10 +81,37 @@ static av_cold int rscc_init(AVCodecContext *avctx)
 if (!ctx->reference)
 return AVERROR(ENOMEM);
 
-avctx->pix_fmt = AV_PIX_FMT_BGRA;
+/* Get pixel format and the size of the pixel */
+if (avctx->codec_tag == MKTAG('I', 'S', 'C', 'C')) {
+avctx->pix_fmt = AV_PIX_FMT_BGRA;
+ctx->component_size = 4;
+} else if (avctx->codec_tag == MKTAG('R', 'S', 'C', 'C')) {
+ctx->component_size = avctx->bits_per_coded_sample / 8;
+switch (avctx->bits_per_coded_sample) {
+case 8:
+avpriv_report_missing_feature(avctx, "8 bits per pixel");
+return AVERROR_PATCHWELCOME;
+case 16:
+avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
+break;
+case 24:
+avctx->pix_fmt = AV_PIX_FMT_BGR24;
+break;
+case 32:
+avctx->pix_fmt = AV_PIX_FMT_BGRA;
+break;
+default:
+av_log(avctx, AV_LOG_ERROR, "Invalid bits per pixel value (%d)\n",
+   avctx->bits_per_coded_sample);
+return AVERROR_INVALIDDATA;
+}
+} else {
+av_log(avctx, AV_LOG_ERROR, "Invalid codec tag\n");
+return AVERROR_INVALIDDATA;
+}
 
 /* Store the value to check for keyframes */
-ctx->inflated_size = avctx->width * avctx->height * 4;
+ctx->inflated_size = avctx->width * avctx->height * ctx->component_size;
 
 /* Allocate maximum size possible, a full frame */
 ctx->inflated_buf = av_malloc(ctx->inflated_size);
@@ -180,7 +208,7 @@ static int rscc_decode_frame(AVCodecContext *avctx, void 
*data,
 ctx->tiles[i].y = bytestream2_get_le16(gbc);
 ctx->tiles[i].h = bytestream2_get_le16(gbc);
 
-pixel_size += ctx->tiles[i].w * ctx->tiles[i].h * 4;
+pixel_size += ctx->tiles[i].w * ctx->tiles[i].h * ctx->component_size;
 
 ff_dlog(avctx, "tile %d orig(%d,%d) %dx%d.\n", i,
 ctx->tiles[i].x, ctx->tiles[i].y,
@@ -243,11 +271,12 @@ static int rscc_decode_frame(AVCodecContext *avctx, void 
*data,
 for (i = 0; i < tiles_nb; i++) {
 uint8_t *dst = ctx->reference->data[0] + ctx->reference->linesize[0] *
(avctx->height - ctx->tiles[i].y - 1) +
-   ctx->tiles[i].x * 4;
+   ctx->tiles[i].x * ctx->component_size;
 av_image_copy_plane(dst, -1 * ctx->reference->linesize[0],
-raw, ctx->tiles[i].w * 4,
-ctx->tiles[i].w * 4, ctx->tiles[i].h);
-raw += ctx->tiles[i].w * 4 * ctx->tiles[i].h;
+raw, ctx->tiles[i].w * ctx->component_size,
+ctx->tiles[i].w * ctx->component_size,
+ctx->tiles[i].h);
+raw += ctx->tiles[i].w * ctx->component_size * ctx->tiles[i].h;
 }
 
 /* Frame is ready to be output */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] fate: Update RSCC tests

2016-05-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Mar 29 20:04:08 2016 +0200| [b5f47d95c6cb8ffa9982eb8fd3e9ab5c9f97e914] | 
committer: Vittorio Giovara

fate: Update RSCC tests

The current sample comes from an older version of the codec, which
supports a single output mode, so rename it accordingly.
Add tests for the new pixel formats.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5f47d95c6cb8ffa9982eb8fd3e9ab5c9f97e914
---

 tests/fate/screen.mak |   16 ++--
 tests/ref/fate/{rscc => iscc} |0
 tests/ref/fate/rscc-16bit |   16 
 tests/ref/fate/rscc-24bit |2 ++
 tests/ref/fate/rscc-32bit |9 +
 5 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/tests/fate/screen.mak b/tests/fate/screen.mak
index 82d4861..7a87dd2 100644
--- a/tests/fate/screen.mak
+++ b/tests/fate/screen.mak
@@ -41,8 +41,20 @@ fate-g2m4: CMD = framecrc -idct simple -i 
$(TARGET_SAMPLES)/g2m/g2m4.asf
 FATE_SAMPLES_AVCONV-$(call DEMDEC, ASF, G2M) += $(FATE_G2M)
 fate-g2m: $(FATE_G2M)
 
-FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, RSCC) += fate-rscc
-fate-rscc: CMD = framecrc -i $(TARGET_SAMPLES)/rscc/pip.avi -an
+FATE_RSCC += fate-iscc
+fate-iscc: CMD = framecrc -i $(TARGET_SAMPLES)/rscc/pip.avi -an
+
+FATE_RSCC += fate-rscc-16bit
+fate-rscc-16bit: CMD = framecrc -i $(TARGET_SAMPLES)/rscc/16bpp_555.avi -an
+
+FATE_RSCC += fate-rscc-24bit
+fate-rscc-24bit: CMD = framecrc -i $(TARGET_SAMPLES)/rscc/24bpp.avi -an
+
+FATE_RSCC += fate-rscc-32bit
+fate-rscc-32bit: CMD = framecrc -i $(TARGET_SAMPLES)/rscc/32bpp.avi -an
+
+FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, RSCC) += $(FATE_RSCC)
+fate-rscc: $(FATE_RSCC)
 
 FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, SCREENPRESSO) += fate-screenpresso
 fate-screenpresso: CMD = framecrc -i $(TARGET_SAMPLES)/spv1/bunny.avi
diff --git a/tests/ref/fate/rscc b/tests/ref/fate/iscc
similarity index 100%
rename from tests/ref/fate/rscc
rename to tests/ref/fate/iscc
diff --git a/tests/ref/fate/rscc-16bit b/tests/ref/fate/rscc-16bit
new file mode 100644
index 000..85d5494
--- /dev/null
+++ b/tests/ref/fate/rscc-16bit
@@ -0,0 +1,16 @@
+#tb 0: 100/2397
+0,  0,  0,1,   153600, 0x33759daf
+0,  1,  1,1,   153600, 0x43e0c910
+0,  2,  2,1,   153600, 0x6c75a8f0
+0,  3,  3,1,   153600, 0xaace1255
+0,  4,  4,1,   153600, 0x42d3f439
+0,  5,  5,1,   153600, 0xb225b396
+0,  6,  6,1,   153600, 0xa615221c
+0,  7,  7,1,   153600, 0x5401f5a9
+0,  8,  8,1,   153600, 0xd274cef3
+0,  9,  9,1,   153600, 0x7935f992
+0, 10, 10,1,   153600, 0x7669e7c6
+0, 11, 11,1,   153600, 0x527bd6a1
+0, 12, 12,1,   153600, 0x0f33b2ed
+0, 13, 13,1,   153600, 0xe62ddb32
+0, 14, 14,1,   153600, 0x81541aa2
diff --git a/tests/ref/fate/rscc-24bit b/tests/ref/fate/rscc-24bit
new file mode 100644
index 000..e38702c
--- /dev/null
+++ b/tests/ref/fate/rscc-24bit
@@ -0,0 +1,2 @@
+#tb 0: 100/2997
+0,  0,  0,1,  1229760, 0x9c99ba99
diff --git a/tests/ref/fate/rscc-32bit b/tests/ref/fate/rscc-32bit
new file mode 100644
index 000..a443186
--- /dev/null
+++ b/tests/ref/fate/rscc-32bit
@@ -0,0 +1,9 @@
+#tb 0: 100/2397
+0,  0,  0,1,   307200, 0xe36c2c38
+0,  1,  1,1,   307200, 0xa2e3476b
+0,  2,  2,1,   307200, 0x65167c95
+0,  3,  3,1,   307200, 0x6acd02ac
+0,  4,  4,1,   307200, 0x37935e0b
+0,  5,  5,1,   307200, 0x8e6918bc
+0,  6,  6,1,   307200, 0x0a246578
+0,  7,  7,1,   307200, 0x9c1a2f4c

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] screenpresso: Correctly handle keyframes

2016-05-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Mar 29 20:30:48 2016 +0200| [ec8a69fab657f9cce624e8b0f4069d12696890bf] | 
committer: Vittorio Giovara

screenpresso: Correctly handle keyframes

The first byte contains compression level together with keyframe status.
When a frame is not interpreted correctly, its data is summed to the
reference, and would degrade over time, producing an incorrect result.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec8a69fab657f9cce624e8b0f4069d12696890bf
---

 libavcodec/screenpresso.c |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/screenpresso.c b/libavcodec/screenpresso.c
index 41d1755..819bd60 100644
--- a/libavcodec/screenpresso.c
+++ b/libavcodec/screenpresso.c
@@ -115,10 +115,9 @@ static int screenpresso_decode_frame(AVCodecContext 
*avctx, void *data,
 return AVERROR_INVALIDDATA;
 }
 
-/* Basic sanity check, but not really harmful */
-if (avpkt->data[0] != 0x73 && avpkt->data[0] != 0x72)
-av_log(avctx, AV_LOG_WARNING, "Unknown header 0x%02X\n", 
avpkt->data[0]);
-keyframe = (avpkt->data[0] == 0x73);
+/* Compression level (4 bits) and keyframe information (1 bit) */
+av_log(avctx, AV_LOG_DEBUG, "Compression level %d\n", avpkt->data[0] >> 4);
+keyframe = avpkt->data[0] & 1;
 
 /* Pixel size */
 component_size = ((avpkt->data[1] >> 2) & 0x03) + 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] screenpresso: Add extended pixel format support

2016-05-08 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Tue 
Mar 29 20:30:47 2016 +0200| [95db8c757cb003a71b040b567f38be74151deb5c] | 
committer: Vittorio Giovara

screenpresso: Add extended pixel format support

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95db8c757cb003a71b040b567f38be74151deb5c
---

 libavcodec/screenpresso.c |   46 ++---
 1 file changed, 31 insertions(+), 15 deletions(-)

diff --git a/libavcodec/screenpresso.c b/libavcodec/screenpresso.c
index 88a927b..41d1755 100644
--- a/libavcodec/screenpresso.c
+++ b/libavcodec/screenpresso.c
@@ -30,7 +30,7 @@
  * rebuilt frame (not the reference), and since there is no coordinate system
  * they contain exactly as many pixel as the keyframe.
  *
- * Supports: BGR24
+ * Supports: BGRA, BGR24, RGB555
  */
 
 #include 
@@ -79,10 +79,8 @@ static av_cold int screenpresso_init(AVCodecContext *avctx)
 if (!ctx->current)
 return AVERROR(ENOMEM);
 
-avctx->pix_fmt = AV_PIX_FMT_BGR24;
-
-/* Allocate maximum size possible, a full frame */
-ctx->inflated_size = avctx->width * avctx->height * 3;
+/* Allocate maximum size possible, a full RGBA frame */
+ctx->inflated_size = avctx->width * avctx->height * 4;
 ctx->inflated_buf  = av_malloc(ctx->inflated_size);
 if (!ctx->inflated_buf)
 return AVERROR(ENOMEM);
@@ -108,7 +106,7 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, 
void *data,
 ScreenpressoContext *ctx = avctx->priv_data;
 AVFrame *frame = data;
 uLongf length = ctx->inflated_size;
-int keyframe;
+int keyframe, component_size, src_linesize;
 int ret;
 
 /* Size check */
@@ -118,13 +116,28 @@ static int screenpresso_decode_frame(AVCodecContext 
*avctx, void *data,
 }
 
 /* Basic sanity check, but not really harmful */
-if ((avpkt->data[0] != 0x73 && avpkt->data[0] != 0x72) ||
-avpkt->data[1] != 8) { // bpp probably
-av_log(avctx, AV_LOG_WARNING, "Unknown header 0x%02X%02X\n",
-   avpkt->data[0], avpkt->data[1]);
-}
+if (avpkt->data[0] != 0x73 && avpkt->data[0] != 0x72)
+av_log(avctx, AV_LOG_WARNING, "Unknown header 0x%02X\n", 
avpkt->data[0]);
 keyframe = (avpkt->data[0] == 0x73);
 
+/* Pixel size */
+component_size = ((avpkt->data[1] >> 2) & 0x03) + 1;
+switch (component_size) {
+case 2:
+avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
+break;
+case 3:
+avctx->pix_fmt = AV_PIX_FMT_BGR24;
+break;
+case 4:
+avctx->pix_fmt = AV_PIX_FMT_BGRA;
+break;
+default:
+av_log(avctx, AV_LOG_ERROR, "Invalid bits per pixel value (%d)\n",
+   component_size);
+return AVERROR_INVALIDDATA;
+}
+
 /* Inflate the frame after the 2 byte header */
 ret = uncompress(ctx->inflated_buf, &length,
  avpkt->data + 2, avpkt->size - 2);
@@ -137,18 +150,21 @@ static int screenpresso_decode_frame(AVCodecContext 
*avctx, void *data,
 if (ret < 0)
 return ret;
 
+/* Codec has aligned strides */
+src_linesize = FFALIGN(avctx->width * component_size, 4);
+
 /* When a keyframe is found, copy it (flipped) */
 if (keyframe)
 av_image_copy_plane(ctx->current->data[0] +
 ctx->current->linesize[0] * (avctx->height - 1),
 -1 * ctx->current->linesize[0],
-ctx->inflated_buf, avctx->width * 3,
-avctx->width * 3, avctx->height);
+ctx->inflated_buf, src_linesize,
+avctx->width * component_size, avctx->height);
 /* Otherwise sum the delta on top of the current frame */
 else
 sum_delta_flipped(ctx->current->data[0], ctx->current->linesize[0],
-  ctx->inflated_buf, avctx->width * 3,
-  avctx->width * 3, avctx->height);
+  ctx->inflated_buf, src_linesize,
+  avctx->width * component_size, avctx->height);
 
 /* Frame is ready to be output */
 ret = av_frame_ref(frame, ctx->current);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


  1   2   3   4   5   6   7   8   9   10   >