topic Re: PXP PS Scaling in i.MX Processors
https://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912271#M137454
<HTML><HEAD></HEAD><BODY><DIV class=""><P>The manual says that each X/Y scale is "two bit integer and 12 bit fractional representation" (total 14 bits) but shows the scales occupying 15 bits each (plus a single reserved bit to make up one 16 bit half-word). Am I correct to assume they are really 14 bits each (bits 29-16, 13-0) plus two reserved bits?</P><P>>>> Bits 30 and 14 are not usable per the note in the RM that states that "The maximum value programmed should be 2 since scaling down by a factor greater than 2 is not supported with the bilinear filter". </P><P style="min-height: 8pt; padding: 0px;"> </P><P>Next, the manual says "The reciprocal of the scale factor should be loaded into this register", but it is not clear how to make a "reciprocal" out of the above bit fields.</P><P>>>> The value to be programmed is 1/desired_scale_factor. The radix point is between bits 28-27 and 12-11 for each register. The two bits to the left of the radix point are the "integer" (valid values are 0 through 2) and the bits to the right are the fractional part. The examples given in the RM match <A class="" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.geeksforgeeks.org%2Fconvert-binary-fraction-decimal%2F" rel="nofollow" target="_blank">the algorithm here</A> for converting a binary fraction to decimal. </P><P style="min-height: 8pt; padding: 0px;"> </P><P><SPAN style="color: #51626f; background-color: #ffffff;">00.0100_0000_0000 scale up by 4 => scale = reciprocal of ( 1/2^2 ) = 1/ (1/4) = 4</SPAN><BR style="color: #51626f; background-color: #ffffff;" /><SPAN style="color: #51626f; background-color: #ffffff;">00.0010_0000_0000 scale up by 2 => bit field here is incorrect, should be 00.1000_0000_0000, which is 1/2, reciprocal is 2</SPAN><BR style="color: #51626f; background-color: #ffffff;" /><SPAN style="color: #51626f; background-color: #ffffff;">00.1010_0000_0000 scale up by 8/5 => scale = reciprocal of ( 1/2 + 1/8 ) = 1 / (0.5 + 0.125) = 8</SPAN></P><P></P><P><SPAN style="color: #51626f; background-color: #ffffff;">Regards</SPAN></P></DIV></BODY></HTML>Thu, 27 Jun 2019 14:54:08 GMTBio_TICFSL2019-06-27T14:54:08ZPXP PS Scaling
https://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912268#M137451
<HTML><HEAD></HEAD><BODY><P>Can someone clarify the setting of the PS Scale Factor Register (PXP_PS_SCALE) in the Pixel Pipeline?</P><P>The description in the iMX6 RMs is a tad confusing/incomplete.</P><P></P><P>The manual says that each X/Y scale is "two bit integer and 12 bit fractional representation" (total 14 bits) but shows the scales occupying 15 bits each (plus a single reserved bit to make up one 16 bit half-word). Am I correct to assume they are really 14 bits each (bits 29-16, 13-0) plus two reserved bits?</P><P></P><P>Next, the manual says "The reciprocal of the scale factor should be loaded into this register", but it is not clear how to make a "reciprocal" out of the above bit fields.</P><P></P><P>The following up scaling examples are provided:<BR />00.0100_0000_0000 scale up by 4<BR />00.0010_0000_0000 scale up by 2<BR />00.1010_0000_0000 scale up by 8/5</P><P>Especially with the last one I don't see where they are getting the register settings.<BR /><BR />The 2x and 4x examples might make sense to me, except that I wonder why the most significant nibble is being set. And how, in that case, would you represent a scaling factor of 0x20 for example?</P><P></P><P>Thanks,</P><P> Steve</P></BODY></HTML>Wed, 12 Jun 2019 01:05:01 GMThttps://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912268#M137451steveschefterti2019-06-12T01:05:01ZRe: PXP PS Scaling
https://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912269#M137452
<HTML><HEAD></HEAD><BODY><P>Hello Steve,</P><P></P><DIV class=""><P>I find no reference to a PXP register PS_SCALE in any MX6 documentation.</P><P style="min-height: 8pt; padding: 0px;"> </P><P>Is this issue really about the MX6? If not, what device is being used?</P><P></P><P>Regards</P></DIV></BODY></HTML>Tue, 25 Jun 2019 20:32:18 GMThttps://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912269#M137452Bio_TICFSL2019-06-25T20:32:18ZRe: PXP PS Scaling
https://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912270#M137453
<HTML><HEAD></HEAD><BODY><P>The PXP, including the PXP_PS_SCALE register, is part of the iMX6UL, </P><P>iMX6ULL, iMX6Solo/DualLite. It's not found in the iMX6D/Q which have an </P><P>IPU instead.</P></BODY></HTML>Tue, 25 Jun 2019 20:45:48 GMThttps://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912270#M137453steveschefterti2019-06-25T20:45:48ZRe: PXP PS Scaling
https://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912271#M137454
<HTML><HEAD></HEAD><BODY><DIV class=""><P>The manual says that each X/Y scale is "two bit integer and 12 bit fractional representation" (total 14 bits) but shows the scales occupying 15 bits each (plus a single reserved bit to make up one 16 bit half-word). Am I correct to assume they are really 14 bits each (bits 29-16, 13-0) plus two reserved bits?</P><P>>>> Bits 30 and 14 are not usable per the note in the RM that states that "The maximum value programmed should be 2 since scaling down by a factor greater than 2 is not supported with the bilinear filter". </P><P style="min-height: 8pt; padding: 0px;"> </P><P>Next, the manual says "The reciprocal of the scale factor should be loaded into this register", but it is not clear how to make a "reciprocal" out of the above bit fields.</P><P>>>> The value to be programmed is 1/desired_scale_factor. The radix point is between bits 28-27 and 12-11 for each register. The two bits to the left of the radix point are the "integer" (valid values are 0 through 2) and the bits to the right are the fractional part. The examples given in the RM match <A class="" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.geeksforgeeks.org%2Fconvert-binary-fraction-decimal%2F" rel="nofollow" target="_blank">the algorithm here</A> for converting a binary fraction to decimal. </P><P style="min-height: 8pt; padding: 0px;"> </P><P><SPAN style="color: #51626f; background-color: #ffffff;">00.0100_0000_0000 scale up by 4 => scale = reciprocal of ( 1/2^2 ) = 1/ (1/4) = 4</SPAN><BR style="color: #51626f; background-color: #ffffff;" /><SPAN style="color: #51626f; background-color: #ffffff;">00.0010_0000_0000 scale up by 2 => bit field here is incorrect, should be 00.1000_0000_0000, which is 1/2, reciprocal is 2</SPAN><BR style="color: #51626f; background-color: #ffffff;" /><SPAN style="color: #51626f; background-color: #ffffff;">00.1010_0000_0000 scale up by 8/5 => scale = reciprocal of ( 1/2 + 1/8 ) = 1 / (0.5 + 0.125) = 8</SPAN></P><P></P><P><SPAN style="color: #51626f; background-color: #ffffff;">Regards</SPAN></P></DIV></BODY></HTML>Thu, 27 Jun 2019 14:54:08 GMThttps://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912271#M137454Bio_TICFSL2019-06-27T14:54:08ZRe: PXP PS Scaling
https://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912272#M137455
<HTML><HEAD></HEAD><BODY><P>Good to have a further indication that it is just the figure showing the register bits is incorrect in the RM.</P><P>Thanks a lot for the link to the algorithm. That's just what I was looking for.</P><P> Steve</P></BODY></HTML>Thu, 27 Jun 2019 19:34:26 GMThttps://community.nxp.com/t5/i-MX-Processors/PXP-PS-Scaling/m-p/912272#M137455steveschefterti2019-06-27T19:34:26Z