From: Bernd Kuhls Date: Wed, 8 Apr 2015 20:43:59 +0000 (+0200) Subject: package/ffmpeg: Re-number patch 0014 to 0015 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a2816b877f66269ffe92c7d24efa099e8efe948;p=buildroot.git package/ffmpeg: Re-number patch 0014 to 0015 Got it wrong in http://git.buildroot.net/buildroot/commit/?id=032e2beedfe7f503f0686470ae930d4c8b41b780 Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- diff --git a/package/ffmpeg/0014-hevc-avoid-unnecessary-calls.patch b/package/ffmpeg/0014-hevc-avoid-unnecessary-calls.patch deleted file mode 100644 index 4e6050d5ab..0000000000 --- a/package/ffmpeg/0014-hevc-avoid-unnecessary-calls.patch +++ /dev/null @@ -1,72 +0,0 @@ -From ef86b05da8ad38c9c83e6f075536635647e6b799 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Thu, 12 Mar 2015 12:49:48 +0100 -Subject: [PATCH] hevc: avoid unnecessary calls to get_format - -Patch part of the XBMC patch set for ffmpeg, downloaded from -https://github.com/xbmc/FFmpeg/. - -Upstream status: committed to master -http://git.videolan.org/?p=ffmpeg.git;a=commit;h=786032cad8ecabe577d9cff0356da6e9e9488a2d - -Signed-off-by: Bernd Kuhls ---- - libavcodec/hevc.c | 23 ++++++++++++++--------- - 1 file changed, 14 insertions(+), 9 deletions(-) - -diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c -index b7ad29a..77b0c0c 100644 ---- a/libavcodec/hevc.c -+++ b/libavcodec/hevc.c -@@ -280,7 +280,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb) - return 0; - } - --static int set_sps(HEVCContext *s, const HEVCSPS *sps) -+static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fmt) - { - #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL) - enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts; -@@ -304,13 +304,18 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps) - #endif - } - -- *fmt++ = sps->pix_fmt; -- *fmt = AV_PIX_FMT_NONE; -+ if (pix_fmt == AV_PIX_FMT_NONE) { -+ *fmt++ = sps->pix_fmt; -+ *fmt = AV_PIX_FMT_NONE; - -- ret = ff_thread_get_format(s->avctx, pix_fmts); -- if (ret < 0) -- goto fail; -- s->avctx->pix_fmt = ret; -+ ret = ff_thread_get_format(s->avctx, pix_fmts); -+ if (ret < 0) -+ goto fail; -+ s->avctx->pix_fmt = ret; -+ } -+ else { -+ s->avctx->pix_fmt = pix_fmt; -+ } - - ff_set_sar(s->avctx, sps->vui.sar); - -@@ -420,7 +425,7 @@ static int hls_slice_header(HEVCContext *s) - sh->no_output_of_prior_pics_flag = 0; - } - ff_hevc_clear_refs(s); -- ret = set_sps(s, s->sps); -+ ret = set_sps(s, s->sps, AV_PIX_FMT_NONE); - if (ret < 0) - return ret; - -@@ -3335,7 +3340,7 @@ static int hevc_update_thread_context(AVCodecContext *dst, - } - - if (s->sps != s0->sps) -- if ((ret = set_sps(s, s0->sps)) < 0) -+ if ((ret = set_sps(s, s0->sps, src->pix_fmt)) < 0) - return ret; - - s->seq_decode = s0->seq_decode; diff --git a/package/ffmpeg/0015-hevc-avoid-unnecessary-calls.patch b/package/ffmpeg/0015-hevc-avoid-unnecessary-calls.patch new file mode 100644 index 0000000000..4e6050d5ab --- /dev/null +++ b/package/ffmpeg/0015-hevc-avoid-unnecessary-calls.patch @@ -0,0 +1,72 @@ +From ef86b05da8ad38c9c83e6f075536635647e6b799 Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Thu, 12 Mar 2015 12:49:48 +0100 +Subject: [PATCH] hevc: avoid unnecessary calls to get_format + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Upstream status: committed to master +http://git.videolan.org/?p=ffmpeg.git;a=commit;h=786032cad8ecabe577d9cff0356da6e9e9488a2d + +Signed-off-by: Bernd Kuhls +--- + libavcodec/hevc.c | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c +index b7ad29a..77b0c0c 100644 +--- a/libavcodec/hevc.c ++++ b/libavcodec/hevc.c +@@ -280,7 +280,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb) + return 0; + } + +-static int set_sps(HEVCContext *s, const HEVCSPS *sps) ++static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fmt) + { + #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL) + enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts; +@@ -304,13 +304,18 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps) + #endif + } + +- *fmt++ = sps->pix_fmt; +- *fmt = AV_PIX_FMT_NONE; ++ if (pix_fmt == AV_PIX_FMT_NONE) { ++ *fmt++ = sps->pix_fmt; ++ *fmt = AV_PIX_FMT_NONE; + +- ret = ff_thread_get_format(s->avctx, pix_fmts); +- if (ret < 0) +- goto fail; +- s->avctx->pix_fmt = ret; ++ ret = ff_thread_get_format(s->avctx, pix_fmts); ++ if (ret < 0) ++ goto fail; ++ s->avctx->pix_fmt = ret; ++ } ++ else { ++ s->avctx->pix_fmt = pix_fmt; ++ } + + ff_set_sar(s->avctx, sps->vui.sar); + +@@ -420,7 +425,7 @@ static int hls_slice_header(HEVCContext *s) + sh->no_output_of_prior_pics_flag = 0; + } + ff_hevc_clear_refs(s); +- ret = set_sps(s, s->sps); ++ ret = set_sps(s, s->sps, AV_PIX_FMT_NONE); + if (ret < 0) + return ret; + +@@ -3335,7 +3340,7 @@ static int hevc_update_thread_context(AVCodecContext *dst, + } + + if (s->sps != s0->sps) +- if ((ret = set_sps(s, s0->sps)) < 0) ++ if ((ret = set_sps(s, s0->sps, src->pix_fmt)) < 0) + return ret; + + s->seq_decode = s0->seq_decode;