Message ID | 20211023081257.28248-2-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 8316b2a15f5e3c0f8da43fa1e43bb5717b56b48a |
Headers | show |
Series | [FFmpeg-devel,1/2] swscale/utils: Improve return codes of sws_setColorspaceDetails() | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
On Sat, Oct 23, 2021 at 10:12:57AM +0200, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libswscale/swscale.h | 8 ++++++++ > 1 file changed, 8 insertions(+) will apply patchset [...]
On 10/23/2021 5:12 AM, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libswscale/swscale.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/libswscale/swscale.h b/libswscale/swscale.h > index 59610d03426..daa53dc01ee 100644 > --- a/libswscale/swscale.h > +++ b/libswscale/swscale.h > @@ -318,14 +318,22 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c); > * @param brightness 16.16 fixed point brightness correction > * @param contrast 16.16 fixed point contrast correction > * @param saturation 16.16 fixed point saturation correction > +#if LIBSWSCALE_VERSION_MAJOR > 6 > + * @return negative error code on error, non negative otherwise > +#else > * @return -1 if not supported > +#endif > */ > int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], > int srcRange, const int table[4], int dstRange, > int brightness, int contrast, int saturation); > > /** > +#if LIBSWSCALE_VERSION_MAJOR > 6 > + * @return negative error code on error, non negative otherwise Strictly speaking, this has been the behavior for a while (Since the av_image_alloc() call was added, at least). IMO just change the line and don't wrap it like this with a preprocessor check, especially if you're not also adding a relevant line to APIChanges. > +#else > * @return -1 if not supported > +#endif > */ > int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, > int *srcRange, int **table, int *dstRange, >
On Mon, Oct 25, 2021 at 10:13:32AM -0300, James Almer wrote: > On 10/23/2021 5:12 AM, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libswscale/swscale.h | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/libswscale/swscale.h b/libswscale/swscale.h > > index 59610d03426..daa53dc01ee 100644 > > --- a/libswscale/swscale.h > > +++ b/libswscale/swscale.h > > @@ -318,14 +318,22 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c); > > * @param brightness 16.16 fixed point brightness correction > > * @param contrast 16.16 fixed point contrast correction > > * @param saturation 16.16 fixed point saturation correction > > +#if LIBSWSCALE_VERSION_MAJOR > 6 > > + * @return negative error code on error, non negative otherwise > > +#else > > * @return -1 if not supported > > +#endif > > */ > > int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], > > int srcRange, const int table[4], int dstRange, > > int brightness, int contrast, int saturation); > > /** > > +#if LIBSWSCALE_VERSION_MAJOR > 6 > > + * @return negative error code on error, non negative otherwise > > Strictly speaking, this has been the behavior for a while (Since the > av_image_alloc() call was added, at least). > > IMO just change the line and don't wrap it like this with a preprocessor > check, especially if you're not also adding a relevant line to APIChanges. didnt see your message before pushing feel free to change it any way you prefer thx [...]
On 10/25/2021 10:20 AM, Michael Niedermayer wrote: > On Mon, Oct 25, 2021 at 10:13:32AM -0300, James Almer wrote: >> On 10/23/2021 5:12 AM, Michael Niedermayer wrote: >>> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> >>> --- >>> libswscale/swscale.h | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/libswscale/swscale.h b/libswscale/swscale.h >>> index 59610d03426..daa53dc01ee 100644 >>> --- a/libswscale/swscale.h >>> +++ b/libswscale/swscale.h >>> @@ -318,14 +318,22 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c); >>> * @param brightness 16.16 fixed point brightness correction >>> * @param contrast 16.16 fixed point contrast correction >>> * @param saturation 16.16 fixed point saturation correction >>> +#if LIBSWSCALE_VERSION_MAJOR > 6 >>> + * @return negative error code on error, non negative otherwise >>> +#else >>> * @return -1 if not supported >>> +#endif >>> */ >>> int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], >>> int srcRange, const int table[4], int dstRange, >>> int brightness, int contrast, int saturation); >>> /** >>> +#if LIBSWSCALE_VERSION_MAJOR > 6 >>> + * @return negative error code on error, non negative otherwise >> >> Strictly speaking, this has been the behavior for a while (Since the >> av_image_alloc() call was added, at least). >> >> IMO just change the line and don't wrap it like this with a preprocessor >> check, especially if you're not also adding a relevant line to APIChanges. > > didnt see your message before pushing > feel free to change it any way you prefer I think you pushed the patch while i was writing it, so i was simply late. > > thx > > [...] > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". >
diff --git a/libswscale/swscale.h b/libswscale/swscale.h index 59610d03426..daa53dc01ee 100644 --- a/libswscale/swscale.h +++ b/libswscale/swscale.h @@ -318,14 +318,22 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c); * @param brightness 16.16 fixed point brightness correction * @param contrast 16.16 fixed point contrast correction * @param saturation 16.16 fixed point saturation correction +#if LIBSWSCALE_VERSION_MAJOR > 6 + * @return negative error code on error, non negative otherwise +#else * @return -1 if not supported +#endif */ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation); /** +#if LIBSWSCALE_VERSION_MAJOR > 6 + * @return negative error code on error, non negative otherwise +#else * @return -1 if not supported +#endif */ int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange,
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libswscale/swscale.h | 8 ++++++++ 1 file changed, 8 insertions(+)