mbox series

[FFmpeg-devel,v3,0/2] PNG sBIT chunk support

Message ID 20230322032626.45777-1-leo.izen@gmail.com
Headers show
Series PNG sBIT chunk support | expand

Message

Leo Izen March 22, 2023, 3:26 a.m. UTC
Add support to the PNG decoder and encoder to support sBIT chunks,
by using AVCodecContext->bits_per_raw_sample.

Changes from v2:
- Added chunk size check to make sure there's enough bytes left

Leo Izen (2):
  avcodec/pngdec: support sBIT chunks
  avcodec/pngenc: write sBIT chunks

 libavcodec/pngdec.c | 48 +++++++++++++++++++++++++++++++++++++++++++++
 libavcodec/pngenc.c |  6 ++++++
 2 files changed, 54 insertions(+)

Comments

Leo Izen March 28, 2023, 4:24 p.m. UTC | #1
On 3/21/23 23:26, Leo Izen wrote:
> Add support to the PNG decoder and encoder to support sBIT chunks,
> by using AVCodecContext->bits_per_raw_sample.
> 
> Changes from v2:
> - Added chunk size check to make sure there's enough bytes left
> 
> Leo Izen (2):
>    avcodec/pngdec: support sBIT chunks
>    avcodec/pngenc: write sBIT chunks
> 
>   libavcodec/pngdec.c | 48 +++++++++++++++++++++++++++++++++++++++++++++
>   libavcodec/pngenc.c |  6 ++++++
>   2 files changed, 54 insertions(+)
> 

If there's no further objections I'll push this in ~3 days or so.

- Leo Izen (thebombzen)
Leo Izen April 1, 2023, 4:39 a.m. UTC | #2
On 3/28/23 12:24, Leo Izen wrote:
> On 3/21/23 23:26, Leo Izen wrote:
>> Add support to the PNG decoder and encoder to support sBIT chunks,
>> by using AVCodecContext->bits_per_raw_sample.
>>
>> Changes from v2:
>> - Added chunk size check to make sure there's enough bytes left
>>
>> Leo Izen (2):
>>    avcodec/pngdec: support sBIT chunks
>>    avcodec/pngenc: write sBIT chunks
>>
>>   libavcodec/pngdec.c | 48 +++++++++++++++++++++++++++++++++++++++++++++
>>   libavcodec/pngenc.c |  6 ++++++
>>   2 files changed, 54 insertions(+)
>>
> 
> If there's no further objections I'll push this in ~3 days or so.
> 
> - Leo Izen (thebombzen)

Pushed as 84b454935fae and c125860892e9.

- Leo Izen (thebombzen)
Anton Khirnov April 4, 2023, 9:36 a.m. UTC | #3
Quoting Leo Izen (2023-04-01 06:39:12)
> On 3/28/23 12:24, Leo Izen wrote:
> > On 3/21/23 23:26, Leo Izen wrote:
> >> Add support to the PNG decoder and encoder to support sBIT chunks,
> >> by using AVCodecContext->bits_per_raw_sample.
> >>
> >> Changes from v2:
> >> - Added chunk size check to make sure there's enough bytes left
> >>
> >> Leo Izen (2):
> >>    avcodec/pngdec: support sBIT chunks
> >>    avcodec/pngenc: write sBIT chunks
> >>
> >>   libavcodec/pngdec.c | 48 +++++++++++++++++++++++++++++++++++++++++++++
> >>   libavcodec/pngenc.c |  6 ++++++
> >>   2 files changed, 54 insertions(+)
> >>
> > 
> > If there's no further objections I'll push this in ~3 days or so.
> > 
> > - Leo Izen (thebombzen)
> 
> Pushed as 84b454935fae and c125860892e9.

Would be nice to have a test.