0006-wave420l-Fix-Werror-address-issue-or-add-Waddress-in.patch 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. From 5178b06a922d9ee5e9688329cd4f3ba38e7f5143 Mon Sep 17 00:00:00 2001
  2. From: Andy Hu <andy.hu@starfivetech.com>
  3. Date: Thu, 19 Jan 2023 16:35:56 +0800
  4. Subject: [PATCH] wave420l: Fix -Werror=address issue or add Waddress in
  5. Makefile
  6. ---
  7. wave420l/code/sample/helper/main_helper.c | 20 ++++++++++----------
  8. 1 file changed, 10 insertions(+), 10 deletions(-)
  9. diff --git a/wave420l/code/sample/helper/main_helper.c b/wave420l/code/sample/helper/main_helper.c
  10. index dc6e90e..e1b4a1c 100644
  11. --- a/wave420l/code/sample/helper/main_helper.c
  12. +++ b/wave420l/code/sample/helper/main_helper.c
  13. @@ -1229,7 +1229,7 @@ Int32 writeVuiRbsp(int coreIdx, TestEncConfig *encConfig, EncOpenParam *encOP, v
  14. }
  15. encOP->vuiRbspDataAddr = vbVuiRbsp->phys_addr;
  16. - if (encConfig->vui_rbsp_file_name) {
  17. + // if (encConfig->vui_rbsp_file_name) {
  18. Uint8 *pVuiRbspBuf;
  19. Int32 rbspSizeInByte = (encOP->vuiRbspDataSize+7)>>3;
  20. ChangePathStyle(encConfig->vui_rbsp_file_name);
  21. @@ -1246,7 +1246,7 @@ Int32 writeVuiRbsp(int coreIdx, TestEncConfig *encConfig, EncOpenParam *encOP, v
  22. osal_fread(pVuiRbspBuf, 1, rbspSizeInByte, encConfig->vui_rbsp_fp);
  23. vdi_write_memory(coreIdx, encOP->vuiRbspDataAddr, pVuiRbspBuf, rbspSizeInByte, encOP->streamEndian);
  24. osal_free(pVuiRbspBuf);
  25. - }
  26. + // }
  27. }
  28. return TRUE;
  29. }
  30. @@ -1263,7 +1263,7 @@ Int32 writeHrdRbsp(int coreIdx, TestEncConfig *encConfig, EncOpenParam *encOP, v
  31. encOP->hrdRbspDataAddr = vbHrdRbsp->phys_addr;
  32. - if (encConfig->hrd_rbsp_file_name) {
  33. + // if (encConfig->hrd_rbsp_file_name) {
  34. Uint8 *pHrdRbspBuf;
  35. Int32 rbspSizeInByte = (encOP->hrdRbspDataSize+7)>>3;
  36. ChangePathStyle(encConfig->hrd_rbsp_file_name);
  37. @@ -1280,7 +1280,7 @@ Int32 writeHrdRbsp(int coreIdx, TestEncConfig *encConfig, EncOpenParam *encOP, v
  38. osal_fread(pHrdRbspBuf, 1, rbspSizeInByte, encConfig->hrd_rbsp_fp);
  39. vdi_write_memory(coreIdx, encOP->hrdRbspDataAddr, pHrdRbspBuf, rbspSizeInByte, encOP->streamEndian);
  40. osal_free(pHrdRbspBuf);
  41. - }
  42. + // }
  43. }
  44. return TRUE;
  45. }
  46. @@ -1505,7 +1505,7 @@ int setRoiMap(int coreIdx, TestEncConfig *encConfig, EncOpenParam encOP, Physica
  47. // sample code to convert ROI coordinate to ROI map.
  48. osal_memset(&encConfig->region[0], 0, sizeof(VpuRect)*MAX_ROI_NUMBER);
  49. osal_memset(&encConfig->roiLevel[0], 0, sizeof(int)*MAX_ROI_NUMBER);
  50. - if (encConfig->roi_file_name) {
  51. + // if (encConfig->roi_file_name) {
  52. char lineStr[256] = {0, };
  53. int val;
  54. fgets(lineStr, 256, encConfig->roi_file);
  55. @@ -1525,7 +1525,7 @@ int setRoiMap(int coreIdx, TestEncConfig *encConfig, EncOpenParam encOP, Physica
  56. VLOG(ERR, "CFG file error : %s value is not available. \n", encConfig->roi_file_name);
  57. }
  58. }
  59. - }
  60. + // }
  61. encParam->ctuOptParam.addrRoiCtuMap = addrRoiMap;
  62. encParam->ctuOptParam.mapEndian = VDI_LITTLE_ENDIAN;
  63. encParam->ctuOptParam.mapStride = ((encOP.picWidth+63)&~63)>>6;
  64. @@ -1580,13 +1580,13 @@ int checkParamRestriction(Uint32 productId, TestEncConfig *encConfig)
  65. int openRoiMapFile(TestEncConfig *encConfig)
  66. {
  67. if (encConfig->roi_enable) {
  68. - if (encConfig->roi_file_name) {
  69. + // if (encConfig->roi_file_name) {
  70. ChangePathStyle(encConfig->roi_file_name);
  71. if ((encConfig->roi_file = osal_fopen(encConfig->roi_file_name, "r")) == NULL) {
  72. VLOG(ERR, "fail to open ROI file, %s\n", encConfig->roi_file_name);
  73. return FALSE;
  74. }
  75. - }
  76. + // }
  77. }
  78. return TRUE;
  79. }
  80. @@ -1617,7 +1617,7 @@ int setCtuQpMap(int coreIdx, TestEncConfig *encConfig, EncOpenParam encOP, Physi
  81. // sample code to convert CTU coordinate to CTU MODE map.
  82. osal_memset(&encConfig->region[0], 0, sizeof(VpuRect)*MAX_ROI_NUMBER);
  83. osal_memset(&encConfig->ctuQp[0], 0, sizeof(int)*MAX_ROI_NUMBER);
  84. - if (encConfig->ctuqp_file_name) {
  85. + // if (encConfig->ctuqp_file_name) {
  86. char lineStr[256] = {0, };
  87. int val;
  88. fgets(lineStr, 256, encConfig->ctuqp_file);
  89. @@ -1637,7 +1637,7 @@ int setCtuQpMap(int coreIdx, TestEncConfig *encConfig, EncOpenParam encOP, Physi
  90. VLOG(ERR, "CFG file error : %s value is not available. \n", encConfig->ctuqp_file_name);
  91. }
  92. }
  93. - }
  94. + // }
  95. encParam->ctuOptParam.addrCtuQpMap = addrCtuQpMap;
  96. encParam->ctuOptParam.mapEndian = VDI_LITTLE_ENDIAN;
  97. encParam->ctuOptParam.mapStride = ((encOP.picWidth+63)&~63)>>6;
  98. --
  99. 2.36.0