On Thu, 20 Feb 2014 18:36:24 +0100, Tim Walker <tdskywal...@gmail.com> wrote: > On 19 Feb 2014, at 21:16, Anton Khirnov <an...@khirnov.net> wrote: > > > --- > > libavfilter/af_ashowinfo.c | 91 > > ++++++++++++++++++++++++++++++++++++++++++++ > > libavfilter/vf_showinfo.c | 54 ++++++++++++++++++++++++++ > > 2 files changed, 145 insertions(+) > > Nice! :-) > > > > > diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c > > index 2a2edcf..9d36d5e 100644 > > --- a/libavfilter/af_ashowinfo.c > > +++ b/libavfilter/af_ashowinfo.c > > @@ -30,6 +30,8 @@ > > #include "libavutil/attributes.h" > > #include "libavutil/channel_layout.h" > > #include "libavutil/common.h" > > +#include "libavutil/downmix_info.h" > > +#include "libavutil/intreadwrite.h" > > #include "libavutil/mem.h" > > #include "libavutil/samplefmt.h" > > > > @@ -66,6 +68,81 @@ static av_cold void uninit(AVFilterContext *ctx) > > av_freep(&s->plane_checksums); > > } > > > > +static void dump_matrixenc(AVFilterContext *ctx, AVFrameSideData *sd) > > +{ > > + enum AVMatrixEncoding enc; > > + > > + av_log(ctx, AV_LOG_INFO, "matrix encoding: "); > > + > > + if (sd->size < sizeof(enum AVMatrixEncoding)) { > > + av_log(ctx, AV_LOG_INFO, "invalid data"); > > + return; > > + } > > + > > + enc = *(enum AVMatrixEncoding *)sd->data; > > + switch (enc) { > > + case AV_MATRIX_ENCODING_NONE: av_log(ctx, AV_LOG_INFO, > > "none"); break; > > + case AV_MATRIX_ENCODING_DOLBY: av_log(ctx, AV_LOG_INFO, > > "Dolby"); break; > > + case AV_MATRIX_ENCODING_DPLII: av_log(ctx, AV_LOG_INFO, > > "DPLII"); break; > > + case AV_MATRIX_ENCODING_DPLIIX: av_log(ctx, AV_LOG_INFO, > > "DPLIIX"); break; > > + case AV_MATRIX_ENCODING_DPLIIZ: av_log(ctx, AV_LOG_INFO, > > "DPLIIZ"); break; > > Maybe DPLIIx, DPLIIz? The "official" name is Dolby Pro Logic IIx/IIz. > > > + case AV_MATRIX_ENCODING_DOLBYEX: av_log(ctx, AV_LOG_INFO, > > "Dolby EX"); break; > > + case AV_MATRIX_ENCODING_DOLBYHEADPHONE: av_log(ctx, AV_LOG_INFO, > > "Dolby headphone"); break; > > + default: av_log(ctx, AV_LOG_INFO, > > "unknown"); break; > > Nit: I don't really like how some values start with a capital letter and > others not. > > We could either go with "None", "Unknown" and maybe even "Dolby Headphone", > or go all lowercase (like you did for Stereo3D, for all except "2D"). > Thoughts?
Well, Dolby is a proper name so it should be uppercase. unknown is not, so there's no reason for it to be. I don't care very much either way though. Other comments implemented locally. -- Anton Khirnov _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel