Re: [libav-devel] [PATCH 6/9] avcodec/extract_extradata: don't uninitialize the H2645Packet on every processed packet
On 10/11/2018 7:12 AM, Luca Barbato wrote: > On 03/10/2018 21:15, Luca Barbato wrote: >> From: James Almer >> >> Based on hevc_parser code. This prevents repeated unnecessary allocations >> and frees on every packet processed by the bsf. >> >> Reviewed-by: Jun Zhao >> Signed-off-by: James Almer >> Signed-off-by: Luca Barbato >> --- >> libavcodec/extract_extradata_bsf.c | 33 +++-- >> 1 file changed, 19 insertions(+), 14 deletions(-) > > I'd merge the extract_extradata improvements today, James do you see > anything I should fold in? > > lu No, patches 1 to 6 can go in as is. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 6/9] avcodec/extract_extradata: don't uninitialize the H2645Packet on every processed packet
On 03/10/2018 21:15, Luca Barbato wrote: > From: James Almer > > Based on hevc_parser code. This prevents repeated unnecessary allocations > and frees on every packet processed by the bsf. > > Reviewed-by: Jun Zhao > Signed-off-by: James Almer > Signed-off-by: Luca Barbato > --- > libavcodec/extract_extradata_bsf.c | 33 +++-- > 1 file changed, 19 insertions(+), 14 deletions(-) I'd merge the extract_extradata improvements today, James do you see anything I should fold in? lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] lavc/qsvenc_jpeg: add async_depth support
> From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of Luca > Barbato > Sent: Thursday, October 11, 2018 5:34 PM > To: libav-devel@libav.org > Subject: Re: [libav-devel] [PATCH 1/2] lavc/qsvenc_jpeg: add async_depth > support > > On 11/10/2018 11:26, Zhong Li wrote: > > Currently qsv (m)jpeg encoding is broken. > > Regression introducing by the commit(id: c1bcd3): fix async support, > > which requires the minimum async_depth to be 1, instead previous zero. > > But the default async_depth of qsv (m)jpeg encoding is still > > initialized > > (mostly) as zero. > > > > This patch also abviously improves qsv (m)jpeg encoding performance > > due to the default async_depth is changed to 4. > > > > Signed-off-by: Zhong Li > > --- > > libavcodec/qsvenc_jpeg.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c index > > e11b74d..7465bb9 100644 > > --- a/libavcodec/qsvenc_jpeg.c > > +++ b/libavcodec/qsvenc_jpeg.c > > @@ -64,6 +64,7 @@ static av_cold int qsv_enc_close(AVCodecContext > > *avctx) #define OFFSET(x) offsetof(QSVMJPEGEncContext, x) #define > VE > > AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM > static const > > AVOption options[] = { > > +{ "async_depth", "Maximum processing parallelism", > > + OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = > > + ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VE }, > > { NULL }, > > }; > > > > > > both look fine. I'd merge them this evening. > > lu Thanks for quick reply, : ) ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] lavc/qsvenc_jpeg: add async_depth support
On 11/10/2018 11:26, Zhong Li wrote: > Currently qsv (m)jpeg encoding is broken. > Regression introducing by the commit(id: c1bcd3): fix async support, > which requires the minimum async_depth to be 1, instead previous zero. > But the default async_depth of qsv (m)jpeg encoding is still initialized > (mostly) as zero. > > This patch also abviously improves qsv (m)jpeg encoding performance > due to the default async_depth is changed to 4. > > Signed-off-by: Zhong Li > --- > libavcodec/qsvenc_jpeg.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c > index e11b74d..7465bb9 100644 > --- a/libavcodec/qsvenc_jpeg.c > +++ b/libavcodec/qsvenc_jpeg.c > @@ -64,6 +64,7 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx) > #define OFFSET(x) offsetof(QSVMJPEGEncContext, x) > #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM > static const AVOption options[] = { > +{ "async_depth", "Maximum processing parallelism", > OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, > INT_MAX, VE }, > { NULL }, > }; > > both look fine. I'd merge them this evening. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/2] lavc/qsvenc_jpeg: set a default quality
Keep alignment with vaapi mjpeg encoder. Signed-off-by: Zhong Li --- libavcodec/qsvenc_jpeg.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c index 7465bb9..bbfd009 100644 --- a/libavcodec/qsvenc_jpeg.c +++ b/libavcodec/qsvenc_jpeg.c @@ -75,6 +75,11 @@ static const AVClass class = { .version= LIBAVUTIL_VERSION_INT, }; +static const AVCodecDefault qsv_enc_defaults[] = { +{ "global_quality", "80" }, +{ NULL }, +}; + AVCodec ff_mjpeg_qsv_encoder = { .name = "mjpeg_qsv", .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Intel Quick Sync Video acceleration)"), @@ -89,5 +94,6 @@ AVCodec ff_mjpeg_qsv_encoder = { AV_PIX_FMT_QSV, AV_PIX_FMT_NONE }, .priv_class = &class, +.defaults = qsv_enc_defaults, .wrapper_name = "qsv", }; -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] lavc/qsvenc_jpeg: add async_depth support
Currently qsv (m)jpeg encoding is broken. Regression introducing by the commit(id: c1bcd3): fix async support, which requires the minimum async_depth to be 1, instead previous zero. But the default async_depth of qsv (m)jpeg encoding is still initialized (mostly) as zero. This patch also abviously improves qsv (m)jpeg encoding performance due to the default async_depth is changed to 4. Signed-off-by: Zhong Li --- libavcodec/qsvenc_jpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c index e11b74d..7465bb9 100644 --- a/libavcodec/qsvenc_jpeg.c +++ b/libavcodec/qsvenc_jpeg.c @@ -64,6 +64,7 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx) #define OFFSET(x) offsetof(QSVMJPEGEncContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { +{ "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VE }, { NULL }, }; -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel