1 |
commit: cc7f541fccd5c782bdf551b8ff2780a8523e142d |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 24 09:59:45 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 24 09:59:45 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc7f541f |
7 |
|
8 |
media-tv/kodi: backport upstream fix to build with ffmpeg-3. Bug #574998 |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
media-tv/kodi/files/kodi-16-ffmpeg3.patch | 641 ++++++++++++++++++++++++++++++ |
14 |
media-tv/kodi/kodi-16.0.ebuild | 1 + |
15 |
2 files changed, 642 insertions(+) |
16 |
|
17 |
diff --git a/media-tv/kodi/files/kodi-16-ffmpeg3.patch b/media-tv/kodi/files/kodi-16-ffmpeg3.patch |
18 |
new file mode 100644 |
19 |
index 0000000..755af69 |
20 |
--- /dev/null |
21 |
+++ b/media-tv/kodi/files/kodi-16-ffmpeg3.patch |
22 |
@@ -0,0 +1,641 @@ |
23 |
+ |
24 |
+Changes from original commit are only in file paths & quilt refresh. |
25 |
+ |
26 |
+commit c31b7d374062f87c7512d9872cbceac920465913 |
27 |
+Author: Philip Langdale <philipl@×××××.org> |
28 |
+Date: Mon Sep 21 19:49:36 2015 -0700 |
29 |
+ |
30 |
+ ffmpeg: Update AVPixelFormat and AV_PIX_FMT_* to compile with master |
31 |
+ |
32 |
+ The deprecated PixelFormat and PIX_FMT_* names have been removed in |
33 |
+ ffmpeg master. |
34 |
+ |
35 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h |
36 |
+=================================================================== |
37 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/FFmpeg.h |
38 |
++++ xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h |
39 |
+@@ -24,7 +24,6 @@ |
40 |
+ #include "utils/CPUInfo.h" |
41 |
+ |
42 |
+ extern "C" { |
43 |
+-#include "libswscale/swscale.h" |
44 |
+ #include "libavcodec/avcodec.h" |
45 |
+ #include "libavformat/avformat.h" |
46 |
+ #include "libavutil/avutil.h" |
47 |
+@@ -33,23 +32,6 @@ extern "C" { |
48 |
+ #include "libpostproc/postprocess.h" |
49 |
+ } |
50 |
+ |
51 |
+-inline int SwScaleCPUFlags() |
52 |
+-{ |
53 |
+- unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures(); |
54 |
+- int flags = 0; |
55 |
+- |
56 |
+- if (cpuFeatures & CPU_FEATURE_MMX) |
57 |
+- flags |= SWS_CPU_CAPS_MMX; |
58 |
+- if (cpuFeatures & CPU_FEATURE_MMX2) |
59 |
+- flags |= SWS_CPU_CAPS_MMX2; |
60 |
+- if (cpuFeatures & CPU_FEATURE_3DNOW) |
61 |
+- flags |= SWS_CPU_CAPS_3DNOW; |
62 |
+- if (cpuFeatures & CPU_FEATURE_ALTIVEC) |
63 |
+- flags |= SWS_CPU_CAPS_ALTIVEC; |
64 |
+- |
65 |
+- return flags; |
66 |
+-} |
67 |
+- |
68 |
+ inline int PPCPUFlags() |
69 |
+ { |
70 |
+ unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures(); |
71 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp |
72 |
+=================================================================== |
73 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp |
74 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp |
75 |
+@@ -39,7 +39,7 @@ extern "C" { |
76 |
+ #include "libswscale/swscale.h" |
77 |
+ } |
78 |
+ |
79 |
+-// allocate a new picture (PIX_FMT_YUV420P) |
80 |
++// allocate a new picture (AV_PIX_FMT_YUV420P) |
81 |
+ DVDVideoPicture* CDVDCodecUtils::AllocatePicture(int iWidth, int iHeight) |
82 |
+ { |
83 |
+ DVDVideoPicture* pPicture = new DVDVideoPicture; |
84 |
+@@ -264,13 +264,13 @@ DVDVideoPicture* CDVDCodecUtils::Convert |
85 |
+ |
86 |
+ int dstformat; |
87 |
+ if (format == RENDER_FMT_UYVY422) |
88 |
+- dstformat = PIX_FMT_UYVY422; |
89 |
++ dstformat = AV_PIX_FMT_UYVY422; |
90 |
+ else |
91 |
+- dstformat = PIX_FMT_YUYV422; |
92 |
++ dstformat = AV_PIX_FMT_YUYV422; |
93 |
+ |
94 |
+- struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, PIX_FMT_YUV420P, |
95 |
++ struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, AV_PIX_FMT_YUV420P, |
96 |
+ pPicture->iWidth, pPicture->iHeight, (AVPixelFormat)dstformat, |
97 |
+- SWS_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); |
98 |
++ SWS_BILINEAR, NULL, NULL, NULL); |
99 |
+ sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride); |
100 |
+ sws_freeContext(ctx); |
101 |
+ } |
102 |
+@@ -403,25 +403,25 @@ double CDVDCodecUtils::NormalizeFramedur |
103 |
+ } |
104 |
+ |
105 |
+ struct EFormatMap { |
106 |
+- PixelFormat pix_fmt; |
107 |
++ AVPixelFormat pix_fmt; |
108 |
+ ERenderFormat format; |
109 |
+ }; |
110 |
+ |
111 |
+ static const EFormatMap g_format_map[] = { |
112 |
+- { PIX_FMT_YUV420P, RENDER_FMT_YUV420P } |
113 |
+-, { PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P } |
114 |
+-, { PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 } |
115 |
+-, { PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 } |
116 |
+-, { PIX_FMT_UYVY422, RENDER_FMT_UYVY422 } |
117 |
+-, { PIX_FMT_YUYV422, RENDER_FMT_YUYV422 } |
118 |
+-, { PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI } |
119 |
+-, { PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA } |
120 |
+-, { PIX_FMT_NONE , RENDER_FMT_NONE } |
121 |
++ { AV_PIX_FMT_YUV420P, RENDER_FMT_YUV420P } |
122 |
++, { AV_PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P } |
123 |
++, { AV_PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 } |
124 |
++, { AV_PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 } |
125 |
++, { AV_PIX_FMT_UYVY422, RENDER_FMT_UYVY422 } |
126 |
++, { AV_PIX_FMT_YUYV422, RENDER_FMT_YUYV422 } |
127 |
++, { AV_PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI } |
128 |
++, { AV_PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA } |
129 |
++, { AV_PIX_FMT_NONE , RENDER_FMT_NONE } |
130 |
+ }; |
131 |
+ |
132 |
+ ERenderFormat CDVDCodecUtils::EFormatFromPixfmt(int fmt) |
133 |
+ { |
134 |
+- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p) |
135 |
++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p) |
136 |
+ { |
137 |
+ if(p->pix_fmt == fmt) |
138 |
+ return p->format; |
139 |
+@@ -431,10 +431,10 @@ ERenderFormat CDVDCodecUtils::EFormatFro |
140 |
+ |
141 |
+ int CDVDCodecUtils::PixfmtFromEFormat(ERenderFormat fmt) |
142 |
+ { |
143 |
+- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p) |
144 |
++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p) |
145 |
+ { |
146 |
+ if(p->format == fmt) |
147 |
+ return p->pix_fmt; |
148 |
+ } |
149 |
+- return PIX_FMT_NONE; |
150 |
++ return AV_PIX_FMT_NONE; |
151 |
+ } |
152 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp |
153 |
+=================================================================== |
154 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp |
155 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp |
156 |
+@@ -77,8 +77,8 @@ enum DecoderState |
157 |
+ STATE_SW_MULTI |
158 |
+ }; |
159 |
+ |
160 |
+-enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx |
161 |
+- , const PixelFormat * fmt ) |
162 |
++enum AVPixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx |
163 |
++ , const AVPixelFormat * fmt ) |
164 |
+ { |
165 |
+ CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque; |
166 |
+ |
167 |
+@@ -104,8 +104,8 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G |
168 |
+ avctx->hwaccel_context = 0; |
169 |
+ } |
170 |
+ |
171 |
+- const PixelFormat * cur = fmt; |
172 |
+- while(*cur != PIX_FMT_NONE) |
173 |
++ const AVPixelFormat * cur = fmt; |
174 |
++ while(*cur != AV_PIX_FMT_NONE) |
175 |
+ { |
176 |
+ #ifdef HAVE_LIBVDPAU |
177 |
+ if(VDPAU::CDecoder::IsVDPAUFormat(*cur) && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVDPAU)) |
178 |
+@@ -137,7 +137,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G |
179 |
+ #endif |
180 |
+ #ifdef HAVE_LIBVA |
181 |
+ // mpeg4 vaapi decoding is disabled |
182 |
+- if(*cur == PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI)) |
183 |
++ if(*cur == AV_PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI)) |
184 |
+ { |
185 |
+ VAAPI::CDecoder* dec = new VAAPI::CDecoder(); |
186 |
+ if(dec->Open(avctx, ctx->m_pCodecContext, *cur, ctx->m_uSurfacesCount) == true) |
187 |
+@@ -214,11 +214,11 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStre |
188 |
+ |
189 |
+ for(std::vector<ERenderFormat>::iterator it = options.m_formats.begin(); it != options.m_formats.end(); ++it) |
190 |
+ { |
191 |
+- m_formats.push_back((PixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it)); |
192 |
++ m_formats.push_back((AVPixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it)); |
193 |
+ if(*it == RENDER_FMT_YUV420P) |
194 |
+- m_formats.push_back(PIX_FMT_YUVJ420P); |
195 |
++ m_formats.push_back(AV_PIX_FMT_YUVJ420P); |
196 |
+ } |
197 |
+- m_formats.push_back(PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */ |
198 |
++ m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */ |
199 |
+ |
200 |
+ pCodec = avcodec_find_decoder(hints.codec); |
201 |
+ |
202 |
+@@ -655,7 +655,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCom |
203 |
+ pDvdVideoPicture->color_transfer = m_pCodecContext->color_trc; |
204 |
+ pDvdVideoPicture->color_matrix = m_pCodecContext->colorspace; |
205 |
+ if(m_pCodecContext->color_range == AVCOL_RANGE_JPEG |
206 |
+- || m_pCodecContext->pix_fmt == PIX_FMT_YUVJ420P) |
207 |
++ || m_pCodecContext->pix_fmt == AV_PIX_FMT_YUVJ420P) |
208 |
+ pDvdVideoPicture->color_range = 1; |
209 |
+ else |
210 |
+ pDvdVideoPicture->color_range = 0; |
211 |
+@@ -738,8 +738,8 @@ bool CDVDVideoCodecFFmpeg::GetPicture(DV |
212 |
+ pDvdVideoPicture->iFlags |= pDvdVideoPicture->data[0] ? 0 : DVP_FLAG_DROPPED; |
213 |
+ pDvdVideoPicture->extended_format = 0; |
214 |
+ |
215 |
+- PixelFormat pix_fmt; |
216 |
+- pix_fmt = (PixelFormat)m_pFrame->format; |
217 |
++ AVPixelFormat pix_fmt; |
218 |
++ pix_fmt = (AVPixelFormat)m_pFrame->format; |
219 |
+ |
220 |
+ pDvdVideoPicture->format = CDVDCodecUtils::EFormatFromPixfmt(pix_fmt); |
221 |
+ return true; |
222 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h |
223 |
+=================================================================== |
224 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h |
225 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h |
226 |
+@@ -46,7 +46,7 @@ public: |
227 |
+ public: |
228 |
+ IHardwareDecoder() {} |
229 |
+ virtual ~IHardwareDecoder() {}; |
230 |
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces) = 0; |
231 |
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces) = 0; |
232 |
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame) = 0; |
233 |
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) = 0; |
234 |
+ virtual int Check (AVCodecContext* avctx) = 0; |
235 |
+@@ -77,7 +77,7 @@ public: |
236 |
+ void SetHardware(IHardwareDecoder* hardware); |
237 |
+ |
238 |
+ protected: |
239 |
+- static enum PixelFormat GetFormat(struct AVCodecContext * avctx, const PixelFormat * fmt); |
240 |
++ static enum AVPixelFormat GetFormat(struct AVCodecContext * avctx, const AVPixelFormat * fmt); |
241 |
+ |
242 |
+ int FilterOpen(const std::string& filters, bool scale); |
243 |
+ void FilterClose(); |
244 |
+@@ -119,7 +119,7 @@ protected: |
245 |
+ int m_iLastKeyframe; |
246 |
+ double m_dts; |
247 |
+ bool m_started; |
248 |
+- std::vector<PixelFormat> m_formats; |
249 |
++ std::vector<AVPixelFormat> m_formats; |
250 |
+ double m_decoderPts; |
251 |
+ int m_skippedDeint; |
252 |
+ bool m_requestSkipDeint; |
253 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp |
254 |
+=================================================================== |
255 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp |
256 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp |
257 |
+@@ -554,11 +554,11 @@ void CDVDVideoCodecVDA::DisplayQueuePop( |
258 |
+ |
259 |
+ void CDVDVideoCodecVDA::UYVY422_to_YUV420P(uint8_t *yuv422_ptr, int yuv422_stride, DVDVideoPicture *picture) |
260 |
+ { |
261 |
+- // convert PIX_FMT_UYVY422 to PIX_FMT_YUV420P. |
262 |
++ // convert AV_PIX_FMT_UYVY422 to AV_PIX_FMT_YUV420P. |
263 |
+ struct SwsContext *swcontext = sws_getContext( |
264 |
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_UYVY422, |
265 |
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P, |
266 |
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); |
267 |
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_UYVY422, |
268 |
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P, |
269 |
++ SWS_FAST_BILINEAR, NULL, NULL, NULL); |
270 |
+ if (swcontext) |
271 |
+ { |
272 |
+ uint8_t *src[] = { yuv422_ptr, 0, 0, 0 }; |
273 |
+@@ -574,11 +574,11 @@ void CDVDVideoCodecVDA::UYVY422_to_YUV42 |
274 |
+ |
275 |
+ void CDVDVideoCodecVDA::BGRA_to_YUV420P(uint8_t *bgra_ptr, int bgra_stride, DVDVideoPicture *picture) |
276 |
+ { |
277 |
+- // convert PIX_FMT_BGRA to PIX_FMT_YUV420P. |
278 |
++ // convert AV_PIX_FMT_BGRA to AV_PIX_FMT_YUV420P. |
279 |
+ struct SwsContext *swcontext = sws_getContext( |
280 |
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_BGRA, |
281 |
+- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P, |
282 |
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); |
283 |
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_BGRA, |
284 |
++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P, |
285 |
++ SWS_FAST_BILINEAR, NULL, NULL, NULL); |
286 |
+ if (swcontext) |
287 |
+ { |
288 |
+ uint8_t *src[] = { bgra_ptr, 0, 0, 0 }; |
289 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp |
290 |
+=================================================================== |
291 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp |
292 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp |
293 |
+@@ -886,7 +886,7 @@ static bool CheckCompatibility(AVCodecCo |
294 |
+ return true; |
295 |
+ } |
296 |
+ |
297 |
+-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces) |
298 |
++bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces) |
299 |
+ { |
300 |
+ if (!CheckCompatibility(avctx)) |
301 |
+ return false; |
302 |
+@@ -1135,9 +1135,9 @@ bool CDecoder::OpenDecoder() |
303 |
+ return true; |
304 |
+ } |
305 |
+ |
306 |
+-bool CDecoder::Supports(enum PixelFormat fmt) |
307 |
++bool CDecoder::Supports(enum AVPixelFormat fmt) |
308 |
+ { |
309 |
+- if(fmt == PIX_FMT_DXVA2_VLD) |
310 |
++ if(fmt == AV_PIX_FMT_DXVA2_VLD) |
311 |
+ return true; |
312 |
+ return false; |
313 |
+ } |
314 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h |
315 |
+=================================================================== |
316 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h |
317 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h |
318 |
+@@ -141,7 +141,7 @@ class CDecoder |
319 |
+ public: |
320 |
+ CDecoder(); |
321 |
+ ~CDecoder(); |
322 |
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces); |
323 |
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces); |
324 |
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame); |
325 |
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); |
326 |
+ virtual int Check (AVCodecContext* avctx); |
327 |
+@@ -154,7 +154,7 @@ public: |
328 |
+ int GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags); |
329 |
+ void RelBuffer(uint8_t *data); |
330 |
+ |
331 |
+- static bool Supports(enum PixelFormat fmt); |
332 |
++ static bool Supports(enum AVPixelFormat fmt); |
333 |
+ |
334 |
+ void CloseDXVADecoder(); |
335 |
+ |
336 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp |
337 |
+=================================================================== |
338 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp |
339 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp |
340 |
+@@ -479,7 +479,7 @@ CDecoder::~CDecoder() |
341 |
+ Close(); |
342 |
+ } |
343 |
+ |
344 |
+-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces) |
345 |
++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces) |
346 |
+ { |
347 |
+ // don't support broken wrappers by default |
348 |
+ // nvidia cards with a vaapi to vdpau wrapper |
349 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h |
350 |
+=================================================================== |
351 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h |
352 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h |
353 |
+@@ -406,7 +406,7 @@ public: |
354 |
+ CDecoder(); |
355 |
+ virtual ~CDecoder(); |
356 |
+ |
357 |
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); |
358 |
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); |
359 |
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame); |
360 |
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); |
361 |
+ virtual void Reset(); |
362 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp |
363 |
+=================================================================== |
364 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp |
365 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp |
366 |
+@@ -186,7 +186,7 @@ void CDecoder::Close() |
367 |
+ m_bitstream = NULL; |
368 |
+ } |
369 |
+ |
370 |
+-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces) |
371 |
++bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces) |
372 |
+ { |
373 |
+ Close(); |
374 |
+ |
375 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h |
376 |
+=================================================================== |
377 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h |
378 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h |
379 |
+@@ -35,7 +35,7 @@ class CDecoder |
380 |
+ public: |
381 |
+ CDecoder(); |
382 |
+ ~CDecoder(); |
383 |
+- virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); |
384 |
++ virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); |
385 |
+ virtual int Decode(AVCodecContext* avctx, AVFrame* frame); |
386 |
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); |
387 |
+ virtual int Check(AVCodecContext* avctx); |
388 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp |
389 |
+=================================================================== |
390 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp |
391 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp |
392 |
+@@ -486,7 +486,7 @@ CDecoder::CDecoder() : m_vdpauOutput(&m_ |
393 |
+ m_vdpauConfig.context = 0; |
394 |
+ } |
395 |
+ |
396 |
+-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces) |
397 |
++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces) |
398 |
+ { |
399 |
+ // check if user wants to decode this format with VDPAU |
400 |
+ std::string gpuvendor = g_Windowing.GetRenderVendor(); |
401 |
+@@ -760,7 +760,7 @@ int CDecoder::Check(AVCodecContext* avct |
402 |
+ return 0; |
403 |
+ } |
404 |
+ |
405 |
+-bool CDecoder::IsVDPAUFormat(PixelFormat format) |
406 |
++bool CDecoder::IsVDPAUFormat(AVPixelFormat format) |
407 |
+ { |
408 |
+ if (format == AV_PIX_FMT_VDPAU) |
409 |
+ return true; |
410 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h |
411 |
+=================================================================== |
412 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h |
413 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h |
414 |
+@@ -556,7 +556,7 @@ public: |
415 |
+ CDecoder(); |
416 |
+ virtual ~CDecoder(); |
417 |
+ |
418 |
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); |
419 |
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); |
420 |
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame); |
421 |
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); |
422 |
+ virtual void Reset(); |
423 |
+@@ -571,7 +571,7 @@ public: |
424 |
+ bool Supports(VdpVideoMixerFeature feature); |
425 |
+ bool Supports(EINTERLACEMETHOD method); |
426 |
+ EINTERLACEMETHOD AutoInterlaceMethod(); |
427 |
+- static bool IsVDPAUFormat(PixelFormat fmt); |
428 |
++ static bool IsVDPAUFormat(AVPixelFormat fmt); |
429 |
+ |
430 |
+ static void FFReleaseBuffer(void *opaque, uint8_t *data); |
431 |
+ static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags); |
432 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp |
433 |
+=================================================================== |
434 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp |
435 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp |
436 |
+@@ -1638,7 +1638,7 @@ void CDVDDemuxFFmpeg::ParsePacket(AVPack |
437 |
+ |
438 |
+ // for video we need a decoder to get desired information into codec context |
439 |
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec->extradata && |
440 |
+- (!st->codec->width || st->codec->pix_fmt == PIX_FMT_NONE)) |
441 |
++ (!st->codec->width || st->codec->pix_fmt == AV_PIX_FMT_NONE)) |
442 |
+ { |
443 |
+ // open a decoder, it will be cleared down by ffmpeg on closing the stream |
444 |
+ if (!st->codec->codec) |
445 |
+@@ -1695,7 +1695,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady() |
446 |
+ st = m_pFormatContext->streams[idx]; |
447 |
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
448 |
+ { |
449 |
+- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE) |
450 |
++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE) |
451 |
+ return true; |
452 |
+ hasVideo = true; |
453 |
+ } |
454 |
+@@ -1708,7 +1708,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady() |
455 |
+ st = m_pFormatContext->streams[i]; |
456 |
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
457 |
+ { |
458 |
+- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE) |
459 |
++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE) |
460 |
+ return true; |
461 |
+ hasVideo = true; |
462 |
+ } |
463 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp |
464 |
+=================================================================== |
465 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp |
466 |
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp |
467 |
+@@ -275,7 +275,7 @@ bool CDVDFileInfo::ExtractThumb(const st |
468 |
+ |
469 |
+ uint8_t *pOutBuf = new uint8_t[nWidth * nHeight * 4]; |
470 |
+ struct SwsContext *context = sws_getContext(picture.iWidth, picture.iHeight, |
471 |
+- PIX_FMT_YUV420P, nWidth, nHeight, PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); |
472 |
++ AV_PIX_FMT_YUV420P, nWidth, nHeight, AV_PIX_FMT_BGRA, SWS_FAST_BILINEAR, NULL, NULL, NULL); |
473 |
+ |
474 |
+ if (context) |
475 |
+ { |
476 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp |
477 |
+=================================================================== |
478 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp |
479 |
++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp |
480 |
+@@ -2932,7 +2932,7 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im |
481 |
+ } |
482 |
+ else if (m_format == RENDER_FMT_NV12) |
483 |
+ { |
484 |
+- srcFormat = PIX_FMT_NV12; |
485 |
++ srcFormat = AV_PIX_FMT_NV12; |
486 |
+ for (int i = 0; i < 2; i++) |
487 |
+ { |
488 |
+ src[i] = im->plane[i]; |
489 |
+@@ -2941,13 +2941,13 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im |
490 |
+ } |
491 |
+ else if (m_format == RENDER_FMT_YUYV422) |
492 |
+ { |
493 |
+- srcFormat = PIX_FMT_YUYV422; |
494 |
++ srcFormat = AV_PIX_FMT_YUYV422; |
495 |
+ src[0] = im->plane[0]; |
496 |
+ srcStride[0] = im->stride[0]; |
497 |
+ } |
498 |
+ else if (m_format == RENDER_FMT_UYVY422) |
499 |
+ { |
500 |
+- srcFormat = PIX_FMT_UYVY422; |
501 |
++ srcFormat = AV_PIX_FMT_UYVY422; |
502 |
+ src[0] = im->plane[0]; |
503 |
+ srcStride[0] = im->stride[0]; |
504 |
+ } |
505 |
+@@ -2965,8 +2965,8 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im |
506 |
+ |
507 |
+ m_context = sws_getCachedContext(m_context, |
508 |
+ im->width, im->height, (AVPixelFormat)srcFormat, |
509 |
+- im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA, |
510 |
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); |
511 |
++ im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA, |
512 |
++ SWS_FAST_BILINEAR, NULL, NULL, NULL); |
513 |
+ |
514 |
+ uint8_t *dst[] = { m_rgbBuffer, 0, 0, 0 }; |
515 |
+ int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 }; |
516 |
+@@ -2995,7 +2995,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I |
517 |
+ |
518 |
+ if (m_format == RENDER_FMT_YUV420P) |
519 |
+ { |
520 |
+- srcFormat = PIX_FMT_YUV420P; |
521 |
++ srcFormat = AV_PIX_FMT_YUV420P; |
522 |
+ for (int i = 0; i < 3; i++) |
523 |
+ { |
524 |
+ srcTop[i] = im->plane[i]; |
525 |
+@@ -3006,7 +3006,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I |
526 |
+ } |
527 |
+ else if (m_format == RENDER_FMT_NV12) |
528 |
+ { |
529 |
+- srcFormat = PIX_FMT_NV12; |
530 |
++ srcFormat = AV_PIX_FMT_NV12; |
531 |
+ for (int i = 0; i < 2; i++) |
532 |
+ { |
533 |
+ srcTop[i] = im->plane[i]; |
534 |
+@@ -3017,7 +3017,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I |
535 |
+ } |
536 |
+ else if (m_format == RENDER_FMT_YUYV422) |
537 |
+ { |
538 |
+- srcFormat = PIX_FMT_YUYV422; |
539 |
++ srcFormat = AV_PIX_FMT_YUYV422; |
540 |
+ srcTop[0] = im->plane[0]; |
541 |
+ srcStrideTop[0] = im->stride[0] * 2; |
542 |
+ srcBot[0] = im->plane[0] + im->stride[0]; |
543 |
+@@ -3025,7 +3025,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I |
544 |
+ } |
545 |
+ else if (m_format == RENDER_FMT_UYVY422) |
546 |
+ { |
547 |
+- srcFormat = PIX_FMT_UYVY422; |
548 |
++ srcFormat = AV_PIX_FMT_UYVY422; |
549 |
+ srcTop[0] = im->plane[0]; |
550 |
+ srcStrideTop[0] = im->stride[0] * 2; |
551 |
+ srcBot[0] = im->plane[0] + im->stride[0]; |
552 |
+@@ -3045,8 +3045,8 @@ void CLinuxRendererGL::ToRGBFields(YV12I |
553 |
+ |
554 |
+ m_context = sws_getCachedContext(m_context, |
555 |
+ im->width, im->height >> 1, (AVPixelFormat)srcFormat, |
556 |
+- im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA, |
557 |
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); |
558 |
++ im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA, |
559 |
++ SWS_FAST_BILINEAR, NULL, NULL, NULL); |
560 |
+ uint8_t *dstTop[] = { m_rgbBuffer, 0, 0, 0 }; |
561 |
+ uint8_t *dstBot[] = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 }; |
562 |
+ int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 }; |
563 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp |
564 |
+=================================================================== |
565 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp |
566 |
++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp |
567 |
+@@ -2006,8 +2006,8 @@ void CLinuxRendererGLES::UploadYV12Textu |
568 |
+ #endif |
569 |
+ { |
570 |
+ m_sw_context = sws_getCachedContext(m_sw_context, |
571 |
+- im->width, im->height, PIX_FMT_YUV420P, |
572 |
+- im->width, im->height, PIX_FMT_RGBA, |
573 |
++ im->width, im->height, AV_PIX_FMT_YUV420P, |
574 |
++ im->width, im->height, AV_PIX_FMT_RGBA, |
575 |
+ SWS_FAST_BILINEAR, NULL, NULL, NULL); |
576 |
+ |
577 |
+ uint8_t *src[] = { im->plane[0], im->plane[1], im->plane[2], 0 }; |
578 |
+Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp |
579 |
+=================================================================== |
580 |
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/WinRenderer.cpp |
581 |
++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp |
582 |
+@@ -94,16 +94,16 @@ CWinRenderer::~CWinRenderer() |
583 |
+ UnInit(); |
584 |
+ } |
585 |
+ |
586 |
+-static enum PixelFormat PixelFormatFromFormat(ERenderFormat format) |
587 |
++static enum AVPixelFormat PixelFormatFromFormat(ERenderFormat format) |
588 |
+ { |
589 |
+- if (format == RENDER_FMT_DXVA) return PIX_FMT_NV12; |
590 |
+- if (format == RENDER_FMT_YUV420P) return PIX_FMT_YUV420P; |
591 |
+- if (format == RENDER_FMT_YUV420P10) return PIX_FMT_YUV420P10; |
592 |
+- if (format == RENDER_FMT_YUV420P16) return PIX_FMT_YUV420P16; |
593 |
+- if (format == RENDER_FMT_NV12) return PIX_FMT_NV12; |
594 |
+- if (format == RENDER_FMT_UYVY422) return PIX_FMT_UYVY422; |
595 |
+- if (format == RENDER_FMT_YUYV422) return PIX_FMT_YUYV422; |
596 |
+- return PIX_FMT_NONE; |
597 |
++ if (format == RENDER_FMT_DXVA) return AV_PIX_FMT_NV12; |
598 |
++ if (format == RENDER_FMT_YUV420P) return AV_PIX_FMT_YUV420P; |
599 |
++ if (format == RENDER_FMT_YUV420P10) return AV_PIX_FMT_YUV420P10; |
600 |
++ if (format == RENDER_FMT_YUV420P16) return AV_PIX_FMT_YUV420P16; |
601 |
++ if (format == RENDER_FMT_NV12) return AV_PIX_FMT_NV12; |
602 |
++ if (format == RENDER_FMT_UYVY422) return AV_PIX_FMT_UYVY422; |
603 |
++ if (format == RENDER_FMT_YUYV422) return AV_PIX_FMT_YUYV422; |
604 |
++ return AV_PIX_FMT_NONE; |
605 |
+ } |
606 |
+ |
607 |
+ void CWinRenderer::ManageTextures() |
608 |
+@@ -719,13 +719,13 @@ void CWinRenderer::Render(DWORD flags) |
609 |
+ |
610 |
+ void CWinRenderer::RenderSW() |
611 |
+ { |
612 |
+- enum PixelFormat format = PixelFormatFromFormat(m_format); |
613 |
++ enum AVPixelFormat format = PixelFormatFromFormat(m_format); |
614 |
+ |
615 |
+ // 1. convert yuv to rgb |
616 |
+ m_sw_scale_ctx = sws_getCachedContext(m_sw_scale_ctx, |
617 |
+ m_sourceWidth, m_sourceHeight, format, |
618 |
+- m_sourceWidth, m_sourceHeight, PIX_FMT_BGRA, |
619 |
+- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); |
620 |
++ m_sourceWidth, m_sourceHeight, AV_PIX_FMT_BGRA, |
621 |
++ SWS_FAST_BILINEAR, NULL, NULL, NULL); |
622 |
+ |
623 |
+ YUVBuffer* buf = (YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer]; |
624 |
+ |
625 |
+Index: xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp |
626 |
+=================================================================== |
627 |
+--- xbmc-16.0-Jarvis.orig/xbmc/pictures/Picture.cpp |
628 |
++++ xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp |
629 |
+@@ -342,9 +342,9 @@ bool CPicture::ScaleImage(uint8_t *in_pi |
630 |
+ uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch, |
631 |
+ CPictureScalingAlgorithm::Algorithm scalingAlgorithm /* = CPictureScalingAlgorithm::NoAlgorithm */) |
632 |
+ { |
633 |
+- struct SwsContext *context = sws_getContext(in_width, in_height, PIX_FMT_BGRA, |
634 |
+- out_width, out_height, PIX_FMT_BGRA, |
635 |
+- CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm) | SwScaleCPUFlags(), NULL, NULL, NULL); |
636 |
++ struct SwsContext *context = sws_getContext(in_width, in_height, AV_PIX_FMT_BGRA, |
637 |
++ out_width, out_height, AV_PIX_FMT_BGRA, |
638 |
++ CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm), NULL, NULL, NULL); |
639 |
+ |
640 |
+ uint8_t *src[] = { in_pixels, 0, 0, 0 }; |
641 |
+ int srcStride[] = { (int)in_pitch, 0, 0, 0 }; |
642 |
+Index: xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp |
643 |
+=================================================================== |
644 |
+--- xbmc-16.0-Jarvis.orig/xbmc/video/FFmpegVideoDecoder.cpp |
645 |
++++ xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp |
646 |
+@@ -252,7 +252,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas |
647 |
+ return false; |
648 |
+ |
649 |
+ // Due to a bug in swsscale we need to allocate one extra line of data |
650 |
+- if ( avpicture_alloc( m_pFrameRGB, PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 ) |
651 |
++ if ( avpicture_alloc( m_pFrameRGB, AV_PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 ) |
652 |
+ return false; |
653 |
+ } |
654 |
+ |
655 |
+@@ -287,7 +287,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas |
656 |
+ |
657 |
+ // We got the video frame, render it into the picture buffer |
658 |
+ struct SwsContext * context = sws_getContext( m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt, |
659 |
+- m_frameRGBwidth, m_frameRGBheight, PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL ); |
660 |
++ m_frameRGBwidth, m_frameRGBheight, AV_PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL ); |
661 |
+ |
662 |
+ sws_scale( context, m_pFrame->data, m_pFrame->linesize, 0, m_pCodecCtx->height, |
663 |
+ m_pFrameRGB->data, m_pFrameRGB->linesize ); |
664 |
|
665 |
diff --git a/media-tv/kodi/kodi-16.0.ebuild b/media-tv/kodi/kodi-16.0.ebuild |
666 |
index 09f3eca..c133d98 100644 |
667 |
--- a/media-tv/kodi/kodi-16.0.ebuild |
668 |
+++ b/media-tv/kodi/kodi-16.0.ebuild |
669 |
@@ -157,6 +157,7 @@ src_unpack() { |
670 |
src_prepare() { |
671 |
epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617 |
672 |
epatch "${FILESDIR}"/${PN}-9999-texturepacker.patch |
673 |
+ epatch "${FILESDIR}"/${PN}-16-ffmpeg3.patch |
674 |
epatch_user #293109 |
675 |
|
676 |
# some dirs ship generated autotools, some dont |