On 3/20/18, Gagandeep Singh <deepgagan231...@gmail.com> wrote: > On Tue, 20 Mar 2018, 16:31 Kieran Kunhya, <kier...@obe.tv> wrote: > >> > >> > ticket #6265, oops forgot this >> > >> >> Can you confirm this makes the png in the ticket look as expected? >> I was expecting the companding curve to also change for alpha. >> >> Kieran >> > > preserving the limits (max and min) > --- > libavcodec/cfhd.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c > index d64acab8d4..a950dc0f28 100644 > --- a/libavcodec/cfhd.c > +++ b/libavcodec/cfhd.c > @@ -103,6 +103,8 @@ static inline void process_alpha(int16_t *alpha, int > width) > channel <<= 8; > channel -= 128; > channel /= 223; > + channel = FFMIN(channel, (1 << 12) - 1); > + channel = FFMAX(channel, 0); > alpha[i] = channel; > } > } > -- > 2.14.1
Please post full patch, not patch against previous patch. Use av_clip instead of FFMIN/FFMAX as already previously mentioned. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel