Skip to content

irs: Add irs header#52

Merged
MonsterDruide1 merged 10 commits intoopen-ead:masterfrom
Fuzzy2319:irs
Jan 14, 2026
Merged

irs: Add irs header#52
MonsterDruide1 merged 10 commits intoopen-ead:masterfrom
Fuzzy2319:irs

Conversation

@Fuzzy2319
Copy link

@Fuzzy2319 Fuzzy2319 commented Dec 27, 2025

This PR adds an header for the irs service.


This change is Reviewable

Copy link

@MonsterDruide1 MonsterDruide1 left a comment

Choose a reason for hiding this comment

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

Where did you get the DPD stuff from?

@MonsterDruide1 reviewed 15 files and all commit messages, and made 5 comments.
Reviewable status: 15 of 19 files reviewed, 4 unresolved discussions (waiting on @Fuzzy2319).


include/nn/irs/ImageTransferProcessorConfig.h line 7 at r1 (raw file):

namespace nn::irsensor {
struct __attribute__((packed)) ImageTransferProcessorConfig {

Why use packed here?

Suggestion:

struct ImageTransferProcessorConfig {

include/nn/irs.h line 44 at r1 (raw file):

                                const IrCameraHandle& handle);
void* CalculateMomentRegionStatistic(const MomentProcessorState* state, const Rect&, s32, s32, s32,
                                     s32);  // TODO: change return type

Suggestion:

IrsMomentStatistic CalculateMomentRegionStatistic(const MomentProcessorState* state, const Rect&, s32, s32, s32,
                                     s32);

include/nn/irs/TeraPluginProcessorState.h line 10 at r1 (raw file):

    s64 timeStamp;
    s32 ambientNoiseLevel;
    u8 data[0x12c];  // TODO: this is unknown

https://switchbrew.github.io/libnx/irs_8h_source.html

Suggestion:

u8 pluginData[0x12c];

include/nn/irs/TeraPluginProcessorConfig.h line 10 at r1 (raw file):

    s8 _1;
    s8 _2;
    s8 _3;

Suggestion:

    s8 _1;  // [6.0.0+]
    s8 _2;  // [6.0.0+]
    s8 _3;  // [6.0.0+]

Copy link
Author

@Fuzzy2319 Fuzzy2319 left a comment

Choose a reason for hiding this comment

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

I used switchbrew website as a reference, it was said that on pre 4.0 sdk pointing stuff was named dpd so I made these struct based on that which seems to fit on ghidra.

@Fuzzy2319 made 5 comments.
Reviewable status: 15 of 19 files reviewed, 4 unresolved discussions (waiting on @MonsterDruide1).


include/nn/irs/ImageTransferProcessorConfig.h line 7 at r1 (raw file):

Previously, MonsterDruide1 wrote…

Why use packed here?

if I remove the packed the compiler will add 4 bytes of padding after format which is wrong according to switchbrew.


include/nn/irs/TeraPluginProcessorState.h line 10 at r1 (raw file):

Previously, MonsterDruide1 wrote…

https://switchbrew.github.io/libnx/irs_8h_source.html

Done.


include/nn/irs.h line 44 at r1 (raw file):

                                const IrCameraHandle& handle);
void* CalculateMomentRegionStatistic(const MomentProcessorState* state, const Rect&, s32, s32, s32,
                                     s32);  // TODO: change return type

Done.


include/nn/irs/TeraPluginProcessorConfig.h line 10 at r1 (raw file):

    s8 _1;
    s8 _2;
    s8 _3;

Done.

Copy link

@MonsterDruide1 MonsterDruide1 left a comment

Choose a reason for hiding this comment

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

@MonsterDruide1 reviewed 7 files and all commit messages, and resolved 4 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Fuzzy2319).

@MonsterDruide1 MonsterDruide1 merged commit caab7d4 into open-ead:master Jan 14, 2026
2 checks passed
@Fuzzy2319 Fuzzy2319 deleted the irs branch January 15, 2026 09:11
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.

2 participants