Skip to content

Add UYVY to YUYV conversion for D457#14015

Merged
OhadMeir merged 2 commits intorealsenseai:developmentfrom
OhadMeir:d457
May 21, 2025
Merged

Add UYVY to YUYV conversion for D457#14015
OhadMeir merged 2 commits intorealsenseai:developmentfrom
OhadMeir:d457

Conversation

@OhadMeir
Copy link
Contributor

Tracked on [RSDSO-20220]

@OhadMeir OhadMeir requested a review from Nir-Az May 19, 2025 18:33
@sareluzi
Copy link
Collaborator

suggest to add a test

src/device.cpp Outdated
}

std::vector<rs2_format> device::map_supported_color_formats(rs2_format source_format)
std::vector< rs2_format > device::map_supported_color_formats( rs2_format source_format, bool map_source )
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does map_source means?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function "maps" a source format to a vector of supported format. The flag indicates if to include the source format in the vector or not. Open to name suggestions :-)

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. why do we need the source?
  2. If you keep it you can add after the switch
    target_formats.push_back(source_format);
    instead on each case, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. By default (existing implementation) source format is kept and an identity_processing_block is created to handle it. In this case we don't want to keep "identity" frames as they are corrupted. We must use another converter to fix them.
  2. For currently supported formats it could have been handled together. In the general case it's not sure. If you want I can change and avoid this small code duplication.

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. on that case I do have a name suggestion, something like "should_convert_raw" or something like this :)
  2. Your call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@OhadMeir OhadMeir merged commit f399b5e into realsenseai:development May 21, 2025
26 checks passed
OhadMeir added a commit to OhadMeir/librealsense that referenced this pull request Jun 10, 2025
Nir-Az added a commit that referenced this pull request Jun 11, 2025
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