Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-27 Thread wm4
On Sat, 27 Feb 2016 13:01:40 +0100 Reimar Döffinger wrote: > Check that the required plane pointers and only > those are set up. > Currently does not enforce anything for the palette > pointer of pseudopal formats as I am unsure about the > requirements. > > Signed-off-by: Reimar Döffinger > --

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-27 Thread wm4
On Sat, 27 Feb 2016 12:54:50 +0100 Reimar Döffinger wrote: > On Fri, Feb 26, 2016 at 11:41:41PM +0100, wm4 wrote: > > On Fri, 26 Feb 2016 22:59:17 +0100 > > Reimar Döffinger wrote: > > > > Can you move it to a separate function? Say, ff_verify_frame(). This > > > > could get much more complica

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-27 Thread Reimar Döffinger
On Sat, Feb 27, 2016 at 01:01:40PM +0100, Reimar Döffinger wrote: > Check that the required plane pointers and only > those are set up. > Currently does not enforce anything for the palette > pointer of pseudopal formats as I am unsure about the > requirements. > > Signed-off-by: Reimar Döffinger

[FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-27 Thread Reimar Döffinger
Check that the required plane pointers and only those are set up. Currently does not enforce anything for the palette pointer of pseudopal formats as I am unsure about the requirements. Signed-off-by: Reimar Döffinger --- doc/APIchanges | 6 ++ libavcodec/utils.c | 27 ++

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-27 Thread Reimar Döffinger
On Fri, Feb 26, 2016 at 11:41:41PM +0100, wm4 wrote: > On Fri, 26 Feb 2016 22:59:17 +0100 > Reimar Döffinger wrote: > > > Can you move it to a separate function? Say, ff_verify_frame(). This > > > could get much more complicated too when checking AVBufferRef usage or > > > audio. > > > > Why ff

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-27 Thread Reimar Döffinger
On Sat, Feb 27, 2016 at 02:21:18AM +0100, Michael Niedermayer wrote: > On Fri, Feb 26, 2016 at 11:06:22PM +0100, Reimar Döffinger wrote: > > +static void validate_avframe_allocation(const AVCodecContext *avctx, > > AVFrame *frame) > > +{ > > +if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { > >

[FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-27 Thread Reimar Döffinger
Check that the required plane pointers and only those are set up. Currently does not enforce anything for the palette pointer of pseudopal formats as I am unsure about the requirements. Signed-off-by: Reimar Döffinger --- libavcodec/utils.c | 27 +++ libavutil/frame.h |

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread Michael Niedermayer
On Fri, Feb 26, 2016 at 11:06:22PM +0100, Reimar Döffinger wrote: > Check that the required plane pointers and only > those are set up. > > Signed-off-by: Reimar Döffinger > --- > libavcodec/utils.c | 20 > libavutil/frame.h | 3 +++ > 2 files changed, 23 insertions(+) >

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread wm4
On Fri, 26 Feb 2016 22:59:17 +0100 Reimar Döffinger wrote: > On Fri, Feb 26, 2016 at 10:39:41PM +0100, wm4 wrote: > > On Fri, 26 Feb 2016 22:25:21 +0100 > > Reimar Döffinger wrote: > > > > > Check that the required plane pointers and only > > > those are set up. > > > > > > Signed-off-by: Re

[FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread Reimar Döffinger
Check that the required plane pointers and only those are set up. Signed-off-by: Reimar Döffinger --- libavcodec/utils.c | 20 libavutil/frame.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index af21cdd..1b6397c 100644 -

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread Reimar Döffinger
On Fri, Feb 26, 2016 at 10:39:41PM +0100, wm4 wrote: > On Fri, 26 Feb 2016 22:25:21 +0100 > Reimar Döffinger wrote: > > > Check that the required plane pointers and only > > those are set up. > > > > Signed-off-by: Reimar Döffinger > > --- > > libavcodec/utils.c | 14 ++ > > libavu

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread wm4
On Fri, 26 Feb 2016 22:25:21 +0100 Reimar Döffinger wrote: > Check that the required plane pointers and only > those are set up. > > Signed-off-by: Reimar Döffinger > --- > libavcodec/utils.c | 14 ++ > libavutil/frame.h | 3 +++ > 2 files changed, 17 insertions(+) > > diff --gi

[FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread Reimar Döffinger
Check that the required plane pointers and only those are set up. Signed-off-by: Reimar Döffinger --- libavcodec/utils.c | 14 ++ libavutil/frame.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index af21cdd..af5ff93 100644 --- a/l

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread Reimar Döffinger
On Fri, Feb 26, 2016 at 06:13:04PM +, Derek Buitenhuis wrote: > On 2/26/2016 5:42 PM, Reimar Döffinger wrote: > > +av_assert0(frame->format == avctx->pix_fmt); > > Is this valid? Mid-stream colorspace changes are fairly common. I believed we enforce a sequence point (i.e. we make sure

Re: [FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread Derek Buitenhuis
On 2/26/2016 5:42 PM, Reimar Döffinger wrote: > +av_assert0(frame->format == avctx->pix_fmt); Is this valid? Mid-stream colorspace changes are fairly common. - erek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/

[FFmpeg-devel] [PATCH] Document and validate AVFrame plane pointers.

2016-02-26 Thread Reimar Döffinger
Check that the required plane pointers and only those are set up. Signed-off-by: Reimar Döffinger --- libavcodec/utils.c | 15 +++ libavutil/frame.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index af21cdd..56c8d7c 100644 --- a/