Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some corrections for GCC and extra API #10

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

shekh
Copy link

@shekh shekh commented Nov 15, 2017

No description provided.

@sw-team-release-gpsw
Copy link

sw-team-release-gpsw commented Nov 15, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@dnewman-gpsw dnewman-gpsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

positive pitch is required further down in the code.

Copy link
Collaborator

@dnewman-gpsw dnewman-gpsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this seems okay, however the pitch sign change will not work for all sources. The new API additions are concerning, as I don't know all the ramifications. What problem are you trying to address?

@shekh
Copy link
Author

shekh commented Nov 20, 2017

the pitch sign change will not work for all sources

Can you list these sources? I tried to avoid copying the buffer when possible.
However it seems the encoder expects RG24 and BGRA in bottom-up memory order, while other formats in top-down order. This is quite inconvenient and with experiment I found the "disable flip" just works for me.

Do you expect me to undo this commit or can you simply skip it?
I don't mind if you take only useful changes in any way that works (dropping this pull request).

The API additions
GetColorFlags: I wanted to know whether YUV format is 709 or 601. I found no other way for this.
GetInputFormat: this is related to #4.
In the decoder wrapper I have this code:

    switch(format){
    case CFHD_ENCODED_FORMAT_RGB_444:
    case CFHD_ENCODED_FORMAT_RGBA_4444:
      switch(input_format){
      case COLOR_FORMAT_RGB24:
      case COLOR_FORMAT_RGB32:
      case COLOR_FORMAT_RGB32_INVERTED:
      case COLOR_FORMAT_BGRA32:
      case COLOR_FORMAT_QT32:
      obj->input_depth = 8;
      break;
      case COLOR_FORMAT_R210:
      case COLOR_FORMAT_RGB10:
      case COLOR_FORMAT_RG30:
      case COLOR_FORMAT_AR10:
      case COLOR_FORMAT_AB10:
      case COLOR_FORMAT_DPX0:
      obj->input_depth = 10;
      break;
      }
    }

The end result is, if the source is 8-bit then I assume maximum value for decoded pixel is 0xFF00.
And for 10-bit source 0xFFC0. For any other source: 0xFFFF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants