cineform-sdk icon indicating copy to clipboard operation
cineform-sdk copied to clipboard

Some corrections for GCC and extra API

Open shekh opened this issue 6 years ago • 2 comments

shekh avatar Nov 15 '17 12:11 shekh

CLA assistant check
All committers have signed the CLA.

sw-team-release-gpsw avatar Nov 15 '17 12:11 sw-team-release-gpsw

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.

shekh avatar Nov 20 '17 12:11 shekh