+++ /dev/null
-From 6a9e2bf65a346a43caff06efbf6051318d11aa8e Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <berndkuhls@hotmail.com>
-Date: Sat, 19 Mar 2016 08:49:43 +0100
-Subject: [PATCH] [Jarvis] partly backport of PR 9231 to fix segfault
-
-This patch is a backport of
-https://github.com/xbmc/xbmc/commit/a81208e3b53b84763fb9f20d8642ffc7bc63c9a7
-to fix a segfault during playback of vaapi-accelerated mpeg2 content:
-
-terminate called after throwing an instance of 'std::logic_error'
- what(): basic_string::_S_construct null not valid
-[New LWP 3743]
-
-Program received signal SIGABRT, Aborted.
-[Switching to LWP 3743]
-0xb5664a9b in raise () from /lib/libc.so.0
-(gdb) bt full
-#0 0xb5664a9b in raise () from /lib/libc.so.0
-No symbol table info available.
-#1 0xb5660520 in abort () from /lib/libc.so.0
-No symbol table info available.
-#2 0xb56e6536 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
-No symbol table info available.
-#3 0xb56e4a1c in ?? () from /usr/lib/libstdc++.so.6
-No symbol table info available.
-#4 0xb56e4a80 in std::terminate() () from /usr/lib/libstdc++.so.6
-No symbol table info available.
-#5 0xb56e4cc9 in __cxa_throw () from /usr/lib/libstdc++.so.6
-No symbol table info available.
-#6 0xb5719d79 in std::__throw_logic_error(char const*) () from /usr/lib/libstdc++.so.6
-No symbol table info available.
-#7 0xb5722c41 in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) () from /usr/lib/libstdc++.so.6
-No symbol table info available.
-#8 0xb5722cc7 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /usr/lib/libstdc++.so.6
-No symbol table info available.
-#9 0x0848fea3 in CDVDVideoCodec::IsCodecDisabled (map=0x9130420 <g_vaapi_available>, size=5, id=AV_CODEC_ID_MPEG4)
- at DVDVideoCodec.cpp:75
- index = <optimized out>
-#10 0x08499d04 in VAAPI::CDecoder::Open (this=0xd09e5e8, avctx=0xd6a2ec0, mainctx=0xd6a2ec0, fmt=AV_PIX_FMT_VAAPI_VLD,
- surfaces=6) at VAAPI.cpp:503
- gpuvendor = {static npos = <optimized out>,
- _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xceb267c "intel open source technology center"}}
- profile = <optimized out>
-#11 0x08491bda in CDVDVideoCodecFFmpeg::GetFormat (avctx=0xd6a2ec0, fmt=0x986d9c0) at DVDVideoCodecFFmpeg.cpp:143
- dec = 0xd09e5e8
- ctx = <optimized out>
- cur = 0x986d9c0
-#12 0xb61c8ced in ?? () from /usr/lib/libavcodec.so.56
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-Patch sent upstream: https://github.com/xbmc/xbmc/pull/9388
----
- .../cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.cpp | 18 +++++++-----------
- xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 9 ++-------
- xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 19 ++++++++-----------
- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 19 ++++++++-----------
- 4 files changed, 25 insertions(+), 40 deletions(-)
-
-diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.cpp
-index 2428696..43e8844 100644
---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.cpp
-+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.cpp
-@@ -60,19 +60,15 @@ bool CDVDVideoCodec::IsSettingVisible(const std::string &condition, const std::s
- return true;
- }
-
--bool CDVDVideoCodec::IsCodecDisabled(DVDCodecAvailableType* map, unsigned int size, AVCodecID id)
-+bool CDVDVideoCodec::IsCodecDisabled(const std::map<AVCodecID, std::string> &map, AVCodecID id)
- {
-- int index = -1;
-- for (unsigned int i = 0; i < size; ++i)
-+ auto codec = map.find(id);
-+ if (codec != map.end())
- {
-- if(map[i].codec == id)
-- {
-- index = (int) i;
-- break;
-- }
-+ return (!CSettings::GetInstance().GetBool(codec->second) ||
-+ !CDVDVideoCodec::IsSettingVisible("unused", "unused",
-+ CSettings::GetInstance().GetSetting(codec->second),
-+ NULL));
- }
-- if(index > -1)
-- return (!CSettings::GetInstance().GetBool(map[index].setting) || !CDVDVideoCodec::IsSettingVisible("unused", "unused", CSettings::GetInstance().GetSetting(map[index].setting), NULL));
--
- return false; //don't disable what we don't have
- }
-diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
-index c84bb70..68ada7d 100644
---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
-+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
-@@ -24,6 +24,7 @@
-
- #include <vector>
- #include <string>
-+#include <map>
- #include "cores/VideoRenderers/RenderFormats.h"
-
-
-@@ -34,12 +35,6 @@ extern "C" {
-
- class CSetting;
-
--struct DVDCodecAvailableType
--{
-- AVCodecID codec;
-- const char* setting;
--};
--
- // when modifying these structures, make sure you update all codecs accordingly
- #define FRAME_TYPE_UNDEF 0
- #define FRAME_TYPE_I 1
-@@ -290,7 +285,7 @@ public:
- /**
- * Interact with user settings so that user disabled codecs are disabled
- */
-- static bool IsCodecDisabled(DVDCodecAvailableType* map, unsigned int size, AVCodecID id);
-+ static bool IsCodecDisabled(const std::map<AVCodecID, std::string> &map, AVCodecID id);
-
- /* For calculation of dropping requirements player asks for some information.
- *
-diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
-index 540f914..ff53dd5 100644
---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
-+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
-@@ -451,16 +451,6 @@ bool CVideoSurfaces::HasRefs()
- // VAAPI
- //-----------------------------------------------------------------------------
-
--// settings codecs mapping
--DVDCodecAvailableType g_vaapi_available[] = {
-- { AV_CODEC_ID_H263, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG4.c_str() },
-- { AV_CODEC_ID_MPEG4, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG4.c_str() },
-- { AV_CODEC_ID_WMV3, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1.c_str() },
-- { AV_CODEC_ID_VC1, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1.c_str() },
-- { AV_CODEC_ID_MPEG2VIDEO, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2.c_str() },
--};
--const size_t settings_count = sizeof(g_vaapi_available) / sizeof(DVDCodecAvailableType);
--
- CDecoder::CDecoder() : m_vaapiOutput(&m_inMsgEvent)
- {
- m_vaapiConfig.videoSurfaces = &m_videoSurfaces;
-@@ -500,7 +490,14 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum P
- }
-
- // check if user wants to decode this format with VAAPI
-- if (CDVDVideoCodec::IsCodecDisabled(g_vaapi_available, settings_count, avctx->codec_id))
-+ std::map<AVCodecID, std::string> settings_map = {
-+ { AV_CODEC_ID_H263, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG4 },
-+ { AV_CODEC_ID_MPEG4, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG4 },
-+ { AV_CODEC_ID_WMV3, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1 },
-+ { AV_CODEC_ID_VC1, CSettings::SETTING_VIDEOPLAYER_USEVAAPIVC1 },
-+ { AV_CODEC_ID_MPEG2VIDEO, CSettings::SETTING_VIDEOPLAYER_USEVAAPIMPEG2 },
-+ };
-+ if (CDVDVideoCodec::IsCodecDisabled(settings_map, avctx->codec_id))
- return false;
-
- if (g_advancedSettings.CanLogComponent(LOGVIDEO))
-diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
-index 85d9295..4e995b6 100644
---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
-+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
-@@ -45,16 +45,6 @@ using namespace VDPAU;
-
- #define ARSIZE(x) (sizeof(x) / sizeof((x)[0]))
-
--// settings codecs mapping
--DVDCodecAvailableType g_vdpau_available[] = {
-- { AV_CODEC_ID_H263, CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG4.c_str() },
-- { AV_CODEC_ID_MPEG4, CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG4.c_str() },
-- { AV_CODEC_ID_WMV3, CSettings::SETTING_VIDEOPLAYER_USEVDPAUVC1.c_str() },
-- { AV_CODEC_ID_VC1, CSettings::SETTING_VIDEOPLAYER_USEVDPAUVC1.c_str() },
-- { AV_CODEC_ID_MPEG2VIDEO, CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG2.c_str() },
--};
--const size_t settings_count = sizeof(g_vdpau_available) / sizeof(DVDCodecAvailableType);
--
- CDecoder::Desc decoder_profiles[] = {
- {"MPEG1", VDP_DECODER_PROFILE_MPEG1},
- {"MPEG2_SIMPLE", VDP_DECODER_PROFILE_MPEG2_SIMPLE},
-@@ -494,7 +484,14 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum P
- // nvidia is whitelisted despite for mpeg-4 we need to query user settings
- if ((gpuvendor.compare(0, 6, "nvidia") != 0) || (avctx->codec_id == AV_CODEC_ID_MPEG4) || (avctx->codec_id == AV_CODEC_ID_H263))
- {
-- if (CDVDVideoCodec::IsCodecDisabled(g_vdpau_available, settings_count, avctx->codec_id))
-+ std::map<AVCodecID, std::string> settings_map = {
-+ { AV_CODEC_ID_H263, CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG4 },
-+ { AV_CODEC_ID_MPEG4, CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG4 },
-+ { AV_CODEC_ID_WMV3, CSettings::SETTING_VIDEOPLAYER_USEVDPAUVC1 },
-+ { AV_CODEC_ID_VC1, CSettings::SETTING_VIDEOPLAYER_USEVDPAUVC1 },
-+ { AV_CODEC_ID_MPEG2VIDEO, CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG2 },
-+ };
-+ if (CDVDVideoCodec::IsCodecDisabled(settings_map, avctx->codec_id))
- return false;
- }
-
---
-2.7.0
-
--- /dev/null
+From 2b395fb3f07551ae1ce2e484c14ac59f36e192b0 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Thu, 17 Mar 2016 21:47:53 +0100
+Subject: [PATCH] native/TexturePacker: fix compilation with gcc 4.6
+
+Kodi itself depends on gcc >= 4.7 due to its use of the C++11 standard.
+When cross-compiling the host gcc currently also needs to be >= 4.7 due
+to the texturepacker tool being needed as native binary to compile
+Textures.xbt for the target system.
+
+Cross-compiling on a system where host gcc is at version 4.6 fails atm
+with this error:
+
+cc1plus: error: unrecognized command line option '-std=c++11'
+make[4]: *** [md5.o] Error 1
+make[4]: *** Waiting for unfinished jobs....
+cc1plus: error: unrecognized command line option '-std=c++11'
+cc1plus: error: unrecognized command line option '-std=c++11'
+
+make[4]: *** [DecoderManager.o] Error 1
+make[4]: *** [XBTFWriter.o] Error 1
+cc1plus: error: unrecognized command line option '-std=c++11'
+make[4]: *** [TexturePacker.o] Error 1
+cc1plus: error: unrecognized command line option '-std=c++11'
+make[4]: *** [decoder/PNGDecoder.o] Error 1
+make[3]: *** [all] Error 2
+make[2]: *** [native/TexturePacker] Error 2
+
+Using this patch the problem is fixed and a working TexturePacker host
+binary is created.
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+Patch sent upstream: https://github.com/xbmc/xbmc/pull/9378
+---
+ tools/depends/native/TexturePacker/src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/depends/native/TexturePacker/src/Makefile.am b/tools/depends/native/TexturePacker/src/Makefile.am
+index c1fc8be..d075290 100644
+--- a/tools/depends/native/TexturePacker/src/Makefile.am
++++ b/tools/depends/native/TexturePacker/src/Makefile.am
+@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects
+
+ AM_CFLAGS = -DTARGET_POSIX -DUSE_LZO_PACKING
+ AM_CFLAGS += @EXTRA_DEFINES@
+-AM_CXXFLAGS = $(AM_CFLAGS) -std=c++11
++AM_CXXFLAGS = $(AM_CFLAGS) -std=c++0x
+
+ AM_CPPFLAGS = \
+ -I. \
+--
+2.7.0
+
--- /dev/null
+Add support for ffmpeg 3.0
+
+Changes from original commit are only in file paths & quilt refresh.
+
+commit c31b7d374062f87c7512d9872cbceac920465913
+Author: Philip Langdale <philipl@overt.org>
+Date: Mon Sep 21 19:49:36 2015 -0700
+
+ ffmpeg: Update AVPixelFormat and AV_PIX_FMT_* to compile with master
+
+ The deprecated PixelFormat and PIX_FMT_* names have been removed in
+ ffmpeg master.
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+[Downloaded from
+https://gitweb.gentoo.org/repo/gentoo.git/tree/media-tv/kodi/files/kodi-16-ffmpeg3.patch]
+
+Index: xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/FFmpeg.h
++++ xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h
+@@ -24,7 +24,6 @@
+ #include "utils/CPUInfo.h"
+
+ extern "C" {
+-#include "libswscale/swscale.h"
+ #include "libavcodec/avcodec.h"
+ #include "libavformat/avformat.h"
+ #include "libavutil/avutil.h"
+@@ -33,23 +32,6 @@ extern "C" {
+ #include "libpostproc/postprocess.h"
+ }
+
+-inline int SwScaleCPUFlags()
+-{
+- unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures();
+- int flags = 0;
+-
+- if (cpuFeatures & CPU_FEATURE_MMX)
+- flags |= SWS_CPU_CAPS_MMX;
+- if (cpuFeatures & CPU_FEATURE_MMX2)
+- flags |= SWS_CPU_CAPS_MMX2;
+- if (cpuFeatures & CPU_FEATURE_3DNOW)
+- flags |= SWS_CPU_CAPS_3DNOW;
+- if (cpuFeatures & CPU_FEATURE_ALTIVEC)
+- flags |= SWS_CPU_CAPS_ALTIVEC;
+-
+- return flags;
+-}
+-
+ inline int PPCPUFlags()
+ {
+ unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures();
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
+@@ -39,7 +39,7 @@ extern "C" {
+ #include "libswscale/swscale.h"
+ }
+
+-// allocate a new picture (PIX_FMT_YUV420P)
++// allocate a new picture (AV_PIX_FMT_YUV420P)
+ DVDVideoPicture* CDVDCodecUtils::AllocatePicture(int iWidth, int iHeight)
+ {
+ DVDVideoPicture* pPicture = new DVDVideoPicture;
+@@ -264,13 +264,13 @@ DVDVideoPicture* CDVDCodecUtils::Convert
+
+ int dstformat;
+ if (format == RENDER_FMT_UYVY422)
+- dstformat = PIX_FMT_UYVY422;
++ dstformat = AV_PIX_FMT_UYVY422;
+ else
+- dstformat = PIX_FMT_YUYV422;
++ dstformat = AV_PIX_FMT_YUYV422;
+
+- struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, PIX_FMT_YUV420P,
++ struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, AV_PIX_FMT_YUV420P,
+ pPicture->iWidth, pPicture->iHeight, (AVPixelFormat)dstformat,
+- SWS_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ SWS_BILINEAR, NULL, NULL, NULL);
+ sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride);
+ sws_freeContext(ctx);
+ }
+@@ -403,25 +403,25 @@ double CDVDCodecUtils::NormalizeFramedur
+ }
+
+ struct EFormatMap {
+- PixelFormat pix_fmt;
++ AVPixelFormat pix_fmt;
+ ERenderFormat format;
+ };
+
+ static const EFormatMap g_format_map[] = {
+- { PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
+-, { PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
+-, { PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
+-, { PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
+-, { PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
+-, { PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
+-, { PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
+-, { PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
+-, { PIX_FMT_NONE , RENDER_FMT_NONE }
++ { AV_PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
++, { AV_PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
++, { AV_PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
++, { AV_PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
++, { AV_PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
++, { AV_PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
++, { AV_PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
++, { AV_PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
++, { AV_PIX_FMT_NONE , RENDER_FMT_NONE }
+ };
+
+ ERenderFormat CDVDCodecUtils::EFormatFromPixfmt(int fmt)
+ {
+- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
+ {
+ if(p->pix_fmt == fmt)
+ return p->format;
+@@ -431,10 +431,10 @@ ERenderFormat CDVDCodecUtils::EFormatFro
+
+ int CDVDCodecUtils::PixfmtFromEFormat(ERenderFormat fmt)
+ {
+- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
+ {
+ if(p->format == fmt)
+ return p->pix_fmt;
+ }
+- return PIX_FMT_NONE;
++ return AV_PIX_FMT_NONE;
+ }
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+@@ -77,8 +77,8 @@ enum DecoderState
+ STATE_SW_MULTI
+ };
+
+-enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
+- , const PixelFormat * fmt )
++enum AVPixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
++ , const AVPixelFormat * fmt )
+ {
+ CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque;
+
+@@ -104,8 +104,8 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G
+ avctx->hwaccel_context = 0;
+ }
+
+- const PixelFormat * cur = fmt;
+- while(*cur != PIX_FMT_NONE)
++ const AVPixelFormat * cur = fmt;
++ while(*cur != AV_PIX_FMT_NONE)
+ {
+ #ifdef HAVE_LIBVDPAU
+ if(VDPAU::CDecoder::IsVDPAUFormat(*cur) && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVDPAU))
+@@ -137,7 +137,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G
+ #endif
+ #ifdef HAVE_LIBVA
+ // mpeg4 vaapi decoding is disabled
+- if(*cur == PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI))
++ if(*cur == AV_PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI))
+ {
+ VAAPI::CDecoder* dec = new VAAPI::CDecoder();
+ if(dec->Open(avctx, ctx->m_pCodecContext, *cur, ctx->m_uSurfacesCount) == true)
+@@ -214,11 +214,11 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStre
+
+ for(std::vector<ERenderFormat>::iterator it = options.m_formats.begin(); it != options.m_formats.end(); ++it)
+ {
+- m_formats.push_back((PixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
++ m_formats.push_back((AVPixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
+ if(*it == RENDER_FMT_YUV420P)
+- m_formats.push_back(PIX_FMT_YUVJ420P);
++ m_formats.push_back(AV_PIX_FMT_YUVJ420P);
+ }
+- m_formats.push_back(PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
++ m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
+
+ pCodec = avcodec_find_decoder(hints.codec);
+
+@@ -655,7 +655,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCom
+ pDvdVideoPicture->color_transfer = m_pCodecContext->color_trc;
+ pDvdVideoPicture->color_matrix = m_pCodecContext->colorspace;
+ if(m_pCodecContext->color_range == AVCOL_RANGE_JPEG
+- || m_pCodecContext->pix_fmt == PIX_FMT_YUVJ420P)
++ || m_pCodecContext->pix_fmt == AV_PIX_FMT_YUVJ420P)
+ pDvdVideoPicture->color_range = 1;
+ else
+ pDvdVideoPicture->color_range = 0;
+@@ -738,8 +738,8 @@ bool CDVDVideoCodecFFmpeg::GetPicture(DV
+ pDvdVideoPicture->iFlags |= pDvdVideoPicture->data[0] ? 0 : DVP_FLAG_DROPPED;
+ pDvdVideoPicture->extended_format = 0;
+
+- PixelFormat pix_fmt;
+- pix_fmt = (PixelFormat)m_pFrame->format;
++ AVPixelFormat pix_fmt;
++ pix_fmt = (AVPixelFormat)m_pFrame->format;
+
+ pDvdVideoPicture->format = CDVDCodecUtils::EFormatFromPixfmt(pix_fmt);
+ return true;
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
+@@ -46,7 +46,7 @@ public:
+ public:
+ IHardwareDecoder() {}
+ virtual ~IHardwareDecoder() {};
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces) = 0;
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces) = 0;
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame) = 0;
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) = 0;
+ virtual int Check (AVCodecContext* avctx) = 0;
+@@ -77,7 +77,7 @@ public:
+ void SetHardware(IHardwareDecoder* hardware);
+
+ protected:
+- static enum PixelFormat GetFormat(struct AVCodecContext * avctx, const PixelFormat * fmt);
++ static enum AVPixelFormat GetFormat(struct AVCodecContext * avctx, const AVPixelFormat * fmt);
+
+ int FilterOpen(const std::string& filters, bool scale);
+ void FilterClose();
+@@ -119,7 +119,7 @@ protected:
+ int m_iLastKeyframe;
+ double m_dts;
+ bool m_started;
+- std::vector<PixelFormat> m_formats;
++ std::vector<AVPixelFormat> m_formats;
+ double m_decoderPts;
+ int m_skippedDeint;
+ bool m_requestSkipDeint;
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
+@@ -554,11 +554,11 @@ void CDVDVideoCodecVDA::DisplayQueuePop(
+
+ void CDVDVideoCodecVDA::UYVY422_to_YUV420P(uint8_t *yuv422_ptr, int yuv422_stride, DVDVideoPicture *picture)
+ {
+- // convert PIX_FMT_UYVY422 to PIX_FMT_YUV420P.
++ // convert AV_PIX_FMT_UYVY422 to AV_PIX_FMT_YUV420P.
+ struct SwsContext *swcontext = sws_getContext(
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_UYVY422,
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P,
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_UYVY422,
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P,
++ SWS_FAST_BILINEAR, NULL, NULL, NULL);
+ if (swcontext)
+ {
+ uint8_t *src[] = { yuv422_ptr, 0, 0, 0 };
+@@ -574,11 +574,11 @@ void CDVDVideoCodecVDA::UYVY422_to_YUV42
+
+ void CDVDVideoCodecVDA::BGRA_to_YUV420P(uint8_t *bgra_ptr, int bgra_stride, DVDVideoPicture *picture)
+ {
+- // convert PIX_FMT_BGRA to PIX_FMT_YUV420P.
++ // convert AV_PIX_FMT_BGRA to AV_PIX_FMT_YUV420P.
+ struct SwsContext *swcontext = sws_getContext(
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_BGRA,
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P,
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_BGRA,
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P,
++ SWS_FAST_BILINEAR, NULL, NULL, NULL);
+ if (swcontext)
+ {
+ uint8_t *src[] = { bgra_ptr, 0, 0, 0 };
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
+@@ -886,7 +886,7 @@ static bool CheckCompatibility(AVCodecCo
+ return true;
+ }
+
+-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces)
++bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces)
+ {
+ if (!CheckCompatibility(avctx))
+ return false;
+@@ -1135,9 +1135,9 @@ bool CDecoder::OpenDecoder()
+ return true;
+ }
+
+-bool CDecoder::Supports(enum PixelFormat fmt)
++bool CDecoder::Supports(enum AVPixelFormat fmt)
+ {
+- if(fmt == PIX_FMT_DXVA2_VLD)
++ if(fmt == AV_PIX_FMT_DXVA2_VLD)
+ return true;
+ return false;
+ }
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
+@@ -141,7 +141,7 @@ class CDecoder
+ public:
+ CDecoder();
+ ~CDecoder();
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces);
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces);
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
+ virtual int Check (AVCodecContext* avctx);
+@@ -154,7 +154,7 @@ public:
+ int GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
+ void RelBuffer(uint8_t *data);
+
+- static bool Supports(enum PixelFormat fmt);
++ static bool Supports(enum AVPixelFormat fmt);
+
+ void CloseDXVADecoder();
+
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+@@ -479,7 +479,7 @@ CDecoder::~CDecoder()
+ Close();
+ }
+
+-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
+ {
+ // don't support broken wrappers by default
+ // nvidia cards with a vaapi to vdpau wrapper
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
+@@ -406,7 +406,7 @@ public:
+ CDecoder();
+ virtual ~CDecoder();
+
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
+ virtual void Reset();
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
+@@ -186,7 +186,7 @@ void CDecoder::Close()
+ m_bitstream = NULL;
+ }
+
+-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces)
++bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces)
+ {
+ Close();
+
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
+@@ -35,7 +35,7 @@ class CDecoder
+ public:
+ CDecoder();
+ ~CDecoder();
+- virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
++ virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
+ virtual int Decode(AVCodecContext* avctx, AVFrame* frame);
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
+ virtual int Check(AVCodecContext* avctx);
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+@@ -486,7 +486,7 @@ CDecoder::CDecoder() : m_vdpauOutput(&m_
+ m_vdpauConfig.context = 0;
+ }
+
+-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
+ {
+ // check if user wants to decode this format with VDPAU
+ std::string gpuvendor = g_Windowing.GetRenderVendor();
+@@ -760,7 +760,7 @@ int CDecoder::Check(AVCodecContext* avct
+ return 0;
+ }
+
+-bool CDecoder::IsVDPAUFormat(PixelFormat format)
++bool CDecoder::IsVDPAUFormat(AVPixelFormat format)
+ {
+ if (format == AV_PIX_FMT_VDPAU)
+ return true;
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
+@@ -556,7 +556,7 @@ public:
+ CDecoder();
+ virtual ~CDecoder();
+
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
+ virtual void Reset();
+@@ -571,7 +571,7 @@ public:
+ bool Supports(VdpVideoMixerFeature feature);
+ bool Supports(EINTERLACEMETHOD method);
+ EINTERLACEMETHOD AutoInterlaceMethod();
+- static bool IsVDPAUFormat(PixelFormat fmt);
++ static bool IsVDPAUFormat(AVPixelFormat fmt);
+
+ static void FFReleaseBuffer(void *opaque, uint8_t *data);
+ static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -1638,7 +1638,7 @@ void CDVDDemuxFFmpeg::ParsePacket(AVPack
+
+ // for video we need a decoder to get desired information into codec context
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec->extradata &&
+- (!st->codec->width || st->codec->pix_fmt == PIX_FMT_NONE))
++ (!st->codec->width || st->codec->pix_fmt == AV_PIX_FMT_NONE))
+ {
+ // open a decoder, it will be cleared down by ffmpeg on closing the stream
+ if (!st->codec->codec)
+@@ -1695,7 +1695,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady()
+ st = m_pFormatContext->streams[idx];
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ {
+- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
+ return true;
+ hasVideo = true;
+ }
+@@ -1708,7 +1708,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady()
+ st = m_pFormatContext->streams[i];
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ {
+- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
+ return true;
+ hasVideo = true;
+ }
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp
+@@ -275,7 +275,7 @@ bool CDVDFileInfo::ExtractThumb(const st
+
+ uint8_t *pOutBuf = new uint8_t[nWidth * nHeight * 4];
+ struct SwsContext *context = sws_getContext(picture.iWidth, picture.iHeight,
+- PIX_FMT_YUV420P, nWidth, nHeight, PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ AV_PIX_FMT_YUV420P, nWidth, nHeight, AV_PIX_FMT_BGRA, SWS_FAST_BILINEAR, NULL, NULL, NULL);
+
+ if (context)
+ {
+Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+@@ -2932,7 +2932,7 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
+ }
+ else if (m_format == RENDER_FMT_NV12)
+ {
+- srcFormat = PIX_FMT_NV12;
++ srcFormat = AV_PIX_FMT_NV12;
+ for (int i = 0; i < 2; i++)
+ {
+ src[i] = im->plane[i];
+@@ -2941,13 +2941,13 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
+ }
+ else if (m_format == RENDER_FMT_YUYV422)
+ {
+- srcFormat = PIX_FMT_YUYV422;
++ srcFormat = AV_PIX_FMT_YUYV422;
+ src[0] = im->plane[0];
+ srcStride[0] = im->stride[0];
+ }
+ else if (m_format == RENDER_FMT_UYVY422)
+ {
+- srcFormat = PIX_FMT_UYVY422;
++ srcFormat = AV_PIX_FMT_UYVY422;
+ src[0] = im->plane[0];
+ srcStride[0] = im->stride[0];
+ }
+@@ -2965,8 +2965,8 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
+
+ m_context = sws_getCachedContext(m_context,
+ im->width, im->height, (AVPixelFormat)srcFormat,
+- im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA,
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA,
++ SWS_FAST_BILINEAR, NULL, NULL, NULL);
+
+ uint8_t *dst[] = { m_rgbBuffer, 0, 0, 0 };
+ int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };
+@@ -2995,7 +2995,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
+
+ if (m_format == RENDER_FMT_YUV420P)
+ {
+- srcFormat = PIX_FMT_YUV420P;
++ srcFormat = AV_PIX_FMT_YUV420P;
+ for (int i = 0; i < 3; i++)
+ {
+ srcTop[i] = im->plane[i];
+@@ -3006,7 +3006,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
+ }
+ else if (m_format == RENDER_FMT_NV12)
+ {
+- srcFormat = PIX_FMT_NV12;
++ srcFormat = AV_PIX_FMT_NV12;
+ for (int i = 0; i < 2; i++)
+ {
+ srcTop[i] = im->plane[i];
+@@ -3017,7 +3017,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
+ }
+ else if (m_format == RENDER_FMT_YUYV422)
+ {
+- srcFormat = PIX_FMT_YUYV422;
++ srcFormat = AV_PIX_FMT_YUYV422;
+ srcTop[0] = im->plane[0];
+ srcStrideTop[0] = im->stride[0] * 2;
+ srcBot[0] = im->plane[0] + im->stride[0];
+@@ -3025,7 +3025,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
+ }
+ else if (m_format == RENDER_FMT_UYVY422)
+ {
+- srcFormat = PIX_FMT_UYVY422;
++ srcFormat = AV_PIX_FMT_UYVY422;
+ srcTop[0] = im->plane[0];
+ srcStrideTop[0] = im->stride[0] * 2;
+ srcBot[0] = im->plane[0] + im->stride[0];
+@@ -3045,8 +3045,8 @@ void CLinuxRendererGL::ToRGBFields(YV12I
+
+ m_context = sws_getCachedContext(m_context,
+ im->width, im->height >> 1, (AVPixelFormat)srcFormat,
+- im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA,
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA,
++ SWS_FAST_BILINEAR, NULL, NULL, NULL);
+ uint8_t *dstTop[] = { m_rgbBuffer, 0, 0, 0 };
+ uint8_t *dstBot[] = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 };
+ int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };
+Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
+@@ -2006,8 +2006,8 @@ void CLinuxRendererGLES::UploadYV12Textu
+ #endif
+ {
+ m_sw_context = sws_getCachedContext(m_sw_context,
+- im->width, im->height, PIX_FMT_YUV420P,
+- im->width, im->height, PIX_FMT_RGBA,
++ im->width, im->height, AV_PIX_FMT_YUV420P,
++ im->width, im->height, AV_PIX_FMT_RGBA,
+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
+
+ uint8_t *src[] = { im->plane[0], im->plane[1], im->plane[2], 0 };
+Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/WinRenderer.cpp
++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp
+@@ -94,16 +94,16 @@ CWinRenderer::~CWinRenderer()
+ UnInit();
+ }
+
+-static enum PixelFormat PixelFormatFromFormat(ERenderFormat format)
++static enum AVPixelFormat PixelFormatFromFormat(ERenderFormat format)
+ {
+- if (format == RENDER_FMT_DXVA) return PIX_FMT_NV12;
+- if (format == RENDER_FMT_YUV420P) return PIX_FMT_YUV420P;
+- if (format == RENDER_FMT_YUV420P10) return PIX_FMT_YUV420P10;
+- if (format == RENDER_FMT_YUV420P16) return PIX_FMT_YUV420P16;
+- if (format == RENDER_FMT_NV12) return PIX_FMT_NV12;
+- if (format == RENDER_FMT_UYVY422) return PIX_FMT_UYVY422;
+- if (format == RENDER_FMT_YUYV422) return PIX_FMT_YUYV422;
+- return PIX_FMT_NONE;
++ if (format == RENDER_FMT_DXVA) return AV_PIX_FMT_NV12;
++ if (format == RENDER_FMT_YUV420P) return AV_PIX_FMT_YUV420P;
++ if (format == RENDER_FMT_YUV420P10) return AV_PIX_FMT_YUV420P10;
++ if (format == RENDER_FMT_YUV420P16) return AV_PIX_FMT_YUV420P16;
++ if (format == RENDER_FMT_NV12) return AV_PIX_FMT_NV12;
++ if (format == RENDER_FMT_UYVY422) return AV_PIX_FMT_UYVY422;
++ if (format == RENDER_FMT_YUYV422) return AV_PIX_FMT_YUYV422;
++ return AV_PIX_FMT_NONE;
+ }
+
+ void CWinRenderer::ManageTextures()
+@@ -719,13 +719,13 @@ void CWinRenderer::Render(DWORD flags)
+
+ void CWinRenderer::RenderSW()
+ {
+- enum PixelFormat format = PixelFormatFromFormat(m_format);
++ enum AVPixelFormat format = PixelFormatFromFormat(m_format);
+
+ // 1. convert yuv to rgb
+ m_sw_scale_ctx = sws_getCachedContext(m_sw_scale_ctx,
+ m_sourceWidth, m_sourceHeight, format,
+- m_sourceWidth, m_sourceHeight, PIX_FMT_BGRA,
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ m_sourceWidth, m_sourceHeight, AV_PIX_FMT_BGRA,
++ SWS_FAST_BILINEAR, NULL, NULL, NULL);
+
+ YUVBuffer* buf = (YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer];
+
+Index: xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/pictures/Picture.cpp
++++ xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp
+@@ -342,9 +342,9 @@ bool CPicture::ScaleImage(uint8_t *in_pi
+ uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch,
+ CPictureScalingAlgorithm::Algorithm scalingAlgorithm /* = CPictureScalingAlgorithm::NoAlgorithm */)
+ {
+- struct SwsContext *context = sws_getContext(in_width, in_height, PIX_FMT_BGRA,
+- out_width, out_height, PIX_FMT_BGRA,
+- CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm) | SwScaleCPUFlags(), NULL, NULL, NULL);
++ struct SwsContext *context = sws_getContext(in_width, in_height, AV_PIX_FMT_BGRA,
++ out_width, out_height, AV_PIX_FMT_BGRA,
++ CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm), NULL, NULL, NULL);
+
+ uint8_t *src[] = { in_pixels, 0, 0, 0 };
+ int srcStride[] = { (int)in_pitch, 0, 0, 0 };
+Index: xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp
+===================================================================
+--- xbmc-16.0-Jarvis.orig/xbmc/video/FFmpegVideoDecoder.cpp
++++ xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp
+@@ -252,7 +252,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas
+ return false;
+
+ // Due to a bug in swsscale we need to allocate one extra line of data
+- if ( avpicture_alloc( m_pFrameRGB, PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
++ if ( avpicture_alloc( m_pFrameRGB, AV_PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
+ return false;
+ }
+
+@@ -287,7 +287,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas
+
+ // We got the video frame, render it into the picture buffer
+ struct SwsContext * context = sws_getContext( m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt,
+- m_frameRGBwidth, m_frameRGBheight, PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
++ m_frameRGBwidth, m_frameRGBheight, AV_PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
+
+ sws_scale( context, m_pFrame->data, m_pFrame->linesize, 0, m_pCodecCtx->height,
+ m_pFrameRGB->data, m_pFrameRGB->linesize );
+++ /dev/null
-From 2b395fb3f07551ae1ce2e484c14ac59f36e192b0 Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd.kuhls@t-online.de>
-Date: Thu, 17 Mar 2016 21:47:53 +0100
-Subject: [PATCH] native/TexturePacker: fix compilation with gcc 4.6
-
-Kodi itself depends on gcc >= 4.7 due to its use of the C++11 standard.
-When cross-compiling the host gcc currently also needs to be >= 4.7 due
-to the texturepacker tool being needed as native binary to compile
-Textures.xbt for the target system.
-
-Cross-compiling on a system where host gcc is at version 4.6 fails atm
-with this error:
-
-cc1plus: error: unrecognized command line option '-std=c++11'
-make[4]: *** [md5.o] Error 1
-make[4]: *** Waiting for unfinished jobs....
-cc1plus: error: unrecognized command line option '-std=c++11'
-cc1plus: error: unrecognized command line option '-std=c++11'
-
-make[4]: *** [DecoderManager.o] Error 1
-make[4]: *** [XBTFWriter.o] Error 1
-cc1plus: error: unrecognized command line option '-std=c++11'
-make[4]: *** [TexturePacker.o] Error 1
-cc1plus: error: unrecognized command line option '-std=c++11'
-make[4]: *** [decoder/PNGDecoder.o] Error 1
-make[3]: *** [all] Error 2
-make[2]: *** [native/TexturePacker] Error 2
-
-Using this patch the problem is fixed and a working TexturePacker host
-binary is created.
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-Patch sent upstream: https://github.com/xbmc/xbmc/pull/9378
----
- tools/depends/native/TexturePacker/src/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/depends/native/TexturePacker/src/Makefile.am b/tools/depends/native/TexturePacker/src/Makefile.am
-index c1fc8be..d075290 100644
---- a/tools/depends/native/TexturePacker/src/Makefile.am
-+++ b/tools/depends/native/TexturePacker/src/Makefile.am
-@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects
-
- AM_CFLAGS = -DTARGET_POSIX -DUSE_LZO_PACKING
- AM_CFLAGS += @EXTRA_DEFINES@
--AM_CXXFLAGS = $(AM_CFLAGS) -std=c++11
-+AM_CXXFLAGS = $(AM_CFLAGS) -std=c++0x
-
- AM_CPPFLAGS = \
- -I. \
---
-2.7.0
-
+++ /dev/null
-Add support for ffmpeg 3.0
-
-Changes from original commit are only in file paths & quilt refresh.
-
-commit c31b7d374062f87c7512d9872cbceac920465913
-Author: Philip Langdale <philipl@overt.org>
-Date: Mon Sep 21 19:49:36 2015 -0700
-
- ffmpeg: Update AVPixelFormat and AV_PIX_FMT_* to compile with master
-
- The deprecated PixelFormat and PIX_FMT_* names have been removed in
- ffmpeg master.
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-[Downloaded from
-https://gitweb.gentoo.org/repo/gentoo.git/tree/media-tv/kodi/files/kodi-16-ffmpeg3.patch]
-
-Index: xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/FFmpeg.h
-+++ xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h
-@@ -24,7 +24,6 @@
- #include "utils/CPUInfo.h"
-
- extern "C" {
--#include "libswscale/swscale.h"
- #include "libavcodec/avcodec.h"
- #include "libavformat/avformat.h"
- #include "libavutil/avutil.h"
-@@ -33,23 +32,6 @@ extern "C" {
- #include "libpostproc/postprocess.h"
- }
-
--inline int SwScaleCPUFlags()
--{
-- unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures();
-- int flags = 0;
--
-- if (cpuFeatures & CPU_FEATURE_MMX)
-- flags |= SWS_CPU_CAPS_MMX;
-- if (cpuFeatures & CPU_FEATURE_MMX2)
-- flags |= SWS_CPU_CAPS_MMX2;
-- if (cpuFeatures & CPU_FEATURE_3DNOW)
-- flags |= SWS_CPU_CAPS_3DNOW;
-- if (cpuFeatures & CPU_FEATURE_ALTIVEC)
-- flags |= SWS_CPU_CAPS_ALTIVEC;
--
-- return flags;
--}
--
- inline int PPCPUFlags()
- {
- unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures();
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
-@@ -39,7 +39,7 @@ extern "C" {
- #include "libswscale/swscale.h"
- }
-
--// allocate a new picture (PIX_FMT_YUV420P)
-+// allocate a new picture (AV_PIX_FMT_YUV420P)
- DVDVideoPicture* CDVDCodecUtils::AllocatePicture(int iWidth, int iHeight)
- {
- DVDVideoPicture* pPicture = new DVDVideoPicture;
-@@ -264,13 +264,13 @@ DVDVideoPicture* CDVDCodecUtils::Convert
-
- int dstformat;
- if (format == RENDER_FMT_UYVY422)
-- dstformat = PIX_FMT_UYVY422;
-+ dstformat = AV_PIX_FMT_UYVY422;
- else
-- dstformat = PIX_FMT_YUYV422;
-+ dstformat = AV_PIX_FMT_YUYV422;
-
-- struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, PIX_FMT_YUV420P,
-+ struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, AV_PIX_FMT_YUV420P,
- pPicture->iWidth, pPicture->iHeight, (AVPixelFormat)dstformat,
-- SWS_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ SWS_BILINEAR, NULL, NULL, NULL);
- sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride);
- sws_freeContext(ctx);
- }
-@@ -403,25 +403,25 @@ double CDVDCodecUtils::NormalizeFramedur
- }
-
- struct EFormatMap {
-- PixelFormat pix_fmt;
-+ AVPixelFormat pix_fmt;
- ERenderFormat format;
- };
-
- static const EFormatMap g_format_map[] = {
-- { PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
--, { PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
--, { PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
--, { PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
--, { PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
--, { PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
--, { PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
--, { PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
--, { PIX_FMT_NONE , RENDER_FMT_NONE }
-+ { AV_PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
-+, { AV_PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
-+, { AV_PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
-+, { AV_PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
-+, { AV_PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
-+, { AV_PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
-+, { AV_PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
-+, { AV_PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
-+, { AV_PIX_FMT_NONE , RENDER_FMT_NONE }
- };
-
- ERenderFormat CDVDCodecUtils::EFormatFromPixfmt(int fmt)
- {
-- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
-+ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
- {
- if(p->pix_fmt == fmt)
- return p->format;
-@@ -431,10 +431,10 @@ ERenderFormat CDVDCodecUtils::EFormatFro
-
- int CDVDCodecUtils::PixfmtFromEFormat(ERenderFormat fmt)
- {
-- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
-+ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
- {
- if(p->format == fmt)
- return p->pix_fmt;
- }
-- return PIX_FMT_NONE;
-+ return AV_PIX_FMT_NONE;
- }
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-@@ -77,8 +77,8 @@ enum DecoderState
- STATE_SW_MULTI
- };
-
--enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
-- , const PixelFormat * fmt )
-+enum AVPixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
-+ , const AVPixelFormat * fmt )
- {
- CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque;
-
-@@ -104,8 +104,8 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G
- avctx->hwaccel_context = 0;
- }
-
-- const PixelFormat * cur = fmt;
-- while(*cur != PIX_FMT_NONE)
-+ const AVPixelFormat * cur = fmt;
-+ while(*cur != AV_PIX_FMT_NONE)
- {
- #ifdef HAVE_LIBVDPAU
- if(VDPAU::CDecoder::IsVDPAUFormat(*cur) && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVDPAU))
-@@ -137,7 +137,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G
- #endif
- #ifdef HAVE_LIBVA
- // mpeg4 vaapi decoding is disabled
-- if(*cur == PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI))
-+ if(*cur == AV_PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI))
- {
- VAAPI::CDecoder* dec = new VAAPI::CDecoder();
- if(dec->Open(avctx, ctx->m_pCodecContext, *cur, ctx->m_uSurfacesCount) == true)
-@@ -214,11 +214,11 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStre
-
- for(std::vector<ERenderFormat>::iterator it = options.m_formats.begin(); it != options.m_formats.end(); ++it)
- {
-- m_formats.push_back((PixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
-+ m_formats.push_back((AVPixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
- if(*it == RENDER_FMT_YUV420P)
-- m_formats.push_back(PIX_FMT_YUVJ420P);
-+ m_formats.push_back(AV_PIX_FMT_YUVJ420P);
- }
-- m_formats.push_back(PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
-+ m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
-
- pCodec = avcodec_find_decoder(hints.codec);
-
-@@ -655,7 +655,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCom
- pDvdVideoPicture->color_transfer = m_pCodecContext->color_trc;
- pDvdVideoPicture->color_matrix = m_pCodecContext->colorspace;
- if(m_pCodecContext->color_range == AVCOL_RANGE_JPEG
-- || m_pCodecContext->pix_fmt == PIX_FMT_YUVJ420P)
-+ || m_pCodecContext->pix_fmt == AV_PIX_FMT_YUVJ420P)
- pDvdVideoPicture->color_range = 1;
- else
- pDvdVideoPicture->color_range = 0;
-@@ -738,8 +738,8 @@ bool CDVDVideoCodecFFmpeg::GetPicture(DV
- pDvdVideoPicture->iFlags |= pDvdVideoPicture->data[0] ? 0 : DVP_FLAG_DROPPED;
- pDvdVideoPicture->extended_format = 0;
-
-- PixelFormat pix_fmt;
-- pix_fmt = (PixelFormat)m_pFrame->format;
-+ AVPixelFormat pix_fmt;
-+ pix_fmt = (AVPixelFormat)m_pFrame->format;
-
- pDvdVideoPicture->format = CDVDCodecUtils::EFormatFromPixfmt(pix_fmt);
- return true;
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
-@@ -46,7 +46,7 @@ public:
- public:
- IHardwareDecoder() {}
- virtual ~IHardwareDecoder() {};
-- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces) = 0;
-+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces) = 0;
- virtual int Decode (AVCodecContext* avctx, AVFrame* frame) = 0;
- virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) = 0;
- virtual int Check (AVCodecContext* avctx) = 0;
-@@ -77,7 +77,7 @@ public:
- void SetHardware(IHardwareDecoder* hardware);
-
- protected:
-- static enum PixelFormat GetFormat(struct AVCodecContext * avctx, const PixelFormat * fmt);
-+ static enum AVPixelFormat GetFormat(struct AVCodecContext * avctx, const AVPixelFormat * fmt);
-
- int FilterOpen(const std::string& filters, bool scale);
- void FilterClose();
-@@ -119,7 +119,7 @@ protected:
- int m_iLastKeyframe;
- double m_dts;
- bool m_started;
-- std::vector<PixelFormat> m_formats;
-+ std::vector<AVPixelFormat> m_formats;
- double m_decoderPts;
- int m_skippedDeint;
- bool m_requestSkipDeint;
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
-@@ -554,11 +554,11 @@ void CDVDVideoCodecVDA::DisplayQueuePop(
-
- void CDVDVideoCodecVDA::UYVY422_to_YUV420P(uint8_t *yuv422_ptr, int yuv422_stride, DVDVideoPicture *picture)
- {
-- // convert PIX_FMT_UYVY422 to PIX_FMT_YUV420P.
-+ // convert AV_PIX_FMT_UYVY422 to AV_PIX_FMT_YUV420P.
- struct SwsContext *swcontext = sws_getContext(
-- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_UYVY422,
-- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P,
-- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_UYVY422,
-+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P,
-+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
- if (swcontext)
- {
- uint8_t *src[] = { yuv422_ptr, 0, 0, 0 };
-@@ -574,11 +574,11 @@ void CDVDVideoCodecVDA::UYVY422_to_YUV42
-
- void CDVDVideoCodecVDA::BGRA_to_YUV420P(uint8_t *bgra_ptr, int bgra_stride, DVDVideoPicture *picture)
- {
-- // convert PIX_FMT_BGRA to PIX_FMT_YUV420P.
-+ // convert AV_PIX_FMT_BGRA to AV_PIX_FMT_YUV420P.
- struct SwsContext *swcontext = sws_getContext(
-- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_BGRA,
-- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P,
-- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_BGRA,
-+ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P,
-+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
- if (swcontext)
- {
- uint8_t *src[] = { bgra_ptr, 0, 0, 0 };
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
-@@ -886,7 +886,7 @@ static bool CheckCompatibility(AVCodecCo
- return true;
- }
-
--bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces)
-+bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces)
- {
- if (!CheckCompatibility(avctx))
- return false;
-@@ -1135,9 +1135,9 @@ bool CDecoder::OpenDecoder()
- return true;
- }
-
--bool CDecoder::Supports(enum PixelFormat fmt)
-+bool CDecoder::Supports(enum AVPixelFormat fmt)
- {
-- if(fmt == PIX_FMT_DXVA2_VLD)
-+ if(fmt == AV_PIX_FMT_DXVA2_VLD)
- return true;
- return false;
- }
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
-@@ -141,7 +141,7 @@ class CDecoder
- public:
- CDecoder();
- ~CDecoder();
-- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces);
-+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces);
- virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
- virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
- virtual int Check (AVCodecContext* avctx);
-@@ -154,7 +154,7 @@ public:
- int GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
- void RelBuffer(uint8_t *data);
-
-- static bool Supports(enum PixelFormat fmt);
-+ static bool Supports(enum AVPixelFormat fmt);
-
- void CloseDXVADecoder();
-
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
-@@ -479,7 +479,7 @@ CDecoder::~CDecoder()
- Close();
- }
-
--bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
-+bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
- {
- // don't support broken wrappers by default
- // nvidia cards with a vaapi to vdpau wrapper
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
-@@ -406,7 +406,7 @@ public:
- CDecoder();
- virtual ~CDecoder();
-
-- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
-+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
- virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
- virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
- virtual void Reset();
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp
-@@ -186,7 +186,7 @@ void CDecoder::Close()
- m_bitstream = NULL;
- }
-
--bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces)
-+bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces)
- {
- Close();
-
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
-@@ -35,7 +35,7 @@ class CDecoder
- public:
- CDecoder();
- ~CDecoder();
-- virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
-+ virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
- virtual int Decode(AVCodecContext* avctx, AVFrame* frame);
- virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
- virtual int Check(AVCodecContext* avctx);
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
-@@ -486,7 +486,7 @@ CDecoder::CDecoder() : m_vdpauOutput(&m_
- m_vdpauConfig.context = 0;
- }
-
--bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
-+bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
- {
- // check if user wants to decode this format with VDPAU
- std::string gpuvendor = g_Windowing.GetRenderVendor();
-@@ -760,7 +760,7 @@ int CDecoder::Check(AVCodecContext* avct
- return 0;
- }
-
--bool CDecoder::IsVDPAUFormat(PixelFormat format)
-+bool CDecoder::IsVDPAUFormat(AVPixelFormat format)
- {
- if (format == AV_PIX_FMT_VDPAU)
- return true;
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
-@@ -556,7 +556,7 @@ public:
- CDecoder();
- virtual ~CDecoder();
-
-- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
-+ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
- virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
- virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
- virtual void Reset();
-@@ -571,7 +571,7 @@ public:
- bool Supports(VdpVideoMixerFeature feature);
- bool Supports(EINTERLACEMETHOD method);
- EINTERLACEMETHOD AutoInterlaceMethod();
-- static bool IsVDPAUFormat(PixelFormat fmt);
-+ static bool IsVDPAUFormat(AVPixelFormat fmt);
-
- static void FFReleaseBuffer(void *opaque, uint8_t *data);
- static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-@@ -1638,7 +1638,7 @@ void CDVDDemuxFFmpeg::ParsePacket(AVPack
-
- // for video we need a decoder to get desired information into codec context
- if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec->extradata &&
-- (!st->codec->width || st->codec->pix_fmt == PIX_FMT_NONE))
-+ (!st->codec->width || st->codec->pix_fmt == AV_PIX_FMT_NONE))
- {
- // open a decoder, it will be cleared down by ffmpeg on closing the stream
- if (!st->codec->codec)
-@@ -1695,7 +1695,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady()
- st = m_pFormatContext->streams[idx];
- if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
- {
-- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
-+ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
- return true;
- hasVideo = true;
- }
-@@ -1708,7 +1708,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady()
- st = m_pFormatContext->streams[i];
- if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
- {
-- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
-+ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
- return true;
- hasVideo = true;
- }
-Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp
-@@ -275,7 +275,7 @@ bool CDVDFileInfo::ExtractThumb(const st
-
- uint8_t *pOutBuf = new uint8_t[nWidth * nHeight * 4];
- struct SwsContext *context = sws_getContext(picture.iWidth, picture.iHeight,
-- PIX_FMT_YUV420P, nWidth, nHeight, PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ AV_PIX_FMT_YUV420P, nWidth, nHeight, AV_PIX_FMT_BGRA, SWS_FAST_BILINEAR, NULL, NULL, NULL);
-
- if (context)
- {
-Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
-@@ -2932,7 +2932,7 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
- }
- else if (m_format == RENDER_FMT_NV12)
- {
-- srcFormat = PIX_FMT_NV12;
-+ srcFormat = AV_PIX_FMT_NV12;
- for (int i = 0; i < 2; i++)
- {
- src[i] = im->plane[i];
-@@ -2941,13 +2941,13 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
- }
- else if (m_format == RENDER_FMT_YUYV422)
- {
-- srcFormat = PIX_FMT_YUYV422;
-+ srcFormat = AV_PIX_FMT_YUYV422;
- src[0] = im->plane[0];
- srcStride[0] = im->stride[0];
- }
- else if (m_format == RENDER_FMT_UYVY422)
- {
-- srcFormat = PIX_FMT_UYVY422;
-+ srcFormat = AV_PIX_FMT_UYVY422;
- src[0] = im->plane[0];
- srcStride[0] = im->stride[0];
- }
-@@ -2965,8 +2965,8 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
-
- m_context = sws_getCachedContext(m_context,
- im->width, im->height, (AVPixelFormat)srcFormat,
-- im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA,
-- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA,
-+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
-
- uint8_t *dst[] = { m_rgbBuffer, 0, 0, 0 };
- int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };
-@@ -2995,7 +2995,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
-
- if (m_format == RENDER_FMT_YUV420P)
- {
-- srcFormat = PIX_FMT_YUV420P;
-+ srcFormat = AV_PIX_FMT_YUV420P;
- for (int i = 0; i < 3; i++)
- {
- srcTop[i] = im->plane[i];
-@@ -3006,7 +3006,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
- }
- else if (m_format == RENDER_FMT_NV12)
- {
-- srcFormat = PIX_FMT_NV12;
-+ srcFormat = AV_PIX_FMT_NV12;
- for (int i = 0; i < 2; i++)
- {
- srcTop[i] = im->plane[i];
-@@ -3017,7 +3017,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
- }
- else if (m_format == RENDER_FMT_YUYV422)
- {
-- srcFormat = PIX_FMT_YUYV422;
-+ srcFormat = AV_PIX_FMT_YUYV422;
- srcTop[0] = im->plane[0];
- srcStrideTop[0] = im->stride[0] * 2;
- srcBot[0] = im->plane[0] + im->stride[0];
-@@ -3025,7 +3025,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
- }
- else if (m_format == RENDER_FMT_UYVY422)
- {
-- srcFormat = PIX_FMT_UYVY422;
-+ srcFormat = AV_PIX_FMT_UYVY422;
- srcTop[0] = im->plane[0];
- srcStrideTop[0] = im->stride[0] * 2;
- srcBot[0] = im->plane[0] + im->stride[0];
-@@ -3045,8 +3045,8 @@ void CLinuxRendererGL::ToRGBFields(YV12I
-
- m_context = sws_getCachedContext(m_context,
- im->width, im->height >> 1, (AVPixelFormat)srcFormat,
-- im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA,
-- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA,
-+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
- uint8_t *dstTop[] = { m_rgbBuffer, 0, 0, 0 };
- uint8_t *dstBot[] = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 };
- int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };
-Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
-@@ -2006,8 +2006,8 @@ void CLinuxRendererGLES::UploadYV12Textu
- #endif
- {
- m_sw_context = sws_getCachedContext(m_sw_context,
-- im->width, im->height, PIX_FMT_YUV420P,
-- im->width, im->height, PIX_FMT_RGBA,
-+ im->width, im->height, AV_PIX_FMT_YUV420P,
-+ im->width, im->height, AV_PIX_FMT_RGBA,
- SWS_FAST_BILINEAR, NULL, NULL, NULL);
-
- uint8_t *src[] = { im->plane[0], im->plane[1], im->plane[2], 0 };
-Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/WinRenderer.cpp
-+++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp
-@@ -94,16 +94,16 @@ CWinRenderer::~CWinRenderer()
- UnInit();
- }
-
--static enum PixelFormat PixelFormatFromFormat(ERenderFormat format)
-+static enum AVPixelFormat PixelFormatFromFormat(ERenderFormat format)
- {
-- if (format == RENDER_FMT_DXVA) return PIX_FMT_NV12;
-- if (format == RENDER_FMT_YUV420P) return PIX_FMT_YUV420P;
-- if (format == RENDER_FMT_YUV420P10) return PIX_FMT_YUV420P10;
-- if (format == RENDER_FMT_YUV420P16) return PIX_FMT_YUV420P16;
-- if (format == RENDER_FMT_NV12) return PIX_FMT_NV12;
-- if (format == RENDER_FMT_UYVY422) return PIX_FMT_UYVY422;
-- if (format == RENDER_FMT_YUYV422) return PIX_FMT_YUYV422;
-- return PIX_FMT_NONE;
-+ if (format == RENDER_FMT_DXVA) return AV_PIX_FMT_NV12;
-+ if (format == RENDER_FMT_YUV420P) return AV_PIX_FMT_YUV420P;
-+ if (format == RENDER_FMT_YUV420P10) return AV_PIX_FMT_YUV420P10;
-+ if (format == RENDER_FMT_YUV420P16) return AV_PIX_FMT_YUV420P16;
-+ if (format == RENDER_FMT_NV12) return AV_PIX_FMT_NV12;
-+ if (format == RENDER_FMT_UYVY422) return AV_PIX_FMT_UYVY422;
-+ if (format == RENDER_FMT_YUYV422) return AV_PIX_FMT_YUYV422;
-+ return AV_PIX_FMT_NONE;
- }
-
- void CWinRenderer::ManageTextures()
-@@ -719,13 +719,13 @@ void CWinRenderer::Render(DWORD flags)
-
- void CWinRenderer::RenderSW()
- {
-- enum PixelFormat format = PixelFormatFromFormat(m_format);
-+ enum AVPixelFormat format = PixelFormatFromFormat(m_format);
-
- // 1. convert yuv to rgb
- m_sw_scale_ctx = sws_getCachedContext(m_sw_scale_ctx,
- m_sourceWidth, m_sourceHeight, format,
-- m_sourceWidth, m_sourceHeight, PIX_FMT_BGRA,
-- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ m_sourceWidth, m_sourceHeight, AV_PIX_FMT_BGRA,
-+ SWS_FAST_BILINEAR, NULL, NULL, NULL);
-
- YUVBuffer* buf = (YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer];
-
-Index: xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/pictures/Picture.cpp
-+++ xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp
-@@ -342,9 +342,9 @@ bool CPicture::ScaleImage(uint8_t *in_pi
- uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch,
- CPictureScalingAlgorithm::Algorithm scalingAlgorithm /* = CPictureScalingAlgorithm::NoAlgorithm */)
- {
-- struct SwsContext *context = sws_getContext(in_width, in_height, PIX_FMT_BGRA,
-- out_width, out_height, PIX_FMT_BGRA,
-- CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm) | SwScaleCPUFlags(), NULL, NULL, NULL);
-+ struct SwsContext *context = sws_getContext(in_width, in_height, AV_PIX_FMT_BGRA,
-+ out_width, out_height, AV_PIX_FMT_BGRA,
-+ CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm), NULL, NULL, NULL);
-
- uint8_t *src[] = { in_pixels, 0, 0, 0 };
- int srcStride[] = { (int)in_pitch, 0, 0, 0 };
-Index: xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp
-===================================================================
---- xbmc-16.0-Jarvis.orig/xbmc/video/FFmpegVideoDecoder.cpp
-+++ xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp
-@@ -252,7 +252,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas
- return false;
-
- // Due to a bug in swsscale we need to allocate one extra line of data
-- if ( avpicture_alloc( m_pFrameRGB, PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
-+ if ( avpicture_alloc( m_pFrameRGB, AV_PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
- return false;
- }
-
-@@ -287,7 +287,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas
-
- // We got the video frame, render it into the picture buffer
- struct SwsContext * context = sws_getContext( m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt,
-- m_frameRGBwidth, m_frameRGBheight, PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
-+ m_frameRGBwidth, m_frameRGBheight, AV_PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
-
- sws_scale( context, m_pFrame->data, m_pFrame->linesize, 0, m_pCodecCtx->height,
- m_pFrameRGB->data, m_pFrameRGB->linesize );
# Locally computed
-sha256 0421ea1337cdee674f8a36d995f54152b5ddc4100e53410b3aeeb3b3f7d53946 kodi-16.0-Jarvis.tar.gz
+sha256 7d82c8aff2715c83deecdf10c566e26105bec0473af530a1356d4c747ebdfd10 kodi-16.1-Jarvis.tar.gz
#
################################################################################
-KODI_VERSION = 16.0-Jarvis
+KODI_VERSION = 16.1-Jarvis
KODI_SITE = $(call github,xbmc,xbmc,$(KODI_VERSION))
KODI_LICENSE = GPLv2
KODI_LICENSE_FILES = LICENSE.GPL