Re: [libav-devel] [PATCH 1/9] lavc: Add codec metadata to indicate hardware support

2017-10-30 Thread Anton Khirnov
git a/libavcodec/hwaccel.h b/libavcodec/hwaccel.h > index 60dbe81c8..a066bc40f 100644 > --- a/libavcodec/hwaccel.h > +++ b/libavcodec/hwaccel.h > @@ -19,6 +19,24 @@ > #ifndef AVCODEC_HWACCEL_H > #define AVCODEC_HWACCEL_H > > +#include "avcodec.h" > + > + > #define HWACCEL

Re: [libav-devel] API breakage with old avcodec_decode_* functions

2017-10-30 Thread Anton Khirnov
for. If you have packet loss, you're not required to do anything special with the decoder, you just do not give the packets you don't have. Similarly, I don't see any reason why sending a NULL packet at the beginning should ever accomplish anything useful. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 6/6] hwcontext_vaapi: Set message callbacks on internally-created devices

2017-10-23 Thread Anton Khirnov
Quoting Mark Thompson (2017-10-02 00:01:06) > The message callbacks are library-safe in libva2, so we can now use > them. > --- > libavutil/hwcontext_vaapi.c | 21 + > 1 file changed, 21 insertions(+) > Looks very good to me

Re: [libav-devel] [PATCH 5/6] vaapi: Always free parameter buffers after vaEndPicture() with libva2

2017-10-23 Thread Anton Khirnov
.c | 4 ++-- > libavcodec/vaapi_encode.c | 4 ++-- > libavfilter/vf_deinterlace_vaapi.c | 2 +- > libavfilter/vf_scale_vaapi.c | 2 +- > 4 files changed, 6 insertions(+), 6 deletions(-) Ok -- Anton Khirnov ___ libav-devel mailing

Re: [libav-devel] [PATCH 4/6] vaapi_h264: Do not use deprecated header type

2017-10-23 Thread Anton Khirnov
ff_cbs_fragment_uninit(&priv->cbc, au); > > -*type = VAEncPackedHeaderH264_SEI; > +*type = VAEncPackedHeaderRawData; This makes no difference for old libva? -- Anton Khirnov ___ libav-devel mailing list libav-deve

Re: [libav-devel] [PATCH 3/6] vaapi: Remove H.264 baseline profile

2017-10-23 Thread Anton Khirnov
code.c | 1 - > libavcodec/vaapi_encode_h264.c | 7 --- > 2 files changed, 4 insertions(+), 4 deletions(-) Ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 2/6] configure: Add config option for libva2 (VAAPI 1)

2017-10-23 Thread Anton Khirnov
texturedsp > texturedspenc > tpeldsp > +vaapi_1 Isn't SYSTEM_FEATURES the more correct places for this? Otherwise looks ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 1/6] vaapi: Disable deprecation warnings around use of struct vaapi_context

2017-10-23 Thread Anton Khirnov
Quoting Mark Thompson (2017-10-02 00:01:01) > --- > libavcodec/vaapi_decode.h | 3 +++ > 1 file changed, 3 insertions(+) > LGTM -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH v4] lavc: external hardware frame pool initialization

2017-10-19 Thread Anton Khirnov
akes care of initializing the hw_frames_ctx > if needed, and does additional error handling and API usage checking. > > Support for VDA and Cuvid missing. > --- > With updated doxygen. > --- Thanks, pushed. -- Anton Khirnov ___ libav-

Re: [libav-devel] [PATCH v2] lavc: external hardware frame pool initialization

2017-10-10 Thread Anton Khirnov
can potentially contain user-allocated content which is then freed in the user-set free() callback. The semantics of that memory management is then unclear. Is there any reason the av_hwframe_ctx_alloc() call must be done by the user? Doing it inside this function (and so changing the last parameter to AVBu

Re: [libav-devel] [PATCH] lavf: make avio_read_partial() public

2017-08-19 Thread Anton Khirnov
Quoting wm4 (2017-08-18 15:35:49) > On Fri, 18 Aug 2017 15:22:28 +0200 > Anton Khirnov wrote: > > > Quoting wm4 (2017-08-18 14:44:45) > > > On Fri, 18 Aug 2017 15:40:32 +0300 (EEST) > > > Martin Storsjö wrote: > > > > &

Re: [libav-devel] [PATCH] lavf: make avio_read_partial() public

2017-08-18 Thread Anton Khirnov
Quoting wm4 (2017-08-18 14:44:45) > On Fri, 18 Aug 2017 15:40:32 +0300 (EEST) > Martin Storsjö wrote: > > > On Fri, 18 Aug 2017, Anton Khirnov wrote: > > > > > Quoting wm4 (2017-08-17 15:01:44) > > >> Main use-case is proxying avio through a foreign

Re: [libav-devel] [PATCH 01/10] lavc: Add support for external hardware frame pool initialisation

2017-08-18 Thread Anton Khirnov
ich may be influenced by other > + * user settings (such as avctx->extra_hw_frames). > + * > + * avctx->hw_frames_ctx must be set before calling this function. > + * Inside avctx->hw_frames_ctx, the fields format, sw_format, width and > + * height must be set. If dynamicall

Re: [libav-devel] [PATCH 5/5] mpeg2enc: Don't mark all streams as component video

2017-08-18 Thread Anton Khirnov
tual diffs are all trivial, e.g. for fate-lavf-mxf: Ok. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 3/5] lavc: Add mpeg2_metadata bitstream filter

2017-08-18 Thread Anton Khirnov
->cbc, out, frag); > +if (err < 0) { > +av_log(bsf, AV_LOG_ERROR, "Failed to write packet.\n"); > +goto fail; > +} > + > +err = av_packet_copy_props(out, in); > +if (err < 0) > +goto fail; This leaks the contents of out I think. Not sure if we should make the generic code unref it on failure. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 2/5] lavc: Add coded bitstream read/write support for MPEG-2

2017-08-18 Thread Anton Khirnov
.c | 1 + > 9 files changed, 975 insertions(+), 2 deletions(-) > create mode 100644 libavcodec/cbs_mpeg2.c > create mode 100644 libavcodec/cbs_mpeg2.h > create mode 100644 libavcodec/cbs_mpeg2_syntax_template.c > LGTM -- Anton Khirnov __

Re: [libav-devel] [PATCH] lavf: make avio_read_partial() public

2017-08-18 Thread Anton Khirnov
all. This always tries to read at least 1 byte. > + * Useful to reduce latency in certain cases. > + * @return number of bytes read or AVERROR > + */ > +int avio_read_partial(AVIOContext *s, unsigned char *buf, int size); Maybe this would be a good opportunity to make this size_t --

[libav-devel] [PATCH 1/2] h264dec: use a large enough field for reference list modification values

2017-08-17 Thread Anton Khirnov
pic_num can be at most 17-bit, so uint8_t is not sufficient. Found-By: Bradley Sepos CC: libav-sta...@libav.org --- libavcodec/h264dec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index ddfe224..cce5e19 100644 --- a/libavcodec/

[libav-devel] [PATCH 2/2] FATE: add a test for the H.264 sample fixed by 7c4f6f6

2017-08-17 Thread Anton Khirnov
--- tests/fate/h264.mak | 2 ++ tests/ref/fate/h264-ref-pic-mod-overflow | 21 + 2 files changed, 23 insertions(+) create mode 100644 tests/ref/fate/h264-ref-pic-mod-overflow diff --git a/tests/fate/h264.mak b/tests/fate/h264.mak index bdc390d..7676fb8 1

Re: [libav-devel] [PATCH] mpeg2enc: Don't mark all streams as component video

2017-08-13 Thread Anton Khirnov
// video_format: > 5 is unspecified > put_bits(&s->pb, 1, 1); // > colour_description > put_bits(&s->pb, 8, s->avctx->color_primaries); // > colour_primaries > put_bits(&s->pb, 8, s->avctx->

Re: [libav-devel] [PATCH 14/14] hevc: Remove unused hevc_ps_enc.c

2017-08-12 Thread Anton Khirnov
Quoting Mark Thompson (2017-08-11 01:37:09) > Replaced with more complete implementation via coded bitstream infrastructure. > --- > Unchanged. Ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.or

Re: [libav-devel] [PATCH 13/14] qsvenc_hevc: Replace ad-hoc VPS writing with CBS implementation

2017-08-12 Thread Anton Khirnov
ence decoder barfs if it isn't). > --- > Build system change only. Looks ok. I'll try to test it on Windows later. Poke me if I forget. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 12/14] vaapi_h265: Add support for AUD NAL units

2017-08-12 Thread Anton Khirnov
Quoting Mark Thompson (2017-08-11 01:37:07) > Matching the H.264 encoder. > --- Looks ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 11/14] vaapi_h265: Convert to use coded bitstream infrastructure

2017-08-12 Thread Anton Khirnov
Is this related to the rest of the patch? Does not seem so. Otherwise looks ok as far as I can tell. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 10/14] vaapi_h264: Add support for SEI recovery points

2017-08-12 Thread Anton Khirnov
Quoting Mark Thompson (2017-08-11 01:37:05) > Included by default with non-IDR intra frames. LGTM -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 2/2 V2] libavfilter/vf_vpp: Add common filters of the qsv vpp

2017-08-12 Thread Anton Khirnov
unnecessary. And in any case it should use a proper logging context and have a lower verbosity level. >+ } >+ >+av_expr_free(w_expr); >+av_expr_free(h_expr); >+av_expr_free(cw_expr); >+av_expr_free(ch_expr); >+av_expr_free(cx_expr); >+av_expr_fre

Re: [libav-devel] [PATCH 1/2 V6] libavfilter/overlay_qsv: Add QSV overlay vpp filter

2017-08-12 Thread Anton Khirnov
ame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame > > *picref) > > +{ > > +in_frame = submit_frame(s, inlink, picref); > > +if (!in_frame) { > > +av_log(ctx, AV_LOG_ERROR, "Fail to submit frame on input[%d]\n", > > +FF_INLINK_IDX(inlink)); > > "Failed", indentation is off. > > > +return AVERROR(EINVAL); > > Is this an error due to user-supplied data or user-supplied configuration? > Because that's what EINVAL is for. Should be ENOMEM > > Don't you leak vpp->comp_conf.InputStream here? > No, uninit is always called even if init fails. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 1/2 V5] libavfilter/overlay_qsv: Add QSV overlay vpp filter

2017-08-10 Thread Anton Khirnov
tret = 0; >+AVExpr *ox_expr, *oy_expr, *ow_expr, *oh_expr; Those need to be initialized to NULL, otherwise you have invalid frees in the failure path. Otherwise looks ok. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.

Re: [libav-devel] [PATCH 13/22] vaapi_h264: Add support for AUD NAL units

2017-08-10 Thread Anton Khirnov
Quoting Mark Thompson (2017-07-29 23:16:36) > Adds a new private option to enable them (off by default). > --- > libavcodec/vaapi_encode_h264.c | 33 + > 1 file changed, 33 insertions(+) Looks ok -- A

Re: [libav-devel] [PATCH 12/22] vaapi_h264: Convert to use coded bitstream infrastructure

2017-08-10 Thread Anton Khirnov
CODER)+= qsvdec_h2645.o > OBJS-$(CONFIG_H264_QSV_ENCODER)+= qsvenc_h264.o > -OBJS-$(CONFIG_H264_VAAPI_ENCODER) += vaapi_encode_h264.o > vaapi_encode_h26x.o > +OBJS-$(CONFIG_H264_VAAPI_ENCODER) += vaapi_encode_h264.o I'd expect a dependency on cbs here (or in configu

Re: [libav-devel] [PATCH 11/22] lavc: Add hevc_metadata bitstream filter

2017-08-10 Thread Anton Khirnov
+@item crop_left > +@item crop_right > +@item crop_top > +@item crop_bottom > +Set the conformance window cropping offsets in the SPS. These values > +will replace the current ones if the stream is already cropped. > + > +The unit of these values is chroma pixels after subsampli

Re: [libav-devel] [PATCH 07/22] lavc: Add coded bitstream read/write support for MPEG-2

2017-08-10 Thread Anton Khirnov
int8_t intra_quantiser_matrix[64]; > +uint8_t load_non_intra_quantiser_matrix; > +uint8_t non_intra_quantiser_matrix[64]; > +uint8_t load_chroma_intra_quantiser_matrix; > +uint8_t chroma_intra_quantiser_matrix[64]; > +uint8_t load_chroma_non_intra_quantiser_matrix; > +uint8_t chroma_non_intra_quantiser_matrix[64]; > +} MPEG2RawQuantMatrixExtension; > + > +typedef struct MPEG2RawExtensionData { > +uint8_t extension_start_code; > +uint8_t extension_start_code_identifier; > + > +union { > +MPEG2RawSequenceExtension sequence; > +MPEG2RawSequenceDisplayExtension sequence_display; > +MPEG2RawQuantMatrixExtension quant_matrix; > +MPEG2RawPictureCodingExtension picture_coding; > +} data; > +} MPEG2RawExtensionData; > + > +typedef struct MPEG2RawSliceHeader { > +uint8_t slice_vertical_position; > + > +uint8_t slice_vertical_position_extension; > +uint8_t priority_breakpoint; > + > +uint8_t quantiser_scale_code; > + > +uint8_t slice_extension_flag; > +uint8_t intra_slice; > +uint8_t slice_picture_id_enable; > +uint8_t slice_picture_id; > + > +uint8_t extra_bit_slice; > + > +size_t extra_information_length; > +uint8_t *extra_information; Does this get freed? Same for user_data. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 10/22] lavc: Add h264_redundant_pps bitstream filter

2017-08-07 Thread Anton Khirnov
ted, and all of the redundant PPSs > within the stream are removed. > --- Seems no changes here, so still ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 09/22] lavc: Add h264_metadata bitstream filter

2017-08-07 Thread Anton Khirnov
t(&ctx->cbc, au, > + sei_pos, H264_NAL_SEI, sei); > + if (err < 0) { > +av_log(bsf, AV_LOG_ERROR, "Failed to insert SEI.\n"); > +goto fail; > +} > +} > + > +payload = &sei->payload[sei->payload_count]; > + > +payload->payload_type = H264_SEI_TYPE_USER_DATA_UNREGISTERED; > +udu = &payload->payload.user_data_unregistered; > + > +for (i = j = 0; j < 32 && ctx->sei_user_data[i]; i++) { > +int c, v; > +c = ctx->sei_user_data[i]; > +if (c == '-') { > +continue; > +} else if (av_isxdigit(c)) { > + c = av_tolower(c); > + v = (c <= '9' ? c - '0' : c - 'a' + 10); > +} else { > + goto invalid_user_data; weird indentation Otherwise ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 08/22] lavc: Add trace_headers bitstream filter

2017-08-07 Thread Anton Khirnov
v_strlcat(tmp, ", corrupt", sizeof(tmp)); > + > +if (in->pts != AV_NOPTS_VALUE) > +av_strlcatf(tmp, sizeof(tmp), ", pts %"PRId64, in->pts); since you're going all out here, might as well print 'nopts' for AV_NOPTS_VALUE Otherwise looks ok. --

Re: [libav-devel] [PATCH 06/22] lavc: Add coded bitstream read/write support for H.265

2017-08-07 Thread Anton Khirnov
bs_h265.h > create mode 100644 libavcodec/cbs_h265_syntax.c Ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 05/22] lavc: Add coded bitstream read/write support for H.264

2017-08-07 Thread Anton Khirnov
5.h > create mode 100644 libavcodec/cbs_h264_syntax.c ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 04/22] lavc: Add coded bitstream read/write API

2017-08-07 Thread Anton Khirnov
; create mode 100644 libavcodec/cbs.c > create mode 100644 libavcodec/cbs.h > create mode 100644 libavcodec/cbs_internal.h > This one looks unchanged, so still ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://li

Re: [libav-devel] [PATCH 1/2 V4] libavfilter/overlay_qsv: Add QSV overlay vpp filter

2017-08-07 Thread Anton Khirnov
ret = blend_frame(ctx, s->main, s->over_prev); >+} else { >+av_frame_free(&s->main); >+ret = AVERROR(EAGAIN); >+} >+ >+s->main = NULL; >+ >+return ret ; >+} This duplication of nontrivial code with vf_overlay is suboptimal. Would it be hard to share? >+ >+static int filter_frame_main(AVFilterLink *inlink, AVFrame *frame) >+{ >+QSVOverlayContext *s = inlink->dst->priv; >+ >+av_assert0(!s->main); >+s->main = frame; >+ >+return 0; >+} >+ >+static int filter_frame_overlay(AVFilterLink *inlink, AVFrame *frame) >+{ >+QSVOverlayContext *s = inlink->dst->priv; >+ >+av_assert0(!s->over_next); >+s->over_next = frame; >+ >+return 0; >+} >+ >+static int overlay_qsv_init(AVFilterContext *ctx) >+{ >+QSVOverlayContext *vpp = ctx->priv; >+ >+/* fill composite config */ >+vpp->comp_conf.Header.BufferId = MFX_EXTBUFF_VPP_COMPOSITE; >+vpp->comp_conf.Header.BufferSz = sizeof(vpp->comp_conf); >+vpp->comp_conf.NumInputStream = ctx->nb_inputs; >+vpp->comp_conf.InputStream = >+av_mallocz(sizeof(*vpp->comp_conf.InputStream) * ctx->nb_inputs); nit: av_mallocz_array() >+if (!vpp->comp_conf.InputStream) >+return AVERROR(ENOMEM); >+ >+/* initialize QSVVPP params */ >+vpp->qsv_param.filter_frame = NULL; >+vpp->qsv_param.ext_buf = av_mallocz(sizeof(*vpp->qsv_param.ext_buf)); >+if (!vpp->qsv_param.ext_buf) >+return AVERROR(ENOMEM); >+ >+vpp->qsv_param.ext_buf[0]= (mfxExtBuffer *)&vpp->comp_conf; >+vpp->qsv_param.num_ext_buf = 1; >+vpp->qsv_param.out_sw_format = AV_PIX_FMT_NV12; >+vpp->qsv_param.num_crop = 0; >+ >+return 0; >+} >+ >+static void overlay_qsv_uninit(AVFilterContext *ctx) >+{ >+QSVOverlayContext *vpp = ctx->priv; >+ >+av_frame_free(&vpp->main); >+av_frame_free(&vpp->over_prev); >+av_frame_free(&vpp->over_next); >+ff_qsvvpp_free(&vpp->qsv); >+av_freep(&vpp->comp_conf.InputStream); >+av_freep(&vpp->qsv_param.ext_buf); >+} >+ >+static int overlay_qsv_query_formats(AVFilterContext *ctx) >+{ >+int i; >+ >+static const enum AVPixelFormat main_in_fmts[] = { >+AV_PIX_FMT_YUV420P, >+AV_PIX_FMT_NV12, >+AV_PIX_FMT_YUYV422, >+AV_PIX_FMT_RGB32, >+AV_PIX_FMT_QSV, >+AV_PIX_FMT_NONE >+}; >+static const enum AVPixelFormat out_pix_fmts[] = { >+AV_PIX_FMT_NV12, >+AV_PIX_FMT_QSV, >+AV_PIX_FMT_NONE >+}; >+ >+for(i = 0; i < ctx->nb_inputs; i++) missing space >+AVFilter ff_vf_overlay_qsv = { >+.name = "overlay_qsv", >+.description = NULL_IF_CONFIG_SMALL("Quick Sync Video overlay."), >+.priv_size = sizeof(QSVOverlayContext), >+.query_formats = overlay_qsv_query_formats, >+.init = overlay_qsv_init, >+.uninit= overlay_qsv_uninit, >+.inputs= overlay_qsv_inputs, >+.outputs = overlay_qsv_outputs, >+.priv_class= &overlay_qsv_class, >+ .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, broken indentation -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] avconv: Do not issue a warning if no specific devices are selected

2017-07-28 Thread Anton Khirnov
Quoting Luca Barbato (2017-07-21 00:53:18) > The hardware encoders currently do pick the first compatible device > available by themselves. I don't think this is true for all encoders. Perhaps what we should do instead is auto-create the device like we do for decoding. -- An

[libav-devel] [PATCH] cuvid: add cuvid.h to SKIPHEADERS

2017-07-27 Thread Anton Khirnov
--- libavcodec/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index ac13166..eba651f 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -797,6 +797,7 @@ SKIPHEADERS+= %_tablegen.h \

Re: [libav-devel] [PATCH v3 1/2] lavc, lavu: move frame cropping to a convenience function

2017-07-27 Thread Anton Khirnov
Both pushed, thanks. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] h264dec: add a CUVID hwaccel

2017-07-27 Thread Anton Khirnov
Quoting Sean McGovern (2017-07-27 07:42:29) > Hi Anton, > > On Mon, Jul 24, 2017 at 12:50 PM, Anton Khirnov wrote: > > Quoting Luca Barbato (2017-07-24 18:21:20) > >> On 24/07/2017 15:15, Anton Khirnov wrote: > >> > Some parts of the code are based on

[libav-devel] [PATCH 4/4] h264dec: Fix mix of lossless and lossy MBs decoding

2017-07-24 Thread Anton Khirnov
From: Anton Mitrofanov CC: libav-sta...@libav.org Signed-off-by: Anton Khirnov --- libavcodec/h264_cabac.c | 16 libavcodec/h264_cavlc.c | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c

[libav-devel] [PATCH 3/4] h264_cabac: Fix CABAC+8x8dct in 4:4:4

2017-07-24 Thread Anton Khirnov
From: Anton Mitrofanov Use the correct ctxIdxInc calculation for coded_block_flag. Keep old behavior for old versions of x264 for backward compatibility. CC: libav-sta...@libav.org Signed-off-by: Anton Khirnov --- libavcodec/h264_cabac.c | 47

[libav-devel] [PATCH 1/4] h264dec: track the last seen value of x264_build

2017-07-24 Thread Anton Khirnov
Do not use the one in the SEI directly as that is reset at certain points. Inspired by patches from Michael Niedermayer and Anton Mitrofanov . CC: libav-sta...@libav.org --- libavcodec/h264_direct.c | 4 ++-- libavcodec/h264_slice.c | 6 +- libavcodec/h264dec.c | 1 + libavcodec

[libav-devel] [PATCH 2/4] h264dec: fix Lossless Decoding (Profile 244) for 8x8 Intra Prediction

2017-07-24 Thread Anton Khirnov
From: Yogender Kumar Gupta CC: libav-sta...@libav.org Signed-off-by: Anton Khirnov --- libavcodec/h264_mb.c | 7 +++- libavcodec/h264pred.c | 2 ++ libavcodec/h264pred.h | 3 ++ libavcodec/h264pred_template.c | 73 ++ 4

Re: [libav-devel] [PATCH 06/15] lavc: Add coded bitstream read/write support for H.265

2017-07-24 Thread Anton Khirnov
> libavcodec/cbs_internal.h|1 + > 5 files changed, 2435 insertions(+), 3 deletions(-) > create mode 100644 libavcodec/cbs_h265.h > create mode 100644 libavcodec/cbs_h265_syntax.c > Looks okish from a quick look -- Anton Khirnov __

Re: [libav-devel] [PATCH] h264dec: add a CUVID hwaccel

2017-07-24 Thread Anton Khirnov
Quoting Luca Barbato (2017-07-24 18:21:20) > On 24/07/2017 15:15, Anton Khirnov wrote: > > Some parts of the code are based on a patch by > > Timo Rothenpieler > > --- > > Now with high bit depth support > > --- > > I recently updated the nvidia-video-c

[libav-devel] [PATCH] hevcdec: add a CUVID hwaccel

2017-07-24 Thread Anton Khirnov
t map_avcodec_id(enum AVCodecID id) { switch (id) { case AV_CODEC_ID_H264: return cudaVideoCodec_H264; +case AV_CODEC_ID_HEVC: return cudaVideoCodec_HEVC; } return -1; } diff --git a/libavcodec/cuvid_hevc.c b/libavcodec/cuvid_hevc.c new file mode 100644 index

[libav-devel] [PATCH] h264dec: add a CUVID hwaccel

2017-07-24 Thread Anton Khirnov
@ -68,6 +68,7 @@ void avcodec_register_all(void) /* hardware accelerators */ REGISTER_HWACCEL(H263_VAAPI,h263_vaapi); +REGISTER_HWACCEL(H264_CUVID,h264_cuvid); REGISTER_HWACCEL(H264_D3D11VA, h264_d3d11va); REGISTER_HWACCEL(H264_D3D11VA2, h264_d3d11va2)

Re: [libav-devel] [PATCH 2/3] fate/hevc: specify output pixel format explicitly

2017-07-24 Thread Anton Khirnov
Quoting Hendrik Leppkes (2017-07-24 12:09:52) > On Mon, Jul 24, 2017 at 11:46 AM, Anton Khirnov wrote: > > This allows running those tests with hwaccel. > > --- > > tests/fate/hevc.mak | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff -

[libav-devel] [PATCH 1/3] hevcdec: set the active SPS before calling get_format()

2017-07-24 Thread Anton Khirnov
This way the SPS is available to the hwaccel init code. --- libavcodec/hevcdec.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index f6bbb70..664e4ac 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -490,13 +

[libav-devel] [PATCH 2/3] fate/hevc: specify output pixel format explicitly

2017-07-24 Thread Anton Khirnov
This allows running those tests with hwaccel. --- tests/fate/hevc.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak index 5446969..fe3ef26 100644 --- a/tests/fate/hevc.mak +++ b/tests/fate/hevc.mak @@ -144,7 +144,7 @@ HEVC_SAMPLES_10B

[libav-devel] [PATCH 3/3] hevcdec: add a CUVID hwaccel

2017-07-24 Thread Anton Khirnov
) { switch (id) { case AV_CODEC_ID_H264: return cudaVideoCodec_H264; +case AV_CODEC_ID_HEVC: return cudaVideoCodec_HEVC; } return -1; } diff --git a/libavcodec/cuvid_hevc.c b/libavcodec/cuvid_hevc.c new file mode 100644 index 000..5de9bca --- /dev/null +++ b/libavcodec/cuvid_hevc

Re: [libav-devel] [PATCH 04/15] lavc: Add coded bitstream read/write API

2017-07-23 Thread Anton Khirnov
; create mode 100644 libavcodec/cbs.c > create mode 100644 libavcodec/cbs.h > create mode 100644 libavcodec/cbs_internal.h > Ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 05/15] lavc: Add coded bitstream read/write support for H.264

2017-07-23 Thread Anton Khirnov
5.h > create mode 100644 libavcodec/cbs_h264_syntax.c Ok -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 10/15] lavc: Add h264_redundant_pps bitstream filter

2017-07-23 Thread Anton Khirnov
+ > 4 files changed, 188 insertions(+) > create mode 100644 libavcodec/h264_redundant_pps_bsf.c LGTM -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 09/15] lavc: Add h264_metadata bitstream filter

2017-07-23 Thread Anton Khirnov
+ > libavcodec/bitstream_filters.c | 1 + > libavcodec/h264_metadata_bsf.c | 462 > + > 4 files changed, 512 insertions(+) > create mode 100644 libavcodec/h264_metadata_bsf.c > Looks ok -- Anton Khirnov ___

Re: [libav-devel] [PATCH 08/15] lavc: Add trace_headers bitstream filter

2017-07-22 Thread Anton Khirnov
e > +av_log(bsf, AV_LOG_INFO, "Packet (%spts %"PRId64")\n", > + in->flags & AV_PKT_FLAG_KEY ? "key frame, " : "", in->pts); Why not log the dts as well? Otherwise looks ok. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 03/15] hevc: Validate the number of long term reference pictures

2017-07-22 Thread Anton Khirnov
Quoting Mark Thompson (2017-06-24 01:39:09) > This would overflow if the stream contained a value greater than the > maximum allowed by the standard (32). > --- > libavcodec/hevc_ps.c | 6 ++ > 1 file changed, 6 insertions(+) > Looks ok and should go into stable.

Re: [libav-devel] [PATCH 02/15] hevc: Improve stream constraint values in common header

2017-07-22 Thread Anton Khirnov
> 4 files changed, 52 insertions(+), 19 deletions(-) > LGTM -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 01/15] h264: Add stream constraint values to the common header

2017-07-22 Thread Anton Khirnov
n't see it as a problem. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 08/25] libavfilter changes for the new channel layout API

2017-07-22 Thread Anton Khirnov
ter. That helps ensuring that the compat layers are correct. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 07/25] lavfi, buffersrc: switch to the new channel layout API

2017-07-22 Thread Anton Khirnov
me* > return AVERROR(ENOMEM); > > if (!s->time_base.num) > s->time_base = (AVRational){1, s->sample_rate}; > > +chlstr = av_channel_layout_describe(&s->ch_layout); > av_log(ctx, AV_LOG_VERBOSE, "tb:%d/%d samplefmt:%s samplerate: %d " > "ch layout:%s\n", s->time_base.num, s->time_base.den, > s->sample_fmt_str, > - s->sample_rate, s->channel_layout_str); > + s->sample_rate, chlstr); > +av_free(chlstr); > > return ret; > } > @@ -344,7 +347,7 @@ static int query_formats(AVFilterContext *ctx) > ff_add_format(&samplerates, c->sample_rate); > ff_set_common_samplerates(ctx, samplerates); > > -ff_add_channel_layout(&channel_layouts, c->channel_layout); > +ff_add_channel_layout(&channel_layouts, c->ch_layout.u.mask); > ff_set_common_channel_layouts(ctx, channel_layouts); > break; > default: > @@ -357,6 +360,7 @@ static int query_formats(AVFilterContext *ctx) > static int config_props(AVFilterLink *link) > { > BufferSourceContext *c = link->src->priv; > +int ret; > > switch (link->type) { > case AVMEDIA_TYPE_VIDEO: > @@ -371,7 +375,16 @@ static int config_props(AVFilterLink *link) > } > break; > case AVMEDIA_TYPE_AUDIO: > -link->channel_layout = c->channel_layout; > +ret = av_channel_layout_copy(&link->ch_layout, &c->ch_layout); > +if (ret < 0) > +return ret; > +#if FF_API_OLD_CHANNEL_LAYOUT > +FF_DISABLE_DEPRECATION_WARNINGS > +if (c->ch_layout.order == AV_CHANNEL_ORDER_NATIVE || > +c->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) > +link->channel_layout = c->ch_layout.u.mask; Same as above. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 06/25] lavr: switch to the new channel layout API

2017-07-22 Thread Anton Khirnov
"Unspecified channel layout order is supported only for up > " > + "to 63 channels (got %d).\n", > avr->out_ch_layout.nb_channels); > + return AVERROR(ENOSYS); > +} > +av_channel_layout_default(&avr->out_ch_layout, > avr->out_ch_layout.nb_channels); > +} Why are those needed? Seems they are redundant given the other checks right below. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 05/25] avtools: Use the new channel layout API in AVFrame

2017-07-22 Thread Anton Khirnov
t needs to be done here, then your compatibility layer is broken. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 04/25] avframe: switch to the new channel layout API

2017-07-22 Thread Anton Khirnov
Quoting Vittorio Giovara (2017-06-29 00:10:48) > From: Anton Khirnov > > Signed-off-by: Vittorio Giovara > --- > libavcodec/decode.c | 67 > libavcodec/encode.c | 9 ++ > lib

Re: [libav-devel] [PATCH 04/25] avframe: switch to the new channel layout API

2017-07-22 Thread Anton Khirnov
Quoting Vittorio Giovara (2017-06-29 00:10:48) > From: Anton Khirnov > > Signed-off-by: Vittorio Giovara > --- > libavcodec/decode.c | 67 > libavcodec/encode.c | 9 ++ Why are there lavc changes in this patch. Should they n

Re: [libav-devel] [PATCH] Add a new channel layout API

2017-07-22 Thread Anton Khirnov
Quoting wm4 (2017-07-05 20:53:54) > On Fri, 30 Jun 2017 12:51:16 -0400 > Vittorio Giovara wrote: > > > On Fri, Jun 30, 2017 at 4:38 AM, wm4 wrote: > > > On Thu, 29 Jun 2017 17:28:51 -0400 > > > Vittorio Giovara wrote: > > > > > >>

Re: [libav-devel] [PATCH 01/25] Add a new channel layout API

2017-07-22 Thread Anton Khirnov
ented by: > + * - the formal channel layout name (returned by > av_channel_layout_describe()) > + * - single or multiple channel names (returned by av_channel_name() > + *or concatenated with "|") Shouldn't this be - single or multiple channel names (returned by av_channel_name(

Re: [libav-devel] [PATCH 5/5] h264dec: add a CUVID hwaccel

2017-07-22 Thread Anton Khirnov
Quoting Luca Barbato (2017-07-21 19:28:29) > On 21/07/2017 15:19, Anton Khirnov wrote: > > Some parts of the code are based on a patch by > > Timo Rothenpieler > > --- > > Seems fine, once I manage to boot the desktop I can test it. > > lu > > PS: Do

Re: [libav-devel] [PATCH v2] imgutils: add function to clear an image to black

2017-07-21 Thread Anton Khirnov
t_desc_get(pix_fmt); > +int nb_planes = av_pix_fmt_count_planes(pix_fmt); > +// A pixel on each plane, with a value that represents black. > +// Consider e.g. AV_PIX_FMT_UYVY422 for non-trivial cases. > + uint8_t pixel[4][MAX_PIXEL_SIZE] = {0}; // clear padding with 0 > +

Re: [libav-devel] [PATCH v2] lavc, lavu: move frame cropping to a convenience function

2017-07-21 Thread Anton Khirnov
Quoting wm4 (2017-07-21 22:56:43) > On Fri, 21 Jul 2017 22:32:43 +0200 > Anton Khirnov wrote: > > > Quoting wm4 (2017-07-12 17:02:49) > > > +int av_frame_apply_cropping(AVFrame *frame, int flags) > > > +{ > > > +const AVPixFmtDescriptor *desc; >

Re: [libav-devel] [PATCH v2] lavc, lavu: move frame cropping to a convenience function

2017-07-21 Thread Anton Khirnov
icitly specify otherwise) expect the frame data to be aligned, so when this flag is used, the resulting frame must not be fed back to Libav.' Otherwise looks ok, modulo apichanges/bump -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] lavf: allow avformat_close_input() with NULL

2017-07-21 Thread Anton Khirnov
+AVIOContext *pb; > + > +if (!ps || !*ps) This is overly lax IMO. *ps being NULL should be allowed, in analogy with free(NULL) beeing a no-op. But ps being NULL makes no sense at all ever and just means that the caller is broken, so that should crash. -- Anton Khirnov __

[libav-devel] [PATCH] caf: add an Opus tag

2017-07-21 Thread Anton Khirnov
CC: libav-sta...@libav.org --- libavformat/caf.c| 1 + libavformat/cafdec.c | 8 2 files changed, 9 insertions(+) diff --git a/libavformat/caf.c b/libavformat/caf.c index cf128d5..c299cad 100644 --- a/libavformat/caf.c +++ b/libavformat/caf.c @@ -49,6 +49,7 @@ const AVCodecTag ff_cod

Re: [libav-devel] [PATCH] caf: add an Opus tag

2017-07-21 Thread Anton Khirnov
Quoting James Almer (2017-07-21 17:49:33) > On 7/21/2017 9:19 AM, Anton Khirnov wrote: > > Quoting Anton Khirnov (2017-07-21 13:59:41) > >> CC: libav-sta...@libav.org > >> --- > >> libavformat/caf.c | 1 + > >> 1 file changed, 1 insertion(+) > >

[libav-devel] [PATCH 2/5] decode: add a method for attaching lavc-internal data to frames

2017-07-21 Thread Anton Khirnov
Use the AVFrame.opaque_ref field. The original user's opaque_ref is wrapped in the lavc struct and then unwrapped before the frame is returned to the caller. This new struct will be useful in the following commits. --- libavcodec/decode.c | 57 +

[libav-devel] [PATCH 4/5] decode: add a per-frame private data for hwaccel use

2017-07-21 Thread Anton Khirnov
This will be useful in the CUVID hwaccel. It should also eventually replace current decoder-specific mechanisms used by various other hwaccels. --- libavcodec/decode.c | 3 +++ libavcodec/decode.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c

[libav-devel] [PATCH 3/5] decode: add a mechanism for performing delayed processing on the decoded frames

2017-07-21 Thread Anton Khirnov
This will be useful in the CUVID hwaccel. --- libavcodec/decode.c | 11 +++ libavcodec/decode.h | 15 +++ 2 files changed, 26 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 9cd3081..01e4dd2 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c

[libav-devel] [PATCH 1/5] decode: avoid leaks on failure in ff_get_buffer()

2017-07-21 Thread Anton Khirnov
If the get_buffer() call fails, the frame might have some side data already set. Make sure it gets freed. --- libavcodec/decode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 175a6fa..89a6d34 100644 --- a/libavcodec/decode.c +++ b/libavcode

[libav-devel] [PATCH 5/5] h264dec: add a CUVID hwaccel

2017-07-21 Thread Anton Khirnov
register_all(void) /* hardware accelerators */ REGISTER_HWACCEL(H263_VAAPI,h263_vaapi); +REGISTER_HWACCEL(H264_CUVID,h264_cuvid); REGISTER_HWACCEL(H264_D3D11VA, h264_d3d11va); REGISTER_HWACCEL(H264_D3D11VA2, h264_d3d11va2); REGISTER_HWACCEL(H2

Re: [libav-devel] [PATCH] caf: add an Opus tag

2017-07-21 Thread Anton Khirnov
Quoting Anton Khirnov (2017-07-21 13:59:41) > CC: libav-sta...@libav.org > --- > libavformat/caf.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/caf.c b/libavformat/caf.c > index cf128d5..c299cad 100644 > --- a/libavformat/caf.c > +++ b/libavfo

[libav-devel] [PATCH] caf: add an Opus tag

2017-07-21 Thread Anton Khirnov
CC: libav-sta...@libav.org --- libavformat/caf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/caf.c b/libavformat/caf.c index cf128d5..c299cad 100644 --- a/libavformat/caf.c +++ b/libavformat/caf.c @@ -49,6 +49,7 @@ const AVCodecTag ff_codec_caf_tags[] = { { AV_CODEC_ID_QCE

Re: [libav-devel] [PATCH 1/6] avcodec/h264_slice: Also copy x264_build in ff_h264_update_thread_context()

2017-06-16 Thread Anton Khirnov
do it. H264SEI should store the content of the last parsed SEI, other code should not mess with it. The right thing to do is maintain a copy of x264_build in H264Context. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 1/2] smacker: Check that the data size is a multiple of a sample vector

2017-05-30 Thread Anton Khirnov
t output buffer */ > frame->nb_samples = unp_size / (avctx->channels * (bits + 1)); > +if (unp_size % (avctx->channels * (bits + 1))) { > +av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size); > +return AVERROR(EINVAL); > + } The

Re: [libav-devel] [PATCH] avconv: Always initialize the opkt struct on streamcopy

2017-05-29 Thread Anton Khirnov
p; !(pkt->flags & AV_PKT_FLAG_KEY)) && > >> !ost->copy_initial_nonkeyframes) > >> return; > > > > This doesn't initialize all AVPacket fields. > > I can throw in a { 0 } if you like it better :) Stab. It's not a question of "liking", there are correct things to do and incorrect things to do. So do the correct thing. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 002/200] lavu: support AVChannelLayout AVOptions

2017-05-26 Thread Anton Khirnov
Quoting wm4 (2017-05-26 20:03:07) > On Fri, 26 May 2017 19:30:40 +0200 > Anton Khirnov wrote: > > > Quoting Luca Barbato (2017-05-23 22:08:49) > > > On 5/17/17 7:46 PM, Vittorio Giovara wrote: > > > > +av_channel_layout_uninit(dst); > >

Re: [libav-devel] [PATCH 2/3] log: move all the "advanced" logging from lavu into cmdutils

2017-05-26 Thread Anton Khirnov
Quoting Vittorio Giovara (2017-05-22 22:05:55) > On Sat, May 20, 2017 at 7:57 AM, Anton Khirnov wrote: > > The default logging callback in lavu currently contains several > > "advanced" features, such as > > - suppressing repeated messages > > - automatica

Re: [libav-devel] [PATCH 05/14] lavc: Add coded bitstream read/write support for H.264

2017-05-26 Thread Anton Khirnov
Quoting Mark Thompson (2017-05-26 01:37:21) > On 21/05/17 09:46, Anton Khirnov wrote: > > Quoting Mark Thompson (2017-05-14 23:24:11) > >> + > >> +start = end = 6; > >> +for (i = 0; i < count; i++) { > >> +size = AV_RB16(d

Re: [libav-devel] [PATCH 04/14] lavc: Add coded bitstream read/write API

2017-05-26 Thread Anton Khirnov
Quoting Mark Thompson (2017-05-26 00:46:09) > On 20/05/17 07:35, Anton Khirnov wrote: > > Quoting Mark Thompson (2017-05-14 23:24:10) > >> +int ff_cbs_insert_unit(CodedBitstreamContext *ctx, > >> + CodedBitstreamFragment *frag, > >> +

Re: [libav-devel] [PATCH 1/3] build: Skip generating .version files when reconfiguring

2017-05-26 Thread Anton Khirnov
The commit message could use more detail, it's not entirely obvious why this is the correct thing to do. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 002/200] lavu: support AVChannelLayout AVOptions

2017-05-26 Thread Anton Khirnov
leak memory if you forget. I am against this. Freeing memory should be explicit. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 05/14] lavc: Add coded bitstream read/write support for H.264

2017-05-21 Thread Anton Khirnov
+ CodedBitstreamUnit *unit) > +{ > +BitstreamContext bc; > +int err; > + > +err = bitstream_init(&bc, unit->data, 8 * unit->data_size); > +if (err < 0) > +return err; > + > +switch (unit->type) { > +case H264_NAL_SPS: > +{ > +H264RawSPS *sps; > + > +sps = av_mallocz(sizeof(*sps)); > +if (!sps) > +return AVERROR(ENOMEM); > +err = cbs_h264_read_sps(ctx, &bc, sps); > +if (err < 0) { > +av_free(sps); > +return err; > +} > + > +cbs_h264_replace_sps(ctx, sps); Should probably check the return value. Same below. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 2/3] log: move all the "advanced" logging from lavu into cmdutils

2017-05-20 Thread Anton Khirnov
Quoting Hendrik Leppkes (2017-05-20 21:20:58) > On Sat, May 20, 2017 at 9:15 PM, Anton Khirnov wrote: > > Quoting Martin Storsjö (2017-05-20 20:28:35) > >> On Sat, 20 May 2017, Anton Khirnov wrote: > >> > >> > The default logging callback in lavu curr

Re: [libav-devel] [PATCH 2/3] log: move all the "advanced" logging from lavu into cmdutils

2017-05-20 Thread Anton Khirnov
Quoting Martin Storsjö (2017-05-20 20:28:35) > On Sat, 20 May 2017, Anton Khirnov wrote: > > > The default logging callback in lavu currently contains several > > "advanced" features, such as > > - suppressing repeated messages > > - automatically h

[libav-devel] [PATCH 1/3] cmdutils: drop libavformat/network.h include

2017-05-20 Thread Anton Khirnov
It is not a public header and has not been used since 10173c0e58e557582dbd659f42c6aa164a8682db --- avtools/cmdutils.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/avtools/cmdutils.c b/avtools/cmdutils.c index b0445eb..a19df30 100644 --- a/avtools/cmdutils.c +++ b/avtools/cmdutils.c @@ -47

[libav-devel] [PATCH 2/3] log: move all the "advanced" logging from lavu into cmdutils

2017-05-20 Thread Anton Khirnov
The default logging callback in lavu currently contains several "advanced" features, such as - suppressing repeated messages - automatically hiding the log prefix - color support They add significant complexity to the logging callback and - more importantly - global state, making logging not thread

[libav-devel] [PATCH 3/3] log: deprecate now unused AV_LOG_SKIP_REPEATED

2017-05-20 Thread Anton Khirnov
--- libavutil/log.h | 9 +++-- libavutil/version.h | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavutil/log.h b/libavutil/log.h index ce00bcc..0fc8b9c 100644 --- a/libavutil/log.h +++ b/libavutil/log.h @@ -249,15 +249,12 @@ void av_log_default_callback(void *av

  1   2   3   4   5   6   7   8   9   10   >