[FFmpeg-cvslog] avcodec/aactab: Add ff_aac_eld_window_480_fixed

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 13:22:09 2015 +0200| [f267d553f76f8ef75d3dbfb148ee847ff3c11dac] | 
committer: Michael Niedermayer

avcodec/aactab: Add ff_aac_eld_window_480_fixed

Fixes pointer type mismatch

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f267d553f76f8ef75d3dbfb148ee847ff3c11dac
---

 libavcodec/aacdec_template.c |2 +-
 libavcodec/aactab.c  |  453 ++
 libavcodec/aactab.h  |1 +
 3 files changed, 455 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index b4eee85..acca460 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2598,7 +2598,7 @@ static void imdct_and_windowing_eld(AACContext *ac, 
SingleChannelElement *sce)
 const int n  = ac->oc[1].m4ac.frame_length_short ? 480 : 512;
 const int n2 = n >> 1;
 const int n4 = n >> 2;
-const INTFLOAT *const window = n == 480 ? ff_aac_eld_window_480 :
+const INTFLOAT *const window = n == 480 ? 
AAC_RENAME(ff_aac_eld_window_480) :
AAC_RENAME(ff_aac_eld_window_512);
 
 // Inverse transform, mapped to the conventional IMDCT by
diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c
index 8b98fe0..dc9acc1 100644
--- a/libavcodec/aactab.c
+++ b/libavcodec/aactab.c
@@ -2705,3 +2705,456 @@ const DECLARE_ALIGNED(32, float, 
ff_aac_eld_window_480)[1800] = {
 -0.00115988, -0.00114605, -0.00113200, -0.00111778,
 -0.00110343, -0.00108898, -0.00107448, -0.00105995,
 };
+
+const DECLARE_ALIGNED(32, int, ff_aac_eld_window_480_fixed)[1800] = {
+0x00109442, 0x00482797, 0x0075bf2a, 0x00afa864,
+0x00ef2aa5, 0x01335b36, 0x017a4df0, 0x01c2cffe,
+0x020bfb4c, 0x0254fd74, 0x029d557c, 0x02e50574,
+0x032c41a8, 0x03732c08, 0x03b9cb88, 0x040032e8,
+0x044686f0, 0x048cd578, 0x04d30738, 0x05190500,
+0x055ec210, 0x05a44750, 0x05e9aeb8, 0x062f0c80,
+0x067477a0, 0x06ba1ac0, 0x07001998, 0x074680e0,
+0x078d5ec0, 0x07d4d038, 0x081cf8f0, 0x0865f8b0,
+0x08afe0e0, 0x08fab150, 0x09466cd0, 0x09931910,
+0x09e0adb0, 0x0a2f1640, 0x0a7e43f0, 0x0ace2960,
+0x0b1eb180, 0x0b6fc4b0, 0x0bc15050, 0x0c134710,
+0x0c65a420, 0x0cb86340, 0x0d0b7df0, 0x0d5ef450,
+0x0db2cb60, 0x0e070180, 0x0e5b91f0, 0x0eb07f20,
+0x0f05d0a0, 0x0f5b8920, 0x0fb1a950, 0x10082e40,
+0x105f1400, 0x10b65820, 0x110df780, 0x1165f120,
+0x11be43e0, 0x1216eea0, 0x126feac0, 0x12c92b00,
+0x1322a620, 0x137c55c0, 0x13d61ae0, 0x142fc940,
+0x148949e0, 0x14e28da0, 0x153b9a80, 0x15947640,
+0x15ed1840, 0x16458660, 0x169deb20, 0x16f663c0,
+0x174ef8c0, 0x17a7a120, 0x180041c0, 0x1858d000,
+0x18b14940, 0x1909a140, 0x1961c820, 0x19b9b620,
+0x1a116480, 0x1a68c1a0, 0x1abfbd00, 0x1b164f60,
+0x1b6c7580, 0x1bc23120, 0x1c1780e0, 0x1c6c5d00,
+0x1cc0dbe0, 0x1d1532a0, 0x1d697660, 0x1dbdac20,
+0x1e11b280, 0x1e655b80, 0x1eb89e80, 0x1f0b7720,
+0x1f5dd680, 0x1fafaec0, 0x2000fb00, 0x2051c340,
+0x20a22ac0, 0x20f24580, 0x214213c0, 0x21919140,
+0x21e0b300, 0x222f7580, 0x227dd900, 0x22cbd880,
+0x23196ec0, 0x23669b00, 0x23b35d80, 0x23ffb6c0,
+0x244ba7c0, 0x249731c0, 0x24e25700, 0x252d1940,
+0x2594ae40, 0x25deea40, 0x2628bd00, 0x26722680,
+0x26bb2740, 0x2703bf40, 0x274beec0, 0x2793b600,
+0x27db1500, 0x28220c00, 0x28689b80, 0x28aec4c0,
+0x28f48800, 0x2939e680, 0x297ee080, 0x29c37600,
+0x2a07a740, 0x2a4b74c0, 0x2a8ede80, 0x2ad1e500,
+0x2b148880, 0x2b56c940, 0x2b98a740, 0x2bda2240,
+0x2c1b3a80, 0x2c5bef80, 0x2c9c4100, 0x2cdc2e80,
+0x2d1bb800, 0x2d5adc80, 0x2d999b80, 0x2dd7f500,
+0x2e15e800, 0x2e537400, 0x2e9098c0, 0x2ecd5540,
+0x2f09a900, 0x2f4592c0, 0x2f811140, 0x2fbc2340,
+0x2ff6c7c0, 0x3030fe80, 0x306ac6c0, 0x30a41f80,
+0x30dd07c0, 0x31157dc0, 0x314d7fc0, 0x31850c80,
+0x31bc22c0, 0x31f2c1c0, 0x3228e840, 0x325e9540,
+0x3293c7c0, 0x32c87e40, 0x32fcb800, 0x33307340,
+0x3363aec0, 0x33966940, 0x33c8a140, 0x33fa5580,
+0x342b84c0, 0x345c2dc0, 0x348c4f80, 0x34bbe900,
+0x34eaf9c0, 0x35198080, 0x35477d00, 0x3574ee40,
+0x35a1d340, 0x35ce2bc0, 0x35f9f6c0, 0x36253380,
+0x364fe180, 0x367a0040, 0x36a38f80, 0x36cc8ec0,
+0x36f4fe80, 0x371cde80, 0x37442e80, 0x376aef00,
+0x37912000, 0x37b6c200, 0x37dbd600, 0x38005d00,
+0x38245840, 0x3847c880, 0x386aaf80, 0x388d0e80,
+0x38aee700, 0x38d03bc0, 0x38f11000, 0x39116700,
+0x39314440, 0x3950ab00, 0x396f9e80, 0x398e22c0,
+0x39ac3c40, 0x39c9f280, 0x39e74cc0, 0x3a045280,
+0x3a210b40, 0x3a3d7ec0, 0x3a59b480, 0x3a75b480,
+0x3a918900, 0x3aad3cc0, 0x3ac8db00, 0x3ae46bc0,
+0x3afff080, 0x3b1b6840, 0x3b36d2c0, 0x3b521980,
+0x3b6d0780, 0x3b876400, 0x3ba0f4c0, 0x3bb96740,
+0x3bd03dc0, 0x3be56580, 0x3bf6dec0, 0x3c0c6140,
+0x3c15a9c0, 0x3c1a5780, 0x3c1fd0c0, 0x3c25edc0,
+0x3c2c78c0, 0x3c333880, 0x3c39f3c0, 0x3c409100,
+

[FFmpeg-cvslog] avcodec/aactab: Fix rounding of elements in ff_aac_eld_window_512_fixed

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 13:19:06 2015 +0200| [17cc35c76b925a5558ee23cf54926b4c8ca4ad7d] | 
committer: Michael Niedermayer

avcodec/aactab: Fix rounding of elements in ff_aac_eld_window_512_fixed

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17cc35c76b925a5558ee23cf54926b4c8ca4ad7d
---

 libavcodec/aactab.c |  306 +--
 1 file changed, 153 insertions(+), 153 deletions(-)

diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c
index deb9d91..8b98fe0 100644
--- a/libavcodec/aactab.c
+++ b/libavcodec/aactab.c
@@ -2024,139 +2024,139 @@ const DECLARE_ALIGNED(32, int, 
ff_aac_eld_window_512_fixed)[1920] = {
 0x0113f27c, 0x0107fb6c, 0x00fc36fd, 0x00f0a2d5,
 0x00e53d51, 0x00da050f, 0x00cef88c, 0x00c41869,
 0x00b9671f, 0x00aee754, 0x00a49b80, 0x009a8384,
-0x00909ca6, 0x0086e400, 0x007d56e3, 0x0073f48f,
-0x006abe70, 0x0061b5de, 0x0058dc65, 0x005033b5,
+0x00909ca6, 0x0086e400, 0x007d56e3, 0x0073f48e,
+0x006abe70, 0x0061b5de, 0x0058dc65, 0x005033b4,
 0x0047be30, 0x003f7e30, 0x00377619, 0x002fa4d4,
 0x002805ee, 0x002094cb, 0x00194cb8, 0x00122856,
-0x000b215c, 0x00043148, 0xfffd51f1, 0xfff683a1,
-0xffefcd4e, 0xffe93630, 0xffe2c57e, 0xffdc855d,
-0xffd682c4, 0xffd0cad4, 0xffcb6a2d, 0xffc663bd,
-0xffc1b070, 0xffbd48e2, 0xffb92571, 0xffb53a55,
-0xffb1779d, 0xffadcd39, 0xffaa2b43, 0xffa68856,
-0xffa2e142, 0xff9f332d, 0xff9b7b9d, 0xff97bf2f,
-0xff9409e3, 0xff9067e3, 0xff8ce557, 0xff898bf1,
-0xff866307, 0xff8371d0, 0xff80bf64, 0xff7e4ebb,
-0xff7c1eab, 0xff7a2e05, 0xff787b48, 0xff770281,
-0xff75bd07, 0xff74a3f8, 0xff73b0b3, 0xff72dd03,
-0xff72237f, 0xff717ebf, 0xff70e94d, 0xff705f5a,
-0xff6fde6b, 0xff6f6427, 0xff6eee41, 0xff6e7d0c,
-0xff6e135a, 0xff6db404, 0xff6d61f9, 0xff6d2055,
-0xff6cf268, 0xff6cdb77, 0xff6cdebc, 0xff6cff48,
-0xff6d3fca, 0xff6da307, 0xff6e2b83, 0xff6eda14,
-0xff6fad6e, 0xff70a464, 0xff71bd9e, 0xff72f663,
-0xff744a81, 0xff75b5c5, 0xff77340a, 0xff78c0a7,
-0xff7a5694, 0xff7bf0dd, 0xff7d8abc, 0xff7f2302,
-0xff80bc09, 0xff825855, 0xff83fa57, 0xff85a55c,
-0xff875d22, 0xff892599, 0xff8b025e, 0xff8cf53c,
-0xff8efdf5, 0xff911c48, 0xff934fca, 0xff959676,
-0xff97ec87, 0xff9a4e36, 0xff9cb7d2, 0xff9f26cd,
-0xffa199cf, 0xffa40f75, 0xffa6867d, 0xffa8feb2,
-0xffab78e0, 0xffadf5c8, 0xffb07640, 0xffb2fba1,
-0xffb587a2, 0xffb81bfc, 0xffbaba47, 0xffbd6237,
-0xffc011a9, 0xffc2c67a, 0xffc57e85, 0xffc83894,
-0xffcaf41b, 0xffcdb0b9, 0xffd06e18, 0xffd32bf8,
-0xffd5ea38, 0xffd8a8c4, 0xffdb6765, 0xffde25fc,
-0xffe0e472, 0xffe3a2b3, 0xffe66088, 0xffe91da7,
-0xffebd979, 0xffee9352, 0xfff14ab1, 0xfff3fef7,
-0xfff6af95, 0xfff95c0d, 0xfffc03c8, 0xfffea65a,
+0x000b215c, 0x00043148, 0xfffd51f0, 0xfff683a0,
+0xffefcd4d, 0xffe9362f, 0xffe2c57d, 0xffdc855c,
+0xffd682c4, 0xffd0cad4, 0xffcb6a2c, 0xffc663bc,
+0xffc1b06f, 0xffbd48e1, 0xffb92570, 0xffb53a54,
+0xffb1779c, 0xffadcd38, 0xffaa2b42, 0xffa68855,
+0xffa2e141, 0xff9f332c, 0xff9b7b9c, 0xff97bf2e,
+0xff9409e2, 0xff9067e2, 0xff8ce556, 0xff898bf0,
+0xff866306, 0xff8371d0, 0xff80bf63, 0xff7e4eba,
+0xff7c1eaa, 0xff7a2e04, 0xff787b47, 0xff770280,
+0xff75bd06, 0xff74a3f7, 0xff73b0b2, 0xff72dd02,
+0xff72237e, 0xff717ebe, 0xff70e94c, 0xff705f59,
+0xff6fde6a, 0xff6f6426, 0xff6eee40, 0xff6e7d0b,
+0xff6e1359, 0xff6db403, 0xff6d61f8, 0xff6d2054,
+0xff6cf267, 0xff6cdb76, 0xff6cdebb, 0xff6cff47,
+0xff6d3fc9, 0xff6da306, 0xff6e2b82, 0xff6eda13,
+0xff6fad6d, 0xff70a463, 0xff71bd9d, 0xff72f662,
+0xff744a80, 0xff75b5c4, 0xff773409, 0xff78c0a6,
+0xff7a5693, 0xff7bf0dc, 0xff7d8abb, 0xff7f2301,
+0xff80bc08, 0xff825854, 0xff83fa56, 0xff85a55c,
+0xff875d22, 0xff892598, 0xff8b025d, 0xff8cf53c,
+0xff8efdf4, 0xff911c48, 0xff934fc9, 0xff959675,
+0xff97ec86, 0xff9a4e35, 0xff9cb7d2, 0xff9f26cc,
+0xffa199ce, 0xffa40f74, 0xffa6867c, 0xffa8feb2,
+0xffab78e0, 0xffadf5c7, 0xffb07640, 0xffb2fba0,
+0xffb587a2, 0xffb81bfb, 0xffbaba46, 0xffbd6236,
+0xffc011a8, 0xffc2c679, 0xffc57e84, 0xffc83894,
+0xffcaf41a, 0xffcdb0b8, 0xffd06e17, 0xffd32bf7,
+0xffd5ea38, 0xffd8a8c3, 0xffdb6764, 0xffde25fb,
+0xffe0e471, 0xffe3a2b2, 0xffe66087, 0xffe91da6,
+0xffebd978, 0xffee9351, 0xfff14ab0, 0xfff3fef6,
+0xfff6af94, 0xfff95c0c, 0xfffc03c7, 0xfffea659,
 0x00015885, 0x0003f2e9, 0x00068a73, 0x00091e8d,
 0x000bae7f, 0x000e39bf, 0x0010bf96, 0x00133f78,
-0x0015b8c4, 0x00182ae4, 0x001a9558, 0x001cf7b3,
+0x0015b8c4, 0x00182ae4, 0x001a9558, 0x001cf7b2,
 0x001f51e0, 0x0021a3b4, 0x0023ed25, 0x00262df2,
 0x002865c5, 0x002a9469, 0x002cb967, 0x002ed4aa,
 0x0030e607, 0x0032ed88, 0x0034eb2f, 0x0036de23,
-0x0038c503, 0x003a9e4c, 0x003c68a7, 0x003e23dd,
+0x0038c503, 0x003a9e4c, 0x003c68a6, 0x003e23dd,
 0x003fd0db

[FFmpeg-cvslog] avcodec/aacps: Fix ;;

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 14:07:55 2015 +0200| [bbad3811cc86f1b4c81fbf5042b4d0bbfcef9028] | 
committer: Michael Niedermayer

avcodec/aacps: Fix ;;

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbad3811cc86f1b4c81fbf5042b4d0bbfcef9028
---

 libavcodec/aacps.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index bf60475..664330d 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -670,7 +670,7 @@ static void decorrelation(PSContext *ps, INTFLOAT 
(*out)[32][2], const INTFLOAT
 const int8_t *k_to_i = is34 ? k_to_i_34 : k_to_i_20;
 int i, k, m, n;
 int n0 = 0, nL = 32;
-const INTFLOAT peak_decay_factor = Q31(0.76592833836465f);;
+const INTFLOAT peak_decay_factor = Q31(0.76592833836465f);
 
 memset(power, 0, 34 * sizeof(*power));
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/dvdec: only attempt to conceal errors based on STA inconsistencies when error_concealment is set

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 15:19:41 2015 +0200| [38490e07247e2a73d31ccb3f57b02db65c033ae3] | 
committer: Michael Niedermayer

avcodec/dvdec: only attempt to conceal errors based on STA inconsistencies when 
error_concealment is set

This allows the user to disable it in the hypothetical case that STA values are 
wrong

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38490e07247e2a73d31ccb3f57b02db65c033ae3
---

 libavcodec/dvdec.c |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 2a241ab..4d080b2 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -311,12 +311,14 @@ retry:
 for (mb_index = 0; mb_index < 5; mb_index++, mb1 += s->sys->bpm, block1 += 
s->sys->bpm * 64) {
 /* skip header */
 quant= buf_ptr[3] & 0x0f;
-if ((buf_ptr[3] >> 4) == 0x0E)
-vs_bit_buffer_damaged = 1;
-if (!mb_index) {
-sta = buf_ptr[3] >> 4;
-} else if (sta != (buf_ptr[3] >> 4))
-vs_bit_buffer_damaged = 1;
+if (avctx->error_concealment) {
+if ((buf_ptr[3] >> 4) == 0x0E)
+vs_bit_buffer_damaged = 1;
+if (!mb_index) {
+sta = buf_ptr[3] >> 4;
+} else if (sta != (buf_ptr[3] >> 4))
+vs_bit_buffer_damaged = 1;
+}
 buf_ptr += 4;
 init_put_bits(&pb, mb_bit_buffer, 80);
 mb= mb1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec: Add QSV MPEG-2 video decoder.

2015-07-25 Thread Ivan Uskov
ffmpeg | branch: master | Ivan Uskov  | Sat Jul 25 
10:45:20 2015 -0400| [6d0123f40e2a94ae3f215af4d598919bc72b9b07] | committer: 
Michael Niedermayer

avcodec: Add QSV MPEG-2 video decoder.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d0123f40e2a94ae3f215af4d598919bc72b9b07
---

 Changelog |1 +
 configure |4 ++
 libavcodec/Makefile   |1 +
 libavcodec/allcodecs.c|2 +
 libavcodec/qsvdec_mpeg2.c |   95 +
 libavcodec/version.h  |2 +-
 6 files changed, 104 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 27870ba..7a642bf 100644
--- a/Changelog
+++ b/Changelog
@@ -15,6 +15,7 @@ version :
 - adrawgraph audio and drawgraph video filter
 - removegrain video filter
 - Intel QSV-accelerated MPEG-2 video and HEVC encoding
+- Intel QSV-accelerated MPEG-2 video decoding
 - libkvazaar HEVC encoder
 - erosion, dilation, deflate and inflate video filters
 - Dynamic Audio Normalizer as dynaudnorm filter
diff --git a/configure b/configure
index 8f3bce3..c71951c 100755
--- a/configure
+++ b/configure
@@ -2273,6 +2273,8 @@ mpeg1video_decoder_select="error_resilience mpeg_er 
mpegvideo"
 mpeg1video_encoder_select="aandcttables mpegvideoenc h263dsp"
 mpeg2video_decoder_select="error_resilience mpeg_er mpegvideo"
 mpeg2video_encoder_select="aandcttables mpegvideoenc h263dsp"
+mpeg2_qsv_decoder_deps="libmfx"
+mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel"
 mpeg2_qsv_encoder_deps="libmfx"
 mpeg2_qsv_encoder_select="qsvenc"
 mpeg4_decoder_select="h263_decoder mpeg4video_parser"
@@ -2431,6 +2433,8 @@ mpeg2_vdpau_hwaccel_deps="vdpau"
 mpeg2_vdpau_hwaccel_select="mpeg2video_decoder"
 mpeg2_xvmc_hwaccel_deps="xvmc"
 mpeg2_xvmc_hwaccel_select="mpeg2video_decoder"
+mpeg2_qsv_hwaccel_deps="libmfx"
+mpeg2_qsv_hwaccel_select="qsvdec_mpeg2"
 mpeg4_crystalhd_decoder_select="crystalhd"
 mpeg4_vaapi_hwaccel_deps="vaapi"
 mpeg4_vaapi_hwaccel_select="mpeg4_decoder"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index eea9ead..b8c24d3 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -364,6 +364,7 @@ OBJS-$(CONFIG_MPEG1VIDEO_ENCODER)  += mpeg12enc.o 
mpeg12.o
 OBJS-$(CONFIG_MPEG2VIDEO_DECODER)  += mpeg12dec.o mpeg12.o mpeg12data.o
 OBJS-$(CONFIG_MPEG2VIDEO_ENCODER)  += mpeg12enc.o mpeg12.o
 OBJS-$(CONFIG_MPEG2_QSV_ENCODER)   += qsvenc_mpeg2.o
+OBJS-$(CONFIG_MPEG2_QSV_DECODER)   += qsvdec_mpeg2.o
 OBJS-$(CONFIG_MPEG4_DECODER)   += xvididct.o
 OBJS-$(CONFIG_MPL2_DECODER)+= mpl2dec.o ass.o
 OBJS-$(CONFIG_MSMPEG4V1_DECODER)   += msmpeg4dec.o msmpeg4.o msmpeg4data.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 82db791..647cd4f 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -94,6 +94,7 @@ void avcodec_register_all(void)
 REGISTER_HWACCEL(MPEG2_DXVA2,   mpeg2_dxva2);
 REGISTER_HWACCEL(MPEG2_VAAPI,   mpeg2_vaapi);
 REGISTER_HWACCEL(MPEG2_VDPAU,   mpeg2_vdpau);
+REGISTER_HWACCEL(MPEG2_QSV, mpeg2_qsv);
 REGISTER_HWACCEL(MPEG4_VAAPI,   mpeg4_vaapi);
 REGISTER_HWACCEL(MPEG4_VDPAU,   mpeg4_vdpau);
 REGISTER_HWACCEL(VC1_D3D11VA,   vc1_d3d11va);
@@ -223,6 +224,7 @@ void avcodec_register_all(void)
 REGISTER_DECODER(MPEG_VDPAU,mpeg_vdpau);
 REGISTER_DECODER(MPEG1_VDPAU,   mpeg1_vdpau);
 REGISTER_DECODER(MPEG2_CRYSTALHD,   mpeg2_crystalhd);
+REGISTER_DECODER(MPEG2_QSV, mpeg2_qsv);
 REGISTER_DECODER(MSA1,  msa1);
 REGISTER_DECODER(MSMPEG4_CRYSTALHD, msmpeg4_crystalhd);
 REGISTER_DECODER(MSMPEG4V1, msmpeg4v1);
diff --git a/libavcodec/qsvdec_mpeg2.c b/libavcodec/qsvdec_mpeg2.c
new file mode 100644
index 000..e920da7
--- /dev/null
+++ b/libavcodec/qsvdec_mpeg2.c
@@ -0,0 +1,95 @@
+/*
+ * Intel MediaSDK QSV based MPEG2 video decoder
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ *
+ * FFmpeg 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 FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include 
+#include 
+
+#include "libavutil/common.h"
+#include "libavutil/opt.h"
+
+#include "avcodec.h"
+#include "qsvdec.h"
+
+typedef struct QSVMPVContext {
+AVClass *class;
+QSVContext qsv;
+} QSVMPVContext;
+
+static av_cold int qsv_decode_cl

[FFmpeg-cvslog] avformat/nutenc: Omit AV_PKT_DATA_QUALITY_STATS when storing side data.

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 18:39:17 2015 +0200| [7ec5115409edd22de762b858fe28086ea3072bbb] | 
committer: Michael Niedermayer

avformat/nutenc: Omit AV_PKT_DATA_QUALITY_STATS when storing side data.

This side data does not serve or improve decoding the data, it thus
would semantically be metadata and not side data.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ec5115409edd22de762b858fe28086ea3072bbb
---

 libavformat/nutenc.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 1522a04..49d62bf 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -933,6 +933,7 @@ static int write_sm_data(AVFormatContext *s, AVIOContext 
*bc, AVPacket *pkt, int
 break;
 case AV_PKT_DATA_METADATA_UPDATE:
 case AV_PKT_DATA_STRINGS_METADATA:
+case AV_PKT_DATA_QUALITY_STATS:
 // belongs into meta, not side data
 break;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec: Add QSV VC-1 video decoder.

2015-07-25 Thread Ivan Uskov
ffmpeg | branch: master | Ivan Uskov  | Sat Jul 25 
12:28:11 2015 -0400| [fb57bc6c34b979bec995e714162fdfb4caf6db1a] | committer: 
Michael Niedermayer

avcodec: Add QSV VC-1 video decoder.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb57bc6c34b979bec995e714162fdfb4caf6db1a
---

 Changelog   |1 +
 configure   |4 +++
 libavcodec/Makefile |1 +
 libavcodec/allcodecs.c  |2 ++
 libavcodec/qsvdec_vc1.c |   88 +++
 libavcodec/version.h|2 +-
 6 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 7a642bf..9079e58 100644
--- a/Changelog
+++ b/Changelog
@@ -16,6 +16,7 @@ version :
 - removegrain video filter
 - Intel QSV-accelerated MPEG-2 video and HEVC encoding
 - Intel QSV-accelerated MPEG-2 video decoding
+- Intel QSV-accelerated VC-1 video decoding
 - libkvazaar HEVC encoder
 - erosion, dilation, deflate and inflate video filters
 - Dynamic Audio Normalizer as dynaudnorm filter
diff --git a/configure b/configure
index c71951c..2d405ba 100755
--- a/configure
+++ b/configure
@@ -2340,6 +2340,8 @@ utvideo_encoder_select="bswapdsp huffman huffyuvencdsp"
 vble_decoder_select="huffyuvdsp"
 vc1_decoder_select="blockdsp error_resilience h263_decoder h264chroma h264qpel 
intrax8 mpeg_er qpeldsp startcode"
 vc1image_decoder_select="vc1_decoder"
+vc1_qsv_decoder_deps="libmfx"
+vc1_qsv_decoder_select="qsvdec vc1_qsv_hwaccel"
 vorbis_decoder_select="mdct"
 vorbis_encoder_select="mdct"
 vp3_decoder_select="hpeldsp vp3dsp videodsp"
@@ -2454,6 +2456,8 @@ vc1_vdpau_decoder_deps="vdpau"
 vc1_vdpau_decoder_select="vc1_decoder"
 vc1_vdpau_hwaccel_deps="vdpau"
 vc1_vdpau_hwaccel_select="vc1_decoder"
+vc1_qsv_hwaccel_deps="libmfx"
+vc1_qsv_hwaccel_select="qsvdec_vc1"
 wmv3_crystalhd_decoder_select="crystalhd"
 wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel"
 wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index b8c24d3..647aae5 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -521,6 +521,7 @@ OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o 
vc1_block.o vc1_loopfilter.o
   vc1dsp.o \
   msmpeg4dec.o msmpeg4.o msmpeg4data.o 
\
   wmv2dsp.o
+OBJS-$(CONFIG_VC1_QSV_DECODER) += qsvdec_vc1.o
 OBJS-$(CONFIG_VCR1_DECODER)+= vcr1.o
 OBJS-$(CONFIG_VMDAUDIO_DECODER)+= vmdaudio.o
 OBJS-$(CONFIG_VMDVIDEO_DECODER)+= vmdvideo.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 647cd4f..c0f2757 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -101,6 +101,7 @@ void avcodec_register_all(void)
 REGISTER_HWACCEL(VC1_DXVA2, vc1_dxva2);
 REGISTER_HWACCEL(VC1_VAAPI, vc1_vaapi);
 REGISTER_HWACCEL(VC1_VDPAU, vc1_vdpau);
+REGISTER_HWACCEL(VC1_QSV,   vc1_qsv);
 REGISTER_HWACCEL(WMV3_D3D11VA,  wmv3_d3d11va);
 REGISTER_HWACCEL(WMV3_DXVA2,wmv3_dxva2);
 REGISTER_HWACCEL(WMV3_VAAPI,wmv3_vaapi);
@@ -305,6 +306,7 @@ void avcodec_register_all(void)
 REGISTER_DECODER(VC1_CRYSTALHD, vc1_crystalhd);
 REGISTER_DECODER(VC1_VDPAU, vc1_vdpau);
 REGISTER_DECODER(VC1IMAGE,  vc1image);
+REGISTER_DECODER(VC1_QSV,   vc1_qsv);
 REGISTER_DECODER(VCR1,  vcr1);
 REGISTER_DECODER(VMDVIDEO,  vmdvideo);
 REGISTER_DECODER(VMNC,  vmnc);
diff --git a/libavcodec/qsvdec_vc1.c b/libavcodec/qsvdec_vc1.c
new file mode 100644
index 000..d5258fc
--- /dev/null
+++ b/libavcodec/qsvdec_vc1.c
@@ -0,0 +1,88 @@
+/*
+ * Intel MediaSDK QSV based VC-1 video decoder
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ *
+ * FFmpeg 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 FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include 
+#include 
+
+#include "libavutil/common.h"
+#include "libavutil/fifo.h"
+#include "libavutil/opt.h"
+
+#include "avcodec.h"
+#include "qsvdec.h"
+
+typedef struct QSVVC1Context {
+AVClass *class;
+QSVContext qsv;
+} QSVVC1Context;
+
+
+static av_cold int qsv_decode_close(AVCodecContext *avctx)
+{
+QSVVC1Context *s = avctx->priv_data;
+
+ff_qsv

[FFmpeg-cvslog] avutil/softfloat: Add a test for av_sincos_sf()

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 21:28:05 2015 +0200| [e171309756cb0e407632b163ce588ea8262bc50e] | 
committer: Michael Niedermayer

avutil/softfloat: Add a test for av_sincos_sf()

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e171309756cb0e407632b163ce588ea8262bc50e
---

 libavutil/softfloat.c |   12 
 1 file changed, 12 insertions(+)

diff --git a/libavutil/softfloat.c b/libavutil/softfloat.c
index afce358..a9d1b0c 100644
--- a/libavutil/softfloat.c
+++ b/libavutil/softfloat.c
@@ -97,6 +97,18 @@ int main(void){
 sf1 = av_int2sf(0xE001, 0);
 printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), 
sf1.mant, sf1.exp);
 
+for(i= 0; i<4*36; i++){
+int s, c;
+double errs, errc;
+
+av_sincos_sf(i*(1ULL<<32)/36/4, &s, &c);
+errs = (double)s/ (1<<30) - sin(i*M_PI/36);
+errc = (double)c/ (1<<30) - cos(i*M_PI/36);
+if (fabs(errs) > 0.0002 || fabs(errc) >0.001) {
+printf("sincos FAIL %d %f %f %f %f\n", i, (float)s/ (1<<30), 
(float)c/ (1<<30), sin(i*M_PI/36), cos(i*M_PI/36));
+}
+
+}
 return 0;
 
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/aacps_fixed_tablegen: change f_center to 64bit to avoid overflow

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 22:07:41 2015 +0200| [c105e0f077fb988d5c19e1a1beadf839f01e1a3e] | 
committer: Michael Niedermayer

avcodec/aacps_fixed_tablegen: change f_center to 64bit to avoid overflow

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c105e0f077fb988d5c19e1a1beadf839f01e1a3e
---

 libavcodec/aacps_fixed_tablegen.h |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/aacps_fixed_tablegen.h 
b/libavcodec/aacps_fixed_tablegen.h
index 701a9d2..01f2ece 100644
--- a/libavcodec/aacps_fixed_tablegen.h
+++ b/libavcodec/aacps_fixed_tablegen.h
@@ -349,7 +349,8 @@ static void ps_tableinit(void)
 }
 
 for (k = 0; k < NR_ALLPASS_BANDS20; k++) {
-int theta, f_center;
+int theta;
+int64_t f_center;
 int c, s;
 
 if (k < FF_ARRAY_ELEMS(f_center_20))
@@ -377,7 +378,7 @@ static void ps_tableinit(void)
 if (k < FF_ARRAY_ELEMS(f_center_34))
 f_center = f_center_34[k];
 else
-f_center = (k << 26) - (53 << 25);
+f_center = ((int64_t)k << 26) - (53 << 25);
 
 for (m = 0; m < PS_AP_LINKS; m++) {
 theta = (int)(((int64_t)fractional_delay_links[m] * f_center + 
0x1000) >> 27);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Merge commit 'aa9d15d89bb4ee8a31607d3db1b8c5334eb88d2d'

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 23:10:14 2015 +0200| [ef2a85ac532117b13087f3ceabeb450f12d26c7e] | 
committer: Michael Niedermayer

Merge commit 'aa9d15d89bb4ee8a31607d3db1b8c5334eb88d2d'

* commit 'aa9d15d89bb4ee8a31607d3db1b8c5334eb88d2d':
  qsvdec: avoid an infinite loop with no consumed data and no output

Conflicts:
libavcodec/qsvdec.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef2a85ac532117b13087f3ceabeb450f12d26c7e
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] qsvdec: avoid an infinite loop with no consumed data and no output

2015-07-25 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Thu Jul  9 
20:08:13 2015 +0200| [aa9d15d89bb4ee8a31607d3db1b8c5334eb88d2d] | committer: 
Anton Khirnov

qsvdec: avoid an infinite loop with no consumed data and no output

This is triggerable with the HEVC decoder. It is unclear yet whether the
bug is in the calling code or the MSDK, but it seems better to check for
this in any case.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa9d15d89bb4ee8a31607d3db1b8c5334eb88d2d
---

 libavcodec/qsvdec.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index da9b082..489375c 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -245,6 +245,13 @@ int ff_qsv_decode(AVCodecContext *avctx, QSVContext *q,
 return ff_qsv_error(ret);
 }
 
+/* make sure we do not enter an infinite loop if the SDK
+ * did not consume any data and did not return anything */
+if (!sync && !bs.DataOffset) {
+av_log(avctx, AV_LOG_WARNING, "A decode call did not consume any 
data\n");
+bs.DataOffset = avpkt->size;
+}
+
 if (sync) {
 QSVFrame *out_frame = find_frame(q, outsurf);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Merge commit '22522d9c2c69624fe4d81d61ee65a56610f22f1d'

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 23:28:39 2015 +0200| [c3413a712ac23d74a7a0474a6100753d538b79cd] | 
committer: Michael Niedermayer

Merge commit '22522d9c2c69624fe4d81d61ee65a56610f22f1d'

* commit '22522d9c2c69624fe4d81d61ee65a56610f22f1d':
  qsvdec: fix a memleak of async_fifo

Conflicts:
libavcodec/qsvdec.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3413a712ac23d74a7a0474a6100753d538b79cd
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] qsvdec: fix a memleak of async_fifo

2015-07-25 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Tue Jul 21 
19:41:59 2015 +0200| [22522d9c2c69624fe4d81d61ee65a56610f22f1d] | committer: 
Anton Khirnov

qsvdec: fix a memleak of async_fifo

init() is called whenever format changes, so current code would leak the
fifo in this case.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22522d9c2c69624fe4d81d61ee65a56610f22f1d
---

 libavcodec/qsvdec.c |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 489375c..ef781d9 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -73,10 +73,12 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext 
*q, mfxSession session)
 mfxVideoParam param = { { 0 } };
 int ret;
 
-q->async_fifo = av_fifo_alloc((1 + q->async_depth) *
-  (sizeof(mfxSyncPoint) + sizeof(QSVFrame*)));
-if (!q->async_fifo)
-return AVERROR(ENOMEM);
+if (!q->async_fifo) {
+q->async_fifo = av_fifo_alloc((1 + q->async_depth) *
+  (sizeof(mfxSyncPoint) + 
sizeof(QSVFrame*)));
+if (!q->async_fifo)
+return AVERROR(ENOMEM);
+}
 
 ret = qsv_init_session(avctx, q, session);
 if (ret < 0) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/nvenc: Remove unused parameter

2015-07-25 Thread Timo Rothenpieler
ffmpeg | branch: master | Timo Rothenpieler  | Sat Jul 
25 23:26:42 2015 +0200| [15cd2f8ea9f66cf491a27ee7ae0461f5590240f6] | committer: 
Timo Rothenpieler

avcodec/nvenc: Remove unused parameter

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15cd2f8ea9f66cf491a27ee7ae0461f5590240f6
---

 libavcodec/nvenc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 0589cf1..6e4d631 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1081,7 +1081,7 @@ static av_cold int nvenc_encode_close(AVCodecContext 
*avctx)
 return 0;
 }
 
-static int process_output_surface(AVCodecContext *avctx, AVPacket *pkt, 
AVFrame *coded_frame, NvencOutputSurface *tmpoutsurf)
+static int process_output_surface(AVCodecContext *avctx, AVPacket *pkt, 
NvencOutputSurface *tmpoutsurf)
 {
 NvencContext *ctx = avctx->priv_data;
 NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
@@ -1376,7 +1376,7 @@ static int nvenc_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 if (ctx->output_surface_ready_queue.count) {
 tmpoutsurf = out_surf_queue_dequeue(&ctx->output_surface_ready_queue);
 
-res = process_output_surface(avctx, pkt, avctx->coded_frame, 
tmpoutsurf);
+res = process_output_surface(avctx, pkt, tmpoutsurf);
 
 if (res)
 return res;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Merge commit 'fa85fcf2b7d1ab822a59245077b8bb855406d3e9'

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Jul 25 23:40:06 2015 +0200| [af08d8bfbbed4e9a1dfa3ab7ccd81d7e54389f9e] | 
committer: Michael Niedermayer

Merge commit 'fa85fcf2b7d1ab822a59245077b8bb855406d3e9'

* commit 'fa85fcf2b7d1ab822a59245077b8bb855406d3e9':
  qsvenc_hevc: fix enum declaration

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af08d8bfbbed4e9a1dfa3ab7ccd81d7e54389f9e
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] qsvenc_hevc: fix enum declaration

2015-07-25 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Tue Jul 21 
19:43:34 2015 +0200| [fa85fcf2b7d1ab822a59245077b8bb855406d3e9] | committer: 
Anton Khirnov

qsvenc_hevc: fix enum declaration

Declare a named enum, not a variable with anonymous enum type.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa85fcf2b7d1ab822a59245077b8bb855406d3e9
---

 libavcodec/qsvenc_hevc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
index 7ef706b..0efb794 100644
--- a/libavcodec/qsvenc_hevc.c
+++ b/libavcodec/qsvenc_hevc.c
@@ -36,11 +36,11 @@
 #include "qsv_internal.h"
 #include "qsvenc.h"
 
-enum {
+enum LoadPlugin {
 LOAD_PLUGIN_NONE,
 LOAD_PLUGIN_HEVC_SW,
 LOAD_PLUGIN_HEVC_HW,
-} LoadPlugin;
+};
 
 typedef struct QSVHEVCEncContext {
 AVClass *class;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avfilter/Makefile: fix order of framestep filter

2015-07-25 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Fri Jul 24 07:59:02 
2015 +| [62aab839f80512c0ca997a357a237e6d14db86e1] | committer: Paul B Mahol

avfilter/Makefile: fix order of framestep filter

Signed-off-by: Paul B Mahol 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62aab839f80512c0ca997a357a237e6d14db86e1
---

 libavfilter/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index a85430b..af1d780 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -138,9 +138,9 @@ OBJS-$(CONFIG_FIELDMATCH_FILTER) += 
vf_fieldmatch.o
 OBJS-$(CONFIG_FIELDORDER_FILTER) += vf_fieldorder.o
 OBJS-$(CONFIG_FIND_RECT_FILTER)  += vf_find_rect.o lavfutils.o
 OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o
-OBJS-$(CONFIG_FRAMESTEP_FILTER)  += vf_framestep.o
 OBJS-$(CONFIG_FPS_FILTER)+= vf_fps.o
 OBJS-$(CONFIG_FRAMEPACK_FILTER)  += vf_framepack.o
+OBJS-$(CONFIG_FRAMESTEP_FILTER)  += vf_framestep.o
 OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o
 OBJS-$(CONFIG_FSPP_FILTER)   += vf_fspp.o
 OBJS-$(CONFIG_GEQ_FILTER)+= vf_geq.o

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avfilter: add sidechain compress audio filter

2015-07-25 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Fri Jul 17 18:44:16 
2015 +| [c1fa846d0c23dee4b214d454415a576bec0fc5d2] | committer: Paul B Mahol

avfilter: add sidechain compress audio filter

Signed-off-by: Paul B Mahol 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1fa846d0c23dee4b214d454415a576bec0fc5d2
---

 Changelog  |1 +
 doc/filters.texi   |   62 +++
 libavfilter/Makefile   |1 +
 libavfilter/af_sidechaincompress.c |  338 
 libavfilter/allfilters.c   |1 +
 libavfilter/version.h  |2 +-
 6 files changed, 404 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 9079e58..a54417f 100644
--- a/Changelog
+++ b/Changelog
@@ -24,6 +24,7 @@ version :
 - Random filter
 - deband filter
 - AAC fixed-point decoding
+- sidechaincompress audio filter
 
 
 version 2.7:
diff --git a/doc/filters.texi b/doc/filters.texi
index 35a24cc..f6380c9 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -622,6 +622,7 @@ slope
 Specify the band-width of a filter in width_type units.
 @end table
 
+@anchor{amerge}
 @section amerge
 
 Merge two or more audio streams into a single multi-channel stream.
@@ -2020,6 +2021,7 @@ Applies only to double-pole filter.
 The default is 0.707q and gives a Butterworth response.
 @end table
 
+@anchor{pan}
 @section pan
 
 Mix channels with specific gain levels. The filter accepts the output
@@ -2121,6 +2123,66 @@ At end of filtering it displays @code{track_gain} and 
@code{track_peak}.
 Convert the audio sample format, sample rate and channel layout. It is
 not meant to be used directly.
 
+@section sidechaincompress
+
+This filter acts like normal compressor but has the ability to compress
+detected signal using second input signal.
+It needs two input streams and returns one output stream.
+First input stream will be processed depending on second stream signal.
+The filtered signal then can be filtered with other filters in later stages of
+processing. See @ref{pan} and @ref{amerge} filter.
+
+The filter accepts the following options:
+
+@table @option
+@item threshold
+If a signal of second stream raises above this level it will affect the gain
+reduction of first stream.
+By default is 0.125. Range is between 0.00097563 and 1.
+
+@item ratio
+Set a ratio about which the signal is reduced. 1:2 means that if the level
+raised 4dB above the threshold, it will be only 2dB above after the reduction.
+Default is 2. Range is between 1 and 20.
+
+@item attack
+Amount of milliseconds the signal has to rise above the threshold before gain
+reduction starts. Default is 20. Range is between 0.01 and 2000.
+
+@item release
+Amount of milliseconds the signal has to fall bellow the threshold before
+reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
+
+@item makeup
+Set the amount by how much signal will be amplified after processing.
+Default is 2. Range is from 1 and 64.
+
+@item knee
+Curve the sharp knee around the threshold to enter gain reduction more softly.
+Default is 2.82843. Range is between 1 and 8.
+
+@item link
+Choose if the @code{average} level between all channels of side-chain stream
+or the louder(@code{maximum}) channel of side-chain stream affects the
+reduction. Default is @code{average}.
+
+@item detection
+Should the exact signal be taken in case of @code{peak} or an RMS one in case
+of @code{rms}. Default is @code{rms} which is mainly smoother.
+@end table
+
+@subsection Examples
+
+@itemize
+@item
+Full ffmpeg example taking 2 audio inputs, 1st input to be compressed
+depending on the signal of 2nd input and later compressed signal to be
+merged with 2nd input:
+@example
+ffmpeg -i main.flac -i sidechain.flac -filter_complex 
"[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge"
+@end example
+@end itemize
+
 @section silencedetect
 
 Detect silence in an audio stream.
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index bec7bdb..a85430b 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -80,6 +80,7 @@ OBJS-$(CONFIG_LOWPASS_FILTER)+= af_biquads.o
 OBJS-$(CONFIG_PAN_FILTER)+= af_pan.o
 OBJS-$(CONFIG_REPLAYGAIN_FILTER) += af_replaygain.o
 OBJS-$(CONFIG_RESAMPLE_FILTER)   += af_resample.o
+OBJS-$(CONFIG_SIDECHAINCOMPRESS_FILTER)  += af_sidechaincompress.o
 OBJS-$(CONFIG_SILENCEDETECT_FILTER)  += af_silencedetect.o
 OBJS-$(CONFIG_SILENCEREMOVE_FILTER)  += af_silenceremove.o
 OBJS-$(CONFIG_TREBLE_FILTER) += af_biquads.o
diff --git a/libavfilter/af_sidechaincompress.c 
b/libavfilter/af_sidechaincompress.c
new file mode 100644
index 000..f63
--- /dev/null
+++ b/libavfilter/af_sidechaincompress.c
@@ -0,0 +1,338 @@
+/*
+ * Copyright (C) 2001-2010 Krzysztof Foltman, Markus Schmidt, Thor Harald 
Johansen and others
+ * Copyright (c) 2015 Paul B Mahol
+ *

[FFmpeg-cvslog] qsvdec: move qsv_process_data() from qsvdec_h264 to the common code

2015-07-25 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Tue Jul 21 
18:57:49 2015 +0200| [96dca089b19bf55293136277f5b081c56146e10e] | committer: 
Anton Khirnov

qsvdec: move qsv_process_data() from qsvdec_h264 to the common code

It will be shared with the upcoming mpeg2 and hevc decoders.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96dca089b19bf55293136277f5b081c56146e10e
---

 libavcodec/qsvdec.c  |  109 --
 libavcodec/qsvdec.h  |   12 +++--
 libavcodec/qsvdec_h264.c |  107 ++---
 3 files changed, 118 insertions(+), 110 deletions(-)

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index ef781d9..5263bf5 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -34,6 +34,7 @@
 
 #include "avcodec.h"
 #include "internal.h"
+#include "qsv.h"
 #include "qsv_internal.h"
 #include "qsvdec.h"
 
@@ -209,9 +210,9 @@ static QSVFrame *find_frame(QSVContext *q, mfxFrameSurface1 
*surf)
 return NULL;
 }
 
-int ff_qsv_decode(AVCodecContext *avctx, QSVContext *q,
-  AVFrame *frame, int *got_frame,
-  AVPacket *avpkt)
+static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
+  AVFrame *frame, int *got_frame,
+  AVPacket *avpkt)
 {
 QSVFrame *out_frame;
 mfxFrameSurface1 *insurf;
@@ -317,8 +318,110 @@ int ff_qsv_decode_close(QSVContext *q)
 av_fifo_free(q->async_fifo);
 q->async_fifo = NULL;
 
+av_parser_close(q->parser);
+avcodec_free_context(&q->avctx_internal);
+
 if (q->internal_session)
 MFXClose(q->internal_session);
 
 return 0;
 }
+
+int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
+AVFrame *frame, int *got_frame, AVPacket *pkt)
+{
+uint8_t *dummy_data;
+int dummy_size;
+int ret;
+
+if (!q->avctx_internal) {
+q->avctx_internal = avcodec_alloc_context3(NULL);
+if (!q->avctx_internal)
+return AVERROR(ENOMEM);
+
+if (avctx->extradata) {
+q->avctx_internal->extradata = av_mallocz(avctx->extradata_size + 
FF_INPUT_BUFFER_PADDING_SIZE);
+if (!q->avctx_internal->extradata)
+return AVERROR(ENOMEM);
+
+memcpy(q->avctx_internal->extradata, avctx->extradata,
+   avctx->extradata_size);
+q->avctx_internal->extradata_size = avctx->extradata_size;
+}
+
+q->parser = av_parser_init(avctx->codec_id);
+if (!q->parser)
+return AVERROR(ENOMEM);
+
+q->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
+q->orig_pix_fmt   = AV_PIX_FMT_NONE;
+}
+
+if (!pkt->size)
+return qsv_decode(avctx, q, frame, got_frame, pkt);
+
+/* we assume the packets are already split properly and want
+ * just the codec parameters here */
+av_parser_parse2(q->parser, q->avctx_internal,
+ &dummy_data, &dummy_size,
+ pkt->data, pkt->size, pkt->pts, pkt->dts,
+ pkt->pos);
+
+/* TODO: flush delayed frames on reinit */
+if (q->parser->format   != q->orig_pix_fmt||
+q->parser->coded_width  != avctx->coded_width ||
+q->parser->coded_height != avctx->coded_height) {
+mfxSession session = NULL;
+
+enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT_QSV,
+   AV_PIX_FMT_NONE,
+   AV_PIX_FMT_NONE };
+enum AVPixelFormat qsv_format;
+
+qsv_format = ff_qsv_map_pixfmt(q->parser->format);
+if (qsv_format < 0) {
+av_log(avctx, AV_LOG_ERROR,
+   "Only 8-bit YUV420 streams are supported.\n");
+ret = AVERROR(ENOSYS);
+goto reinit_fail;
+}
+
+q->orig_pix_fmt = q->parser->format;
+avctx->pix_fmt  = pix_fmts[1] = qsv_format;
+avctx->width= q->parser->width;
+avctx->height   = q->parser->height;
+avctx->coded_width  = q->parser->coded_width;
+avctx->coded_height = q->parser->coded_height;
+avctx->level= q->avctx_internal->level;
+avctx->profile  = q->avctx_internal->profile;
+
+ret = ff_get_format(avctx, pix_fmts);
+if (ret < 0)
+goto reinit_fail;
+
+avctx->pix_fmt = ret;
+
+if (avctx->hwaccel_context) {
+AVQSVContext *user_ctx = avctx->hwaccel_context;
+session   = user_ctx->session;
+q->iopattern  = user_ctx->iopattern;
+q->ext_buffers= user_ctx->ext_buffers;
+q->nb_ext_buffers = user_ctx->nb_ext_buffers;
+}
+
+ret = ff_qsv_decode_init(avctx, q, session);
+if (ret < 0)
+goto reinit_fail;
+}
+
+return qsv_decode(avctx, q, frame, got_frame, pkt);
+
+reinit_fail:
+q->orig_pix_fmt = q->parser->format = av

[FFmpeg-cvslog] Merge commit '96dca089b19bf55293136277f5b081c56146e10e'

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jul 26 00:18:44 2015 +0200| [a822c3bd7974469d3d86abb29c8309238b5986c5] | 
committer: Michael Niedermayer

Merge commit '96dca089b19bf55293136277f5b081c56146e10e'

* commit '96dca089b19bf55293136277f5b081c56146e10e':
  qsvdec: move qsv_process_data() from qsvdec_h264 to the common code

Conflicts:
libavcodec/qsvdec.c
libavcodec/qsvdec_h264.c

No change as the parser code has been removed

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a822c3bd7974469d3d86abb29c8309238b5986c5
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Merge commit 'f89f78c1c563d98f10ee1d7e1ed67c9f9e03b741'

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jul 26 00:34:12 2015 +0200| [15bcbc9d3b88b7f2564eca81b754b6d863906bb9] | 
committer: Michael Niedermayer

Merge commit 'f89f78c1c563d98f10ee1d7e1ed67c9f9e03b741'

* commit 'f89f78c1c563d98f10ee1d7e1ed67c9f9e03b741':
  lavc: add a HEVC mp4->annex B bitstream filter

Conflicts:
Changelog

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15bcbc9d3b88b7f2564eca81b754b6d863906bb9
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: add a HEVC mp4->annex B bitstream filter

2015-07-25 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Thu Jul  9 
11:28:38 2015 +0200| [f89f78c1c563d98f10ee1d7e1ed67c9f9e03b741] | committer: 
Anton Khirnov

lavc: add a HEVC mp4->annex B bitstream filter

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f89f78c1c563d98f10ee1d7e1ed67c9f9e03b741
---

 Changelog |1 +
 libavcodec/Makefile   |1 +
 libavcodec/allcodecs.c|1 +
 libavcodec/hevc_mp4toannexb_bsf.c |  186 +
 4 files changed, 189 insertions(+)

diff --git a/Changelog b/Changelog
index 99b3d1d..99e23d6 100644
--- a/Changelog
+++ b/Changelog
@@ -39,6 +39,7 @@ version :
 - rewritten ASF demuxer
 - Go2Meeting decoding support
 - Intel QSV-accelerated MPEG-2 video and HEVC encoding
+- bitstream filter for converting HEVC from MP4 to Annex B
 
 
 version 11:
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6bc9ff7..1bfd954 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -730,6 +730,7 @@ OBJS-$(CONFIG_AAC_ADTSTOASC_BSF)  += 
aac_adtstoasc_bsf.o aacadtsdec.o \
 OBJS-$(CONFIG_CHOMP_BSF)  += chomp_bsf.o
 OBJS-$(CONFIG_DUMP_EXTRADATA_BSF) += dump_extradata_bsf.o
 OBJS-$(CONFIG_H264_MP4TOANNEXB_BSF)   += h264_mp4toannexb_bsf.o
+OBJS-$(CONFIG_HEVC_MP4TOANNEXB_BSF)   += hevc_mp4toannexb_bsf.o
 OBJS-$(CONFIG_IMX_DUMP_HEADER_BSF)+= imx_dump_header_bsf.o
 OBJS-$(CONFIG_MJPEG2JPEG_BSF) += mjpeg2jpeg_bsf.o
 OBJS-$(CONFIG_MJPEGA_DUMP_HEADER_BSF) += mjpega_dump_header_bsf.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 9fdbe8f..67f40bf 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -529,6 +529,7 @@ void avcodec_register_all(void)
 REGISTER_BSF(CHOMP, chomp);
 REGISTER_BSF(DUMP_EXTRADATA,dump_extradata);
 REGISTER_BSF(H264_MP4TOANNEXB,  h264_mp4toannexb);
+REGISTER_BSF(HEVC_MP4TOANNEXB,  hevc_mp4toannexb);
 REGISTER_BSF(IMX_DUMP_HEADER,   imx_dump_header);
 REGISTER_BSF(MJPEG2JPEG,mjpeg2jpeg);
 REGISTER_BSF(MJPEGA_DUMP_HEADER,mjpega_dump_header);
diff --git a/libavcodec/hevc_mp4toannexb_bsf.c 
b/libavcodec/hevc_mp4toannexb_bsf.c
new file mode 100644
index 000..449c8a3
--- /dev/null
+++ b/libavcodec/hevc_mp4toannexb_bsf.c
@@ -0,0 +1,186 @@
+/*
+ * HEVC MP4 to Annex B byte stream format filter
+ * copyright (c) 2015 Anton Khirnov
+ *
+ * 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 
+
+#include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
+
+#include "avcodec.h"
+#include "bytestream.h"
+#include "hevc.h"
+
+#define MIN_HEVCC_LENGTH 23
+
+typedef struct HEVCBSFContext {
+uint8_t  length_size;
+int  extradata_parsed;
+
+int logged_nonmp4_warning;
+} HEVCBSFContext;
+
+static int hevc_extradata_to_annexb(AVCodecContext *avctx)
+{
+GetByteContext gb;
+int length_size, num_arrays, i, j;
+int ret = 0;
+
+uint8_t *new_extradata = NULL;
+size_t   new_extradata_size = 0;;
+
+bytestream2_init(&gb, avctx->extradata, avctx->extradata_size);
+
+bytestream2_skip(&gb, 21);
+length_size = (bytestream2_get_byte(&gb) & 3) + 1;
+num_arrays  = bytestream2_get_byte(&gb);
+
+for (i = 0; i < num_arrays; i++) {
+int type = bytestream2_get_byte(&gb) & 0x3f;
+int cnt  = bytestream2_get_be16(&gb);
+
+if (!(type == NAL_VPS || type == NAL_SPS || type == NAL_PPS ||
+  type == NAL_SEI_PREFIX || type == NAL_SEI_SUFFIX)) {
+av_log(avctx, AV_LOG_ERROR, "Invalid NAL unit type in extradata: 
%d\n",
+   type);
+ret = AVERROR_INVALIDDATA;
+goto fail;
+}
+
+for (j = 0; j < cnt; j++) {
+int nalu_len = bytestream2_get_be16(&gb);
+
+if (4 + FF_INPUT_BUFFER_PADDING_SIZE + nalu_len > SIZE_MAX - 
new_extradata_size) {
+ret = AVERROR_INVALIDDATA;
+goto fail;
+}
+ret = av_reallocp(&new_extradata, new_extradata_size + nalu_len + 
4 + FF_INPUT_BUFFER_PADDING_SIZE);
+if (ret < 0)
+goto fail;
+
+AV_WB32(new_extradata + new_extradata_size, 1); // add the 
startco

[FFmpeg-cvslog] avcodec/nvenc: Delay frame output to increase encoding speed

2015-07-25 Thread Timo Rothenpieler
ffmpeg | branch: master | Timo Rothenpieler  | Sat Jul 
25 23:20:28 2015 +0200| [9f4bff834c47d2093ae35215c4aafa92c29d9d79] | committer: 
Timo Rothenpieler

avcodec/nvenc: Delay frame output to increase encoding speed

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f4bff834c47d2093ae35215c4aafa92c29d9d79
---

 libavcodec/nvenc.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 6e4d631..633fb51 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -163,6 +163,7 @@ typedef struct NvencContext
 int cbr;
 int twopass;
 int gpu;
+int buffer_delay;
 } NvencContext;
 
 static const NvencValuePair nvenc_h264_level_pairs[] = {
@@ -692,6 +693,9 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
 num_mbs = ((avctx->width + 15) >> 4) * ((avctx->height + 15) >> 4);
 ctx->max_surface_count = (num_mbs >= 8160) ? 32 : 48;
 
+if (ctx->buffer_delay >= ctx->max_surface_count)
+ctx->buffer_delay = ctx->max_surface_count - 1;
+
 ctx->init_encode_params.enableEncodeAsync = 0;
 ctx->init_encode_params.enablePTD = 1;
 
@@ -1373,7 +1377,7 @@ static int nvenc_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 }
 }
 
-if (ctx->output_surface_ready_queue.count) {
+if (ctx->output_surface_ready_queue.count && (!frame || 
ctx->output_surface_ready_queue.count + ctx->output_surface_queue.count >= 
ctx->buffer_delay)) {
 tmpoutsurf = out_surf_queue_dequeue(&ctx->output_surface_ready_queue);
 
 res = process_output_surface(avctx, pkt, tmpoutsurf);
@@ -1410,6 +1414,7 @@ static const AVOption options[] = {
 { "cbr", "Use cbr encoding mode", OFFSET(cbr), AV_OPT_TYPE_INT, { .i64 = 0 
}, 0, 1, VE },
 { "2pass", "Use 2pass cbr encoding mode (low latency mode only)", 
OFFSET(twopass), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE },
 { "gpu", "Selects which NVENC capable GPU to use. First GPU is 0, second 
is 1, and so on.", OFFSET(gpu), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
+{ "delay", "Delays frame output by the given amount of frames.", 
OFFSET(buffer_delay), AV_OPT_TYPE_INT, { .i64 = INT_MAX }, 0, INT_MAX, VE },
 { NULL }
 };
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: add Intel libmfx-based MPEG2 decoder.

2015-07-25 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Tue Jun 16 
18:22:11 2015 +0200| [bf52f773913cf74bdf0d2c8c2cb4473fa1b7801e] | committer: 
Anton Khirnov

lavc: add Intel libmfx-based MPEG2 decoder.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bf52f773913cf74bdf0d2c8c2cb4473fa1b7801e
---

 configure |3 +
 libavcodec/Makefile   |1 +
 libavcodec/allcodecs.c|2 +
 libavcodec/qsvdec_mpeg2.c |  179 +
 4 files changed, 185 insertions(+)

diff --git a/configure b/configure
index 5ef2e0d..575fdf7 100755
--- a/configure
+++ b/configure
@@ -1922,6 +1922,8 @@ mpeg1video_decoder_select="error_resilience mpeg_er 
mpegvideo"
 mpeg1video_encoder_select="aandcttables mpegvideoenc"
 mpeg2video_decoder_select="error_resilience mpeg_er mpegvideo"
 mpeg2video_encoder_select="aandcttables mpegvideoenc"
+mpeg2_qsv_decoder_deps="libmfx"
+mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel mpegvideo_parser"
 mpeg2_qsv_encoder_deps="libmfx"
 mpeg2_qsv_encoder_select="qsvenc"
 mpeg4_decoder_select="h263_decoder mpeg4video_parser"
@@ -2049,6 +2051,7 @@ mpeg2_d3d11va_hwaccel_deps="d3d11va"
 mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
 mpeg2_dxva2_hwaccel_deps="dxva2"
 mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
+mpeg2_qsv_hwaccel_deps="libmfx"
 mpeg2_vaapi_hwaccel_deps="vaapi"
 mpeg2_vaapi_hwaccel_select="mpeg2video_decoder"
 mpeg2_vdpau_hwaccel_deps="vdpau"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 1bfd954..6493d76 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -307,6 +307,7 @@ OBJS-$(CONFIG_MPEG1VIDEO_DECODER)  += mpeg12dec.o 
mpeg12.o mpeg12data.o
 OBJS-$(CONFIG_MPEG1VIDEO_ENCODER)  += mpeg12enc.o mpeg12.o
 OBJS-$(CONFIG_MPEG2VIDEO_DECODER)  += mpeg12dec.o mpeg12.o mpeg12data.o
 OBJS-$(CONFIG_MPEG2VIDEO_ENCODER)  += mpeg12enc.o mpeg12.o
+OBJS-$(CONFIG_MPEG2_QSV_DECODER)   += qsvdec_mpeg2.o
 OBJS-$(CONFIG_MPEG2_QSV_ENCODER)   += qsvenc_mpeg2.o
 OBJS-$(CONFIG_MPEG4_DECODER)   += xvididct.o
 OBJS-$(CONFIG_MSMPEG4V1_DECODER)   += msmpeg4dec.o msmpeg4.o msmpeg4data.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 67f40bf..fdd8b56 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -89,6 +89,7 @@ void avcodec_register_all(void)
 REGISTER_HWACCEL(MPEG1_VDPAU,   mpeg1_vdpau);
 REGISTER_HWACCEL(MPEG2_D3D11VA, mpeg2_d3d11va);
 REGISTER_HWACCEL(MPEG2_DXVA2,   mpeg2_dxva2);
+REGISTER_HWACCEL(MPEG2_QSV, mpeg2_qsv);
 REGISTER_HWACCEL(MPEG2_VAAPI,   mpeg2_vaapi);
 REGISTER_HWACCEL(MPEG2_VDPAU,   mpeg2_vdpau);
 REGISTER_HWACCEL(MPEG4_VAAPI,   mpeg4_vaapi);
@@ -203,6 +204,7 @@ void avcodec_register_all(void)
 #endif /* FF_API_XVMC */
 REGISTER_ENCDEC (MPEG1VIDEO,mpeg1video);
 REGISTER_ENCDEC (MPEG2VIDEO,mpeg2video);
+REGISTER_DECODER(MPEG2_QSV, mpeg2_qsv);
 REGISTER_ENCDEC (MPEG4, mpeg4);
 REGISTER_DECODER(MSA1,  msa1);
 REGISTER_DECODER(MSMPEG4V1, msmpeg4v1);
diff --git a/libavcodec/qsvdec_mpeg2.c b/libavcodec/qsvdec_mpeg2.c
new file mode 100644
index 000..dbe882b
--- /dev/null
+++ b/libavcodec/qsvdec_mpeg2.c
@@ -0,0 +1,179 @@
+/*
+ * Intel MediaSDK QSV based MPEG2 decoder
+ *
+ * copyright (c) 2015 Anton Khirnov
+ *
+ * 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 
+#include 
+
+#include 
+
+#include "libavutil/common.h"
+#include "libavutil/fifo.h"
+#include "libavutil/opt.h"
+
+#include "avcodec.h"
+#include "internal.h"
+#include "qsv_internal.h"
+#include "qsvdec.h"
+#include "qsv.h"
+
+typedef struct QSVMPEG2Context {
+AVClass *class;
+QSVContext qsv;
+
+AVFifoBuffer *packet_fifo;
+
+AVPacket input_ref;
+} QSVMPEG2Context;
+
+static void qsv_clear_buffers(QSVMPEG2Context *s)
+{
+AVPacket pkt;
+while (av_fifo_size(s->packet_fifo) >= sizeof(pkt)) {
+av_fifo_generic_read(s->packet_fifo, &pkt, sizeof(pkt), NULL);
+av_packet_unref(&pkt);
+}
+
+av_packet_unref(&s->input_ref);
+}
+
+static av_cold int qsv_decode_close(AVCodecContext *avctx)
+{
+QSVMPEG2Context *s = avctx->priv_data;
+
+ff_qsv_decode_close(&s->qsv);
+
+qsv_cle

[FFmpeg-cvslog] Merge commit 'bf52f773913cf74bdf0d2c8c2cb4473fa1b7801e'

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jul 26 00:51:04 2015 +0200| [bb619f41bea81e6ee9e208476a92fced4107a853] | 
committer: Michael Niedermayer

Merge commit 'bf52f773913cf74bdf0d2c8c2cb4473fa1b7801e'

* commit 'bf52f773913cf74bdf0d2c8c2cb4473fa1b7801e':
  lavc: add Intel libmfx-based MPEG2 decoder.

Conflicts:
configure
libavcodec/qsvdec_mpeg2.c

Some cosmetics merged, rest is related to the removed parser code and
thus not merged

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb619f41bea81e6ee9e208476a92fced4107a853
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Merge commit '41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986'

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jul 26 01:20:46 2015 +0200| [508b79e6c1dc40d9d96d027ed38dab3a9b9a7287] | 
committer: Michael Niedermayer

Merge commit '41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986'

* commit '41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986':
  lavc: add Intel libmfx-based HEVC decoder.

Conflicts:
Changelog
configure
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/qsvdec.c
libavcodec/qsvdec_h2645.c
libavcodec/version.h

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=508b79e6c1dc40d9d96d027ed38dab3a9b9a7287
---



___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] lavc: add Intel libmfx-based HEVC decoder.

2015-07-25 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Tue Jun 16 
18:22:11 2015 +0200| [41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986] | committer: 
Anton Khirnov

lavc: add Intel libmfx-based HEVC decoder.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986
---

 Changelog|1 +
 configure|3 +
 libavcodec/Makefile  |3 +-
 libavcodec/allcodecs.c   |2 +
 libavcodec/qsvdec.c  |3 +-
 libavcodec/qsvdec.h  |2 +
 libavcodec/{qsvdec_h264.c => qsvdec_h2645.c} |   93 ++
 libavcodec/version.h |4 +-
 8 files changed, 95 insertions(+), 16 deletions(-)

diff --git a/Changelog b/Changelog
index 99e23d6..26efbf3 100644
--- a/Changelog
+++ b/Changelog
@@ -40,6 +40,7 @@ version :
 - Go2Meeting decoding support
 - Intel QSV-accelerated MPEG-2 video and HEVC encoding
 - bitstream filter for converting HEVC from MP4 to Annex B
+- Intel QSV-accelerated MPEG-2 video and HEVC decoding
 
 
 version 11:
diff --git a/configure b/configure
index 575fdf7..973edb4 100755
--- a/configure
+++ b/configure
@@ -1881,6 +1881,8 @@ hap_encoder_select="texturedspenc"
 hevc_decoder_select="bswapdsp cabac golomb videodsp"
 hevc_nvenc_encoder_deps="nvenc"
 hevc_qsv_encoder_deps="libmfx"
+hevc_qsv_decoder_deps="libmfx"
+hevc_qsv_decoder_select="hevc_mp4toannexb_bsf hevc_parser qsvdec 
hevc_qsv_hwaccel"
 hevc_qsv_encoder_select="qsvenc"
 huffyuv_decoder_select="bswapdsp huffyuvdsp"
 huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp"
@@ -2045,6 +2047,7 @@ hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
 hevc_d3d11va_hwaccel_select="hevc_decoder"
 hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
 hevc_dxva2_hwaccel_select="hevc_decoder"
+hevc_qsv_hwaccel_deps="libmfx"
 mpeg1_vdpau_hwaccel_deps="vdpau"
 mpeg1_vdpau_hwaccel_select="mpeg1video_decoder"
 mpeg2_d3d11va_hwaccel_deps="d3d11va"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6493d76..40f653b 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -241,7 +241,7 @@ OBJS-$(CONFIG_H264_DECODER)+= h264.o 
h264_cabac.o h264_cavlc.o \
   h264_refs.o h264_sei.o h264_slice.o
 OBJS-$(CONFIG_H264_MMAL_DECODER)   += mmaldec.o
 OBJS-$(CONFIG_H264_NVENC_ENCODER)  += nvenc_h264.o
-OBJS-$(CONFIG_H264_QSV_DECODER)+= qsvdec_h264.o
+OBJS-$(CONFIG_H264_QSV_DECODER)+= qsvdec_h2645.o
 OBJS-$(CONFIG_H264_QSV_ENCODER)+= qsvenc_h264.o
 OBJS-$(CONFIG_HAP_DECODER) += hapdec.o
 OBJS-$(CONFIG_HAP_ENCODER) += hapenc.o
@@ -249,6 +249,7 @@ OBJS-$(CONFIG_HEVC_DECODER)+= hevc.o hevc_mvs.o 
hevc_ps.o hevc_sei.o
   hevc_cabac.o hevc_refs.o hevcpred.o  
  \
   hevcdsp.o hevc_filter.o hevc_parse.o 
hevc_data.o
 OBJS-$(CONFIG_HEVC_NVENC_ENCODER)  += nvenc_hevc.o
+OBJS-$(CONFIG_HEVC_QSV_DECODER)+= qsvdec_h2645.o
 OBJS-$(CONFIG_HEVC_QSV_ENCODER)+= qsvenc_hevc.o hevc_ps_enc.o 
hevc_parse.o
 OBJS-$(CONFIG_HNM4_VIDEO_DECODER)  += hnm4video.o
 OBJS-$(CONFIG_HQ_HQA_DECODER)  += hq_hqa.o hq_hqadata.o hq_hqadsp.o \
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index fdd8b56..69790d6 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -86,6 +86,7 @@ void avcodec_register_all(void)
 REGISTER_HWACCEL(H264_VDPAU,h264_vdpau);
 REGISTER_HWACCEL(HEVC_D3D11VA,  hevc_d3d11va);
 REGISTER_HWACCEL(HEVC_DXVA2,hevc_dxva2);
+REGISTER_HWACCEL(HEVC_QSV,  hevc_qsv);
 REGISTER_HWACCEL(MPEG1_VDPAU,   mpeg1_vdpau);
 REGISTER_HWACCEL(MPEG2_D3D11VA, mpeg2_d3d11va);
 REGISTER_HWACCEL(MPEG2_DXVA2,   mpeg2_dxva2);
@@ -173,6 +174,7 @@ void avcodec_register_all(void)
 REGISTER_DECODER(H264_QSV,  h264_qsv);
 REGISTER_ENCDEC (HAP,   hap);
 REGISTER_DECODER(HEVC,  hevc);
+REGISTER_DECODER(HEVC_QSV,  hevc_qsv);
 REGISTER_DECODER(HNM4_VIDEO,hnm4_video);
 REGISTER_DECODER(HQ_HQA,hq_hqa);
 REGISTER_DECODER(HQX,   hqx);
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 5263bf5..8c324f4 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -53,7 +53,8 @@ static int qsv_init_session(AVCodecContext *avctx, QSVContext 
*q, mfxSession ses
 {
 if (!session) {
 if (!q->internal_session) {
-int ret = ff_qsv_init_internal_session(avctx, 
&q->internal_session, NULL);
+int ret = ff_qsv_init_internal_session(avctx, &q->internal_session,
+   q->load_plugins);
 if (ret < 0)
 return ret;
 }
diff --git a/libavcodec/qsvdec.h b/lib

[FFmpeg-cvslog] libavcodec/h264_mp4toannexb_bsf.c: Optional argument "private_spspps_buf" to avoid extradata modification.

2015-07-25 Thread Ivan Uskov
ffmpeg | branch: master | Ivan Uskov  | Sat Jul 25 
16:11:30 2015 -0400| [1defff85cb2cc98b4d7053415caed773586a1253] | committer: 
Michael Niedermayer

libavcodec/h264_mp4toannexb_bsf.c: Optional argument "private_spspps_buf" to 
avoid extradata modification.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1defff85cb2cc98b4d7053415caed773586a1253
---

 libavcodec/h264_mp4toannexb_bsf.c |   41 ++---
 1 file changed, 34 insertions(+), 7 deletions(-)

diff --git a/libavcodec/h264_mp4toannexb_bsf.c 
b/libavcodec/h264_mp4toannexb_bsf.c
index ae96ee9..e919360 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -33,6 +33,18 @@ typedef struct H264BSFContext {
 uint8_t  idr_sps_seen;
 uint8_t  idr_pps_seen;
 int  extradata_parsed;
+
+/* When private_spspps is zero then spspps_buf points to global extradata
+   and bsf does replace a global extradata to own-allocated version 
(default
+   behaviour).
+   When private_spspps is non-zero the bsf uses a private version of 
spspps buf.
+   This mode necessary when bsf uses in decoder, else bsf has issues after
+   decoder re-initialization. Use the "private_spspps_buf" argument to
+   activate this mode.
+ */
+int  private_spspps;
+uint8_t *spspps_buf;
+uint32_t spspps_size;
 } H264BSFContext;
 
 static int alloc_and_copy(uint8_t **poutbuf, int *poutbuf_size,
@@ -129,9 +141,13 @@ pps:
"Warning: PPS NALU missing or invalid. "
"The resulting stream may not play.\n");
 
-av_free(avctx->extradata);
-avctx->extradata  = out;
-avctx->extradata_size = total_size;
+if (!ctx->private_spspps) {
+av_free(avctx->extradata);
+avctx->extradata  = out;
+avctx->extradata_size = total_size;
+}
+ctx->spspps_buf  = out;
+ctx->spspps_size = total_size;
 
 return length_size;
 }
@@ -159,6 +175,9 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext 
*bsfc,
 
 /* retrieve sps and pps NAL units from extradata */
 if (!ctx->extradata_parsed) {
+if (args && strstr(args, "private_spspps_buf"))
+ctx->private_spspps = 1;
+
 ret = h264_extradata_to_annexb(ctx, avctx, 
FF_INPUT_BUFFER_PADDING_SIZE);
 if (ret < 0)
 return ret;
@@ -195,8 +214,8 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext 
*bsfc,
 av_log(avctx, AV_LOG_WARNING, "SPS not present in the 
stream, nor in AVCC, stream may be unreadable\n");
 else {
 if ((ret = alloc_and_copy(poutbuf, poutbuf_size,
- avctx->extradata + ctx->sps_offset,
- ctx->pps_offset != -1 ? 
ctx->pps_offset : avctx->extradata_size - ctx->sps_offset,
+ ctx->spspps_buf + ctx->sps_offset,
+ ctx->pps_offset != -1 ? 
ctx->pps_offset : ctx->spspps_size - ctx->sps_offset,
  buf, nal_size)) < 0)
 goto fail;
 ctx->idr_sps_seen = 1;
@@ -214,7 +233,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext 
*bsfc,
 /* prepend only to the first type 5 NAL unit of an IDR picture, if no 
sps/pps are already present */
 if (ctx->new_idr && unit_type == 5 && !ctx->idr_sps_seen && 
!ctx->idr_pps_seen) {
 if ((ret=alloc_and_copy(poutbuf, poutbuf_size,
-   avctx->extradata, avctx->extradata_size,
+   ctx->spspps_buf, ctx->spspps_size,
buf, nal_size)) < 0)
 goto fail;
 ctx->new_idr = 0;
@@ -226,7 +245,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext 
*bsfc,
  NULL, 0, buf, nal_size)) < 0)
 goto fail;
 } else if ((ret = alloc_and_copy(poutbuf, poutbuf_size,
-avctx->extradata + ctx->pps_offset, 
avctx->extradata_size - ctx->pps_offset,
+ctx->spspps_buf + ctx->pps_offset, 
ctx->spspps_size - ctx->pps_offset,
 buf, nal_size)) < 0)
 goto fail;
 } else {
@@ -253,8 +272,16 @@ fail:
 return ret;
 }
 
+static void h264_mp4toannexb_filter_close(AVBitStreamFilterContext *bsfc)
+{
+H264BSFContext *ctx = bsfc->priv_data;
+if (ctx->private_spspps)
+av_free(ctx->spspps_buf);
+}
+
 AVBitStreamFilter ff_h264_mp4toannexb_bsf = {
 .name   = "h264_mp4toannexb",
 .priv_data_size = sizeof(H264BSFContext),
 .filter = h264_mp4toannexb_filter,
+.close  = h264_mp4toannexb_filter_close,
 };

___

[FFmpeg-cvslog] libavcodec/qsvdec_h264.c: using "private_spspps_buf" argument for av_bitstream_filter_filter() to avoid failure after decoder re-initialization.

2015-07-25 Thread Ivan Uskov
ffmpeg | branch: master | Ivan Uskov  | Sat Jul 25 
15:56:08 2015 -0400| [684b7038436fba1a29e51861998dbf24681144d8] | committer: 
Michael Niedermayer

libavcodec/qsvdec_h264.c: using "private_spspps_buf" argument for 
av_bitstream_filter_filter() to avoid failure after decoder re-initialization.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=684b7038436fba1a29e51861998dbf24681144d8
---

 libavcodec/qsvdec_h2645.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index d231b46..20cb438 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -115,7 +115,7 @@ static int qsv_decode_frame(AVCodecContext *avctx, void 
*data,
 
 } else {
 /* no annex-b prefix. try to restore: */
-ret = av_bitstream_filter_filter(s->bsf, avctx, NULL,
+ret = av_bitstream_filter_filter(s->bsf, avctx, 
"private_spspps_buf",
  &p_filtered, &n_filtered,
  avpkt->data, avpkt->size, 0);
 if (ret>=0) {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/ipmovie: Fix late audio detection

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jul 26 04:00:02 2015 +0200| [c3361b3a8786f56428efb296dcc56c0f07d3b123] | 
committer: Michael Niedermayer

avformat/ipmovie: Fix late audio detection

Fixes audio in Ticket117

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3361b3a8786f56428efb296dcc56c0f07d3b123
---

 libavformat/ipmovie.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index bebe866..51aed32 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -631,7 +631,8 @@ static int ipmovie_read_header(AVFormatContext *s)
 
 if (ipmovie->audio_type) {
 return init_audio(s);
-}
+} else
+   s->ctx_flags |= AVFMTCTX_NOHEADER;
 
 return 0;
 }
@@ -656,7 +657,7 @@ static int ipmovie_read_packet(AVFormatContext *s,
 else if (ret == CHUNK_INIT_VIDEO || ret == CHUNK_INIT_AUDIO)
 continue;
 else
-ret = -1;
+continue;
 
 return ret;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/ipmovie: Parse&handle late audio init

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jul 26 03:41:57 2015 +0200| [8e0fdb03a2f17131c13df3fe9814d34c1fc972af] | 
committer: Michael Niedermayer

avformat/ipmovie: Parse&handle late audio init

Fixes Ticket117

Based on problem description by Kostya
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e0fdb03a2f17131c13df3fe9814d34c1fc972af
---

 libavformat/ipmovie.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 367d074..bebe866 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -78,7 +78,7 @@
 #define PALETTE_COUNT 256
 
 typedef struct IPMVEContext {
-
+AVFormatContext *avf;
 unsigned char *buf;
 int buf_size;
 
@@ -541,6 +541,9 @@ static int process_ipmovie_chunk(IPMVEContext *s, 
AVIOContext *pb,
 }
 }
 
+if (s->avf->nb_streams == 1 && s->audio_type)
+init_audio(s->avf);
+
 /* make a note of where the stream is sitting */
 s->next_chunk_offset = avio_tell(pb);
 
@@ -576,6 +579,8 @@ static int ipmovie_read_header(AVFormatContext *s)
 int chunk_type, i;
 uint8_t signature_buffer[sizeof(signature)];
 
+ipmovie->avf = s;
+
 avio_read(pb, signature_buffer, sizeof(signature_buffer));
 while (memcmp(signature_buffer, signature, sizeof(signature))) {
 memmove(signature_buffer, signature_buffer + 1, 
sizeof(signature_buffer) - 1);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/ipmovie: Factor init_audio() out

2015-07-25 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jul 26 03:39:55 2015 +0200| [e011538394519bc430a8b1d81a22eb3e944c3afc] | 
committer: Michael Niedermayer

avformat/ipmovie: Factor init_audio() out

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e011538394519bc430a8b1d81a22eb3e944c3afc
---

 libavformat/ipmovie.c |   44 ++--
 1 file changed, 26 insertions(+), 18 deletions(-)

diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index af518b5..367d074 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -212,6 +212,31 @@ static int load_ipmovie_packet(IPMVEContext *s, 
AVIOContext *pb,
 return chunk_type;
 }
 
+static int init_audio(AVFormatContext *s)
+{
+IPMVEContext *ipmovie = s->priv_data;
+AVStream *st = avformat_new_stream(s, NULL);
+if (!st)
+return AVERROR(ENOMEM);
+avpriv_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
+ipmovie->audio_stream_index = st->index;
+st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+st->codec->codec_id = ipmovie->audio_type;
+st->codec->codec_tag = 0;  /* no tag */
+st->codec->channels = ipmovie->audio_channels;
+st->codec->channel_layout = st->codec->channels == 1 ? AV_CH_LAYOUT_MONO :
+
AV_CH_LAYOUT_STEREO;
+st->codec->sample_rate = ipmovie->audio_sample_rate;
+st->codec->bits_per_coded_sample = ipmovie->audio_bits;
+st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
+st->codec->bits_per_coded_sample;
+if (st->codec->codec_id == AV_CODEC_ID_INTERPLAY_DPCM)
+st->codec->bit_rate /= 2;
+st->codec->block_align = st->codec->channels * 
st->codec->bits_per_coded_sample;
+
+return 0;
+}
+
 /* This function loads and processes a single chunk in an IP movie file.
  * It returns the type of chunk that was processed. */
 static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
@@ -600,24 +625,7 @@ static int ipmovie_read_header(AVFormatContext *s)
 st->codec->bits_per_coded_sample = ipmovie->video_bpp;
 
 if (ipmovie->audio_type) {
-st = avformat_new_stream(s, NULL);
-if (!st)
-return AVERROR(ENOMEM);
-avpriv_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
-ipmovie->audio_stream_index = st->index;
-st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-st->codec->codec_id = ipmovie->audio_type;
-st->codec->codec_tag = 0;  /* no tag */
-st->codec->channels = ipmovie->audio_channels;
-st->codec->channel_layout = st->codec->channels == 1 ? 
AV_CH_LAYOUT_MONO :
-   
AV_CH_LAYOUT_STEREO;
-st->codec->sample_rate = ipmovie->audio_sample_rate;
-st->codec->bits_per_coded_sample = ipmovie->audio_bits;
-st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-st->codec->bits_per_coded_sample;
-if (st->codec->codec_id == AV_CODEC_ID_INTERPLAY_DPCM)
-st->codec->bit_rate /= 2;
-st->codec->block_align = st->codec->channels * 
st->codec->bits_per_coded_sample;
+return init_audio(s);
 }
 
 return 0;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/texturedsp: fix undefined shift

2015-07-25 Thread James Almer
ffmpeg | branch: master | James Almer  | Fri Jul 24 22:12:39 
2015 -0300| [ec7f04c13a6e6e483cc86e576aff7700e42cd59e] | committer: James Almer

avcodec/texturedsp: fix undefined shift

Silences warnings when using -Wshift-overflow (GCC 6+)

Reviewed-by: Michael Niedermayer 
Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec7f04c13a6e6e483cc86e576aff7700e42cd59e
---

 libavcodec/texturedsp.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
index 7a706b4..19aa353 100644
--- a/libavcodec/texturedsp.c
+++ b/libavcodec/texturedsp.c
@@ -425,7 +425,7 @@ static inline void rgtc_block_internal(uint8_t *dst, 
ptrdiff_t stride,
 int i = indices[x + y * 4];
 /* Interval expansion from [-1 1] or [0 1] to [0 255]. */
 int c = color_tab[i];
-uint32_t pixel = RGBA(c, c, c, 255);
+uint32_t pixel = RGBA(c, c, c, 255U);
 AV_WL32(dst + x * 4 + y * stride, pixel);
 }
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/hlsenc: Add WebVtt support in hls

2015-07-25 Thread Anshul Maheshwari
ffmpeg | branch: master | Anshul Maheshwari  | 
Thu Jun  4 13:43:52 2015 +0530| [379ddc6af44f0c2f3cb517bcc5664610aef9bfc0] | 
committer: Michael Niedermayer

avformat/hlsenc: Add WebVtt support in hls

Signed-off-by: Anshul Maheshwari 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=379ddc6af44f0c2f3cb517bcc5664610aef9bfc0
---

 libavformat/hlsenc.c |  202 +++---
 1 file changed, 192 insertions(+), 10 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index cf29f4f..eea7c81 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -42,6 +42,7 @@
 
 typedef struct HLSSegment {
 char filename[1024];
+char sub_filename[1024];
 double duration; /* in seconds */
 int64_t pos;
 int64_t size;
@@ -67,8 +68,10 @@ typedef struct HLSContext {
 int64_t sequence;
 int64_t start_sequence;
 AVOutputFormat *oformat;
+AVOutputFormat *vtt_oformat;
 
 AVFormatContext *avf;
+AVFormatContext *vtt_avf;
 
 float time;// Set by a private option.
 int max_nb_segments;   // Set by a private option.
@@ -79,6 +82,7 @@ typedef struct HLSContext {
 int allowcache;
 int64_t recording_time;
 int has_video;
+int has_subtitle;
 int64_t start_pts;
 int64_t end_pts;
 double duration;  // last segment duration computed so far, in seconds
@@ -92,8 +96,12 @@ typedef struct HLSContext {
 HLSSegment *old_segments;
 
 char *basename;
+char *vtt_basename;
+char *vtt_m3u8_name;
 char *baseurl;
 char *format_options_str;
+char *vtt_format_options_str;
+char *subtitle_filename;
 AVDictionary *format_options;
 
 char *key_info_file;
@@ -101,14 +109,16 @@ typedef struct HLSContext {
 char key_uri[LINE_BUFFER_SIZE + 1];
 char key_string[KEYSIZE*2 + 1];
 char iv_string[KEYSIZE*2 + 1];
+AVDictionary *vtt_format_options;
+
 } HLSContext;
 
 static int hls_delete_old_segments(HLSContext *hls) {
 
 HLSSegment *segment, *previous_segment = NULL;
 float playlist_duration = 0.0f;
-int ret = 0, path_size;
-char *dirname = NULL, *p, *path;
+int ret = 0, path_size, sub_path_size;
+char *dirname = NULL, *p, *path, *sub_path;
 
 segment = hls->segments;
 while (segment) {
@@ -150,13 +160,28 @@ static int hls_delete_old_segments(HLSContext *hls) {
 ret = AVERROR(ENOMEM);
 goto fail;
 }
+sub_path_size = strlen(dirname) + strlen(segment->sub_filename) + 1;
+sub_path = av_malloc(sub_path_size);
+if (!sub_path) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+
 av_strlcpy(path, dirname, path_size);
 av_strlcat(path, segment->filename, path_size);
 if (unlink(path) < 0) {
 av_log(hls, AV_LOG_ERROR, "failed to delete old segment %s: %s\n",
  path, strerror(errno));
 }
+
+av_strlcpy(sub_path, dirname, sub_path_size);
+av_strlcat(sub_path, segment->sub_filename, sub_path_size);
+if (unlink(sub_path) < 0) {
+av_log(hls, AV_LOG_ERROR, "failed to delete old segment %s: %s\n",
+ sub_path, strerror(errno));
+}
 av_free(path);
+av_free(sub_path);
 previous_segment = segment;
 segment = previous_segment->next;
 av_free(previous_segment);
@@ -226,6 +251,7 @@ static int hls_mux_init(AVFormatContext *s)
 {
 HLSContext *hls = s->priv_data;
 AVFormatContext *oc;
+AVFormatContext *vtt_oc;
 int i, ret;
 
 ret = avformat_alloc_output_context2(&hls->avf, hls->oformat, NULL, NULL);
@@ -238,9 +264,24 @@ static int hls_mux_init(AVFormatContext *s)
 oc->max_delay  = s->max_delay;
 av_dict_copy(&oc->metadata, s->metadata, 0);
 
+if(hls->vtt_oformat) {
+ret = avformat_alloc_output_context2(&hls->vtt_avf, hls->vtt_oformat, 
NULL, NULL);
+if (ret < 0)
+return ret;
+vtt_oc  = hls->vtt_avf;
+vtt_oc->oformat = hls->vtt_oformat;
+av_dict_copy(&vtt_oc->metadata, s->metadata, 0);
+}
+
 for (i = 0; i < s->nb_streams; i++) {
 AVStream *st;
-if (!(st = avformat_new_stream(oc, NULL)))
+AVFormatContext *loc;
+if (s->streams[i]->codec->codec_type == AVMEDIA_TYPE_SUBTITLE)
+loc = vtt_oc;
+else
+loc = oc;
+
+if (!(st = avformat_new_stream(loc, NULL)))
 return AVERROR(ENOMEM);
 avcodec_copy_context(st->codec, s->streams[i]->codec);
 st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
@@ -263,6 +304,9 @@ static int hls_append_segment(HLSContext *hls, double 
duration, int64_t pos,
 
 av_strlcpy(en->filename, av_basename(hls->avf->filename), 
sizeof(en->filename));
 
+if(hls->has_subtitle)
+av_strlcpy(en->sub_file

[FFmpeg-cvslog] avcodec/x86: add missing colon to labels

2015-07-25 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Jul 26 02:28:16 
2015 -0300| [844bef578ee0994a94bdd6ffe40996a9f136] | committer: James Almer

avcodec/x86: add missing colon to labels

Silences warnings with Nasm

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=844bef578ee0994a94bdd6ffe40996a9f136
---

 libavcodec/x86/blockdsp.asm|2 +-
 libavcodec/x86/dcadsp.asm  |2 +-
 libavcodec/x86/diracdsp_yasm.asm   |2 +-
 libavcodec/x86/h264_qpel_10bit.asm |2 +-
 libavcodec/x86/h264_weight.asm |4 ++--
 libavcodec/x86/hevc_mc.asm |   46 ++--
 libavcodec/x86/hevc_sao.asm|6 ++---
 libavcodec/x86/huffyuvdsp.asm  |2 +-
 libavcodec/x86/jpeg2000dsp.asm |2 +-
 libavcodec/x86/me_cmp.asm  |4 ++--
 libavcodec/x86/svq1enc.asm |2 +-
 libavcodec/x86/v210.asm|2 +-
 libavcodec/x86/v210enc.asm |4 ++--
 libavcodec/x86/vp3dsp.asm  |2 +-
 14 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/libavcodec/x86/blockdsp.asm b/libavcodec/x86/blockdsp.asm
index c793858..af2b0de 100644
--- a/libavcodec/x86/blockdsp.asm
+++ b/libavcodec/x86/blockdsp.asm
@@ -64,7 +64,7 @@ cglobal clear_blocks, 1, 2, %1, blocks, len
 add   blocksq, 768
 mov  lenq, -768
 ZERO   m0, m0
-.loop
+.loop:
 mova  [blocksq+lenq+mmsize*0], m0
 mova  [blocksq+lenq+mmsize*1], m0
 mova  [blocksq+lenq+mmsize*2], m0
diff --git a/libavcodec/x86/dcadsp.asm b/libavcodec/x86/dcadsp.asm
index 1ac2378..030b4d4 100644
--- a/libavcodec/x86/dcadsp.asm
+++ b/libavcodec/x86/dcadsp.asm
@@ -333,7 +333,7 @@ cglobal synth_filter_inner, 0, 6 + 4 * ARCH_X86_64, 7 + 6 * 
ARCH_X86_64, \
 %if ARCH_X86_32
 mov buf2, synth_buf2mp
 %endif
-.mainloop
+.mainloop:
 ; m1 = a  m2 = b  m3 = c  m4 = d
 SETZERO   m3
 SETZERO   m4
diff --git a/libavcodec/x86/diracdsp_yasm.asm b/libavcodec/x86/diracdsp_yasm.asm
index d3cf9f1..40fe2c8 100644
--- a/libavcodec/x86/diracdsp_yasm.asm
+++ b/libavcodec/x86/diracdsp_yasm.asm
@@ -149,7 +149,7 @@ cglobal put_signed_rect_clamped_%1, 5,9,3, dst, dst_stride, 
src, src_stride, w,
 %define hd r5mp
 %endif
 
-.loopy
+.loopy:
 lea src2q, [srcq+src_strideq*2]
 lea dst2q, [dstq+dst_strideq]
 .loopx:
diff --git a/libavcodec/x86/h264_qpel_10bit.asm 
b/libavcodec/x86/h264_qpel_10bit.asm
index 757c425..7e9be36 100644
--- a/libavcodec/x86/h264_qpel_10bit.asm
+++ b/libavcodec/x86/h264_qpel_10bit.asm
@@ -386,7 +386,7 @@ MC_CACHE MC10
 ; void ff_h264_qpel_mc02(uint8_t *dst, uint8_t *src, int stride)
 ;-
 %macro V_FILT 10
-v_filt%9_%10_10
+v_filt%9_%10_10:
 addr4, r2
 .no_addr4:
 FILT_V m0, m1, m2, m3, m4, m5, m6, m7
diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.asm
index 897c616..6c57d57 100644
--- a/libavcodec/x86/h264_weight.asm
+++ b/libavcodec/x86/h264_weight.asm
@@ -139,12 +139,12 @@ WEIGHT_FUNC_HALF_MM 8, 8
 je .nonnormal
 cmpr5, 128
 jne .normal
-.nonnormal
+.nonnormal:
 sarr5, 1
 sarr6, 1
 sar  off_regd, 1
 subr4, 1
-.normal
+.normal:
 %if cpuflag(ssse3)
 movd   m4, r5d
 movd   m0, r6d
diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm
index 986493f..98a8038 100644
--- a/libavcodec/x86/hevc_mc.asm
+++ b/libavcodec/x86/hevc_mc.asm
@@ -683,7 +683,7 @@ HEVC_BI_PEL_PIXELS  %1, %2
 %macro HEVC_PEL_PIXELS 2
 cglobal hevc_put_hevc_pel_pixels%1_%2, 4, 4, 3, dst, src, srcstride,height
 pxor   m2, m2
-.loop
+.loop:
 SIMPLE_LOAD   %1, %2, srcq, m0
 MC_PIXEL_COMPUTE  %1, %2, 1
 PEL_10STORE%1 dstq, m0, m1
@@ -693,7 +693,7 @@ cglobal hevc_put_hevc_pel_pixels%1_%2, 4, 4, 3, dst, src, 
srcstride,height
 
 %macro HEVC_UNI_PEL_PIXELS 2
 cglobal hevc_put_hevc_uni_pel_pixels%1_%2, 5, 5, 2, dst, dststride, src, 
srcstride,height
-.loop
+.loop:
 SIMPLE_LOAD   %1, %2, srcq, m0
 PEL_%2STORE%1   dstq, m0, m1
 add dstq, dststrideq ; dst += dststride
@@ -707,7 +707,7 @@ cglobal hevc_put_hevc_uni_pel_pixels%1_%2, 5, 5, 2, dst, 
dststride, src, srcstri
 cglobal hevc_put_hevc_bi_pel_pixels%1_%2, 6, 6, 6, dst, dststride, src, 
srcstride, src2, height
 pxor  m2, m2
 movdqam5, [pw_bi_%2]
-.loop
+.loop:
 SIMPLE_LOAD   %1, %2, srcq, m0
 SIMPLE_BILOAD %1, src2q, m3, m4
 MC_PIXEL_COMPUTE  %1, %2, 1
@@ -739,7 +739,7 @@ cglobal hevc_put_hevc_bi_pel_pixels%1_%2, 6, 6, 6, dst, 
dststride, src, srcstrid
 cglobal hevc_put_hevc_epel_h%1_%2, 5, 6, XMM_REGS, dst, src, srcstride, 
height, mx, rfilter
 %assign %%stride ((%2 + 7)/8)
 EPEL_FILTER   %2, mx, m4, m5, rfilter
-.loop
+.loop:
 EPEL_LOAD %2, srcq-%%stride, %%stride, %1
 EPEL_COMPUTE  %2, %1, m4, m5, 1
  

[FFmpeg-cvslog] x86/vf_interlace: add missing colon to labels

2015-07-25 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Jul 26 02:28:36 
2015 -0300| [d9e10af54784f5f8eaa2b4f9f7409ce215916ee4] | committer: James Almer

x86/vf_interlace: add missing colon to labels

Silences warnings with Nasm

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9e10af54784f5f8eaa2b4f9f7409ce215916ee4
---

 libavfilter/x86/vf_interlace.asm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/x86/vf_interlace.asm b/libavfilter/x86/vf_interlace.asm
index ce3dd81..f70c700 100644
--- a/libavfilter/x86/vf_interlace.asm
+++ b/libavfilter/x86/vf_interlace.asm
@@ -37,7 +37,7 @@ cglobal lowpass_line, 5, 5, 7
 
 pcmpeqb m6, m6
 
-.loop
+.loop:
 mova m0, [r3+r1]
 mova m1, [r3+r1+mmsize]
 pavgb m0, [r4+r1]

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] x86/float_dsp: add missing colon to labels

2015-07-25 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Jul 26 02:28:51 
2015 -0300| [4d2c014a8f0a802e2d59293cdef81d899dfdb484] | committer: James Almer

x86/float_dsp: add missing colon to labels

Silences warnings with Nasm

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d2c014a8f0a802e2d59293cdef81d899dfdb484
---

 libavutil/x86/float_dsp.asm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm
index ec3d22b..87229d4 100644
--- a/libavutil/x86/float_dsp.asm
+++ b/libavutil/x86/float_dsp.asm
@@ -203,7 +203,7 @@ cglobal vector_fmul_window, 5, 6, 6, dst, src0, src1, win, 
len, len1
 add dstq, lenq
 add winq, lenq
 neg lenq
-.loop
+.loop:
 mova  m0, [winq  + lenq]
 mova  m4, [src0q + lenq]
 %if cpuflag(sse)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] swresample/x86: add missing colon to labels

2015-07-25 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Jul 26 02:29:14 
2015 -0300| [f37a5dcb55d1cd9aebe84adccc4701c29a80d769] | committer: James Almer

swresample/x86: add missing colon to labels

Silences warnings with Nasm

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f37a5dcb55d1cd9aebe84adccc4701c29a80d769
---

 libswresample/x86/audio_convert.asm |   12 ++--
 libswresample/x86/rematrix.asm  |8 
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libswresample/x86/audio_convert.asm 
b/libswresample/x86/audio_convert.asm
index 69e4f05..e9a9acf 100644
--- a/libswresample/x86/audio_convert.asm
+++ b/libswresample/x86/audio_convert.asm
@@ -44,7 +44,7 @@ cglobal pack_2ch_%2_to_%1_%3, 3, 4, 6, dst, src, len, src2
 test src2q, mmsize-1
 jne pack_2ch_%2_to_%1_u_int %+ SUFFIX
 %else
-pack_2ch_%2_to_%1_u_int %+ SUFFIX
+pack_2ch_%2_to_%1_u_int %+ SUFFIX:
 %endif
 lea srcq , [srcq  + (1<<%5)*lenq]
 lea src2q, [src2q + (1<<%5)*lenq]
@@ -101,7 +101,7 @@ cglobal unpack_2ch_%2_to_%1_%3, 3, 4, 7, dst, src, len, dst2
 test dst2q, mmsize-1
 jne unpack_2ch_%2_to_%1_u_int %+ SUFFIX
 %else
-unpack_2ch_%2_to_%1_u_int %+ SUFFIX
+unpack_2ch_%2_to_%1_u_int %+ SUFFIX:
 %endif
 lea srcq , [srcq  + (2<<%5)*lenq]
 lea dstq , [dstq  + (1<<%4)*lenq]
@@ -170,7 +170,7 @@ cglobal %2_to_%1_%3, 3, 3, 6, dst, src, len
 test srcq, mmsize-1
 jne %2_to_%1_u_int %+ SUFFIX
 %else
-%2_to_%1_u_int %+ SUFFIX
+%2_to_%1_u_int %+ SUFFIX:
 %endif
 lea srcq , [srcq  + (1<<%5)*lenq]
 lea dstq , [dstq  + (1<<%4)*lenq]
@@ -232,7 +232,7 @@ cglobal pack_6ch_%2_to_%1_%3, 2,8,7, dst, src, src1, src2, 
src3, src4, src5, len
 test src5q, mmsize-1
 jne pack_6ch_%2_to_%1_u_int %+ SUFFIX
 %else
-pack_6ch_%2_to_%1_u_int %+ SUFFIX
+pack_6ch_%2_to_%1_u_int %+ SUFFIX:
 %endif
 subsrc1q, srcq
 subsrc2q, srcq
@@ -335,7 +335,7 @@ cglobal unpack_6ch_%2_to_%1_%3, 2, 8, 8, dst, src, dst1, 
dst2, dst3, dst4, dst5,
 test dst5q, mmsize-1
 jne unpack_6ch_%2_to_%1_u_int %+ SUFFIX
 %else
-unpack_6ch_%2_to_%1_u_int %+ SUFFIX
+unpack_6ch_%2_to_%1_u_int %+ SUFFIX:
 %endif
 subdst1q, dstq
 subdst2q, dstq
@@ -443,7 +443,7 @@ cglobal pack_8ch_%2_to_%1_%3, 2,PACK_8CH_GPRS,10, 
ARCH_X86_32*48, dst, src, len,
 %endif
 jne pack_8ch_%2_to_%1_u_int %+ SUFFIX
 %else
-pack_8ch_%2_to_%1_u_int %+ SUFFIX
+pack_8ch_%2_to_%1_u_int %+ SUFFIX:
 %endif
 subsrc1q, srcq
 subsrc2q, srcq
diff --git a/libswresample/x86/rematrix.asm b/libswresample/x86/rematrix.asm
index f0ae959..7984b9a 100644
--- a/libswresample/x86/rematrix.asm
+++ b/libswresample/x86/rematrix.asm
@@ -37,7 +37,7 @@ cglobal mix_2_1_%1_float, 7, 7, 6, out, in1, in2, coeffp, 
index1, index2, len
 test outq, mmsize-1
 jne mix_2_1_float_u_int %+ SUFFIX
 %else
-mix_2_1_float_u_int %+ SUFFIX
+mix_2_1_float_u_int %+ SUFFIX:
 %endif
 VBROADCASTSS m4, [coeffpq + 4*index1q]
 VBROADCASTSS m5, [coeffpq + 4*index2q]
@@ -79,7 +79,7 @@ cglobal mix_1_1_%1_float, 5, 5, 3, out, in, coeffp, index, len
 test outq, mmsize-1
 jne mix_1_1_float_u_int %+ SUFFIX
 %else
-mix_1_1_float_u_int %+ SUFFIX
+mix_1_1_float_u_int %+ SUFFIX:
 %endif
 VBROADCASTSS m2, [coeffpq + 4*indexq]
 shl lenq, 2
@@ -111,7 +111,7 @@ cglobal mix_1_1_%1_int16, 5, 5, 6, out, in, coeffp, index, 
len
 test outq, mmsize-1
 jne mix_1_1_int16_u_int %+ SUFFIX
 %else
-mix_1_1_int16_u_int %+ SUFFIX
+mix_1_1_int16_u_int %+ SUFFIX:
 %endif
 movd   m4, [coeffpq + 4*indexq]
 SPLATW m5, m4
@@ -166,7 +166,7 @@ cglobal mix_2_1_%1_int16, 7, 7, 8, out, in1, in2, coeffp, 
index1, index2, len
 test outq, mmsize-1
 jne mix_2_1_int16_u_int %+ SUFFIX
 %else
-mix_2_1_int16_u_int %+ SUFFIX
+mix_2_1_int16_u_int %+ SUFFIX:
 %endif
 movd   m4, [coeffpq + 4*index1q]
 movd   m6, [coeffpq + 4*index2q]

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog