Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.65 KB | None | 0 0
  1. From 6cbffee002a827dc7dbb2a878995a6a21f4de543 Mon Sep 17 00:00:00 2001
  2. From: "michal.lazo" <xlazom00@gmail.com>
  3. Date: Wed, 28 Sep 2016 23:57:03 +0200
  4. Subject: [PATCH] enable HEVC
  5.  
  6. ---
  7. chromium/config/Chrome/win/x64/config.asm | 6 +++---
  8. chromium/config/Chrome/win/x64/config.h | 8 ++++----
  9. chromium/config/Chromium/win/x64/config.asm | 6 +++---
  10. chromium/config/Chromium/win/x64/config.h | 8 ++++----
  11. ffmpeg_generated.gni | 28 ++++++++++++++++++++++++++++
  12. libavformat/autorename_libavformat_hevc.c | 2 ++
  13. 6 files changed, 44 insertions(+), 14 deletions(-)
  14. create mode 100644 libavformat/autorename_libavformat_hevc.c
  15.  
  16. diff --git a/chromium/config/Chrome/win/x64/config.asm b/chromium/config/Chrome/win/x64/config.asm
  17. index 6792c19..8b4b0b8 100644
  18. --- a/chromium/config/Chrome/win/x64/config.asm
  19. +++ b/chromium/config/Chrome/win/x64/config.asm
  20. @@ -700,7 +700,7 @@
  21. %define CONFIG_H264_VDA_DECODER 0
  22. %define CONFIG_H264_VDPAU_DECODER 0
  23. %define CONFIG_HAP_DECODER 0
  24. -%define CONFIG_HEVC_DECODER 0
  25. +%define CONFIG_HEVC_DECODER 1
  26. %define CONFIG_HEVC_QSV_DECODER 0
  27. %define CONFIG_HNM4_VIDEO_DECODER 0
  28. %define CONFIG_HQ_HQA_DECODER 0
  29. @@ -1131,7 +1131,7 @@
  30. %define CONFIG_H261_DEMUXER 0
  31. %define CONFIG_H263_DEMUXER 0
  32. %define CONFIG_H264_DEMUXER 0
  33. -%define CONFIG_HEVC_DEMUXER 0
  34. +%define CONFIG_HEVC_DEMUXER 1
  35. %define CONFIG_HLS_DEMUXER 0
  36. %define CONFIG_HNM_DEMUXER 0
  37. %define CONFIG_ICO_DEMUXER 0
  38. @@ -1999,7 +1999,7 @@
  39. %define CONFIG_H261_PARSER 0
  40. %define CONFIG_H263_PARSER 0
  41. %define CONFIG_H264_PARSER 1
  42. -%define CONFIG_HEVC_PARSER 0
  43. +%define CONFIG_HEVC_PARSER 1
  44. %define CONFIG_MJPEG_PARSER 0
  45. %define CONFIG_MLP_PARSER 0
  46. %define CONFIG_MPEG4VIDEO_PARSER 0
  47. diff --git a/chromium/config/Chrome/win/x64/config.h b/chromium/config/Chrome/win/x64/config.h
  48. index 9899dd4..5b3dcde 100644
  49. --- a/chromium/config/Chrome/win/x64/config.h
  50. +++ b/chromium/config/Chrome/win/x64/config.h
  51. @@ -1,7 +1,7 @@
  52. /* Automatically generated by configure - do not modify! */
  53. #ifndef FFMPEG_CONFIG_H
  54. #define FFMPEG_CONFIG_H
  55. -#define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-decoder=vorbis --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav' --enable-parser='opus,vorbis' --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --enable-yasm --extra-cflags=-I/cygdrive/d/ffmpeg-tmp/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib' --enable-decoder='aac,h264,mp3' --enable-demuxer='aac,mp3,mov' --enable-parser='aac,h264,mpegaudio'"
  56. +#define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-decoder=vorbis --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav' --enable-parser='opus,vorbis' --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --enable-yasm --extra-cflags=-I/cygdrive/d/ffmpeg-tmp/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib' --enable-decoder='aac,h264,mp3' --enable-demuxer='aac,mp3,mov' --enable-parser='aac,h264,mpegaudio' --enable-decoder='hevc' --enable-demuxer='hevc' --enable-parser='hevc'"
  57. #define FFMPEG_LICENSE "LGPL version 2.1 or later"
  58. #define CONFIG_THIS_YEAR 2016
  59. #define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
  60. @@ -716,7 +716,7 @@
  61. #define CONFIG_H264_VDA_DECODER 0
  62. #define CONFIG_H264_VDPAU_DECODER 0
  63. #define CONFIG_HAP_DECODER 0
  64. -#define CONFIG_HEVC_DECODER 0
  65. +#define CONFIG_HEVC_DECODER 1
  66. #define CONFIG_HEVC_QSV_DECODER 0
  67. #define CONFIG_HNM4_VIDEO_DECODER 0
  68. #define CONFIG_HQ_HQA_DECODER 0
  69. @@ -1147,7 +1147,7 @@
  70. #define CONFIG_H261_DEMUXER 0
  71. #define CONFIG_H263_DEMUXER 0
  72. #define CONFIG_H264_DEMUXER 0
  73. -#define CONFIG_HEVC_DEMUXER 0
  74. +#define CONFIG_HEVC_DEMUXER 1
  75. #define CONFIG_HLS_DEMUXER 0
  76. #define CONFIG_HNM_DEMUXER 0
  77. #define CONFIG_ICO_DEMUXER 0
  78. @@ -2015,7 +2015,7 @@
  79. #define CONFIG_H261_PARSER 0
  80. #define CONFIG_H263_PARSER 0
  81. #define CONFIG_H264_PARSER 1
  82. -#define CONFIG_HEVC_PARSER 0
  83. +#define CONFIG_HEVC_PARSER 1
  84. #define CONFIG_MJPEG_PARSER 0
  85. #define CONFIG_MLP_PARSER 0
  86. #define CONFIG_MPEG4VIDEO_PARSER 0
  87. diff --git a/chromium/config/Chromium/win/x64/config.asm b/chromium/config/Chromium/win/x64/config.asm
  88. index 503fda5..d09a458 100644
  89. --- a/chromium/config/Chromium/win/x64/config.asm
  90. +++ b/chromium/config/Chromium/win/x64/config.asm
  91. @@ -700,7 +700,7 @@
  92. %define CONFIG_H264_VDA_DECODER 0
  93. %define CONFIG_H264_VDPAU_DECODER 0
  94. %define CONFIG_HAP_DECODER 0
  95. -%define CONFIG_HEVC_DECODER 0
  96. +%define CONFIG_HEVC_DECODER 1
  97. %define CONFIG_HEVC_QSV_DECODER 0
  98. %define CONFIG_HNM4_VIDEO_DECODER 0
  99. %define CONFIG_HQ_HQA_DECODER 0
  100. @@ -1131,7 +1131,7 @@
  101. %define CONFIG_H261_DEMUXER 0
  102. %define CONFIG_H263_DEMUXER 0
  103. %define CONFIG_H264_DEMUXER 0
  104. -%define CONFIG_HEVC_DEMUXER 0
  105. +%define CONFIG_HEVC_DEMUXER 1
  106. %define CONFIG_HLS_DEMUXER 0
  107. %define CONFIG_HNM_DEMUXER 0
  108. %define CONFIG_ICO_DEMUXER 0
  109. @@ -1999,7 +1999,7 @@
  110. %define CONFIG_H261_PARSER 0
  111. %define CONFIG_H263_PARSER 0
  112. %define CONFIG_H264_PARSER 0
  113. -%define CONFIG_HEVC_PARSER 0
  114. +%define CONFIG_HEVC_PARSER 1
  115. %define CONFIG_MJPEG_PARSER 0
  116. %define CONFIG_MLP_PARSER 0
  117. %define CONFIG_MPEG4VIDEO_PARSER 0
  118. diff --git a/chromium/config/Chromium/win/x64/config.h b/chromium/config/Chromium/win/x64/config.h
  119. index 14b9e07..6fddb0e 100644
  120. --- a/chromium/config/Chromium/win/x64/config.h
  121. +++ b/chromium/config/Chromium/win/x64/config.h
  122. @@ -1,7 +1,7 @@
  123. /* Automatically generated by configure - do not modify! */
  124. #ifndef FFMPEG_CONFIG_H
  125. #define FFMPEG_CONFIG_H
  126. -#define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-decoder=vorbis --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav' --enable-parser='opus,vorbis' --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --enable-yasm --extra-cflags=-I/cygdrive/d/ffmpeg-tmp/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib'"
  127. +#define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-decoder=vorbis --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav' --enable-parser='opus,vorbis' --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --enable-yasm --extra-cflags=-I/cygdrive/d/ffmpeg-tmp/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib' --enable-decoder='hevc' --enable-demuxer='hevc' --enable-parser='hevc'"
  128. #define FFMPEG_LICENSE "LGPL version 2.1 or later"
  129. #define CONFIG_THIS_YEAR 2016
  130. #define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
  131. @@ -716,7 +716,7 @@
  132. #define CONFIG_H264_VDA_DECODER 0
  133. #define CONFIG_H264_VDPAU_DECODER 0
  134. #define CONFIG_HAP_DECODER 0
  135. -#define CONFIG_HEVC_DECODER 0
  136. +#define CONFIG_HEVC_DECODER 1
  137. #define CONFIG_HEVC_QSV_DECODER 0
  138. #define CONFIG_HNM4_VIDEO_DECODER 0
  139. #define CONFIG_HQ_HQA_DECODER 0
  140. @@ -1147,7 +1147,7 @@
  141. #define CONFIG_H261_DEMUXER 0
  142. #define CONFIG_H263_DEMUXER 0
  143. #define CONFIG_H264_DEMUXER 0
  144. -#define CONFIG_HEVC_DEMUXER 0
  145. +#define CONFIG_HEVC_DEMUXER 1
  146. #define CONFIG_HLS_DEMUXER 0
  147. #define CONFIG_HNM_DEMUXER 0
  148. #define CONFIG_ICO_DEMUXER 0
  149. @@ -2015,7 +2015,7 @@
  150. #define CONFIG_H261_PARSER 0
  151. #define CONFIG_H263_PARSER 0
  152. #define CONFIG_H264_PARSER 0
  153. -#define CONFIG_HEVC_PARSER 0
  154. +#define CONFIG_HEVC_PARSER 1
  155. #define CONFIG_MJPEG_PARSER 0
  156. #define CONFIG_MLP_PARSER 0
  157. #define CONFIG_MPEG4VIDEO_PARSER 0
  158. diff --git a/ffmpeg_generated.gni b/ffmpeg_generated.gni
  159. index e952679..24f9f24 100644
  160. --- a/ffmpeg_generated.gni
  161. +++ b/ffmpeg_generated.gni
  162. @@ -143,7 +143,35 @@ if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "C
  163. "libavutil/timecode.c",
  164. "libavutil/twofish.c",
  165. "libavutil/utils.c",
  166. + "libavcodec/hevc.c",
  167. + "libavcodec/hevc_cabac.c",
  168. + "libavcodec/hevc_data.c",
  169. + "libavcodec/hevc_filter.c",
  170. + "libavcodec/hevc_mvs.c",
  171. + "libavcodec/hevc_parse.c",
  172. + "libavcodec/hevc_parser.c",
  173. + "libavcodec/hevc_ps.c",
  174. + "libavcodec/hevc_refs.c",
  175. + "libavcodec/hevc_sei.c",
  176. + "libavcodec/hevcdsp.c",
  177. + "libavcodec/hevcpred.c",
  178. + "libavcodec/x86/hevcdsp_init.c",
  179. + "libavcodec/bswapdsp.c",
  180. + "libavcodec/x86/bswapdsp_init.c",
  181. + "libavformat/autorename_libavformat_hevc.c",
  182. + "libavformat/hevcdec.c",
  183. + "libavformat/avc.c",
  184. + ]
  185. + ffmpeg_yasm_sources += [
  186. + "libavcodec/x86/hevc_deblock.asm",
  187. + "libavcodec/x86/hevc_idct.asm",
  188. + "libavcodec/x86/hevc_mc.asm",
  189. + "libavcodec/x86/hevc_res_add.asm",
  190. + "libavcodec/x86/hevc_sao.asm",
  191. + "libavcodec/x86/hevc_sao_10bit.asm",
  192. + "libavcodec/x86/bswapdsp.asm",
  193. ]
  194. +
  195. }
  196.  
  197. if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
  198. diff --git a/libavformat/autorename_libavformat_hevc.c b/libavformat/autorename_libavformat_hevc.c
  199. new file mode 100644
  200. index 0000000..c9593dc
  201. --- /dev/null
  202. +++ b/libavformat/autorename_libavformat_hevc.c
  203. @@ -0,0 +1,2 @@
  204. +// File automatically generated. See crbug.com/495833.
  205. +#include "hevc.c"
  206. --
  207. 2.9.2.windows.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement