New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612174 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

GN: Support for disabling libvpx codecs (VP8, VP9)

Project Member Reported by kjellander@chromium.org, May 16 2016

Issue description

GYP has a libvpx_build_vp9 variable that allows the user to build libvpx without VP9 support. This has significant impact on the binary size, especially for mobile platforms.

GN doesn't have this, probably because it lacks the functionality to exclude sources using wildcard patterns (https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md). 

Since the libvpx_srcs.gni file is generated by https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libvpx/generate_gypi.sh&l=317, it seems doable to split out the vp9 sources into a separate .gni file, allowing for the existence of a similar libvpx_build_vp9 variable in https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libvpx/BUILD.gn

I'm filing this in relation to https://bugs.chromium.org/p/webrtc/issues/detail?id=5884, which handles this for the GYP build of WebRTC. 
 
Cutting out vp9 by removing the files in vp9/ is pretty coarse. A cleaner alternative would be to add configs (under gen_config_files) for this purpose, but that does duplicate a lot of code. What platforms is this required for? If just arm, that's not a whole lot of duplication, but if you want x86/arm/mips and linux/win/mac for each of those, it gets a bit cumbersome.
The main short-term goal is only Android ARM (possibly Android x86 too but definitely not important in the short term). 

If we do only the config approach, won't all objects be compiled anyway? Would VP9 be trimmed away at link time then?
No, I mean adding a configure target with --disable-vp9, which would build a file list which correctly excludes vp9 and has the #defines set correctly
Sounds good. Can you create such gen_config_files configs for that permutation in generate_gypi.sh?
Is it possible or do you want me to do it? Which config do you want? As I've mentioned before, I think the cpu detect version of the arm build should go away.
I created a CL for duplicating the arm-neon and arm64 configurations: https://codereview.chromium.org/1997603002/
Mostly to check that it's possible to do so with the GN build. We can leave this open until there's a real need for this from WebRTC's perspective.

Project Member

Comment 7 by sheriffbot@chromium.org, May 19 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -johannkoenig@chromium.org johannko...@google.com
Owner: mflodman@chromium.org
Status: Assigned (was: Untriaged)
Summary: GN: Support for disabling libvpx codecs (VP8, VP9) (was: GN: Support for disabling VP9 (similar to GYP's libvpx_build_vp9 variable))
With recent discussions about making it possible to exclude the VP9 codec in our builds, I'm thinking we might want do to this?
I don't see any variables for either choosing VP8 or VP9 in https://cs.chromium.org/chromium/src/third_party/libvpx/BUILD.gn so I updated the title a bit.

Magnus: what do you say?
If yes, please assign the bug to johannkoenig@ for more input.
Labels: -Hotlist-Recharge-Cold
Cc: mflodman@chromium.org
Owner: sprang@chromium.org
You can disable VP9 from the build, rtc_libvpx_build_vp9, and to include/exclude libvpx, rtc_build_libvpx.

There is no flag to disable VP8 wrappers though.

Erik,
Assignign to you for prioritization.

Sign in to add a comment