Skip to content

Conversation

@SpookyIluha
Copy link
Contributor

No description provided.

@SpookyIluha SpookyIluha force-pushed the unstable_rdpinterlace branch from 5f96732 to 1a48a8e Compare May 25, 2025 17:43
#############################################################
.func RDPQ_WriteSetScissor
RDPQ_WriteSetScissor:

Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the reason you put the change here, instead of in RDPQCmd_SetScissorEx? RDPQ_WriteSetScissor is called any time a ucode needs to reset the scissoring (eg: rdpq_mode has to call it when it switches cycle type). So its main use is "reapply the current scissor settings".

I believe the change should go to RDPQCmd_SetScissorEx instead, which is what is called to process the rspq command used to set scissoring (and now interlacing). That's probably where the special semantic should go.

include/rdpq.h Outdated
* @param[in] draw_field True if the RDP should only draw odd lines, otherwise only even lines are drawn
*
*/
__attribute__((always_inline))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you change this to a standard inline?
Also please add the extern inline definitions at the bottom of rdpq.c.

Copy link
Contributor

Choose a reason for hiding this comment

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

Standard inline keyword may be ignored by the compiler under certain circumstances. If the function is intended to be guaranteed to always be inlined, the always_inline attribute must be used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this function is intended to be always inlined, at least no more than any other similar short wrapper in rdpq, and all of them are marked inline. We trust the compiler on this, we don't have any input that we should override its decisions on this function or any other of rdpq.

@SpookyIluha SpookyIluha force-pushed the unstable_rdpinterlace branch from 0464fa2 to 97667e0 Compare May 26, 2025 07:58
@Frosty-J
Copy link

FILTERS_DEDITHER does not seem to work when rdpq_enable_interlaced() is used. Instead of dedithering anything, it just darkens the image slightly. Can this be avoided?

@rasky
Copy link
Collaborator

rasky commented Jul 22, 2025

I don't think we can use dedithering with rdpq-level interlacing; dedithering is a filter that uses a kernel of a few pixels around each one; in case of an interlaced setup, that'd affect lines of different fields and thus different frames.

We can try to warn about this in the future.

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.

5 participants