Re: [libav-devel] [PATCH] checkasm: vp9dsp: Benchmark the dc-only version of idct_idct separately
On 2016-11-14 23:46:14 +0200, Martin Storsjö wrote: > The dc-only mode is already checked to work correctly above, but this > allows benchmarking this mode for performance tuning, and allows making > sure that it actually is correctly hooked up. > --- > tests/checkasm/vp9dsp.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/tests/checkasm/vp9dsp.c b/tests/checkasm/vp9dsp.c > index 690e0cf..b9d1c73 100644 > --- a/tests/checkasm/vp9dsp.c > +++ b/tests/checkasm/vp9dsp.c > @@ -297,6 +297,12 @@ static void check_itxfm(void) > } > bench_new(dst, sz * SIZEOF_PIXEL, coef, sz * sz); > } > +if (txtp == 0 && tx != 4) { > +if (check_func(dsp.itxfm_add[tx][txtp], > "vp9_inv_%s_%dx%d_dc_add", > + txtp_types[txtp], sz, sz)) { > +bench_new(dst, sz * SIZEOF_PIXEL, coef, 1); > +} > +} > } > } > report("itxfm"); ok Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/4 v2] lavu: Add AVSphericalMapping type and frame side data
While no decoder currently exports spherical information, this type represents a frame property that has to be passed through from container to frames. Signed-off-by: Vittorio Giovara--- Changed yaw, pitch, roll to be fixed point instead of double. Vittorio doc/APIchanges| 4 ++ libavutil/Makefile| 2 + libavutil/frame.h | 6 +++ libavutil/spherical.c | 34 libavutil/spherical.h | 146 ++ 5 files changed, 192 insertions(+) create mode 100644 libavutil/spherical.c create mode 100644 libavutil/spherical.h diff --git a/doc/APIchanges b/doc/APIchanges index 6e0d27d..4995043 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,10 @@ libavutil: 2015-08-28 API changes, most recent first: +2016-xx-xx - xxx - lavu 55.29.0 - spherical.h + Add AV_FRAME_DATA_SPHERICAL value, av_spherical_alloc() API and + AVSphericalMapping type to export and describe spherical video properties. + 2016-xx-xx - xxx - lavu 55.28.0 - pixfmt.h Add AV_PIX_FMT_GRAY12(LE/BE). diff --git a/libavutil/Makefile b/libavutil/Makefile index fbcf1a7..28372c9 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -48,6 +48,7 @@ HEADERS = adler32.h \ replaygain.h \ samplefmt.h \ sha.h \ + spherical.h \ stereo3d.h\ time.h\ version.h \ @@ -102,6 +103,7 @@ OBJS = adler32.o \ rc4.o\ samplefmt.o \ sha.o\ + spherical.o \ stereo3d.o \ time.o \ tree.o \ diff --git a/libavutil/frame.h b/libavutil/frame.h index 12624d7..4052199 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -92,6 +92,12 @@ enum AVFrameSideDataType { * enum AVAudioServiceType defined in avcodec.h. */ AV_FRAME_DATA_AUDIO_SERVICE_TYPE, + +/** + * The data represents the AVSphericalMapping structure defined in + * libavutil/spherical.h. + */ +AV_FRAME_DATA_SPHERICAL, }; enum AVActiveFormatDescription { diff --git a/libavutil/spherical.c b/libavutil/spherical.c new file mode 100644 index 000..f6e53d1 --- /dev/null +++ b/libavutil/spherical.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016 Vittorio Giovara + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "mem.h" +#include "spherical.h" + +AVSphericalMapping *av_spherical_alloc(size_t *size) +{ +AVSphericalMapping *spherical = av_mallocz(sizeof(AVSphericalMapping)); +if (!spherical) +return NULL; + +if (size) +*size = sizeof(*spherical); + +return spherical; +} diff --git a/libavutil/spherical.h b/libavutil/spherical.h new file mode 100644 index 000..a061516 --- /dev/null +++ b/libavutil/spherical.h @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2016 Vittorio Giovara + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[libav-devel] [PATCH 3/4 v2] lavc: Add spherical packet side data API
Signed-off-by: Vittorio Giovara--- Updated for yaw, pitch, roll type change. Vittorio avprobe.c| 28 doc/APIchanges | 4 libavcodec/avcodec.h | 6 ++ libavcodec/utils.c | 1 + libavcodec/version.h | 4 ++-- libavformat/dump.c | 36 6 files changed, 77 insertions(+), 2 deletions(-) diff --git a/avprobe.c b/avprobe.c index ff28a0b..f2e8d72 100644 --- a/avprobe.c +++ b/avprobe.c @@ -27,6 +27,7 @@ #include "libavutil/display.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" +#include "libavutil/spherical.h" #include "libavutil/stereo3d.h" #include "libavutil/dict.h" #include "libavutil/libm.h" @@ -766,6 +767,7 @@ static void show_stream(InputFile *ifile, InputStream *ist) for (i = 0; i < stream->nb_side_data; i++) { const AVPacketSideData* sd = >side_data[i]; AVStereo3D *stereo; +AVSphericalMapping *spherical; switch (sd->type) { case AV_PKT_DATA_DISPLAYMATRIX: @@ -786,6 +788,32 @@ static void show_stream(InputFile *ifile, InputStream *ist) !!(stereo->flags & AV_STEREO3D_FLAG_INVERT)); probe_object_footer("stereo3d"); break; +case AV_PKT_DATA_SPHERICAL: +spherical = (AVSphericalMapping *)sd->data; +probe_object_header("spherical"); + +if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR) +probe_str("projection", "equirectangular"); +else if (spherical->projection == AV_SPHERICAL_CUBEMAP) +probe_str("projection", "cubemap"); +else +probe_str("projection", "unknown"); + +probe_object_header("orientation"); +probe_int("yaw", ((double)spherical->yaw) / (1 << 16)); +probe_int("pitch", ((double)spherical->pitch) / (1 << 16)); +probe_int("roll", ((double)spherical->roll) / (1 << 16)); +probe_object_footer("orientation"); + +probe_object_header("offset"); +probe_int("left", spherical->left_offset); +probe_int("top", spherical->top_offset); +probe_int("right", spherical->right_offset); +probe_int("bottom", spherical->bottom_offset); +probe_object_footer("offset"); + +probe_object_footer("spherical"); +break; } } probe_object_footer("sidedata"); diff --git a/doc/APIchanges b/doc/APIchanges index 4995043..bfc8c69 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,10 @@ libavutil: 2015-08-28 API changes, most recent first: +2016-xx-xx - xxx - lavc 57.29.0 - avcodec.h + Add AV_PKT_DATA_SPHERICAL packet side data to export AVSphericalMapping + information from containers. + 2016-xx-xx - xxx - lavu 55.29.0 - spherical.h Add AV_FRAME_DATA_SPHERICAL value, av_spherical_alloc() API and AVSphericalMapping type to export and describe spherical video properties. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 88e6c62..47506a4 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1289,6 +1289,12 @@ enum AVPacketSideDataType { * This side data corresponds to the AVCPBProperties struct. */ AV_PKT_DATA_CPB_PROPERTIES, + +/** + * This side data should be associated with a video stream and corresponds + * to the AVSphericalMapping structure. + */ +AV_PKT_DATA_SPHERICAL, }; typedef struct AVPacketSideData { diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 329233d..549bf81 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -544,6 +544,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) { AV_PKT_DATA_REPLAYGAIN , AV_FRAME_DATA_REPLAYGAIN }, { AV_PKT_DATA_DISPLAYMATRIX, AV_FRAME_DATA_DISPLAYMATRIX }, { AV_PKT_DATA_STEREO3D, AV_FRAME_DATA_STEREO3D }, +{ AV_PKT_DATA_SPHERICAL, AV_FRAME_DATA_SPHERICAL }, { AV_PKT_DATA_AUDIO_SERVICE_TYPE, AV_FRAME_DATA_AUDIO_SERVICE_TYPE }, }; diff --git a/libavcodec/version.h b/libavcodec/version.h index 6f58bc8..6b6d16b 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,8 +28,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 -#define LIBAVCODEC_VERSION_MINOR 28 -#define LIBAVCODEC_VERSION_MICRO 4 +#define LIBAVCODEC_VERSION_MINOR 29 +#define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/libavformat/dump.c b/libavformat/dump.c index 3b50f5d..bbe8e96 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -27,6 +27,7 @@ #include "libavutil/log.h"
[libav-devel] [PATCH 1/4 v2] lavu: Add a video section to Doxygen documentation
Fill it with AVStereo3D and AVDisplayMatrix documentation. Apply the necessary changes to make verbatim code look good in doxygen. Signed-off-by: Vittorio Giovara--- Updated commit title. Vittorio libavutil/avutil.h | 6 ++ libavutil/display.h | 27 +++ libavutil/stereo3d.h | 39 +++ 3 files changed, 72 insertions(+) diff --git a/libavutil/avutil.h b/libavutil/avutil.h index c49685a..2339fe3 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -115,6 +115,12 @@ * * @} * + * @defgroup lavu_video Video related + * + * @{ + * + * @} + * * @defgroup lavu_audio Audio related * * @{ diff --git a/libavutil/display.h b/libavutil/display.h index dba3b1e..2d869fc 100644 --- a/libavutil/display.h +++ b/libavutil/display.h @@ -18,21 +18,37 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * Display matrix + */ + #ifndef AVUTIL_DISPLAY_H #define AVUTIL_DISPLAY_H #include /** + * @addtogroup lavu_video + * @{ + * + * @defgroup lavu_video_display Display transformation matrix functions + * @{ + */ + +/** + * @addtogroup lavu_video_display * The display transformation matrix specifies an affine transformation that * should be applied to video frames for correct presentation. It is compatible * with the matrices stored in the ISO/IEC 14496-12 container format. * * The data is a 3x3 matrix represented as a 9-element array: * + * @code{.unparsed} * | a b u | * (a, b, u, c, d, v, x, y, w) -> | c d v | * | x y w | + * @endcode * * All numbers are stored in native endianness, as 16.16 fixed-point values, * except for u, v and w, which are stored as 2.30 fixed-point values. @@ -40,15 +56,21 @@ * The transformation maps a point (p, q) in the source (pre-transformation) * frame to the point (p', q') in the destination (post-transformation) frame as * follows: + * + * @code{.unparsed} * | a b u | * (p, q, 1) . | c d v | = z * (p', q', 1) * | x y w | + * @endcode * * The transformation can also be more explicitly written in components as * follows: + * + * @code{.unparsed} * p' = (a * p + c * q + x) / z; * q' = (b * p + d * q + y) / z; * z = u * p + v * q + w + * @endcode */ /** @@ -83,4 +105,9 @@ void av_display_rotation_set(int32_t matrix[9], double angle); */ void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip); +/** + * @} + * @} + */ + #endif /* AVUTIL_DISPLAY_H */ diff --git a/libavutil/stereo3d.h b/libavutil/stereo3d.h index aea1b70..9c943c0 100644 --- a/libavutil/stereo3d.h +++ b/libavutil/stereo3d.h @@ -18,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * Stereoscopic video + */ + #ifndef AVUTIL_STEREO3D_H #define AVUTIL_STEREO3D_H @@ -25,6 +30,21 @@ #include "frame.h" +/** + * @addtogroup lavu_video + * @{ + * + * @defgroup lavu_video_stereo3d Stereo3D types and functions + * @{ + */ + +/** + * @addtogroup lavu_video_stereo3d + * A stereoscopic video file consists in multiple views embedded in a single + * frame, usually describing two views of a scene. This file describes all + * possible codec-independent view arrangements. + * */ + /** * List of possible 3D Types */ @@ -37,41 +57,49 @@ enum AVStereo3DType { /** * Views are next to each other. * + * @code{.unparsed} * * * *... + * @endcode */ AV_STEREO3D_SIDEBYSIDE, /** * Views are on top of each other. * + * @code{.unparsed} * * * * + * @endcode */ AV_STEREO3D_TOPBOTTOM, /** * Views are alternated temporally. * + * @code{.unparsed} * frame0 frame1 frame2 ... * * * *... ... ... + * @endcode */ AV_STEREO3D_FRAMESEQUENCE, /** * Views are packed in a checkerboard-like structure per pixel. * + * @code{.unparsed} *LRLRLRLR *RLRLRLRL *LRLRLRLR *... + * @endcode */ AV_STEREO3D_CHECKERBOARD, @@ -79,30 +107,36 @@ enum AVStereo3DType { * Views are next to each other, but when upscaling * apply a checkerboard pattern. * + * @code{.unparsed} * L L L LR R R R * => L L L L R R R R * L L L LR R R R * L L L L R R R R + * @endcode */ AV_STEREO3D_SIDEBYSIDE_QUINCUNX, /** * Views are packed per line, as if
[libav-devel] [PATCH 4/4 v2] mov: Export spherical information
This implements Spherical Video V1 and V2, as described in the spatial-media collection by Google. Signed-off-by: Vittorio Giovara--- Updated for the new yaw, pitch, roll type. Vittorio Changelog | 1 + libavformat/isom.h | 6 ++ libavformat/mov.c | 304 + 3 files changed, 311 insertions(+) diff --git a/Changelog b/Changelog index cd0ffb5..feb151c 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version : +- Support for spherical videos version 12: diff --git a/libavformat/isom.h b/libavformat/isom.h index 1aa2091..fa73ad9 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -24,6 +24,9 @@ #ifndef AVFORMAT_ISOM_H #define AVFORMAT_ISOM_H +#include "libavutil/spherical.h" +#include "libavutil/stereo3d.h" + #include "avio.h" #include "internal.h" #include "dv.h" @@ -145,6 +148,9 @@ typedef struct MOVStreamContext { int stsd_count; int32_t *display_matrix; +AVStereo3D *stereo3d; +AVSphericalMapping *spherical; +size_t spherical_size; } MOVStreamContext; typedef struct MOVContext { diff --git a/libavformat/mov.c b/libavformat/mov.c index df29f2a..0c1a125 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -37,6 +37,8 @@ #include "libavutil/dict.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" +#include "libavutil/spherical.h" +#include "libavutil/stereo3d.h" #include "libavcodec/ac3tab.h" #include "avformat.h" #include "internal.h" @@ -3174,6 +3176,268 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; } +static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ +AVStream *st; +MOVStreamContext *sc; +enum AVStereo3DType type; +int mode; + +if (c->fc->nb_streams < 1) +return 0; + +st = c->fc->streams[c->fc->nb_streams - 1]; +sc = st->priv_data; + +if (atom.size < 1) { +av_log(c->fc, AV_LOG_ERROR, "Empty stereoscopic video box\n"); +return AVERROR_INVALIDDATA; +} + +mode = avio_r8(pb); +switch (mode) { +case 0: +type = AV_STEREO3D_2D; +break; +case 1: +type = AV_STEREO3D_TOPBOTTOM; +break; +case 2: +type = AV_STEREO3D_SIDEBYSIDE; +break; +default: +av_log(c->fc, AV_LOG_WARNING, "Unknown st3d mode value %d\n", mode); +return 0; +} + +sc->stereo3d = av_stereo3d_alloc(); +if (!sc->stereo3d) +return AVERROR(ENOMEM); + +sc->stereo3d->type = type; +return 0; +} + +static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ +AVStream *st; +MOVStreamContext *sc; +int size; +int32_t yaw, pitch, roll; +uint32_t tag; +unsigned l, t, r, b; +enum AVSphericalProjection projection; + +if (c->fc->nb_streams < 1) +return 0; + +st = c->fc->streams[c->fc->nb_streams - 1]; +sc = st->priv_data; + +if (atom.size < 4) { +av_log(c->fc, AV_LOG_ERROR, "Empty spherical video box\n"); +return AVERROR_INVALIDDATA; +} + +size = avio_rb32(pb); +if (size > atom.size) +return AVERROR_INVALIDDATA; + +tag = avio_rl32(pb); +if (tag != MKTAG('s','v','h','d')) { +av_log(c->fc, AV_LOG_ERROR, "Missing spherical video header\n"); +return 0; +} +avio_skip(pb, size - 8); /* metadata_source */ + +size = avio_rb32(pb); +if (size > atom.size) +return AVERROR_INVALIDDATA; + +tag = avio_rl32(pb); +if (tag != MKTAG('p','r','o','j')) { +av_log(c->fc, AV_LOG_ERROR, "Missing projection box\n"); +return 0; +} + +size = avio_rb32(pb); +if (size > atom.size) +return AVERROR_INVALIDDATA; + +tag = avio_rl32(pb); +if (tag != MKTAG('p','r','h','d')) { +av_log(c->fc, AV_LOG_ERROR, "Missing projection header box\n"); +return 0; +} + +/* 16.16 fixed point */ +yaw = avio_rb32(pb); +pitch = avio_rb32(pb); +roll = avio_rb32(pb); + +avio_skip(pb, size - 20); + +size = avio_rb32(pb); +if (size > atom.size) +return AVERROR_INVALIDDATA; + +tag = avio_rl32(pb); +switch (tag) { +case MKTAG('c','b','m','p'): +projection = AV_SPHERICAL_CUBEMAP; +avio_skip(pb, 4); /* layout */ +l = t = r = b = avio_rb32(pb); +break; +case MKTAG('e','q','u','i'): +projection = AV_SPHERICAL_EQUIRECTANGULAR; +t = avio_rb32(pb); +b = avio_rb32(pb); +l = avio_rb32(pb); +r = avio_rb32(pb); +break; +default: +av_log(c->fc, AV_LOG_ERROR, "Unknown projection type\n"); +return 0; +} + +sc->spherical = av_spherical_alloc(>spherical_size); +if (!sc->spherical) +return AVERROR(ENOMEM); + +
Re: [libav-devel] [PATCH 2/3] configure: Move mjpeg_vaapi_decoder dependency declarations to the right place
On 11/11/2016 14:45, Diego Biurrun wrote: > --- > configure | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index 8524d18..a9fd72b 100755 > --- a/configure > +++ b/configure > @@ -2014,8 +2014,6 @@ mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp" > mjpeg_decoder_select="blockdsp hpeldsp idctdsp jpegtables" > mjpeg_encoder_select="aandcttables jpegtables mpegvideoenc" > mjpegb_decoder_select="mjpeg_decoder" > -mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG" > -mjpeg_vaapi_encoder_select="vaapi_encode jpegtables" > mlp_decoder_select="mlp_parser" > motionpixels_decoder_select="bswapdsp" > mp1_decoder_select="mpegaudio" > @@ -2157,6 +2155,8 @@ hevc_dxva2_hwaccel_select="hevc_decoder" > hevc_qsv_hwaccel_deps="libmfx" > hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC" > hevc_vdpau_hwaccel_select="hevc_decoder" > +mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG" > +mjpeg_vaapi_encoder_select="vaapi_encode jpegtables" > mpeg1_vdpau_hwaccel_deps="vdpau" > mpeg1_vdpau_hwaccel_select="mpeg1video_decoder" > mpeg2_d3d11va_hwaccel_deps="d3d11va" > Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] configure: Move mjpeg_vaapi_decoder dependency declarations to the right place
On Fri, Nov 11, 2016 at 02:45:36PM +0100, Diego Biurrun wrote: > --- > configure | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) ping Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] qsv: Drop some unused variables
--- libavcodec/qsv.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 45e9b7a..ab48bb0 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -466,9 +466,7 @@ static mfxStatus qsv_frame_lock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr) QSVMid *qsv_mid = mid; AVHWFramesContext *hw_frames_ctx = (AVHWFramesContext*)qsv_mid->hw_frames_ref->data; AVQSVFramesContext *hw_frames_hwctx = hw_frames_ctx->hwctx; -int size; int ret; -mfxStatus err; if (qsv_mid->locked_frame) return MFX_ERR_UNDEFINED_BEHAVIOR; @@ -523,7 +521,6 @@ fail: static mfxStatus qsv_frame_unlock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr) { QSVMid *qsv_mid = mid; -int ret; av_frame_free(_mid->locked_frame); av_frame_free(_mid->hw_frame); -- 2.1.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/2] qsvdec: Drop stray extra braces around initializer
libavcodec/qsvdec.c:93:5: warning: braces around scalar initializer --- libavcodec/qsvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 9e5b1b3..b6fead0 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -90,7 +90,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q) const AVPixFmtDescriptor *desc; mfxSession session = NULL; int iopattern = 0; -mfxVideoParam param = { { 0 } }; +mfxVideoParam param = { 0 }; int frame_width = avctx->coded_width; int frame_height = avctx->coded_height; int ret; -- 2.1.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] mov: Fix identity matrix boolean logic
This prevented the code from correctly exporting the rotation matrix which caused a few samples to be displayed wrong. Introduced in ecd2ec69ce10e13f6ede353d2def7c. Signed-off-by: Vittorio Giovara--- Thanks to Martin for reporting and for providing samples. Vittorio libavformat/mov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index b5b2a5b..df29f2a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2759,8 +2759,8 @@ static int mov_read_meta(MOVContext *c, AVIOContext *pb, MOVAtom atom) ( (matrix)[0][0] == (1 << 16) && \ (matrix)[1][1] == (1 << 16) && \ (matrix)[2][2] == (1 << 30) && \ - !(matrix)[0][1] && !(matrix)[0][2] || \ - !(matrix)[1][0] && !(matrix)[1][2] || \ + !(matrix)[0][1] && !(matrix)[0][2] && \ + !(matrix)[1][0] && !(matrix)[1][2] && \ !(matrix)[2][0] && !(matrix)[2][1]) static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) -- 2.10.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [libav-commits] mov: Evaluate the movie display matrix
On Tue, Nov 15, 2016 at 3:41 AM, Martin Storsjöwrote: > On Tue, 1 Nov 2016, Vittorio Giovara wrote: > >> Module: libav >> Branch: master >> Commit: ecd2ec69ce10e13f6ede353d2def7ce9f45c1a7d >> >> Author:Vittorio Giovara >> Committer: Vittorio Giovara >> Date: Mon Oct 24 17:46:47 2016 -0400 >> >> mov: Evaluate the movie display matrix >> >> This matrix needs to be applied after all others have (currently only >> display matrix from trak), but cannot be handled in movie box, since >> streams are not allocated yet. So store it in main context, and apply >> it when appropriate, that is after parsing the tkhd one. >> >> Fate tests are updated accordingly. >> >> Signed-off-by: Vittorio Giovara >> >> --- > > > This broke autorotation of rotated videos when using avplay, no longer > displays the rotation of videos in avprobe, and probably no longer works for > autorotating videos in avconv either (although I didn't test that). Hi Martin, I just tested HEAD with a couple of rotated videos (such as https://www.dropbox.com/s/jf5ovflh9aajwxz/rotate90.mov?dl=1) and I wasn't able to reproduce. avplay version v13_dev0-407-gf7407f5, Copyright (c) 2003-2016 the Libav developers built on Nov 15 2016 09:18:51 with clang version 3.8.1 (tags/RELEASE_381/final) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/GiovaraV/Desktop/Summer2012vid/Portrait/Airplane window 2013-09-11 12.04.52.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2013-09-11 10:04:39 model : iPhone 4 model-ita : iPhone 4 encoder : 6.0.1 encoder-ita : 6.0.1 date: 2013-09-11T12:04:38+0200 date-ita: 2013-09-11T12:04:38+0200 make: Apple make-ita: Apple Duration: 00:00:11.12, start: 0.23, bitrate: 10814 kb/s Stream #0:0(und): Video: h264 (Baseline) [avc1 / 0x31637661] yuv420p, tv, bt709/bt709/bt709 1280x720, 10754 kb/s 29.97 fps, 600 tbn (default) Metadata: creation_time : 2013-09-11 10:04:39 handler_name: Core Media Data Handler encoder : H.264 Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(und): Audio: aac (LC) [mp4a / 0x6134706D] 44100 Hz, mono, fltp, 63 kb/s (default) Metadata: creation_time : 2013-09-11 10:04:39 handler_name: Core Media Data Handler 0.93 A-V: -0.188 s:1.6 aq= 120KB vq=12331KB sq=0B f=0/0 /0 Could you share the sample that is not working for you? I'll take a look at it. -- Vittorio ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 08/13] examples/decode_audio: flush the decoder
On 10/11/2016 16:51, Anton Khirnov wrote: > +decode(c, pkt, decoded_frame, outfile); what about explicitly set the pkt ? lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 12/13] examples/decode_video: switch to the new decoding API
On 10/11/2016 16:51, Anton Khirnov wrote: > --- > doc/examples/decode_video.c | 43 +++ > 1 file changed, 23 insertions(+), 20 deletions(-) > Seems Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 11/13] examples/decode_video: use a parser for splitting the input
On 10/11/2016 16:51, Anton Khirnov wrote: > Seems fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 09/13] examples/encode_video: switch to the new encoding API
On 10/11/2016 16:51, Anton Khirnov wrote: > --- > doc/examples/encode_video.c | 59 > - > 1 file changed, 31 insertions(+), 28 deletions(-) > Seems fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 06/13] examples/decode_audio: handle planar audio now produced by the MP2 decoder
On 10/11/2016 16:51, Anton Khirnov wrote: > --- > doc/examples/decode_audio.c | 30 +- > 1 file changed, 25 insertions(+), 5 deletions(-) > A step in the right direction for sure. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 03/13] examples/encode_audio: switch to the new audio encoding API
On 10/11/2016 16:51, Anton Khirnov wrote: > --- > doc/examples/encode_audio.c | 59 > + > 1 file changed, 43 insertions(+), 16 deletions(-) > Seems fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/13] examples/decode_audio: use the new audio decoding API
On 10/11/2016 16:51, Anton Khirnov wrote: > --- > doc/examples/decode_audio.c | 34 -- > 1 file changed, 20 insertions(+), 14 deletions(-) > Seems fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 04/13] examples/decode_audio: use a parser for splitting the input
On 10/11/2016 16:51, Anton Khirnov wrote: > Do not rely on the decoder handling this, as it's not guaranteed to > work. > --- > doc/examples/decode_audio.c | 82 > + > 1 file changed, 54 insertions(+), 28 deletions(-) > Possibly OK. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 02/13] examples/qsvdec: convert to the new decoding API
On 10/11/2016 16:51, Anton Khirnov wrote: > --- > doc/examples/qsvdec.c | 48 +--- > 1 file changed, 25 insertions(+), 23 deletions(-) > Ok ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] checkasm: vp9dsp: Benchmark the dc-only version of idct_idct separately
On 14/11/2016 22:46, Martin Storsjö wrote: > The dc-only mode is already checked to work correctly above, but this > allows benchmarking this mode for performance tuning, and allows making > sure that it actually is correctly hooked up. > --- > tests/checkasm/vp9dsp.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/tests/checkasm/vp9dsp.c b/tests/checkasm/vp9dsp.c > index 690e0cf..b9d1c73 100644 > --- a/tests/checkasm/vp9dsp.c > +++ b/tests/checkasm/vp9dsp.c > @@ -297,6 +297,12 @@ static void check_itxfm(void) > } > bench_new(dst, sz * SIZEOF_PIXEL, coef, sz * sz); > } > +if (txtp == 0 && tx != 4) { > +if (check_func(dsp.itxfm_add[tx][txtp], > "vp9_inv_%s_%dx%d_dc_add", > + txtp_types[txtp], sz, sz)) { > +bench_new(dst, sz * SIZEOF_PIXEL, coef, 1); > +} > +} > } > } > report("itxfm"); > Probably Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [libav-commits] mov: Evaluate the movie display matrix
On Tue, 1 Nov 2016, Vittorio Giovara wrote: Module: libav Branch: master Commit: ecd2ec69ce10e13f6ede353d2def7ce9f45c1a7d Author:Vittorio GiovaraCommitter: Vittorio Giovara Date: Mon Oct 24 17:46:47 2016 -0400 mov: Evaluate the movie display matrix This matrix needs to be applied after all others have (currently only display matrix from trak), but cannot be handled in movie box, since streams are not allocated yet. So store it in main context, and apply it when appropriate, that is after parsing the tkhd one. Fate tests are updated accordingly. Signed-off-by: Vittorio Giovara --- This broke autorotation of rotated videos when using avplay, no longer displays the rotation of videos in avprobe, and probably no longer works for autorotating videos in avconv either (although I didn't test that). Please fix. // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel