]>
Commit | Line | Data |
---|---|---|
3b89f97e JR |
1 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp |
2 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp 2015-07-22 03:41:29.000000000 +0900 | |
3 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp 2016-03-31 21:13:02.941888135 +0900 | |
4 | @@ -42,7 +42,7 @@ | |
5 | #include "libswscale/swscale.h" | |
6 | } | |
7 | ||
8 | -// allocate a new picture (PIX_FMT_YUV420P) | |
9 | +// allocate a new picture (AV_PIX_FMT_YUV420P) | |
10 | DVDVideoPicture* CDVDCodecUtils::AllocatePicture(int iWidth, int iHeight) | |
11 | { | |
12 | DVDVideoPicture* pPicture = new DVDVideoPicture; | |
13 | @@ -267,11 +267,11 @@ | |
14 | ||
15 | int dstformat; | |
16 | if (format == RENDER_FMT_UYVY422) | |
17 | - dstformat = PIX_FMT_UYVY422; | |
18 | + dstformat = AV_PIX_FMT_UYVY422; | |
19 | else | |
20 | - dstformat = PIX_FMT_YUYV422; | |
21 | + dstformat = AV_PIX_FMT_YUYV422; | |
22 | ||
23 | - struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, PIX_FMT_YUV420P, | |
24 | + struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, AV_PIX_FMT_YUV420P, | |
25 | pPicture->iWidth, pPicture->iHeight, (AVPixelFormat)dstformat, | |
26 | SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); | |
27 | sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride); | |
28 | @@ -464,25 +464,25 @@ | |
29 | } | |
30 | ||
31 | struct EFormatMap { | |
32 | - PixelFormat pix_fmt; | |
33 | + AVPixelFormat pix_fmt; | |
34 | ERenderFormat format; | |
35 | }; | |
36 | ||
37 | static const EFormatMap g_format_map[] = { | |
38 | - { PIX_FMT_YUV420P, RENDER_FMT_YUV420P } | |
39 | -, { PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P } | |
40 | -, { PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 } | |
41 | -, { PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 } | |
42 | -, { PIX_FMT_UYVY422, RENDER_FMT_UYVY422 } | |
43 | -, { PIX_FMT_YUYV422, RENDER_FMT_YUYV422 } | |
44 | -, { PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI } | |
45 | -, { PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA } | |
46 | -, { PIX_FMT_NONE , RENDER_FMT_NONE } | |
47 | + { AV_PIX_FMT_YUV420P, RENDER_FMT_YUV420P } | |
48 | +, { AV_PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P } | |
49 | +, { AV_PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 } | |
50 | +, { AV_PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 } | |
51 | +, { AV_PIX_FMT_UYVY422, RENDER_FMT_UYVY422 } | |
52 | +, { AV_PIX_FMT_YUYV422, RENDER_FMT_YUYV422 } | |
53 | +, { AV_PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI } | |
54 | +, { AV_PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA } | |
55 | +, { AV_PIX_FMT_NONE , RENDER_FMT_NONE } | |
56 | }; | |
57 | ||
58 | ERenderFormat CDVDCodecUtils::EFormatFromPixfmt(int fmt) | |
59 | { | |
60 | - for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p) | |
61 | + for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p) | |
62 | { | |
63 | if(p->pix_fmt == fmt) | |
64 | return p->format; | |
65 | @@ -492,10 +492,10 @@ | |
66 | ||
67 | int CDVDCodecUtils::PixfmtFromEFormat(ERenderFormat fmt) | |
68 | { | |
69 | - for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p) | |
70 | + for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p) | |
71 | { | |
72 | if(p->format == fmt) | |
73 | return p->pix_fmt; | |
74 | } | |
75 | - return PIX_FMT_NONE; | |
76 | + return AV_PIX_FMT_NONE; | |
77 | } | |
c9c037ab ER |
78 | --- xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp~ 2016-04-15 00:11:54.000000000 +0300 |
79 | +++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2016-04-15 00:17:02.509741123 +0300 | |
3b89f97e JR |
80 | @@ -79,8 +79,8 @@ |
81 | STATE_SW_MULTI | |
82 | }; | |
83 | ||
84 | -enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx | |
85 | - , const PixelFormat * fmt ) | |
86 | +enum AVPixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx | |
87 | + , const AVPixelFormat * fmt ) | |
88 | { | |
89 | CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque; | |
90 | ||
91 | @@ -97,8 +97,8 @@ | |
92 | return avcodec_default_get_format(avctx, fmt); | |
93 | } | |
94 | ||
95 | - const PixelFormat * cur = fmt; | |
96 | - while(*cur != PIX_FMT_NONE) | |
97 | + const AVPixelFormat * cur = fmt; | |
98 | + while(*cur != AV_PIX_FMT_NONE) | |
99 | { | |
100 | #ifdef HAVE_LIBVDPAU | |
101 | if(VDPAU::CDecoder::IsVDPAUFormat(*cur) && CSettings::Get().GetBool("videoplayer.usevdpau")) | |
c9c037ab | 102 | @@ -137,7 +137,7 @@ |
3b89f97e JR |
103 | #endif |
104 | #ifdef HAVE_LIBVA | |
105 | // mpeg4 vaapi decoding is disabled | |
c9c037ab ER |
106 | - if(*cur == PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI)) |
107 | + if(*cur == AV_PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI)) | |
3b89f97e JR |
108 | { |
109 | VAAPI::CDecoder* dec = new VAAPI::CDecoder(); | |
110 | if(dec->Open(avctx, ctx->m_pCodecContext, *cur, ctx->m_uSurfacesCount) == true) | |
111 | @@ -216,11 +216,11 @@ | |
112 | ||
113 | for(std::vector<ERenderFormat>::iterator it = options.m_formats.begin(); it != options.m_formats.end(); ++it) | |
114 | { | |
115 | - m_formats.push_back((PixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it)); | |
116 | + m_formats.push_back((AVPixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it)); | |
117 | if(*it == RENDER_FMT_YUV420P) | |
118 | - m_formats.push_back(PIX_FMT_YUVJ420P); | |
119 | + m_formats.push_back(AV_PIX_FMT_YUVJ420P); | |
120 | } | |
121 | - m_formats.push_back(PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */ | |
122 | + m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */ | |
123 | ||
124 | pCodec = avcodec_find_decoder(hints.codec); | |
125 | ||
126 | @@ -660,7 +660,7 @@ | |
127 | pDvdVideoPicture->color_transfer = m_pCodecContext->color_trc; | |
128 | pDvdVideoPicture->color_matrix = m_pCodecContext->colorspace; | |
129 | if(m_pCodecContext->color_range == AVCOL_RANGE_JPEG | |
130 | - || m_pCodecContext->pix_fmt == PIX_FMT_YUVJ420P) | |
131 | + || m_pCodecContext->pix_fmt == AV_PIX_FMT_YUVJ420P) | |
132 | pDvdVideoPicture->color_range = 1; | |
133 | else | |
134 | pDvdVideoPicture->color_range = 0; | |
135 | @@ -743,8 +743,8 @@ | |
136 | pDvdVideoPicture->iFlags |= pDvdVideoPicture->data[0] ? 0 : DVP_FLAG_DROPPED; | |
137 | pDvdVideoPicture->extended_format = 0; | |
138 | ||
139 | - PixelFormat pix_fmt; | |
140 | - pix_fmt = (PixelFormat)m_pFrame->format; | |
141 | + AVPixelFormat pix_fmt; | |
142 | + pix_fmt = (AVPixelFormat)m_pFrame->format; | |
143 | ||
144 | pDvdVideoPicture->format = CDVDCodecUtils::EFormatFromPixfmt(pix_fmt); | |
145 | return true; | |
146 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h | |
147 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h 2015-07-22 03:41:29.000000000 +0900 | |
148 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h 2016-03-31 21:00:47.697798052 +0900 | |
149 | @@ -46,7 +46,7 @@ | |
150 | public: | |
151 | IHardwareDecoder() {} | |
152 | virtual ~IHardwareDecoder() {}; | |
153 | - virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces) = 0; | |
154 | + virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces) = 0; | |
155 | virtual int Decode (AVCodecContext* avctx, AVFrame* frame) = 0; | |
156 | virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) = 0; | |
157 | virtual int Check (AVCodecContext* avctx) = 0; | |
158 | @@ -77,7 +77,7 @@ | |
159 | void SetHardware(IHardwareDecoder* hardware); | |
160 | ||
161 | protected: | |
162 | - static enum PixelFormat GetFormat(struct AVCodecContext * avctx, const PixelFormat * fmt); | |
163 | + static enum AVPixelFormat GetFormat(struct AVCodecContext * avctx, const AVPixelFormat * fmt); | |
164 | ||
165 | int FilterOpen(const std::string& filters, bool scale); | |
166 | void FilterClose(); | |
167 | @@ -121,7 +121,7 @@ | |
168 | int m_iLastKeyframe; | |
169 | double m_dts; | |
170 | bool m_started; | |
171 | - std::vector<PixelFormat> m_formats; | |
172 | + std::vector<AVPixelFormat> m_formats; | |
173 | double m_decoderPts; | |
174 | int m_skippedDeint; | |
175 | bool m_requestSkipDeint; | |
176 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | |
177 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2015-07-22 03:41:29.000000000 +0900 | |
178 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2016-03-31 21:16:03.131015505 +0900 | |
179 | @@ -479,7 +479,7 @@ | |
180 | Close(); | |
181 | } | |
182 | ||
183 | -bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces) | |
184 | +bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces) | |
185 | { | |
186 | // don't support broken wrappers by default | |
187 | // nvidia cards with a vaapi to vdpau wrapper | |
188 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h | |
189 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h 2015-07-22 03:41:29.000000000 +0900 | |
190 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h 2016-03-31 21:14:41.633219057 +0900 | |
191 | @@ -406,7 +406,7 @@ | |
192 | CDecoder(); | |
193 | virtual ~CDecoder(); | |
194 | ||
195 | - virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); | |
196 | + virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); | |
197 | virtual int Decode (AVCodecContext* avctx, AVFrame* frame); | |
198 | virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); | |
199 | virtual void Reset(); | |
200 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | |
201 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2015-07-22 03:41:29.000000000 +0900 | |
202 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2016-03-31 21:15:34.730618946 +0900 | |
203 | @@ -483,7 +483,7 @@ | |
204 | m_vdpauConfig.context = 0; | |
205 | } | |
206 | ||
207 | -bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces) | |
208 | +bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces) | |
209 | { | |
210 | // check if user wants to decode this format with VDPAU | |
211 | std::string gpuvendor = g_Windowing.GetRenderVendor(); | |
212 | @@ -757,7 +757,7 @@ | |
213 | return 0; | |
214 | } | |
215 | ||
216 | -bool CDecoder::IsVDPAUFormat(PixelFormat format) | |
217 | +bool CDecoder::IsVDPAUFormat(AVPixelFormat format) | |
218 | { | |
219 | if (format == AV_PIX_FMT_VDPAU) | |
220 | return true; | |
221 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h | |
222 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h 2015-07-22 03:41:29.000000000 +0900 | |
223 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h 2016-03-31 21:14:26.429677869 +0900 | |
224 | @@ -556,7 +556,7 @@ | |
225 | CDecoder(); | |
226 | virtual ~CDecoder(); | |
227 | ||
228 | - virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); | |
229 | + virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); | |
230 | virtual int Decode (AVCodecContext* avctx, AVFrame* frame); | |
231 | virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); | |
232 | virtual void Reset(); | |
233 | @@ -571,7 +571,7 @@ | |
234 | bool Supports(VdpVideoMixerFeature feature); | |
235 | bool Supports(EINTERLACEMETHOD method); | |
236 | EINTERLACEMETHOD AutoInterlaceMethod(); | |
237 | - static bool IsVDPAUFormat(PixelFormat fmt); | |
238 | + static bool IsVDPAUFormat(AVPixelFormat fmt); | |
239 | ||
240 | static void FFReleaseBuffer(void *opaque, uint8_t *data); | |
241 | static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags); | |
242 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | |
243 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2015-07-22 03:41:29.000000000 +0900 | |
244 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2016-03-31 21:16:43.421582924 +0900 | |
245 | @@ -1617,7 +1617,7 @@ | |
246 | ||
247 | // for video we need a decoder to get desired information into codec context | |
248 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec->extradata && | |
249 | - (!st->codec->width || st->codec->pix_fmt == PIX_FMT_NONE)) | |
250 | + (!st->codec->width || st->codec->pix_fmt == AV_PIX_FMT_NONE)) | |
251 | { | |
252 | // open a decoder, it will be cleared down by ffmpeg on closing the stream | |
253 | if (!st->codec->codec) | |
254 | @@ -1674,7 +1674,7 @@ | |
255 | st = m_pFormatContext->streams[idx]; | |
256 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) | |
257 | { | |
258 | - if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE) | |
259 | + if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE) | |
260 | return true; | |
261 | hasVideo = true; | |
262 | } | |
263 | @@ -1687,7 +1687,7 @@ | |
264 | st = m_pFormatContext->streams[i]; | |
265 | if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) | |
266 | { | |
267 | - if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE) | |
268 | + if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE) | |
269 | return true; | |
270 | hasVideo = true; | |
271 | } | |
272 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDFileInfo.cpp | |
273 | --- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2015-07-22 03:41:29.000000000 +0900 | |
274 | +++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2016-03-31 21:10:31.139940012 +0900 | |
275 | @@ -275,7 +275,7 @@ | |
276 | ||
277 | uint8_t *pOutBuf = new uint8_t[nWidth * nHeight * 4]; | |
278 | struct SwsContext *context = sws_getContext(picture.iWidth, picture.iHeight, | |
279 | - PIX_FMT_YUV420P, nWidth, nHeight, PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); | |
280 | + AV_PIX_FMT_YUV420P, nWidth, nHeight, AV_PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); | |
281 | ||
282 | if (context) | |
283 | { | |
284 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/FFmpeg.h xbmc-15.0-Isengard/xbmc/cores/FFmpeg.h | |
285 | --- xbmc-15.0-Isengard.orig/xbmc/cores/FFmpeg.h 2015-07-22 03:41:29.000000000 +0900 | |
286 | +++ xbmc-15.0-Isengard/xbmc/cores/FFmpeg.h 2016-03-31 21:09:46.016055600 +0900 | |
287 | @@ -39,13 +39,13 @@ | |
288 | int flags = 0; | |
289 | ||
290 | if (cpuFeatures & CPU_FEATURE_MMX) | |
291 | - flags |= SWS_CPU_CAPS_MMX; | |
292 | + flags |= PP_CPU_CAPS_MMX; | |
293 | if (cpuFeatures & CPU_FEATURE_MMX2) | |
294 | - flags |= SWS_CPU_CAPS_MMX2; | |
295 | + flags |= PP_CPU_CAPS_MMX2; | |
296 | if (cpuFeatures & CPU_FEATURE_3DNOW) | |
297 | - flags |= SWS_CPU_CAPS_3DNOW; | |
298 | + flags |= PP_CPU_CAPS_3DNOW; | |
299 | if (cpuFeatures & CPU_FEATURE_ALTIVEC) | |
300 | - flags |= SWS_CPU_CAPS_ALTIVEC; | |
301 | + flags |= PP_CPU_CAPS_ALTIVEC; | |
302 | ||
303 | return flags; | |
304 | } | |
305 | diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp xbmc-15.0-Isengard/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | |
306 | --- xbmc-15.0-Isengard.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp 2015-07-22 03:41:29.000000000 +0900 | |
307 | +++ xbmc-15.0-Isengard/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp 2016-03-31 21:18:55.470144206 +0900 | |
308 | @@ -2932,7 +2932,7 @@ | |
309 | } | |
310 | else if (m_format == RENDER_FMT_NV12) | |
311 | { | |
312 | - srcFormat = PIX_FMT_NV12; | |
313 | + srcFormat = AV_PIX_FMT_NV12; | |
314 | for (int i = 0; i < 2; i++) | |
315 | { | |
316 | src[i] = im->plane[i]; | |
317 | @@ -2941,13 +2941,13 @@ | |
318 | } | |
319 | else if (m_format == RENDER_FMT_YUYV422) | |
320 | { | |
321 | - srcFormat = PIX_FMT_YUYV422; | |
322 | + srcFormat = AV_PIX_FMT_YUYV422; | |
323 | src[0] = im->plane[0]; | |
324 | srcStride[0] = im->stride[0]; | |
325 | } | |
326 | else if (m_format == RENDER_FMT_UYVY422) | |
327 | { | |
328 | - srcFormat = PIX_FMT_UYVY422; | |
329 | + srcFormat = AV_PIX_FMT_UYVY422; | |
330 | src[0] = im->plane[0]; | |
331 | srcStride[0] = im->stride[0]; | |
332 | } | |
333 | @@ -2965,7 +2965,7 @@ | |
334 | ||
335 | m_context = sws_getCachedContext(m_context, | |
336 | im->width, im->height, (AVPixelFormat)srcFormat, | |
337 | - im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA, | |
338 | + im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA, | |
339 | SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); | |
340 | ||
341 | uint8_t *dst[] = { m_rgbBuffer, 0, 0, 0 }; | |
342 | @@ -2995,7 +2995,7 @@ | |
343 | ||
344 | if (m_format == RENDER_FMT_YUV420P) | |
345 | { | |
346 | - srcFormat = PIX_FMT_YUV420P; | |
347 | + srcFormat = AV_PIX_FMT_YUV420P; | |
348 | for (int i = 0; i < 3; i++) | |
349 | { | |
350 | srcTop[i] = im->plane[i]; | |
351 | @@ -3006,7 +3006,7 @@ | |
352 | } | |
353 | else if (m_format == RENDER_FMT_NV12) | |
354 | { | |
355 | - srcFormat = PIX_FMT_NV12; | |
356 | + srcFormat = AV_PIX_FMT_NV12; | |
357 | for (int i = 0; i < 2; i++) | |
358 | { | |
359 | srcTop[i] = im->plane[i]; | |
360 | @@ -3017,7 +3017,7 @@ | |
361 | } | |
362 | else if (m_format == RENDER_FMT_YUYV422) | |
363 | { | |
364 | - srcFormat = PIX_FMT_YUYV422; | |
365 | + srcFormat = AV_PIX_FMT_YUYV422; | |
366 | srcTop[0] = im->plane[0]; | |
367 | srcStrideTop[0] = im->stride[0] * 2; | |
368 | srcBot[0] = im->plane[0] + im->stride[0]; | |
369 | @@ -3025,7 +3025,7 @@ | |
370 | } | |
371 | else if (m_format == RENDER_FMT_UYVY422) | |
372 | { | |
373 | - srcFormat = PIX_FMT_UYVY422; | |
374 | + srcFormat = AV_PIX_FMT_UYVY422; | |
375 | srcTop[0] = im->plane[0]; | |
376 | srcStrideTop[0] = im->stride[0] * 2; | |
377 | srcBot[0] = im->plane[0] + im->stride[0]; | |
378 | @@ -3045,7 +3045,7 @@ | |
379 | ||
380 | m_context = sws_getCachedContext(m_context, | |
381 | im->width, im->height >> 1, (AVPixelFormat)srcFormat, | |
382 | - im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA, | |
383 | + im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA, | |
384 | SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); | |
385 | uint8_t *dstTop[] = { m_rgbBuffer, 0, 0, 0 }; | |
386 | uint8_t *dstBot[] = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 }; | |
3b89f97e JR |
387 | diff -ur xbmc-15.0-Isengard.orig/xbmc/video/FFmpegVideoDecoder.cpp xbmc-15.0-Isengard/xbmc/video/FFmpegVideoDecoder.cpp |
388 | --- xbmc-15.0-Isengard.orig/xbmc/video/FFmpegVideoDecoder.cpp 2015-07-22 03:41:29.000000000 +0900 | |
389 | +++ xbmc-15.0-Isengard/xbmc/video/FFmpegVideoDecoder.cpp 2016-03-31 21:37:37.869490415 +0900 | |
390 | @@ -248,7 +248,7 @@ | |
391 | return false; | |
392 | ||
393 | // Due to a bug in swsscale we need to allocate one extra line of data | |
394 | - if ( avpicture_alloc( m_pFrameRGB, PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 ) | |
395 | + if ( avpicture_alloc( m_pFrameRGB, AV_PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 ) | |
396 | return false; | |
397 | } | |
398 | ||
399 | @@ -283,7 +283,7 @@ | |
400 | ||
401 | // We got the video frame, render it into the picture buffer | |
402 | struct SwsContext * context = sws_getContext( m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt, | |
403 | - m_frameRGBwidth, m_frameRGBheight, PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL ); | |
404 | + m_frameRGBwidth, m_frameRGBheight, AV_PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL ); | |
405 | ||
406 | sws_scale( context, m_pFrame->data, m_pFrame->linesize, 0, m_pCodecCtx->height, | |
407 | m_pFrameRGB->data, m_pFrameRGB->linesize ); | |
c9c037ab ER |
408 | --- xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp~ 2016-02-20 17:21:19.000000000 +0200 |
409 | +++ xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp 2016-04-15 00:56:59.263272399 +0300 | |
410 | @@ -342,8 +342,8 @@ | |
411 | uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch, | |
412 | CPictureScalingAlgorithm::Algorithm scalingAlgorithm /* = CPictureScalingAlgorithm::NoAlgorithm */) | |
413 | { | |
414 | - struct SwsContext *context = sws_getContext(in_width, in_height, PIX_FMT_BGRA, | |
415 | - out_width, out_height, PIX_FMT_BGRA, | |
416 | + struct SwsContext *context = sws_getContext(in_width, in_height, AV_PIX_FMT_BGRA, | |
417 | + out_width, out_height, AV_PIX_FMT_BGRA, | |
418 | CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm) | SwScaleCPUFlags(), NULL, NULL, NULL); | |
419 | ||
420 | uint8_t *src[] = { in_pixels, 0, 0, 0 }; |