gd-2.1.1-libvpx-1.4.0.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From d41eb72cd4545c394578332e5c102dee69e02ee8 Mon Sep 17 00:00:00 2001
  2. From: Remi Collet <fedora@famillecollet.com>
  3. Date: Tue, 7 Apr 2015 13:11:03 +0200
  4. Subject: [PATCH] Fix build with latest libvpx 1.4.0
  5. These new constants exist at least since 1.0.0
  6. Compatibility ones have been droped in 1.4.0
  7. ---
  8. src/webpimg.c | 14 +++++++-------
  9. 1 file changed, 7 insertions(+), 7 deletions(-)
  10. diff --git a/src/webpimg.c b/src/webpimg.c
  11. index cf73d64..e49fcc6 100644
  12. --- a/src/webpimg.c
  13. +++ b/src/webpimg.c
  14. @@ -711,14 +711,14 @@ static WebPResult VPXEncode(const uint8* Y,
  15. codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
  16. codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
  17. - vpx_img_wrap(&img, IMG_FMT_I420,
  18. + vpx_img_wrap(&img, VPX_IMG_FMT_I420,
  19. y_width, y_height, 16, (uint8*)(Y));
  20. - img.planes[PLANE_Y] = (uint8*)(Y);
  21. - img.planes[PLANE_U] = (uint8*)(U);
  22. - img.planes[PLANE_V] = (uint8*)(V);
  23. - img.stride[PLANE_Y] = y_stride;
  24. - img.stride[PLANE_U] = uv_stride;
  25. - img.stride[PLANE_V] = uv_stride;
  26. + img.planes[VPX_PLANE_Y] = (uint8*)(Y);
  27. + img.planes[VPX_PLANE_U] = (uint8*)(U);
  28. + img.planes[VPX_PLANE_V] = (uint8*)(V);
  29. + img.stride[VPX_PLANE_Y] = y_stride;
  30. + img.stride[VPX_PLANE_U] = uv_stride;
  31. + img.stride[VPX_PLANE_V] = uv_stride;
  32. res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);