add new arch m32c (newlib toolchain)
[openadk.git] / package / kodi / patches / patch-xbmc_cores_VideoRenderers_LinuxRendererGL_cpp
blobd7a322e39f04b0c41293d086496211a7c2594fb0
1 --- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp 2016-02-20 16:21:19.000000000 +0100
2 +++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp      2016-03-19 18:38:18.666022051 +0100
3 @@ -2932,7 +2932,7 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
4    }
5    else if (m_format == RENDER_FMT_NV12)
6    {
7 -    srcFormat = PIX_FMT_NV12;
8 +    srcFormat = AV_PIX_FMT_NV12;
9      for (int i = 0; i < 2; i++)
10      {
11        src[i]       = im->plane[i];
12 @@ -2941,13 +2941,13 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
13    }
14    else if (m_format == RENDER_FMT_YUYV422)
15    {
16 -    srcFormat    = PIX_FMT_YUYV422;
17 +    srcFormat    = AV_PIX_FMT_YUYV422;
18      src[0]       = im->plane[0];
19      srcStride[0] = im->stride[0];
20    }
21    else if (m_format == RENDER_FMT_UYVY422)
22    {
23 -    srcFormat    = PIX_FMT_UYVY422;
24 +    srcFormat    = AV_PIX_FMT_UYVY422;
25      src[0]       = im->plane[0];
26      srcStride[0] = im->stride[0];
27    }
28 @@ -2965,8 +2965,8 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im
30    m_context = sws_getCachedContext(m_context,
31                                                   im->width, im->height, (AVPixelFormat)srcFormat,
32 -                                                 im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA,
33 -                                                 SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
34 +                                                 im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA,
35 +                                                 SWS_FAST_BILINEAR, NULL, NULL, NULL);
37    uint8_t *dst[]       = { m_rgbBuffer, 0, 0, 0 };
38    int      dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };
39 @@ -2995,7 +2995,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
41    if (m_format == RENDER_FMT_YUV420P)
42    {
43 -    srcFormat = PIX_FMT_YUV420P;
44 +    srcFormat = AV_PIX_FMT_YUV420P;
45      for (int i = 0; i < 3; i++)
46      {
47        srcTop[i]       = im->plane[i];
48 @@ -3006,7 +3006,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
49    }
50    else if (m_format == RENDER_FMT_NV12)
51    {
52 -    srcFormat = PIX_FMT_NV12;
53 +    srcFormat = AV_PIX_FMT_NV12;
54      for (int i = 0; i < 2; i++)
55      {
56        srcTop[i]       = im->plane[i];
57 @@ -3017,7 +3017,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
58    }
59    else if (m_format == RENDER_FMT_YUYV422)
60    {
61 -    srcFormat       = PIX_FMT_YUYV422;
62 +    srcFormat       = AV_PIX_FMT_YUYV422;
63      srcTop[0]       = im->plane[0];
64      srcStrideTop[0] = im->stride[0] * 2;
65      srcBot[0]       = im->plane[0] + im->stride[0];
66 @@ -3025,7 +3025,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I
67    }
68    else if (m_format == RENDER_FMT_UYVY422)
69    {
70 -    srcFormat       = PIX_FMT_UYVY422;
71 +    srcFormat       = AV_PIX_FMT_UYVY422;
72      srcTop[0]       = im->plane[0];
73      srcStrideTop[0] = im->stride[0] * 2;
74      srcBot[0]       = im->plane[0] + im->stride[0];
75 @@ -3045,8 +3045,8 @@ void CLinuxRendererGL::ToRGBFields(YV12I
77    m_context = sws_getCachedContext(m_context,
78                                                   im->width, im->height >> 1, (AVPixelFormat)srcFormat,
79 -                                                 im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA,
80 -                                                 SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
81 +                                                 im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA,
82 +                                                 SWS_FAST_BILINEAR, NULL, NULL, NULL);
83    uint8_t *dstTop[]    = { m_rgbBuffer, 0, 0, 0 };
84    uint8_t *dstBot[]    = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 };
85    int      dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 };