Update 11.4 -> 12.1 (Merge branch 'upstream' into tizen) 84/144884/2 accepted/tizen/4.0/unified/20170828.222650 accepted/tizen/unified/20170822.113049 submit/tizen/20170822.010353 submit/tizen_4.0/20170828.100006
authorHaejeong Kim <backto.kim@samsung.com>
Fri, 18 Aug 2017 07:32:25 +0000 (16:32 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Fri, 18 Aug 2017 08:45:20 +0000 (17:45 +0900)
Change-Id: I522175faed67cf54301e77e9353f542a06a1a849

14 files changed:
1  2 
VERSION
cmdutils.c
libavcodec/aac_parser.c
libavcodec/mpegvideo_motion.c
libavcodec/utils.c
libavformat/asfenc.c
libavformat/avidec.c
libavformat/avio.c
libavformat/libavformat.v
libavformat/m4vdec.c
libavformat/matroskadec.c
libavformat/mov.c
libavformat/url.h
packaging/libav.spec

diff --cc VERSION
index 1c7134d,40e6bd9..40e6bd9
mode 100755,100644..100755
+++ b/VERSION
diff --cc cmdutils.c
Simple merge
Simple merge
index e0ea4a5,1692f1b..1692f1b
mode 100755,100644..100755
index 12e355b,54c2b9a..9a00554
mode 100755,100644..100755
@@@ -274,12 -273,9 +276,12 @@@ typedef struct MatroskaDemuxContext 
  
      /* File has SSA subtitles which prevent incremental cluster parsing. */
      int contains_ssa;
 +#ifdef FIX_CRASH_ISSUE_FOR_INVALID_FILE
 +      int is_parse_header_finish;
 +#endif
  } MatroskaDemuxContext;
  
- typedef struct {
+ typedef struct MatroskaBlock {
      uint64_t duration;
      int64_t  reference;
      uint64_t non_simple;
index 35105a8,2ff5211..09a3d4c
mode 100755,100644..100755
  #include <limits.h>
  #include <stdint.h>
  
- //#define MOV_EXPORT_ALL_METADATA
  #include "libavutil/attributes.h"
  #include "libavutil/channel_layout.h"
 +#include "libavutil/display.h"
  #include "libavutil/intreadwrite.h"
  #include "libavutil/intfloat.h"
  #include "libavutil/mathematics.h"
@@@ -812,13 -969,9 +970,13 @@@ static int mov_read_mvhd(MOVContext *c
      mov_metadata_creation_time(&c->fc->metadata, creation_time);
      c->time_scale = avio_rb32(pb); /* time scale */
  
-     av_dlog(c->fc, "time scale = %i\n", c->time_scale);
+     av_log(c->fc, AV_LOG_TRACE, "time scale = %i\n", c->time_scale);
  
      c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */
 +    // set the AVCodecContext duration because the duration of individual tracks
 +    // may be inaccurate
 +    if (c->time_scale > 0)
 +        c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale);
      avio_rb32(pb); /* preferred scale */
  
      avio_rb16(pb); /* preferred volume */
@@@ -2465,17 -2833,7 +2839,17 @@@ static int mov_read_tkhd(MOVContext *c
  
          for (i = 0; i < 3; i++)
              for (j = 0; j < 3; j++)
-                 sc->display_matrix[i * 3 + j] = display_matrix[j][i];
+                 sc->display_matrix[i * 3 + j] = display_matrix[i][j];
 +
 +        rotate = av_display_rotation_get(sc->display_matrix);
 +        if (!isnan(rotate)) {
 +            char rotate_buf[64];
 +            rotate = -rotate;
 +            if (rotate < 0) // for backward compatibility
 +                rotate += 360;
 +            snprintf(rotate_buf, sizeof(rotate_buf), "%g", rotate);
 +            av_dict_set(&st->metadata, "rotate", rotate_buf, 0);
 +        }
      }
  
      // transform the display width/height according to the matrix
index b05128d,5853ffe..5853ffe
mode 100755,100644..100755
index ce3af33,0000000..e9f4555
mode 100755,000000..100755
--- /dev/null
@@@ -1,254 -1,0 +1,254 @@@
- Version:    11.4
 +Name:       libav
 +Summary:    AV codec lib
++Version:    12.1
 +Release:    0
 +Group:      Multimedia/Libraries
 +URL:        http://libav.org
 +License:    LGPL-2.1+
 +Source0:    %{name}-%{version}.tar.gz
 +
 +
 +%description
 +AV codec library
 +
 +%package -n libavtools
 +Summary:    AV tools
 +Group:      Multimedia/Libraries
 +
 +%description -n libavtools
 +AV tools binary
 +
 +%package -n libavcodec
 +Summary:    AV codec lib
 +Group:      Multimedia/Libraries
 +
 +%description -n libavcodec
 +AV codec library
 +
 +%package -n libavcodec-devel
 +Summary:    AV codec lib (devel)
 +Group:      Multimedia/Libraries
 +Requires:   libavcodec = %{version}-%{release}
 +
 +%description -n libavcodec-devel
 +AV codec library (devel)
 +
 +%package -n libavformat
 +Summary:    AV format lib
 +Group:      Multimedia/Libraries
 +
 +%description -n libavformat
 +AV format library
 +
 +%package -n libavformat-devel
 +Summary:    AV format lib (devel)
 +Group:      Multimedia/Libraries
 +Requires:   libavformat = %{version}-%{release}
 +
 +%description -n libavformat-devel
 +AV format library (devel)
 +
 +%package -n libavutil
 +Summary:    AV util lib
 +Group:      Multimedia/Libraries
 +
 +%description -n libavutil
 +AV util library
 +
 +%package -n libavutil-devel
 +Summary:    AV util lib (devel)
 +Group:      Multimedia/Libraries
 +Requires:   libavutil = %{version}-%{release}
 +
 +%description -n libavutil-devel
 +AV util library (devel)
 +
 +%package -n libavfilter
 +Summary:    AV util lib
 +Group:      Multimedia/Libraries
 +
 +%description -n libavfilter
 +AV filter library
 +
 +%package -n libavfilter-devel
 +Summary:    AV util lib (devel)
 +Group:      Multimedia/Libraries
 +Requires:   libavfilter = %{version}-%{release}
 +
 +%description -n libavfilter-devel
 +AV filter library (devel)
 +
 +%package -n libswscale
 +Summary:    SW scale lib
 +Group:      Multimedia/Libraries
 +
 +%description -n libswscale
 +development files for libswsacle
 +
 +%package -n libswscale-devel
 +Summary:    SW scale lib (devel)
 +Group:      Multimedia/Libraries
 +Requires:   libswscale = %{version}-%{release}
 +
 +%description -n libswscale-devel
 +development files for libswsacle
 +
 +
 +%prep
 +%setup -q
 +
 +export CONFIGURE_OPTIONS="--enable-shared    --disable-static   \
 +--disable-version3  --disable-devices   --disable-nonfree --disable-gpl --disable-doc \
 +--disable-zlib    --disable-network \
 +--disable-avdevice \
 +--disable-bsfs      --disable-filters \
 +--enable-filter=buffer  --enable-filter=buffersink      --enable-filter=crop \
 +--enable-filter=hflip   --enable-filter=lut     --enable-filter=lutyuv \
 +--enable-filter=lutrgb  --enable-filter=overlay --enable-filter=scale \
 +--enable-filter=transpose       --enable-filter=unsharp --enable-filter=vflip \
 +--disable-protocols \
 +--disable-avresample \
 +--enable-protocol=file \
 +--disable-encoders \
 +--disable-muxers \
 +--disable-parsers \
 +--enable-parser=aac     --enable-parser=h264            --enable-parser=mpegaudio \
 +--enable-parser=h263    --enable-parser=mpeg4video      --enable-parser=mpegvideo \
 +--enable-parser=hevc \
 +--disable-demuxers \
 +--enable-demuxer=aac    --enable-demuxer=h264   --enable-demuxer=mpegts \
 +--enable-demuxer=amr    --enable-demuxer=m4v    --enable-demuxer=mpegtsraw \
 +--enable-demuxer=asf    --enable-demuxer=mmf    --enable-demuxer=mpegvideo \
 +--enable-demuxer=avi    --enable-demuxer=mov    --enable-demuxer=ogg \
 +--enable-demuxer=flac   --enable-demuxer=mp3    --enable-demuxer=wav \
 +--enable-demuxer=h263   --enable-demuxer=mpegps --enable-demuxer=matroska \
 +--enable-demuxer=dv           --enable-demuxer=flv    --enable-demuxer=rm \
 +--enable-demuxer=aiff --enable-muxer=mpeg1video       --enable-muxer=mpeg2video       --enable-demuxer=hevc \
 +--disable-decoders \
 +--enable-decoder=alac   --enable-decoder=h264         --enable-decoder=wmv1 \
 +--enable-decoder=flac   --enable-decoder=mpeg4                --enable-decoder=wmv2 \
 +--enable-decoder=h263   --enable-decoder=mpegvideo    --enable-decoder=wmv3 \
 +--enable-decoder=vc1  --enable-decoder=flv            --enable-decoder=rv40 \
 +--enable-decoder=h263i  --enable-decoder=theora       --enable-decoder=mpeg1video     --enable-decoder=mpeg2video \
 +--enable-decoder=pcm_alaw  --enable-decoder=pcm_mulaw \
 +--enable-decoder=msmpeg4v3    --enable-decoder=hevc   --enable-encoder=libx265 \
 +--enable-encoder=h263   --enable-encoder=h263p        --enable-encoder=mpeg4 \
 +--enable-decoder=bmp  --enable-encoder=bmp    --enable-encoder=mpeg1video     --enable-encoder=mpeg2video \
 +--enable-decoder=tiff \
 +--enable-decoder=mp3  --enable-decoder=amrnb    \
 +--enable-encoder=aac  --enable-decoder=aac      \
 +--enable-swscale        --disable-yasm         \
 +--enable-fft    --enable-rdft   --enable-mdct   --enable-neon \
 +%{?asan:--disable-inline-asm} \
 +"
 +
 +%if 0%{?TIZEN_PRODUCT_TV}
 +export CONFIGURE_OPTIONS+="--enable-parser=vp8   --enable-decoder=vp8         --enable-decoder=vp9 "
 +%else
 +%endif
 +
 +%ifarch %{arm} aarch64
 +export CONFIGURE_OPTIONS+="--disable-mmx "
 +%else
 +%endif
 +
 +CFLAGS="%{optflags} -fPIC -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "; export CFLAGS
 +
 +%ifarch %{arm}
 +export CONFIGURE_OPTIONS+="--extra-cflags=-mfpu=neon"
 +%endif
 +
 +./configure \
 +    --prefix=%{_prefix} \
 +    --libdir=%_libdir \
 +    --shlibdir=%_libdir \
 +    $CONFIGURE_OPTIONS
 +
 +%build
 +
 +
 +%__make %{?_smp_mflags}
 +
 +%install
 +rm -rf %{buildroot}
 +%make_install
 +
 +%post -p /sbin/ldconfig
 +
 +%postun -p /sbin/ldconfig
 +
 +%files -n libavtools
 +%manifest libavtools.manifest
 +%defattr(-,root,root,-)
 +%{_bindir}/av*
 +%{_datadir}/avconv/*.avpreset
 +
 +%files -n libavcodec
 +%manifest libavcodec.manifest
 +%defattr(-,root,root,-)
 +%{_libdir}/libavcodec.so.*
 +%license COPYING.LGPLv2.1
 +%post -n libavcodec -p /sbin/ldconfig
 +%postun -n libavcodec -p /sbin/ldconfig
 +
 +%files -n libavformat
 +%manifest libavformat.manifest
 +%defattr(-,root,root,-)
 +%{_libdir}/libavformat.so.*
 +%license COPYING.LGPLv2.1
 +%post -n libavformat -p /sbin/ldconfig
 +%postun -n libavformat -p /sbin/ldconfig
 +
 +%files -n libavutil
 +%manifest libavutil.manifest
 +%defattr(-,root,root,-)
 +%{_libdir}/libavutil.so.*
 +%license COPYING.LGPLv2.1
 +%post -n libavutil -p /sbin/ldconfig
 +%postun -n libavutil -p /sbin/ldconfig
 +
 +%files -n libavfilter
 +%manifest libavfilter.manifest
 +%defattr(-,root,root,-)
 +%{_libdir}/libavfilter.so.*
 +%license COPYING.LGPLv2.1
 +%post -n libavfilter -p /sbin/ldconfig
 +%postun -n libavfilter -p /sbin/ldconfig
 +
 +%files -n libswscale
 +%manifest libswscale.manifest
 +%defattr(-,root,root,-)
 +%{_libdir}/libswscale.so.*
 +%license COPYING.LGPLv2.1
 +%post -n libswscale -p /sbin/ldconfig
 +%postun -n libswscale -p /sbin/ldconfig
 +
 +%files -n libavcodec-devel
 +%defattr(-,root,root,-)
 +%_includedir/libavcodec/*
 +%_libdir/libavcodec.so
 +%_libdir/pkgconfig/libavcodec.pc
 +
 +%files -n libavformat-devel
 +%defattr(-,root,root,-)
 +%_includedir/libavformat/*
 +%_libdir/libavformat.so
 +%_libdir/pkgconfig/libavformat.pc
 +
 +%files -n libavutil-devel
 +%defattr(-,root,root,-)
 +%_includedir/libavutil/*
 +%_libdir/libavutil.so
 +%_libdir/pkgconfig/libavutil.pc
 +
 +%files -n libavfilter-devel
 +%defattr(-,root,root,-)
 +%_includedir/libavfilter/*
 +%_libdir/libavfilter.so
 +%_libdir/pkgconfig/libavfilter.pc
 +
 +%files -n libswscale-devel
 +%defattr(-,root,root,-)
 +%_includedir/libswscale/*
 +%_libdir/libswscale.so
 +%_libdir/pkgconfig/libswscale.pc