[FFmpeg-cvslog] lavc/qsv: handle MFX_FRAMETYPE_UNKNOWN case
ffmpeg | branch: master | Zhong Li | Tue Jul 3 16:01:30 2018 +0800| [3c26ce464435673fe1c0e96a4d5f435b964db8d1] | committer: Zhong Li lavc/qsv: handle MFX_FRAMETYPE_UNKNOWN case Signed-off-by: Zhong Li > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c26ce464435673fe1c0e96a4d5f435b964db8d1 --- libavcodec/qsv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 3ff4f2c092..bb0d79588c 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -198,7 +198,7 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame) enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) { -enum AVPictureType type = AV_PICTURE_TYPE_NONE; +enum AVPictureType type; switch (mfx_pic_type & 0x7) { case MFX_FRAMETYPE_I: if (mfx_pic_type & MFX_FRAMETYPE_S) @@ -215,6 +215,9 @@ enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) else type = AV_PICTURE_TYPE_P; break; +case MFX_FRAMETYPE_UNKNOWN: +type = AV_PICTURE_TYPE_NONE; +break; default: av_assert0(0); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavfi/convolution_opencl: use CL_FAIL_ON_ERROR for error handling
ffmpeg | branch: master | Danil Iashchenko | Fri Jul 13 01:20:18 2018 +0300| [7cd58a8a8c53bde42f3a5d271eb41e6b4428] | committer: Mark Thompson lavfi/convolution_opencl: use CL_FAIL_ON_ERROR for error handling Switch to use CL_FAIL_ON_ERROR for error handling > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7cd58a8a8c53bde42f3a5d271eb41e6b4428 --- libavfilter/vf_convolution_opencl.c | 46 + 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/libavfilter/vf_convolution_opencl.c b/libavfilter/vf_convolution_opencl.c index e2ba81b45e..00246b2e43 100644 --- a/libavfilter/vf_convolution_opencl.c +++ b/libavfilter/vf_convolution_opencl.c @@ -67,12 +67,8 @@ static int convolution_opencl_init(AVFilterContext *avctx) ctx->command_queue = clCreateCommandQueue(ctx->ocf.hwctx->context, ctx->ocf.hwctx->device_id, 0, &cle); -if (!ctx->command_queue) { -av_log(avctx, AV_LOG_ERROR, "Failed to create OpenCL " - "command queue: %d.\n", cle); -err = AVERROR(EIO); -goto fail; -} +CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to create OpenCL " + "command queue %d.\n", cle); if (!strcmp(avctx->filter->name, "convolution_opencl")) { kernel_name = "convolution_global"; @@ -84,11 +80,8 @@ static int convolution_opencl_init(AVFilterContext *avctx) kernel_name = "roberts_global"; } ctx->kernel = clCreateKernel(ctx->ocf.program, kernel_name, &cle); -if (!ctx->kernel) { -av_log(avctx, AV_LOG_ERROR, "Failed to create kernel: %d.\n", cle); -err = AVERROR(EIO); -goto fail; -} +CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to create " + "kernel %d.\n", cle); ctx->initialised = 1; return 0; @@ -243,12 +236,8 @@ static int convolution_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) cle = clEnqueueNDRangeKernel(ctx->command_queue, ctx->kernel, 2, NULL, global_work, NULL, 0, NULL, NULL); -if (cle != CL_SUCCESS) { -av_log(avctx, AV_LOG_ERROR, "Failed to enqueue kernel: %d.\n", - cle); -err = AVERROR(EIO); -goto fail; -} +CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to enqueue " + "kernel: %d.\n", cle); } else { if (!(ctx->planes & (1 << p))) { err = ff_opencl_filter_work_size_from_image(avctx, region, output, p, 0); @@ -257,12 +246,8 @@ static int convolution_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) cle = clEnqueueCopyImage(ctx->command_queue, src, dst, origin, origin, region, 0, NULL, NULL); -if (cle != CL_SUCCESS) { -av_log(avctx, AV_LOG_ERROR, "Failed to copy plane %d: %d.\n", - p, cle); -err = AVERROR(EIO); -goto fail; -} +CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to copy plane %d: %d.\n", + p, cle); } else { CL_SET_KERNEL_ARG(ctx->kernel, 0, cl_mem, &dst); CL_SET_KERNEL_ARG(ctx->kernel, 1, cl_mem, &src); @@ -280,23 +265,14 @@ static int convolution_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) cle = clEnqueueNDRangeKernel(ctx->command_queue, ctx->kernel, 2, NULL, global_work, NULL, 0, NULL, NULL); -if (cle != CL_SUCCESS) { -av_log(avctx, AV_LOG_ERROR, "Failed to enqueue kernel: %d.\n", - cle); -err = AVERROR(EIO); -goto fail; -} +CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to enqueue " + "kernel: %d.\n", cle); } } } cle = clFinish(ctx->command_queue); -if (cle != CL_SUCCESS) { -av_log(avctx, AV_LOG_ERROR, "Failed to finish command queue: %d.\n", - cle); -err = AVERROR(EIO); -goto fail; -} +CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to finish command queue: %d.\n", cle); err = av_frame_copy_props(output, input); if (err < 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/h263dec: Remove a variable declaration that can lead to a warning.
ffmpeg | branch: master | Carl Eugen Hoyos | Thu Jul 12 00:07:55 2018 +0200| [5545a6df879f0c94e7e74ddc6606e300716f390b] | committer: Carl Eugen Hoyos lavc/h263dec: Remove a variable declaration that can lead to a warning. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5545a6df879f0c94e7e74ddc6606e300716f390b --- libavcodec/h263dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 5967fca285..2cf01e3d98 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -47,10 +47,9 @@ static enum AVPixelFormat h263_get_format(AVCodecContext *avctx) { -MpegEncContext *s = avctx->priv_data; /* MPEG-4 Studio Profile only, not supported by hardware */ if (avctx->bits_per_raw_sample > 8) { -av_assert1(s->studio_profile); +av_assert1(((MpegEncContext *)avctx->priv_data)->studio_profile); return avctx->pix_fmt; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavcodec/mpegaudiodecheader.h: fix version check pattern
ffmpeg | branch: master | Karsten Otto | Thu Jul 12 09:30:25 2018 +0200| [ce372bc278ce7ff96e661f3bb109fc74d9a22279] | committer: Michael Niedermayer libavcodec/mpegaudiodecheader.h: fix version check pattern This fixes the check for the reserved MPEG audio version ID, used to detect an invalid frame header. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce372bc278ce7ff96e661f3bb109fc74d9a22279 --- libavcodec/mpegaudiodecheader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegaudiodecheader.h b/libavcodec/mpegaudiodecheader.h index ed9961250a..1da2a4cb6f 100644 --- a/libavcodec/mpegaudiodecheader.h +++ b/libavcodec/mpegaudiodecheader.h @@ -63,7 +63,7 @@ static inline int ff_mpa_check_header(uint32_t header){ if ((header & 0xffe0) != 0xffe0) return -1; /* version check */ -if ((header & (3<<19)) == 1) +if ((header & (3<<19)) == 1<<19) return -1; /* layer check */ if ((header & (3<<17)) == 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: Simplify last element computation in mov_estimate_video_delay()
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 11 02:17:57 2018 +0200| [b0644f7f72a9ae64c7285d26ec720441c25d4cf5] | committer: Michael Niedermayer avformat/mov: Simplify last element computation in mov_estimate_video_delay() Reviewed-by: Derek Buitenhuis Reviewed-by: Sasi Inguva Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0644f7f72a9ae64c7285d26ec720441c25d4cf5 --- libavformat/mov.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 8a91239243..bdd6f64108 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3310,13 +3310,12 @@ static void mov_estimate_video_delay(MOVContext *c, AVStream* st) { st->codecpar->codec_id == AV_CODEC_ID_H264) { st->codecpar->video_delay = 0; for(ind = 0; ind < st->nb_index_entries && ctts_ind < msc->ctts_count; ++ind) { +// Point j to the last elem of the buffer and insert the current pts there. +j = buf_start; buf_start = (buf_start + 1); if (buf_start == MAX_REORDER_DELAY + 1) buf_start = 0; -// Point j to the last elem of the buffer and insert the current pts there. -j = buf_start - 1; -if (j < 0) j = MAX_REORDER_DELAY; pts_buf[j] = st->index_entries[ind].timestamp + msc->ctts_data[ctts_ind].duration; // The timestamps that are already in the sorted buffer, and are greater than the ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: Break out of inner loop early in mov_estimate_video_delay()
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 11 02:17:58 2018 +0200| [aba13dc13e5233545bdd06f514e0addbb0155c69] | committer: Michael Niedermayer avformat/mov: Break out of inner loop early in mov_estimate_video_delay() 0.266 <- 0.299 sec (this is time ffmpeg so containing alot other things) Sample for benchmark was: ffmpeg -f rawvideo -pix_fmt yuv420p -s 32x32 -i /dev/zero -t 24:00:00.00 out.mp4 Reviewed-by: Derek Buitenhuis Reviewed-by: Sasi Inguva Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aba13dc13e5233545bdd06f514e0addbb0155c69 --- libavformat/mov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 67b3e11eb9..8a91239243 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3332,6 +3332,8 @@ static void mov_estimate_video_delay(MOVContext *c, AVStream* st) { if (pts_buf[j] < pts_buf[r]) { FFSWAP(int64_t, pts_buf[j], pts_buf[r]); ++num_swaps; +} else { +break; } j = r; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/drawtext: fix box sizing
ffmpeg | branch: master | Gyan Doshi | Tue Jul 10 15:32:06 2018 +0530| [1a31c2b5df1179fdc1b8e84c8fa89d853e517309] | committer: Gyan Doshi avfilter/drawtext: fix box sizing At present, box size is clipped to frame size before being drawn, which can lead to the box not fully covering animated text which is longer than one or both frame dimensions. Since ff_blend_rectangle correctly takes care of clipping, it is skipped here which results in correct box sizing > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a31c2b5df1179fdc1b8e84c8fa89d853e517309 --- libavfilter/vf_drawtext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 3affa736c7..cca2cbcb88 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1407,8 +1407,8 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame, update_color_with_alpha(s, &bordercolor, s->bordercolor); update_color_with_alpha(s, &boxcolor , s->boxcolor ); -box_w = FFMIN(width - 1 , max_text_line_w); -box_h = FFMIN(height - 1, y + s->max_glyph_h); +box_w = max_text_line_w; +box_h = y + s->max_glyph_h; if (s->fix_bounds) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: correct description of variables in blend filter
ffmpeg | branch: master | Gyan Doshi | Fri Jul 13 11:09:49 2018 +0530| [97d766ff52fb0cb79b82c0b9e0a5bdca3dbdb78f] | committer: Gyan Doshi doc/filters: correct description of variables in blend filter Invert description of SW / SH variables. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97d766ff52fb0cb79b82c0b9e0a5bdca3dbdb78f --- doc/filters.texi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index d236bd69b7..49895ff947 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5645,10 +5645,10 @@ the width and height of currently filtered plane @item SW @item SH -Width and height scale depending on the currently filtered plane. It is the -ratio between the corresponding luma plane number of pixels and the current -plane ones. E.g. for YUV4:2:0 the values are @code{1,1} for the luma plane, and -@code{0.5,0.5} for chroma planes. +Width and height scale for the plane being filtered. It is the +ratio between the dimensions of the current plane to the luma plane, +e.g. for a @code{yuv420p} frame, the values are @code{1,1} for +the luma plane and @code{0.5,0.5} for the chroma planes. @item T Time of the current frame, expressed in seconds. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog