[libav-devel] [PATCH] lavf/qsvvpp: bypass vpp if not needed.
Currently vpp pipeline is always created, even for the unnecessary cases such as setting the option "vpp_qsv=w=1280:h=720" for an input with native resolution 1280x720. Thus introduces unnecessary performance dropping, so bypass vpp if not needed. Signed-off-by: Zhong Li --- libavfilter/vf_vpp_qsv.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 610e821..568dee5 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -27,6 +27,7 @@ #include "libavutil/eval.h" #include "libavutil/avassert.h" #include "libavutil/pixdesc.h" +#include "libavutil/mathematics.h" #include "formats.h" #include "internal.h" @@ -249,6 +250,7 @@ static int config_output(AVFilterLink *outlink) QSVVPPParam param = { NULL }; QSVVPPCrop crop = { 0 }; mfxExtBuffer*ext_buf[ENH_FILTERS_COUNT]; +AVFilterLink*inlink = ctx->inputs[0]; outlink->w = vpp->out_width; outlink->h = vpp->out_height; @@ -320,14 +322,34 @@ static int config_output(AVFilterLink *outlink) param.ext_buf[param.num_ext_buf++] = (mfxExtBuffer*)&vpp->procamp_conf; } -return ff_qsvvpp_create(ctx, &vpp->qsv, ¶m); +if (vpp->use_frc || vpp->use_crop || vpp->deinterlace || vpp->denoise || +vpp->detail || vpp->procamp || inlink->w != outlink->w || inlink->h != outlink->h) +return ff_qsvvpp_create(ctx, &vpp->qsv, ¶m); +else { +av_log(ctx, AV_LOG_VERBOSE, "qsv vpp pass through mode.\n"); +if (inlink->hw_frames_ctx) +outlink->hw_frames_ctx = av_buffer_ref(inlink->hw_frames_ctx); +} + +return 0; } static int filter_frame(AVFilterLink *inlink, AVFrame *picref) { -VPPContext *vpp = inlink->dst->priv; +int ret = 0; +AVFilterContext *ctx = inlink->dst; +VPPContext *vpp = inlink->dst->priv; +AVFilterLink *outlink = ctx->outputs[0]; + +if (vpp->qsv) +ret = ff_qsvvpp_filter_frame(vpp->qsv, inlink, picref); +else { +if (picref->pts != AV_NOPTS_VALUE) +picref->pts = av_rescale_q(picref->pts, inlink->time_base, outlink->time_base); +ret = ff_filter_frame(outlink, picref); +} -return ff_qsvvpp_filter_frame(vpp->qsv, inlink, picref); +return ret; } static int query_formats(AVFilterContext *ctx) -- 1.8.3.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] lavc/qsvdec: expose frame pic_type and key_frame
Currently pict_type and key_frame are unset. Add an extra param to fetch the picture type from qsv decoder The judgement “key frame is equal to IDR frame” only suitable for H264. For HEVC, all IRAP frames are key frames, and other codecs have no IDR frame. Signed-off-by: ChaoX A Liu Signed-off-by: Zhong Li --- libavcodec/qsv.c | 24 libavcodec/qsv_internal.h | 3 +++ libavcodec/qsvdec.c | 9 + 3 files changed, 36 insertions(+) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index e78633d..e578ab1 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -195,6 +195,30 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame) return AVERROR_BUG; } +enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) +{ +enum AVPictureType type; +switch (mfx_pic_type & 0x7) { +case MFX_FRAMETYPE_I: +if (mfx_pic_type & MFX_FRAMETYPE_S) +type = AV_PICTURE_TYPE_SI; +else +type = AV_PICTURE_TYPE_I; +break; +case MFX_FRAMETYPE_B: +type = AV_PICTURE_TYPE_B; +break; +case MFX_FRAMETYPE_P: +if (mfx_pic_type & MFX_FRAMETYPE_S) +type = AV_PICTURE_TYPE_SP; +else +type = AV_PICTURE_TYPE_P; +break; +} + +return type; +} + static int qsv_load_plugins(mfxSession session, const char *load_plugins, void *logctx) { diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index 975c8de..07ddc59 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -48,6 +48,8 @@ typedef struct QSVMid { typedef struct QSVFrame { AVFrame *frame; mfxFrameSurface1 surface; +mfxExtDecodedFrameInfo dec_info; +mfxExtBuffer *ext_param; int queued; int used; @@ -83,6 +85,7 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id); int ff_qsv_profile_to_mfx(enum AVCodecID codec_id, int profile); int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc); +enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type); int ff_qsv_init_internal_session(AVCodecContext *avctx, mfxSession *session, const char *load_plugins); diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index d05d48f..31cce2d 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -232,6 +232,11 @@ static int alloc_frame(AVCodecContext *avctx, QSVContext *q, QSVFrame *frame) frame->surface.Data.MemId = &q->frames_ctx.mids[ret]; } +frame->surface.Data.ExtParam= &frame->ext_param; +frame->surface.Data.NumExtParam = 1; +frame->ext_param= (mfxExtBuffer*)&frame->dec_info; +frame->dec_info.Header.BufferId = MFX_EXTBUFF_DECODED_FRAME_INFO; +frame->dec_info.Header.BufferSz = sizeof(frame->dec_info); frame->used = 1; @@ -418,6 +423,10 @@ FF_ENABLE_DEPRECATION_WARNINGS outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF; frame->interlaced_frame = !(outsurf->Info.PicStruct & MFX_PICSTRUCT_PROGRESSIVE); +frame->pict_type = ff_qsv_map_pictype(out_frame->dec_info.FrameType); +//Key frame is IDR frame is only suitable for H264. For HEVC, IRAPs are key frames. +if (avctx->codec_id == AV_CODEC_ID_H264) +frame->key_frame = !!(out_frame->dec_info.FrameType & MFX_FRAMETYPE_IDR); /* update the surface properties */ if (avctx->pix_fmt == AV_PIX_FMT_QSV) -- 1.8.3.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] lavc/qsvenc: fix the hard code of height aligment checking
Signed-off-by: Zhong Li --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index f6b1a0d..fc9ace4 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1048,7 +1048,7 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame, } } else { /* make a copy if the input is not padded as libmfx requires */ -if (frame->height & 31 || frame->linesize[0] & (q->width_align - 1)) { +if (frame->height & (q->height_align - 1) || frame->linesize[0] & (q->width_align - 1)) { qf->frame->height = FFALIGN(frame->height, q->height_align); qf->frame->width = FFALIGN(frame->width, q->width_align); -- 1.8.3.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH v2] qsv: adding Multi Frame Encode support
On 02/04/2018 15:17, Maxym Dmytrychenko wrote: > +if (QSV_RUNTIME_VERSION_ATLEAST(ver, 1, 25)) { Maybe use QSV_HAVE_MF ? The rest looks fine to me. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 4/6] avprobe: Report the display orientation operations
--- avtools/avprobe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/avtools/avprobe.c b/avtools/avprobe.c index 0ea9ff46fd..8ac8960014 100644 --- a/avtools/avprobe.c +++ b/avtools/avprobe.c @@ -809,6 +809,8 @@ static void show_stream(InputFile *ifile, InputStream *ist) const AVPacketSideData* sd = &stream->side_data[i]; AVStereo3D *stereo; AVSphericalMapping *spherical; +uint32_t mask; +char buf[64]; switch (sd->type) { case AV_PKT_DATA_DISPLAYMATRIX: @@ -828,6 +830,10 @@ static void show_stream(InputFile *ifile, InputStream *ist) probe_array_footer("matrix_str", 1); probe_int("rotation", av_display_rotation_get((int32_t *)sd->data)); +mask = av_display_orientation_get((int32_t *)sd->data); +av_display_orientation_name(mask, &buf[0], sizeof(buf)); +probe_str("orientation", buf); +probe_int("orientation_mask", mask); probe_object_footer("displaymatrix"); break; case AV_PKT_DATA_STEREO3D: -- 2.16.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 6/6] avconv: Support automatic horizontal and vertical flip
--- avtools/avconv_filter.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/avtools/avconv_filter.c b/avtools/avconv_filter.c index 858dc0409b..5a535a7ac1 100644 --- a/avtools/avconv_filter.c +++ b/avtools/avconv_filter.c @@ -551,6 +551,17 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter, } if (ret < 0) return ret; + +if (orientation & AV_FLIP_HORIZONTAL) { +ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); +if (ret < 0) +return ret; +} +if (orientation & AV_FLIP_VERTICAL) { +ret = insert_filter(&last_filter, &pad_idx, "vflip", NULL); +if (ret < 0) +return ret; +} } } -- 2.16.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/6] avprobe: Print a user-friendly version of the display matrix
Shift fixed point numbers to be actual decimal numbers. --- avtools/avprobe.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/avtools/avprobe.c b/avtools/avprobe.c index d6809042f7..0ea9ff46fd 100644 --- a/avtools/avprobe.c +++ b/avtools/avprobe.c @@ -131,6 +131,7 @@ typedef struct PrintContext { static AVIOContext *probe_out = NULL; static PrintContext octx; #define AVP_INDENT() avio_printf(probe_out, "%*c", octx.level * 2, ' ') +#define CONV_FP(x,fp) ((double) (x)) / (1 << fp) /* * Default format, INI @@ -816,6 +817,15 @@ static void show_stream(InputFile *ifile, InputStream *ist) for (j = 0; j < 9; j++) probe_int(NULL, ((int32_t *)sd->data)[j]); probe_array_footer("matrix", 1); +probe_array_header("matrix_str", 1); +for (j = 0; j < 9; j++) { +char buf[32]; +int fp = (j == 2 || j == 5 || j == 8) ? 30 : 16; +int32_t val = ((int32_t *)sd->data)[j]; +value_string(buf, sizeof(buf), CONV_FP(val, fp), ""); +probe_str(NULL, buf); +} +probe_array_footer("matrix_str", 1); probe_int("rotation", av_display_rotation_get((int32_t *)sd->data)); probe_object_footer("displaymatrix"); -- 2.16.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/6] avprobe: Support printing strings with empty keys
--- avtools/avprobe.c | 38 ++ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/avtools/avprobe.c b/avtools/avprobe.c index a9ca1934ca..d6809042f7 100644 --- a/avtools/avprobe.c +++ b/avtools/avprobe.c @@ -235,10 +235,14 @@ static void ini_print_integer(const char *key, int64_t value) static void ini_print_string(const char *key, const char *value) { -ini_escape_print(key); -avio_printf(probe_out, "="); -ini_escape_print(value); -avio_w8(probe_out, '\n'); +if (key) { +ini_escape_print(key); +avio_printf(probe_out, "=%s\n", value); +} else { +if (octx.prefix[octx.level -1].nb_elems) +avio_printf(probe_out, ","); +avio_printf(probe_out, "%s", value); +} } /* @@ -329,14 +333,24 @@ static void json_escape_print(const char *s) static void json_print_string(const char *key, const char *value) { -if (octx.prefix[octx.level -1].nb_elems) -avio_printf(probe_out, ",\n"); -AVP_INDENT(); -avio_w8(probe_out, '\"'); -json_escape_print(key); -avio_printf(probe_out, "\" : \""); -json_escape_print(value); -avio_w8(probe_out, '\"'); +if (key) { +if (octx.prefix[octx.level -1].nb_elems) +avio_printf(probe_out, ",\n"); +AVP_INDENT(); +avio_w8(probe_out, '\"'); +json_escape_print(key); +avio_printf(probe_out, "\" : \""); +json_escape_print(value); +avio_w8(probe_out, '\"'); +} else { +if (octx.prefix[octx.level -1].nb_elems) +avio_printf(probe_out, ", "); +else +AVP_INDENT(); +avio_w8(probe_out, '\"'); +json_escape_print(value); +avio_w8(probe_out, '\"'); +} } /* -- 2.16.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 5/6] avconv: Port automatic rotation to the new orientation API
Needed to avoid conflicts with the upcoming automatic flip. --- avtools/avconv_filter.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/avtools/avconv_filter.c b/avtools/avconv_filter.c index 884478da27..858dc0409b 100644 --- a/avtools/avconv_filter.c +++ b/avtools/avconv_filter.c @@ -538,15 +538,15 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter, uint8_t* displaymatrix = av_stream_get_side_data(ist->st, AV_PKT_DATA_DISPLAYMATRIX, NULL); if (displaymatrix) { -double rot = av_display_rotation_get((int32_t*) displaymatrix); -if (rot < -135 || rot > 135) { +uint32_t orientation = av_display_orientation_get((int32_t*) displaymatrix); +if (orientation & AV_ROTATION_180) { ret = insert_filter(&last_filter, &pad_idx, "vflip", NULL); if (ret < 0) return ret; ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); -} else if (rot < -45) { +} else if (orientation & AV_ROTATION_90) { ret = insert_filter(&last_filter, &pad_idx, "transpose", "dir=clock"); -} else if (rot > 45) { +} else if (orientation & AV_ROTATION_270) { ret = insert_filter(&last_filter, &pad_idx, "transpose", "dir=cclock"); } if (ret < 0) -- 2.16.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 3/6] display: Add AVDisplayOrientation API
The transformation operations that can be described by a display matrix are not limited to pure rotation, but include horizontal and vertical flip, as well as transpose and antitranspose. Unfortunately the current API can only return a rotation angle in degrees, and is not designed to detect flip operations or a combination of rotation and flip. So implement an additional API to analyze the display matrix and return the most common rotation operations (multiples of 90º) as well flips or a combination thereof. This function returns a bitfield mask composed of AVDisplayOrientation elements that describe which rendering operations should be performed on the frame. The existing API is still available and useful in case of custom rotations. Signed-off-by: Vittorio Giovara --- Note: the new operations describe a clockwise rotation, while the old API provided a counterclockwise rotation. I always felt this was a mistake as it's counterintuitive and suprising to new users, so I didn't want to cargo-cult it to a new API. What do people think about it? See also https://github.com/FFMS/ffms2/issues/317 for flipped samples, code, and additional discussion. Missing changelog entry and version bump. Vittorio libavutil/display.c | 92 + libavutil/display.h | 53 ++ 2 files changed, 145 insertions(+) diff --git a/libavutil/display.c b/libavutil/display.c index f7500948ff..839961ec20 100644 --- a/libavutil/display.c +++ b/libavutil/display.c @@ -22,6 +22,7 @@ #include #include +#include "avstring.h" #include "display.h" #include "mathematics.h" @@ -73,3 +74,94 @@ void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip) for (i = 0; i < 9; i++) matrix[i] *= flip[i % 3]; } + +uint32_t av_display_orientation_get(int32_t matrix_src[9]) +{ +int32_t matrix[9]; +uint32_t orientation = 0; +int64_t det = (int64_t)matrix_src[0] * matrix_src[4] - (int64_t)matrix_src[1] * matrix_src[3]; + +/* Duplicate matrix so that the input one is not modified in case of flip. */ +memcpy(matrix, matrix_src, sizeof(*matrix_src) * 9); + +if (det < 0) { +/* Always assume an horizontal flip for simplicity, it can be + * changed later if rotation is 180º. */ +orientation = AV_FLIP_HORIZONTAL; +av_display_matrix_flip(matrix, 1, 0); +} + +if (matrix[1] == (1 << 16) && matrix[3] == -(1 << 16)) { +orientation |= AV_ROTATION_90; +} else if (matrix[0] == -(1 << 16) && matrix[4] == -(1 << 16)) { +if (det < 0) +orientation = AV_FLIP_VERTICAL; +else +orientation |= AV_ROTATION_180; +} else if (matrix[1] == -(1 << 16) && matrix[3] == (1 << 16)) { +orientation |= AV_ROTATION_270; +} else if (matrix[0] == (1 << 16) && matrix[4] == (1 << 16)) { +orientation |= AV_IDENTITY; +} else { +orientation |= AV_ROTATION_CUSTOM; +} + +return orientation; +} + +void av_display_orientation_set(int32_t matrix[9], uint32_t orientation, double angle) +{ +int hflip = !!(orientation & AV_FLIP_HORIZONTAL); +int vflip = !!(orientation & AV_FLIP_VERTICAL); + +memset(matrix, 0, sizeof(*matrix) * 9); +matrix[8] = 1 << 30; + +if (orientation & AV_IDENTITY) { +matrix[0] = 1 << 16; +matrix[4] = 1 << 16; +} else if (orientation & AV_ROTATION_90) { +matrix[1] = 1 << 16; +matrix[3] = -(1 << 16); +} else if (orientation & AV_ROTATION_180) { +matrix[0] = -(1 << 16); +matrix[4] = -(1 << 16); +} else if (orientation & AV_ROTATION_270) { +matrix[1] = -(1 << 16); +matrix[3] = 1 << 16; +} else if (orientation & AV_ROTATION_CUSTOM) { +av_display_rotation_set(matrix, angle); +} + +av_display_matrix_flip(matrix, hflip, vflip); +} + +void av_display_orientation_name(uint32_t orientation, char *buf, size_t buf_size) +{ +if (orientation == 0) { +av_strlcpy(buf, "identity", buf_size); +return; +} + +if (orientation & AV_ROTATION_90) +av_strlcpy(buf, "rotation_90", buf_size); +else if (orientation & AV_ROTATION_180) +av_strlcpy(buf, "rotation_180", buf_size); +else if (orientation & AV_ROTATION_270) +av_strlcpy(buf, "rotation_270", buf_size); +else if (orientation & AV_ROTATION_CUSTOM) +av_strlcpy(buf, "rotation_custom", buf_size); +else +buf[0] = '\0'; + +if (orientation & AV_FLIP_HORIZONTAL) { +if (buf[0] != '\0') +av_strlcat(buf, "+", buf_size); +av_strlcat(buf, "hflip", buf_size); +} +if (orientation & AV_FLIP_VERTICAL) { +if (buf[0] != '\0') +av_strlcat(buf, "+", buf_size); +av_strlcat(buf, "vflip", buf_size); +} +} diff --git a/libavutil/display.h b/libavutil/display.h index 2d869fcd16..a057453b20 100644 --- a/libavutil/display.h +++ b/libavutil
Re: [libav-devel] [PATCH 1/6] avprobe: Support printing strings with empty keys
On 04/04/2018 17:29, Vittorio Giovara wrote: > --- > avtools/avprobe.c | 38 ++ > 1 file changed, 26 insertions(+), 12 deletions(-) > > diff --git a/avtools/avprobe.c b/avtools/avprobe.c > index a9ca1934ca..d6809042f7 100644 > --- a/avtools/avprobe.c > +++ b/avtools/avprobe.c > @@ -235,10 +235,14 @@ static void ini_print_integer(const char *key, int64_t > value) > > static void ini_print_string(const char *key, const char *value) > { > -ini_escape_print(key); > -avio_printf(probe_out, "="); > -ini_escape_print(value); > -avio_w8(probe_out, '\n'); > +if (key) { > +ini_escape_print(key); > +avio_printf(probe_out, "=%s\n", value); > +} else { > +if (octx.prefix[octx.level -1].nb_elems) > +avio_printf(probe_out, ","); > +avio_printf(probe_out, "%s", value); > +} > } > > /* > @@ -329,14 +333,24 @@ static void json_escape_print(const char *s) > > static void json_print_string(const char *key, const char *value) > { > -if (octx.prefix[octx.level -1].nb_elems) > -avio_printf(probe_out, ",\n"); > -AVP_INDENT(); > -avio_w8(probe_out, '\"'); > -json_escape_print(key); > -avio_printf(probe_out, "\" : \""); > -json_escape_print(value); > -avio_w8(probe_out, '\"'); > +if (key) { > +if (octx.prefix[octx.level -1].nb_elems) > +avio_printf(probe_out, ",\n"); > +AVP_INDENT(); > +avio_w8(probe_out, '\"'); > +json_escape_print(key); > +avio_printf(probe_out, "\" : \""); > +json_escape_print(value); > +avio_w8(probe_out, '\"'); > +} else { > +if (octx.prefix[octx.level -1].nb_elems) > +avio_printf(probe_out, ", "); > +else > +AVP_INDENT(); > +avio_w8(probe_out, '\"'); > +json_escape_print(value); > +avio_w8(probe_out, '\"'); > +} > } > > /* > Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/6] avprobe: Print a user-friendly version of the display matrix
On 04/04/2018 17:29, Vittorio Giovara wrote: > Shift fixed point numbers to be actual decimal numbers. > --- > avtools/avprobe.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/avtools/avprobe.c b/avtools/avprobe.c > index d6809042f7..0ea9ff46fd 100644 > --- a/avtools/avprobe.c > +++ b/avtools/avprobe.c > @@ -131,6 +131,7 @@ typedef struct PrintContext { > static AVIOContext *probe_out = NULL; > static PrintContext octx; > #define AVP_INDENT() avio_printf(probe_out, "%*c", octx.level * 2, ' ') > +#define CONV_FP(x,fp) ((double) (x)) / (1 << fp) > > /* > * Default format, INI > @@ -816,6 +817,15 @@ static void show_stream(InputFile *ifile, InputStream > *ist) > for (j = 0; j < 9; j++) > probe_int(NULL, ((int32_t *)sd->data)[j]); > probe_array_footer("matrix", 1); > +probe_array_header("matrix_str", 1); > +for (j = 0; j < 9; j++) { > +char buf[32]; > +int fp = (j == 2 || j == 5 || j == 8) ? 30 : 16; > +int32_t val = ((int32_t *)sd->data)[j]; > +value_string(buf, sizeof(buf), CONV_FP(val, fp), ""); > +probe_str(NULL, buf); > +} > +probe_array_footer("matrix_str", 1); > probe_int("rotation", >av_display_rotation_get((int32_t *)sd->data)); > probe_object_footer("displaymatrix"); > Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] libaom: remove references to RGB pixfmts
Support for it was apparently never in the codebase, and the enum values were recently removed from the public headers [1] Fixes build with latest libaom build. [1] https://aomedia.googlesource.com/aom/+/3f29cc20e3a4c348cb41a797c68de856ddb84e12 Signed-off-by: James Almer --- libavcodec/libaom.c | 44 1 file changed, 44 deletions(-) diff --git a/libavcodec/libaom.c b/libavcodec/libaom.c index f083129f4..512095b33 100644 --- a/libavcodec/libaom.c +++ b/libavcodec/libaom.c @@ -38,28 +38,6 @@ case AOM_IMG_FMT_I ## fmt ## 16: \ enum AVPixelFormat ff_aom_imgfmt_to_pixfmt(aom_img_fmt_t img, int depth) { switch (img) { -case AOM_IMG_FMT_RGB24: -return AV_PIX_FMT_RGB24; -case AOM_IMG_FMT_RGB565: -return AV_PIX_FMT_RGB565BE; -case AOM_IMG_FMT_RGB555: -return AV_PIX_FMT_RGB555BE; -case AOM_IMG_FMT_UYVY: -return AV_PIX_FMT_UYVY422; -case AOM_IMG_FMT_YUY2: -return AV_PIX_FMT_YUYV422; -case AOM_IMG_FMT_YVYU: -return AV_PIX_FMT_YVYU422; -case AOM_IMG_FMT_BGR24: -return AV_PIX_FMT_BGR24; -case AOM_IMG_FMT_ARGB: -return AV_PIX_FMT_ARGB; -case AOM_IMG_FMT_ARGB_LE: -return AV_PIX_FMT_BGRA; -case AOM_IMG_FMT_RGB565_LE: -return AV_PIX_FMT_RGB565LE; -case AOM_IMG_FMT_RGB555_LE: -return AV_PIX_FMT_RGB555LE; case AOM_IMG_FMT_I420: return AV_PIX_FMT_YUV420P; case AOM_IMG_FMT_I422: @@ -81,28 +59,6 @@ enum AVPixelFormat ff_aom_imgfmt_to_pixfmt(aom_img_fmt_t img, int depth) aom_img_fmt_t ff_aom_pixfmt_to_imgfmt(enum AVPixelFormat pix) { switch (pix) { -case AV_PIX_FMT_RGB24: -return AOM_IMG_FMT_RGB24; -case AV_PIX_FMT_RGB565BE: -return AOM_IMG_FMT_RGB565; -case AV_PIX_FMT_RGB555BE: -return AOM_IMG_FMT_RGB555; -case AV_PIX_FMT_UYVY422: -return AOM_IMG_FMT_UYVY; -case AV_PIX_FMT_YUYV422: -return AOM_IMG_FMT_YUY2; -case AV_PIX_FMT_YVYU422: -return AOM_IMG_FMT_YVYU; -case AV_PIX_FMT_BGR24: -return AOM_IMG_FMT_BGR24; -case AV_PIX_FMT_ARGB: -return AOM_IMG_FMT_ARGB; -case AV_PIX_FMT_BGRA: -return AOM_IMG_FMT_ARGB_LE; -case AV_PIX_FMT_RGB565LE: -return AOM_IMG_FMT_RGB565_LE; -case AV_PIX_FMT_RGB555LE: -return AOM_IMG_FMT_RGB555_LE; case AV_PIX_FMT_YUV420P: return AOM_IMG_FMT_I420; case AV_PIX_FMT_YUV422P: -- 2.16.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] libaom: remove references to RGB pixfmts
On 05/04/2018 01:13, James Almer wrote: > Support for it was apparently never in the codebase, and the enum > values were recently removed from the public headers [1] > > Fixes build with latest libaom build. > Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel