Re: [PATCH] doc-rst: add more info for resolution change blocks in ipu3
On 8/19/19 2:19 PM, Tomasz Figa wrote: > Hi Bingbu, > > On Fri, Aug 16, 2019 at 8:17 PM wrote: >> >> From: Bingbu Cao >> >> This patch add more details for the resolution change blocks >> It can help the developer to understand the main resolution >> change blocks in ImgU. >> >> Signed-off-by: Bingbu Cao >> --- >> Documentation/media/v4l-drivers/ipu3.rst | 52 - >> Documentation/media/v4l-drivers/ipu3_rcb.svg | 331 >> +++ >> 2 files changed, 375 insertions(+), 8 deletions(-) >> create mode 100644 Documentation/media/v4l-drivers/ipu3_rcb.svg >> > > Thanks for the patch! Good to see improvements being made to the > documentation. > > Let me add Laurent on CC to check if this clarifies everything needed > for libcamera. Tomasz, thanks for your review. We consider this patch as a start in our plan. We plan to provide more documentation and tools to help Laurent and other engineers to understand and contribute on IPU3, we also plan to improve the design and implementation if necessary. In a word, we start from this patch and will keep working on IPU3 to address all the remaining TODOs. > > Best regards, > Tomasz > >> diff --git a/Documentation/media/v4l-drivers/ipu3.rst >> b/Documentation/media/v4l-drivers/ipu3.rst >> index c9f780404eee..235e10b37c2c 100644 >> --- a/Documentation/media/v4l-drivers/ipu3.rst >> +++ b/Documentation/media/v4l-drivers/ipu3.rst >> @@ -265,19 +265,55 @@ below. >> >> yavta -w "0x009819A1 1" /dev/v4l-subdev7 >> >> -RAW Bayer frames go through the following ImgU pipeline HW blocks to have >> the >> +Certain hardware blocks in ImgU pipeline can change the frame resolution by >> +cropping or scaling, these hardware blocks include Input Feeder(IF), Bayer >> Down >> +Scaler (BDS) and Geometric Distortion Correction (GDC). >> +There is also a block which can change the frame resolution - YUV Scaler, >> it is >> +only applicable to the secondary output. >> + >> +RAW Bayer frames go through these ImgU pipeline hardware blocks and the >> final >> processed image output to the DDR memory. >> >> -RAW Bayer frame -> Input Feeder -> Bayer Down Scaling (BDS) -> Geometric >> -Distortion Correction (GDC) -> DDR >> +.. kernel-figure:: ipu3_rcb.svg >> + :alt: ipu3 resolution blocks image >> >> -The ImgU V4L2 subdev has to be configured with the supported resolutions in >> all >> -the above HW blocks, for a given input resolution. >> + IPU3 resolution change hardware blocks >> + >> +**Input Feeder** >> + >> +Input Feeder gets the Bayer frame data from the sensor, it can enable >> cropping >> +of lines and columns from the frame and then store pixels into device's >> internal >> +pixel buffer which are ready to readout by following blocks. >> + >> +**Bayer Down Scaler** >> + >> +Bayer Down Scaler is capable of performing image scaling in Bayer domain, >> the >> +downscale factor can be configured from 1X to 1/4X in each axis with >> +configuration steps of 0.03125 (1/32). >> >> +**Geometric Distortion Correction** >> + >> +Geometric Distortion Correction is used to performe correction of >> distortions >> +and image filtering. It needs some extra filter and envelop padding pixels >> to >> +work, so the input resolution of GDC should be larger than the output >> resolution. >> + >> +**YUV Scaler** >> + >> +YUV Scaler which similiar with BDS, but it is mainly do image down scaling >> +in YUV domain, it can support up to 1/12X down scaling, but it can not be >> applied >> +to the main output. >> + >> +The ImgU V4L2 subdev has to be configured with the supported resolutions in >> all >> +the above hardware blocks, for a given input resolution. >> For a given supported resolution for an input frame, the Input Feeder, Bayer >> -Down Scaling and GDC blocks should be configured with the supported >> resolutions. >> -This information can be obtained by looking at the following IPU3 ImgU >> -configuration table. >> +Down Scaler and GDC blocks should be configured with the supported >> resolutions >> +as each hardware block has its own alignment requirement. >> + >> +You must configure the output resolution of the hardware blocks smartly to >> meet >> +the hardware requirment along with keeping the maximum field of view. >> +The intermediate resolutions can be generated by specific tool and this >> +information can be obtained by looking at the following IPU3 ImgU >> configuration >> +table. >> >> >> https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master >> >> diff --git a/Documentation/media/v4l-drivers/ipu3_rcb.svg >> b/Documentation/media/v4l-drivers/ipu3_rcb.svg >> new file mode 100644 >> index ..d878421b42a0 >> --- /dev/null >> +++ b/Documentation/media/v4l-drivers/ipu3_rcb.svg >> @@ -0,0 +1,331 @@ >> + >> +http://www.w3.org/2000/svg"; >> xmlns:xlink="http://www.w3.org/1999/xlink"; width="774pt" height="152pt" >> viewBox="0 0 774 152" version="1.1"> >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >
Re: [PATCH] doc-rst: add more info for resolution change blocks in ipu3
Hi Bingbu, On Fri, Aug 16, 2019 at 8:17 PM wrote: > > From: Bingbu Cao > > This patch add more details for the resolution change blocks > It can help the developer to understand the main resolution > change blocks in ImgU. > > Signed-off-by: Bingbu Cao > --- > Documentation/media/v4l-drivers/ipu3.rst | 52 - > Documentation/media/v4l-drivers/ipu3_rcb.svg | 331 > +++ > 2 files changed, 375 insertions(+), 8 deletions(-) > create mode 100644 Documentation/media/v4l-drivers/ipu3_rcb.svg > Thanks for the patch! Good to see improvements being made to the documentation. Let me add Laurent on CC to check if this clarifies everything needed for libcamera. Best regards, Tomasz > diff --git a/Documentation/media/v4l-drivers/ipu3.rst > b/Documentation/media/v4l-drivers/ipu3.rst > index c9f780404eee..235e10b37c2c 100644 > --- a/Documentation/media/v4l-drivers/ipu3.rst > +++ b/Documentation/media/v4l-drivers/ipu3.rst > @@ -265,19 +265,55 @@ below. > > yavta -w "0x009819A1 1" /dev/v4l-subdev7 > > -RAW Bayer frames go through the following ImgU pipeline HW blocks to have the > +Certain hardware blocks in ImgU pipeline can change the frame resolution by > +cropping or scaling, these hardware blocks include Input Feeder(IF), Bayer > Down > +Scaler (BDS) and Geometric Distortion Correction (GDC). > +There is also a block which can change the frame resolution - YUV Scaler, it > is > +only applicable to the secondary output. > + > +RAW Bayer frames go through these ImgU pipeline hardware blocks and the final > processed image output to the DDR memory. > > -RAW Bayer frame -> Input Feeder -> Bayer Down Scaling (BDS) -> Geometric > -Distortion Correction (GDC) -> DDR > +.. kernel-figure:: ipu3_rcb.svg > + :alt: ipu3 resolution blocks image > > -The ImgU V4L2 subdev has to be configured with the supported resolutions in > all > -the above HW blocks, for a given input resolution. > + IPU3 resolution change hardware blocks > + > +**Input Feeder** > + > +Input Feeder gets the Bayer frame data from the sensor, it can enable > cropping > +of lines and columns from the frame and then store pixels into device's > internal > +pixel buffer which are ready to readout by following blocks. > + > +**Bayer Down Scaler** > + > +Bayer Down Scaler is capable of performing image scaling in Bayer domain, the > +downscale factor can be configured from 1X to 1/4X in each axis with > +configuration steps of 0.03125 (1/32). > > +**Geometric Distortion Correction** > + > +Geometric Distortion Correction is used to performe correction of distortions > +and image filtering. It needs some extra filter and envelop padding pixels to > +work, so the input resolution of GDC should be larger than the output > resolution. > + > +**YUV Scaler** > + > +YUV Scaler which similiar with BDS, but it is mainly do image down scaling > +in YUV domain, it can support up to 1/12X down scaling, but it can not be > applied > +to the main output. > + > +The ImgU V4L2 subdev has to be configured with the supported resolutions in > all > +the above hardware blocks, for a given input resolution. > For a given supported resolution for an input frame, the Input Feeder, Bayer > -Down Scaling and GDC blocks should be configured with the supported > resolutions. > -This information can be obtained by looking at the following IPU3 ImgU > -configuration table. > +Down Scaler and GDC blocks should be configured with the supported > resolutions > +as each hardware block has its own alignment requirement. > + > +You must configure the output resolution of the hardware blocks smartly to > meet > +the hardware requirment along with keeping the maximum field of view. > +The intermediate resolutions can be generated by specific tool and this > +information can be obtained by looking at the following IPU3 ImgU > configuration > +table. > > https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master > > diff --git a/Documentation/media/v4l-drivers/ipu3_rcb.svg > b/Documentation/media/v4l-drivers/ipu3_rcb.svg > new file mode 100644 > index ..d878421b42a0 > --- /dev/null > +++ b/Documentation/media/v4l-drivers/ipu3_rcb.svg > @@ -0,0 +1,331 @@ > + > +http://www.w3.org/2000/svg"; > xmlns:xlink="http://www.w3.org/1999/xlink"; width="774pt" height="152pt" > viewBox="0 0 774 152" version="1.1"> > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + >
