utils: codegen: gen-formats.py: Use jinja
Currently the gen-formats.py script can only be used to generate C++ code because it hard-codes part of the template. Use jinja to fully remove any such dependency. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -35,7 +35,9 @@ constexpr uint64_t __mod(unsigned int vendor, unsigned int mod)
|
||||
|
||||
} /* namespace */
|
||||
|
||||
${formats}
|
||||
{% for f in formats -%}
|
||||
constexpr PixelFormat {{f.name}}(__fourcc({{f.fourcc}}), __mod({{f.mod}}));
|
||||
{% endfor %}
|
||||
|
||||
} /* namespace formats */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user