Coder Social home page Coder Social logo

drm-fourcc-rs's People

Contributors

bjorn3 avatar cmeissl avatar colinmarc avatar davide125 avatar drakulix avatar dzfranklin avatar heroickatora avatar i509vcb avatar ids1024 avatar marijns95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

drm-fourcc-rs's Issues

Should Debug and Display output the same thing?

I noticed that Debug and Display will output the same thing. For example if I create a DrmFourcc::Argb8888, the Debug and Display implementations both return AR24. It might be useful if Debug could return Argb8888 instead.

Also generate bindings for drm modifiers?

Thanks for this!

Citing the drm_fourcc.h inline comments:

In addition to the
fourcc code, a Format Modifier may optionally be provided, in order to
further describe the buffer's format - for example tiling or compression.

Could this crate also expose the DRM_FORMAT_MOD constants in a separate enum?

Address no_std use case

This library is quite useful for low-level interaction with other system components or for embedded image interchange. In those cases, including and depending on all of Rust's std is quite heavy. It also isn't really integral to any use case addressed here.

The only current interface (unless I've overlooked any) is DrmFourcc::string_form. However, it's not necessary at all as Display can be written without an allocated container such as String—making string_form redundant because it would then be a call to the standard to_string for those callers that desire it.

I'd be willing to provide a PR if desired, this will be a breaking change to 3.0 though.

R8 format panics on debug

Steps to reproduce:

println!("{:?}", DrmFourcc::R8);

It appears that the representation of this format is 0x20203852, which translates to ['R', '8', ' ', ' '], while the fourcc_string_form function expects the 3 first bytes to be alphanumeric, which is not the case here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.