| Message ID | 20260604090044.3536188-1-tju_cooyun@163.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
2026. 06. 04. 11:00 keltezéssel, tju_cooyun@163.com írta: > From: zcy <tju_cooyun@163.com> > > PipelineHandlerBase::updateStreamConfig now saves the previous > stream color space before assignment when a color space change > is detected. This ensures the debug log reports the transition > as 'from <old> to <new>' instead of showing the new value twice. > > Signed-off-by: zcy <tju_cooyun@163.com> > --- Looks ok to me. I think this can have Fixes: 71bbf10a2f79 ("libcamera: rpi: Add some helpers to PipelineHandlerBase") Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > index 263a48387..5a5acf6a1 100644 > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > @@ -342,12 +342,12 @@ bool PipelineHandlerBase::updateStreamConfig(StreamConfiguration *stream, > } > > if (stream->colorSpace != format.colorSpace) { > - stream->colorSpace = format.colorSpace; > - adjusted = true; > LOG(RPI, Debug) > << "Color space changed from " > << ColorSpace::toString(stream->colorSpace) << " to " > << ColorSpace::toString(format.colorSpace); > + stream->colorSpace = format.colorSpace; > + adjusted = true; > } > > stream->stride = format.planes[0].bpl; > -- > 2.43.0 >
Hi Thanks for the patch. Yes, I think that's clearly what was intended! On Thu, 4 Jun 2026 at 11:25, Barnabás Pőcze <barnabas.pocze@ideasonboard.com> wrote: > > 2026. 06. 04. 11:00 keltezéssel, tju_cooyun@163.com írta: > > From: zcy <tju_cooyun@163.com> > > > > PipelineHandlerBase::updateStreamConfig now saves the previous > > stream color space before assignment when a color space change > > is detected. This ensures the debug log reports the transition > > as 'from <old> to <new>' instead of showing the new value twice. > > > > Signed-off-by: zcy <tju_cooyun@163.com> > > --- > > Looks ok to me. I think this can have > > Fixes: 71bbf10a2f79 ("libcamera: rpi: Add some helpers to PipelineHandlerBase") > > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Best regards David > > > > src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > > index 263a48387..5a5acf6a1 100644 > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > > @@ -342,12 +342,12 @@ bool PipelineHandlerBase::updateStreamConfig(StreamConfiguration *stream, > > } > > > > if (stream->colorSpace != format.colorSpace) { > > - stream->colorSpace = format.colorSpace; > > - adjusted = true; > > LOG(RPI, Debug) > > << "Color space changed from " > > << ColorSpace::toString(stream->colorSpace) << " to " > > << ColorSpace::toString(format.colorSpace); > > + stream->colorSpace = format.colorSpace; > > + adjusted = true; > > } > > > > stream->stride = format.planes[0].bpl; > > -- > > 2.43.0 > > >
2026. 06. 04. 12:25 keltezéssel, Barnabás Pőcze írta: > 2026. 06. 04. 11:00 keltezéssel, tju_cooyun@163.com írta: >> From: zcy <tju_cooyun@163.com> >> >> PipelineHandlerBase::updateStreamConfig now saves the previous >> stream color space before assignment when a color space change >> is detected. This ensures the debug log reports the transition >> as 'from <old> to <new>' instead of showing the new value twice. >> >> Signed-off-by: zcy <tju_cooyun@163.com> >> --- > > Looks ok to me. I think this can have > > Fixes: 71bbf10a2f79 ("libcamera: rpi: Add some helpers to PipelineHandlerBase") Additionally, the subject prefix should probably be pipeline: rpi: instead of rpi: pipeline_base: with the first letter of the succeeding text capitalized, e.g: pipeline: rpi: Print old color space before updating > > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > > >> src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp >> index 263a48387..5a5acf6a1 100644 >> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp >> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp >> @@ -342,12 +342,12 @@ bool PipelineHandlerBase::updateStreamConfig(StreamConfiguration *stream, >> } >> >> if (stream->colorSpace != format.colorSpace) { >> - stream->colorSpace = format.colorSpace; >> - adjusted = true; >> LOG(RPI, Debug) >> << "Color space changed from " >> << ColorSpace::toString(stream->colorSpace) << " to " >> << ColorSpace::toString(format.colorSpace); >> + stream->colorSpace = format.colorSpace; >> + adjusted = true; >> } >> >> stream->stride = format.planes[0].bpl; >> -- >> 2.43.0 >> >
Quoting Barnabás Pőcze (2026-06-04 11:28:14) > 2026. 06. 04. 12:25 keltezéssel, Barnabás Pőcze írta: > > 2026. 06. 04. 11:00 keltezéssel, tju_cooyun@163.com írta: > >> From: zcy <tju_cooyun@163.com> > >> > >> PipelineHandlerBase::updateStreamConfig now saves the previous > >> stream color space before assignment when a color space change > >> is detected. This ensures the debug log reports the transition > >> as 'from <old> to <new>' instead of showing the new value twice. > >> > >> Signed-off-by: zcy <tju_cooyun@163.com> > >> --- > > > > Looks ok to me. I think this can have > > > > Fixes: 71bbf10a2f79 ("libcamera: rpi: Add some helpers to PipelineHandlerBase") > > Additionally, the subject prefix should probably be > > pipeline: rpi: > > instead of > > rpi: pipeline_base: > > with the first letter of the succeeding text capitalized, e.g: > > pipeline: rpi: Print old color space before updating I'll handle all that while applying. -- Thanks Kieran > > > > > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > > > > > >> src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > >> index 263a48387..5a5acf6a1 100644 > >> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > >> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > >> @@ -342,12 +342,12 @@ bool PipelineHandlerBase::updateStreamConfig(StreamConfiguration *stream, > >> } > >> > >> if (stream->colorSpace != format.colorSpace) { > >> - stream->colorSpace = format.colorSpace; > >> - adjusted = true; > >> LOG(RPI, Debug) > >> << "Color space changed from " > >> << ColorSpace::toString(stream->colorSpace) << " to " > >> << ColorSpace::toString(format.colorSpace); > >> + stream->colorSpace = format.colorSpace; > >> + adjusted = true; > >> } > >> > >> stream->stride = format.planes[0].bpl; > >> -- > >> 2.43.0 > >> > > >
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 263a48387..5a5acf6a1 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -342,12 +342,12 @@ bool PipelineHandlerBase::updateStreamConfig(StreamConfiguration *stream, } if (stream->colorSpace != format.colorSpace) { - stream->colorSpace = format.colorSpace; - adjusted = true; LOG(RPI, Debug) << "Color space changed from " << ColorSpace::toString(stream->colorSpace) << " to " << ColorSpace::toString(format.colorSpace); + stream->colorSpace = format.colorSpace; + adjusted = true; } stream->stride = format.planes[0].bpl;