[FFmpeg-cvslog] lavfi/tests/filtfmts: Constify a variable.

2017-10-24 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Oct 24 
22:32:59 2017 +0200| [3c14547eb75c5b18099060085d12f09518ee2732] | committer: 
Carl Eugen Hoyos

lavfi/tests/filtfmts: Constify a variable.

Fixes the following warning:
libavfilter/tests/filtfmts.c: In function ‘main’:
libavfilter/tests/filtfmts.c:103:18: warning: assignment discards ‘const’ 
qualifier from pointer target type

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

 libavfilter/tests/filtfmts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/tests/filtfmts.c b/libavfilter/tests/filtfmts.c
index 199d74d7a9..72b860ae5b 100644
--- a/libavfilter/tests/filtfmts.c
+++ b/libavfilter/tests/filtfmts.c
@@ -73,7 +73,7 @@ static void print_formats(AVFilterContext *filter_ctx)
 
 int main(int argc, char **argv)
 {
-AVFilter *filter;
+const AVFilter *filter;
 AVFilterContext *filter_ctx;
 AVFilterGraph *graph_ctx;
 const char *filter_name;

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


[FFmpeg-cvslog] lavc/dvbsub: Do not fail hard in the region block for 256-colour encoding.

2017-10-24 Thread JULIAN GARDNER
ffmpeg | branch: master | JULIAN GARDNER  | Tue Oct 24 
22:46:00 2017 +0200| [df95f145be1556da7e147d642e4fd8bf96276321] | committer: 
Carl Eugen Hoyos

lavc/dvbsub: Do not fail hard in the region block for 256-colour encoding.

Adds a hunk forgotten in 8a6799d2

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

 libavcodec/dvbsub.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index 3cdbade99c..04c0c60626 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -342,6 +342,9 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
 } else if (h->rects[region_id]->nb_colors <= 16) {
 /* 4 bpp, standard encoding */
 bpp_index = 1;
+} else if (h->rects[region_id]->nb_colors <= 256) {
+/* 8 bpp, standard encoding */
+bpp_index = 2;
 } else {
 return -1;
 }

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


[FFmpeg-cvslog] lavc/dvbsub: Add the missing line separator to dvb_encode_rle8().

2017-10-24 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Oct 24 
22:49:04 2017 +0200| [6e1654768585692e327343059b35695b6123444a] | committer: 
Carl Eugen Hoyos

lavc/dvbsub: Add the missing line separator to dvb_encode_rle8().

Fixes 256-colour dvb subtitle encoding.

Fixes ticket #6769.

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

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

diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index 04c0c60626..8cce702a9e 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -239,9 +239,9 @@ static void dvb_encode_rle8(uint8_t **pq,
 x += len;
 }
 /* end of line */
-//   end of 8-bit/pixel_code_string
-*q++ = 0x00;
+//  end of 8-bit/pixel_code_string
 *q++ = 0x00;
+*q++ = 0xf0;
 bitmap += linesize;
 }
 *pq = q;

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


[FFmpeg-cvslog] cbs_mpeg2: Fix type for marker_bit reading

2017-10-24 Thread Mark Thompson
ffmpeg | branch: master | Mark Thompson  | Tue Oct 24 22:56:48 
2017 +0100| [5b2c71bb94d7cab23ee81b5c29388f5fadbcaf22] | committer: Mark 
Thompson

cbs_mpeg2: Fix type for marker_bit reading

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

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

diff --git a/libavcodec/cbs_mpeg2.c b/libavcodec/cbs_mpeg2.c
index d137762227..0cac29733e 100644
--- a/libavcodec/cbs_mpeg2.c
+++ b/libavcodec/cbs_mpeg2.c
@@ -54,7 +54,7 @@
 xui(width, name, current->name)
 
 #define marker_bit() do { \
-av_unused int one = 1; \
+av_unused uint32_t one; \
 CHECK(ff_cbs_read_unsigned(ctx, rw, 1, "marker_bit", &one, 1, 1)); \
 } while (0)
 

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


[FFmpeg-cvslog] cbs_mpeg2: Fix format specifier

2017-10-24 Thread Mark Thompson
ffmpeg | branch: master | Mark Thompson  | Tue Oct 24 22:57:44 
2017 +0100| [79d666aa57517eda4ad71a83af0c63c722efef70] | committer: Mark 
Thompson

cbs_mpeg2: Fix format specifier

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

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

diff --git a/libavcodec/cbs_mpeg2.c b/libavcodec/cbs_mpeg2.c
index 0cac29733e..8fb5375e3b 100644
--- a/libavcodec/cbs_mpeg2.c
+++ b/libavcodec/cbs_mpeg2.c
@@ -220,7 +220,7 @@ static int cbs_mpeg2_read_unit(CodedBitstreamContext *ctx,
 START(0xb8, MPEG2RawGroupOfPicturesHeader, 
group_of_pictures_header);
 #undef START
 default:
-av_log(ctx->log_ctx, AV_LOG_ERROR, "Unknown start code %02x.\n",
+av_log(ctx->log_ctx, AV_LOG_ERROR, "Unknown start code 
%"PRIx32".\n",
unit->type);
 return AVERROR_INVALIDDATA;
 }

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


[FFmpeg-cvslog] lavc/vaapi_encode_h264: correct VUI max_dec_frame_buffering setting

2017-10-24 Thread Jun Zhao
ffmpeg | branch: master | Jun Zhao  | Tue Oct 24 13:25:21 
2017 +0800| [f31478ba1472afe5c1eed60f219ae331816425a2] | committer: Mark 
Thompson

lavc/vaapi_encode_h264: correct VUI max_dec_frame_buffering setting

This should refer to the existing SPS structure, not the VAAPI sequence
parameter buffer (which is not yet initialised).

Signed-off-by: Jun Zhao 
Signed-off-by: Wang, Yi A 
Signed-off-by: Mark Thompson 

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

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

diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 9a4bd53da1..1d43e934ef 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -441,7 +441,7 @@ static int 
vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
 sps->vui.log2_max_mv_length_horizontal = 16;
 sps->vui.log2_max_mv_length_vertical   = 16;
 sps->vui.max_num_reorder_frames= (ctx->b_per_p > 0);
-sps->vui.max_dec_frame_buffering   = vseq->max_num_ref_frames;
+sps->vui.max_dec_frame_buffering   = sps->max_num_ref_frames;
 
 pps->nal_unit_header.nal_ref_idc = 3;
 pps->nal_unit_header.nal_unit_type = H264_NAL_PPS;

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


[FFmpeg-cvslog] cbs_h264: Fix format specifier

2017-10-24 Thread Mark Thompson
ffmpeg | branch: master | Mark Thompson  | Tue Oct 24 22:58:47 
2017 +0100| [59b00ffea3c90b41f6e83f8184068657fed112dc] | committer: Mark 
Thompson

cbs_h264: Fix format specifier

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

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

diff --git a/libavcodec/cbs_h264_syntax_template.c 
b/libavcodec/cbs_h264_syntax_template.c
index 8303acbdc4..2d60273506 100644
--- a/libavcodec/cbs_h264_syntax_template.c
+++ b/libavcodec/cbs_h264_syntax_template.c
@@ -761,7 +761,7 @@ static int FUNC(sei_payload)(CodedBitstreamContext *ctx, 
RWContext *rw,
 end_position = get_bits_count(rw);
 if (end_position < start_position + 8 * current->payload_size) {
 av_log(ctx->log_ctx, AV_LOG_ERROR, "Incorrect SEI payload length: "
-   "header %d bits, actually %d bits.\n",
+   "header %"PRIu32" bits, actually %d bits.\n",
8 * current->payload_size,
end_position - start_position);
 return AVERROR_INVALIDDATA;

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


[FFmpeg-cvslog] Merge commit '0b9a237b2386ff84a6f99716bd58fa27a1b767e7'

2017-10-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Oct 24 19:10:22 
2017 -0300| [c0683dce89eceaab8783b8b47dd2346afc0a9276] | committer: James Almer

Merge commit '0b9a237b2386ff84a6f99716bd58fa27a1b767e7'

* commit '0b9a237b2386ff84a6f99716bd58fa27a1b767e7':
  hevc: Add NEON 4x4 and 8x8 IDCT

[15:12:59] <@ubitux> hevc_idct_4x4_8_c: 389.1
[15:13:00] <@ubitux> hevc_idct_4x4_8_neon: 126.6
[15:13:02] <@ubitux> our ^
[15:13:06] <@ubitux> hevc_idct_4x4_8_c: 389.3
[15:13:08] <@ubitux> hevc_idct_4x4_8_neon: 107.8
[15:13:10] <@ubitux> hevc_idct_4x4_10_c: 418.6
[15:13:12] <@ubitux> hevc_idct_4x4_10_neon: 108.1
[15:13:14] <@ubitux> libav ^
[15:13:30] <@ubitux> so yeah, we can probably trash our versions here

Merged-by: James Almer 

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

 libavcodec/arm/hevcdsp_arm.h   |   2 +-
 libavcodec/arm/hevcdsp_idct_neon.S | 430 +
 libavcodec/arm/hevcdsp_init_arm.c  |   6 +-
 libavcodec/arm/hevcdsp_init_neon.c |  17 +-
 libavcodec/hevcdsp.c   |   4 +-
 libavcodec/hevcdsp.h   |   3 +-
 6 files changed, 221 insertions(+), 241 deletions(-)

diff --git a/libavcodec/arm/hevcdsp_arm.h b/libavcodec/arm/hevcdsp_arm.h
index 7735df9cd2..47cdfa574d 100644
--- a/libavcodec/arm/hevcdsp_arm.h
+++ b/libavcodec/arm/hevcdsp_arm.h
@@ -21,6 +21,6 @@
 
 #include "libavcodec/hevcdsp.h"
 
-void ff_hevcdsp_init_neon(HEVCDSPContext *c, const int bit_depth);
+void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth);
 
 #endif /* AVCODEC_ARM_HEVCDSP_ARM_H */
diff --git a/libavcodec/arm/hevcdsp_idct_neon.S 
b/libavcodec/arm/hevcdsp_idct_neon.S
index e39d00634b..627b9b4750 100644
--- a/libavcodec/arm/hevcdsp_idct_neon.S
+++ b/libavcodec/arm/hevcdsp_idct_neon.S
@@ -1,5 +1,7 @@
 /*
+ * ARM NEON optimised IDCT functions for HEVC decoding
  * Copyright (c) 2014 Seppo Tomperi 
+ * Copyright (c) 2017 Alexandra Hájková
  *
  * This file is part of FFmpeg.
  *
@@ -19,7 +21,13 @@
  */
 
 #include "libavutil/arm/asm.S"
-#include "neon.S"
+
+const trans, align=4
+.short 64, 83, 64, 36
+.short 89, 75, 50, 18
+.short 90, 87, 80, 70
+.short 57, 43, 25, 9
+endconst
 
 function ff_hevc_idct_4x4_dc_neon_8, export=1
 ldrsh   r1, [r0]
@@ -168,30 +176,6 @@ function ff_hevc_add_residual_32x32_neon_8, export=1
 bx  lr
 endfunc
 
-.macro  transpose_16b_8x8   r0, r1, r2, r3, r4, r5, r6, r7
-vtrn.64 \r0, \r4
-vtrn.64 \r1, \r5
-vtrn.64 \r2, \r6
-vtrn.64 \r3, \r7
-vtrn.32 \r0, \r2
-vtrn.32 \r1, \r3
-vtrn.32 \r4, \r6
-vtrn.32 \r5, \r7
-vtrn.16 \r0, \r1
-vtrn.16 \r2, \r3
-vtrn.16 \r4, \r5
-vtrn.16 \r6, \r7
-.endm
-
-// in 4 q regs
-// output 8 d regs
-.macro transpose_16b_4x4r0, r1, r2, r3
-vtrn.32 \r0, \r2
-vtrn.32 \r1, \r3
-vtrn.16 \r0, \r1
-vtrn.16 \r2, \r3
-.endm
-
 /* uses registers q2 - q9 for temp values */
 /* TODO: reorder */
 .macro tr4_luma_shift r0, r1, r2, r3, shift
@@ -225,67 +209,6 @@ endfunc
 vqrshrn.s32   \r3, q5, \shift
 .endm
 
-/* uses registers q2 - q6 for temp values */
-.macro tr4 r0, r1, r2, r3
-vmull.s16  q4, \r1, d0[0]   // 83 * src1
-vmull.s16  q6, \r1, d0[1]   // 36 * src1
-vshll.s16  q2, \r0, #6   // 64 * src0
-vshll.s16  q3, \r2, #6   // 64 * src2
-vadd.s32   q5, q2, q3// 64 * (src0 + src2) e0
-vsub.s32   q2, q2, q3// 64 * (src0 - src2) e1
-vmlal.s16  q4, \r3, d0[1]   // 83 * src1 + 36 * src3  o0
-vmlsl.s16  q6, \r3, d0[0]   // 36 * src1 - 83 * src3  o1
-
-vsub.s32   q3, q5, q4// e0 - o0
-vadd.s32   q4, q5, q4// e0 + o0
-vadd.s32   q5, q2, q6// e1 + o1
-vsub.s32   q6, q2, q6// e1 - o1
-.endm
-
-.macro tr4_shift r0, r1, r2, r3, shift
-vmull.s16  q4, \r1, d0[0]   // 83 * src1
-vmull.s16  q6, \r1, d0[1]   // 36 * src1
-vshll.s16  q2, \r0, #6   // 64 * src0
-vshll.s16  q3, \r2, #6   // 64 * src2
-vadd.s32   q5, q2, q3// 64 * (src0 + src2) e0
-vsub.s32   q2, q2, q3// 64 * (src0 - src2) e1
-vmlal.s16  q4, \r3, d0[1]   // 83 * src1 + 36 * src3  o0
-vmlsl.s16  q6, \r3, d0[0]   // 36 * src1 - 83 * src3  o1
-
-vsub.s32   q3, q5, q4// e0 - o0
-vadd.s32   q4, q5, q4// e0 + o0
-vadd.s32   q5, q2, q6// e1 + o1
-vsub.s32   q6, q2, q6// e1 - o1
-
-vqrshrn.s32   \r0, q4, \shift
-vqrshrn.s32   \r1, q5, \shift
-vqrshrn.s32   \r2, q6, \shift
-vqrshrn.s32   \r3, q3, \shift
-.endm
-
-function ff_hevc_transform_4x4_neon_8, export=1
-vpush   {d8-d15}
-vld1.16 {q14, q15}, [r0]  // co

[FFmpeg-cvslog] hevc: Add NEON 4x4 and 8x8 IDCT

2017-10-24 Thread Alexandra Hájková
ffmpeg | branch: master | Alexandra Hájková  | 
Mon Mar 27 09:52:55 2017 +0200| [0b9a237b2386ff84a6f99716bd58fa27a1b767e7] | 
committer: Martin Storsjö

hevc: Add NEON 4x4 and 8x8 IDCT

Optimized by Martin Storsjö .

The speedup vs C code is around 3.2-4.4x.

Signed-off-by: Martin Storsjö 

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

 libavcodec/arm/Makefile   |   2 +
 libavcodec/arm/hevc_idct.S| 228 ++
 libavcodec/arm/hevcdsp_init_arm.c |  47 
 libavcodec/hevcdsp.c  |   2 +
 libavcodec/hevcdsp.h  |   1 +
 5 files changed, 280 insertions(+)

diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 77452b126d..555de160e4 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -134,6 +134,8 @@ NEON-OBJS-$(CONFIG_AAC_DECODER)+= 
arm/aacpsdsp_neon.o   \
 NEON-OBJS-$(CONFIG_APE_DECODER)+= arm/apedsp_neon.o
 NEON-OBJS-$(CONFIG_DCA_DECODER)+= arm/dcadsp_neon.o \
   arm/synth_filter_neon.o
+NEON-OBJS-$(CONFIG_HEVC_DECODER)   += arm/hevc_idct.o   \
+  arm/hevcdsp_init_arm.o
 NEON-OBJS-$(CONFIG_RV30_DECODER)   += arm/rv34dsp_neon.o
 NEON-OBJS-$(CONFIG_RV40_DECODER)   += arm/rv34dsp_neon.o\
   arm/rv40dsp_neon.o
diff --git a/libavcodec/arm/hevc_idct.S b/libavcodec/arm/hevc_idct.S
new file mode 100644
index 00..4124fc8226
--- /dev/null
+++ b/libavcodec/arm/hevc_idct.S
@@ -0,0 +1,228 @@
+/*
+ * ARM NEON optimised IDCT functions for HEVC decoding
+ * Copyright (c) 2017 Alexandra Hájková
+ *
+ * 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 "libavutil/arm/asm.S"
+
+const trans, align=4
+.short 64, 83, 64, 36
+.short 89, 75, 50, 18
+.short 90, 87, 80, 70
+.short 57, 43, 25, 9
+endconst
+
+.macro sum_sub out, in, c, op
+  .ifc \op, +
+vmlal.s16   \out, \in, \c
+  .else
+vmlsl.s16   \out, \in, \c
+  .endif
+.endm
+
+.macro tr_4x4 in0, in1, in2, in3, out0, out1, out2, out3, shift, tmp0, tmp1, 
tmp2, tmp3, tmp4
+ vshll.s16  \tmp0, \in0, #6
+ vmull.s16  \tmp2, \in1, d4[1]
+ vmov   \tmp1, \tmp0
+ vmull.s16  \tmp3, \in1, d4[3]
+ vmlal.s16  \tmp0, \in2, d4[0] @e0
+ vmlsl.s16  \tmp1, \in2, d4[0] @e1
+ vmlal.s16  \tmp2, \in3, d4[3] @o0
+ vmlsl.s16  \tmp3, \in3, d4[1] @o1
+
+ vadd.s32   \tmp4, \tmp0, \tmp2
+ vsub.s32   \tmp0, \tmp0, \tmp2
+ vadd.s32   \tmp2, \tmp1, \tmp3
+ vsub.s32   \tmp1, \tmp1, \tmp3
+ vqrshrn.s32\out0, \tmp4, #\shift
+ vqrshrn.s32\out3, \tmp0, #\shift
+ vqrshrn.s32\out1, \tmp2, #\shift
+ vqrshrn.s32\out2, \tmp1, #\shift
+.endm
+
+.macro tr_4x4_8 in0, in1, in2, in3, out0, out1, out2, out3, tmp0, tmp1, tmp2, 
tmp3
+ vshll.s16  \tmp0, \in0, #6
+ vld1.s16   {\in0}, [r1, :64]!
+ vmov   \tmp1, \tmp0
+ vmull.s16  \tmp2, \in1, \in0[1]
+ vmull.s16  \tmp3, \in1, \in0[3]
+ vmlal.s16  \tmp0, \in2, \in0[0] @e0
+ vmlsl.s16  \tmp1, \in2, \in0[0] @e1
+ vmlal.s16  \tmp2, \in3, \in0[3] @o0
+ vmlsl.s16  \tmp3, \in3, \in0[1] @o1
+
+ vld1.s16   {\in0}, [r1, :64]
+
+ vadd.s32   \out0, \tmp0, \tmp2
+ vadd.s32   \out1, \tmp1, \tmp3
+ vsub.s32   \out2, \tmp1, \tmp3
+ vsub.s32   \out3, \tmp0, \tmp2
+
+ subr1,  r1,  #8
+.endm
+
+@ Do a 4x4 transpose, using q registers for the subtransposes that don't
+@ need to address the indiviudal d registers.
+@ r0,r1 == rq0, r2,r3 == rq1
+.macro transpose_4x4 rq0, rq1, r0, r1, r2, r3
+vtrn.32 \rq0, \rq1
+vtrn.16 \r0,  \r1
+vtrn.16 \r2,  \r3
+.endm
+
+.macro idct_4x4 bitdepth
+function ff_hevc_idct_4x4_\bitdepth\()_neon, export=1
+@r0 - coeffs
+vld1.s16{q0-q1}, [r0, :128]
+
+movrel  r1, trans
+ 

[FFmpeg-cvslog] Merge commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b'

2017-10-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Oct 24 19:14:22 
2017 -0300| [4e9dc52a9703f84a0e996263018745afa1118aa0] | committer: James Almer

Merge commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b'

* commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b':
  hwcontext: Move NONE to the be the first member of AVHWDeviceType

Merged-by: James Almer 

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

 libavutil/hwcontext.c | 3 ++-
 libavutil/hwcontext.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index 048e82126f..7f8e22736c 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -79,7 +79,8 @@ enum AVHWDeviceType av_hwdevice_find_type_by_name(const char 
*name)
 
 const char *av_hwdevice_get_type_name(enum AVHWDeviceType type)
 {
-if (type >= 0 && type < FF_ARRAY_ELEMS(hw_type_names))
+if (type > AV_HWDEVICE_TYPE_NONE &&
+type < FF_ARRAY_ELEMS(hw_type_names))
 return hw_type_names[type];
 else
 return NULL;
diff --git a/libavutil/hwcontext.h b/libavutil/hwcontext.h
index 03334e20e0..d20810422c 100644
--- a/libavutil/hwcontext.h
+++ b/libavutil/hwcontext.h
@@ -25,13 +25,13 @@
 #include "pixfmt.h"
 
 enum AVHWDeviceType {
+AV_HWDEVICE_TYPE_NONE,
 AV_HWDEVICE_TYPE_VDPAU,
 AV_HWDEVICE_TYPE_CUDA,
 AV_HWDEVICE_TYPE_VAAPI,
 AV_HWDEVICE_TYPE_DXVA2,
 AV_HWDEVICE_TYPE_QSV,
 AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
-AV_HWDEVICE_TYPE_NONE,
 AV_HWDEVICE_TYPE_D3D11VA,
 AV_HWDEVICE_TYPE_DRM,
 };


==

diff --cc libavutil/hwcontext.h
index 03334e20e0,889e30365e..d20810422c
--- a/libavutil/hwcontext.h
+++ b/libavutil/hwcontext.h
@@@ -30,10 -31,6 +31,9 @@@ enum AVHWDeviceType 
  AV_HWDEVICE_TYPE_VAAPI,
  AV_HWDEVICE_TYPE_DXVA2,
  AV_HWDEVICE_TYPE_QSV,
 +AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
- AV_HWDEVICE_TYPE_NONE,
 +AV_HWDEVICE_TYPE_D3D11VA,
 +AV_HWDEVICE_TYPE_DRM,
  };
  
  typedef struct AVHWDeviceInternal AVHWDeviceInternal;

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


[FFmpeg-cvslog] hwcontext: Move NONE to the be the first member of AVHWDeviceType

2017-10-24 Thread Mark Thompson
ffmpeg | branch: master | Mark Thompson  | Thu Mar 23 19:49:39 
2017 +| [1bd986ed4b0e95ded368a8eeb5c044853c090f9b] | committer: Mark 
Thompson

hwcontext: Move NONE to the be the first member of AVHWDeviceType

Also use that to fix a warning in av_hwdevice_get_type_name().

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

 libavutil/hwcontext.c | 3 ++-
 libavutil/hwcontext.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index 2c6d51ee55..ff9fe99aba 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -67,7 +67,8 @@ enum AVHWDeviceType av_hwdevice_find_type_by_name(const char 
*name)
 
 const char *av_hwdevice_get_type_name(enum AVHWDeviceType type)
 {
-if (type >= 0 && type < FF_ARRAY_ELEMS(hw_type_names))
+if (type > AV_HWDEVICE_TYPE_NONE &&
+type < FF_ARRAY_ELEMS(hw_type_names))
 return hw_type_names[type];
 else
 return NULL;
diff --git a/libavutil/hwcontext.h b/libavutil/hwcontext.h
index 040e010b30..889e30365e 100644
--- a/libavutil/hwcontext.h
+++ b/libavutil/hwcontext.h
@@ -25,12 +25,12 @@
 #include "pixfmt.h"
 
 enum AVHWDeviceType {
+AV_HWDEVICE_TYPE_NONE,
 AV_HWDEVICE_TYPE_VDPAU,
 AV_HWDEVICE_TYPE_CUDA,
 AV_HWDEVICE_TYPE_VAAPI,
 AV_HWDEVICE_TYPE_DXVA2,
 AV_HWDEVICE_TYPE_QSV,
-AV_HWDEVICE_TYPE_NONE,
 };
 
 typedef struct AVHWDeviceInternal AVHWDeviceInternal;

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


[FFmpeg-cvslog] Merge commit '5a969f64b9cf40bad923c73b66c3031b0018e848'

2017-10-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Oct 24 19:17:02 
2017 -0300| [6821b693ecced16346e901fab5d700e0b9d1d7d8] | committer: James Almer

Merge commit '5a969f64b9cf40bad923c73b66c3031b0018e848'

* commit '5a969f64b9cf40bad923c73b66c3031b0018e848':
  jack: Drop support for old (2012) JACK versions

Merged-by: James Almer 

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

 configure  | 7 ++-
 libavdevice/jack.c | 4 
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/configure b/configure
index 7a53bc76c7..c86e5788fa 100755
--- a/configure
+++ b/configure
@@ -2023,7 +2023,6 @@ SYSTEM_FUNCS="
 gmtime_r
 inet_aton
 isatty
-jack_port_get_latency_range
 kbhit
 LoadLibrary
 localtime_r
@@ -6231,10 +6230,8 @@ check_header soundcard.h
 enabled alsa && use_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimestamp 
||
 check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound
 
-if enabled libjack; then
-check_pkg_config libjack jack jack/jack.h jack_port_get_latency_range ||
-require_pkg_config libjack jack jack/jack.h jack_client_open
-fi
+enabled libjack &&
+require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
 
 enabled sndio && check_lib sndio sndio.h sio_open -lsndio
 
diff --git a/libavdevice/jack.c b/libavdevice/jack.c
index 076078ce6d..e35a4a815a 100644
--- a/libavdevice/jack.c
+++ b/libavdevice/jack.c
@@ -94,13 +94,9 @@ static int process_callback(jack_nframes_t nframes, void 
*arg)
 
 /* Copy and interleave audio data from the JACK buffer into the packet */
 for (i = 0; i < self->nports; i++) {
-#if HAVE_JACK_PORT_GET_LATENCY_RANGE
 jack_latency_range_t range;
 jack_port_get_latency_range(self->ports[i], JackCaptureLatency, 
&range);
 latency += range.max;
-#else
-latency += jack_port_get_total_latency(self->client, self->ports[i]);
-#endif
 buffer = jack_port_get_buffer(self->ports[i], self->buffer_size);
 for (j = 0; j < self->buffer_size; j++)
 pkt_data[j * self->nports + i] = buffer[j];


==

diff --cc configure
index 7a53bc76c7,f1488cf494..c86e5788fa
--- a/configure
+++ b/configure
@@@ -2023,12 -1638,8 +2023,11 @@@ SYSTEM_FUNCS=
  gmtime_r
  inet_aton
  isatty
- jack_port_get_latency_range
 +kbhit
  LoadLibrary
  localtime_r
 +lstat
 +lzo1x_999_compress
  mach_absolute_time
  MapViewOfFile
  memalign
@@@ -6218,29 -4828,18 +6217,27 @@@ check_type "dshow.h" IBaseFilte
check_header dev/video/bktr/ioctl_bt848.h; } ||
  check_header dev/ic/bt8xx.h
  
 -check_header sys/soundcard.h
 +if check_struct sys/soundcard.h audio_buf_info bytes; then
 +enable_safe sys/soundcard.h
 +else
 +check_cc -D__BSD_VISIBLE -D__XSI_VISIBLE <
 +audio_buf_info abc;
 +EOF
 +fi
  check_header soundcard.h
  
 -enabled_any alsa_indev alsa_outdev &&
 +enabled alsa && use_pkg_config alsa alsa "alsa/asoundlib.h" 
snd_pcm_htimestamp ||
  check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound
  
- if enabled libjack; then
- check_pkg_config libjack jack jack/jack.h jack_port_get_latency_range ||
- require_pkg_config libjack jack jack/jack.h jack_client_open
- fi
+ enabled libjack &&
+ require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
  
 -enabled_any sndio_indev sndio_outdev && check_lib sndio sndio.h sio_open 
-lsndio
 +enabled sndio && check_lib sndio sndio.h sio_open -lsndio
  
  if enabled libcdio; then
 +use_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" 
cdio_cddap_open ||
 +use_pkg_config libcdio libcdio_paranoia "cdio/paranoia/cdda.h 
cdio/paranoia/paranoia.h" cdio_cddap_open ||
  check_lib libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open 
-lcdio_paranoia -lcdio_cdda -lcdio ||
  check_lib libcdio "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" 
cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
  die "ERROR: No usable libcdio/cdparanoia found"

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


[FFmpeg-cvslog] jack: Drop support for old (2012) JACK versions

2017-10-24 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Tue Mar 21 
12:10:40 2017 +0100| [5a969f64b9cf40bad923c73b66c3031b0018e848] | committer: 
Diego Biurrun

jack: Drop support for old (2012) JACK versions

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

 configure  | 7 ++-
 libavdevice/jack.c | 4 
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/configure b/configure
index 2d84700fc7..f1488cf494 100755
--- a/configure
+++ b/configure
@@ -1638,7 +1638,6 @@ SYSTEM_FUNCS="
 gmtime_r
 inet_aton
 isatty
-jack_port_get_latency_range
 LoadLibrary
 localtime_r
 mach_absolute_time
@@ -4835,10 +4834,8 @@ check_header soundcard.h
 enabled_any alsa_indev alsa_outdev &&
 check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound
 
-if enabled libjack; then
-check_pkg_config libjack jack jack/jack.h jack_port_get_latency_range ||
-require_pkg_config libjack jack jack/jack.h jack_client_open
-fi
+enabled libjack &&
+require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
 
 enabled_any sndio_indev sndio_outdev && check_lib sndio sndio.h sio_open 
-lsndio
 
diff --git a/libavdevice/jack.c b/libavdevice/jack.c
index 0b4deee01c..c31c4ce5b3 100644
--- a/libavdevice/jack.c
+++ b/libavdevice/jack.c
@@ -93,13 +93,9 @@ static int process_callback(jack_nframes_t nframes, void 
*arg)
 
 /* Copy and interleave audio data from the JACK buffer into the packet */
 for (i = 0; i < self->nports; i++) {
-#if HAVE_JACK_PORT_GET_LATENCY_RANGE
 jack_latency_range_t range;
 jack_port_get_latency_range(self->ports[i], JackCaptureLatency, 
&range);
 latency += range.max;
-#else
-latency += jack_port_get_total_latency(self->client, self->ports[i]);
-#endif
 buffer = jack_port_get_buffer(self->ports[i], self->buffer_size);
 for (j = 0; j < self->buffer_size; j++)
 pkt_data[j * self->nports + i] = buffer[j];

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


[FFmpeg-cvslog] ffserver: Fix off by 1 error in path

2017-10-24 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Oct 22 17:11:20 2017 +0200| [617f0c65e1bac8983a5b6521818c1b9b57f0804b] | 
committer: Michael Niedermayer

ffserver: Fix off by 1 error in path

Code suggested by ubitux

Signed-off-by: Michael Niedermayer 

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

 fftools/ffserver.c | 24 ++--
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/fftools/ffserver.c b/fftools/ffserver.c
index d4885dfa0e..7f8b2387bd 100644
--- a/fftools/ffserver.c
+++ b/fftools/ffserver.c
@@ -476,7 +476,7 @@ static int compute_datarate(DataRateData *drd, int64_t 
count)
 static void start_children(FFServerStream *feed)
 {
 char *pathname;
-char *slash;
+char *dirname, *prog;
 int i;
 size_t cmd_length;
 
@@ -495,22 +495,18 @@ static void start_children(FFServerStream *feed)
 return;
 }
 
-slash = strrchr(my_program_name, '/');
-if (!slash) {
-pathname = av_mallocz(sizeof("ffmpeg"));
-} else {
-pathname = av_mallocz(slash - my_program_name + sizeof("ffmpeg"));
-if (pathname != NULL) {
-memcpy(pathname, my_program_name, slash - my_program_name);
-}
-}
-if (!pathname) {
+   /* use "ffmpeg" in the path of current program. Ignore user provided path */
+prog = av_strdup(my_program_name);
+if (prog) {
+dirname = av_dirname(prog);
+pathname = *dirname ? av_asprintf("%s/%s", dirname, "ffmpeg")
+: av_asprintf("ffmpeg");
+av_free(prog);
+}
+if (!prog || !pathname) {
 http_log("Could not allocate memory for children cmd line\n");
 return;
 }
-   /* use "ffmpeg" in the path of current program. Ignore user provided path */
-
-strcat(pathname, "ffmpeg");
 
 for (; feed; feed = feed->next) {
 

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


[FFmpeg-cvslog] tests/ffserver.regression.ref: update checksums to what ffserver currently produces

2017-10-24 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Oct 22 17:11:21 2017 +0200| [431eccd61e155190a7762314938799076cffeb67] | 
committer: Michael Niedermayer

tests/ffserver.regression.ref: update checksums to what ffserver currently 
produces

Signed-off-by: Michael Niedermayer 

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

 tests/ffserver.regression.ref | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/ffserver.regression.ref b/tests/ffserver.regression.ref
index 398c285156..fd8536c853 100644
--- a/tests/ffserver.regression.ref
+++ b/tests/ffserver.regression.ref
@@ -1,11 +1,11 @@
 0c9639f09decbc54c9f091dcf1ca0e8f *ff-test_h.avi
 e28ba75853caf975e06d92955c9f7f73 *ff-test_l.avi
 a767dbdf5d1bded3450279f812f97b37 *ff-test.swf
-dc16f607e13328a832e73801cd21ec98 *ff-test_h.asf
-69337d6c8cd7ac7e626338decdbf41d3 *ff-test_l.asf
+ca209a0c67afbd3bc3bcde0840f313fc *ff-test_h.asf
+f97a91609bfc8a1857455f17c5ec101c *ff-test_l.asf
 06f5a6a4c5d1c6735f4d0068e825c91f *ff-test_h.rm
 1f57580f02f0317407b3b82a3d5e093f *ff-test_l.rm
-4c887dfc1dd0f6ea1a3a2be6dd32e495 *ff-test.jpg
-1d04b73b04aad27793cc762d5afabac1 *ff-test_small.jpg
-bc36c40ee34ebee6ffe50f3094aab733 *ff-test.mjpg
+e04e6ebf9584654df131f5eec881ac38 *ff-test.jpg
+f15d43e9d3630601b61a024023249bb8 *ff-test_small.jpg
+4735c72cde67000f12e9d1dbfbd975a7 *ff-test.mjpg
 fd038af80560e15271ce42651093ee43 *ff-stat

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


[FFmpeg-cvslog] libopus: Add channel mapping 2 support in libopusdec

2017-10-24 Thread Felicia Lim
ffmpeg | branch: master | Felicia Lim  | Mon Mar 27 16:21:20 
2017 -0700| [c8c995bc1ddc34df93049f002432286018c8cc94] | committer: Michael 
Niedermayer

libopus: Add channel mapping 2 support in libopusdec

Enables demuxing of Ambisonics content coded with channel mapping 2

Signed-off-by: Michael Niedermayer 

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

 libavcodec/libopusdec.c | 39 +--
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c
index e6ca61a78f..9dab0fdf65 100644
--- a/libavcodec/libopusdec.c
+++ b/libavcodec/libopusdec.c
@@ -57,8 +57,6 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
 avc->sample_rate= 48000;
 avc->sample_fmt = avc->request_sample_fmt == AV_SAMPLE_FMT_FLT ?
   AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_S16;
-avc->channel_layout = avc->channels > 8 ? 0 :
-  ff_vorbis_channel_layouts[avc->channels - 1];
 
 if (avc->extradata_size >= OPUS_HEAD_SIZE) {
 opus->pre_skip = AV_RL16(avc->extradata + 10);
@@ -82,14 +80,35 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
 mapping= mapping_arr;
 }
 
-if (avc->channels > 2 && avc->channels <= 8) {
-const uint8_t *vorbis_offset = 
ff_vorbis_channel_layout_offsets[avc->channels - 1];
-int ch;
-
-/* Remap channels from Vorbis order to ffmpeg order */
-for (ch = 0; ch < avc->channels; ch++)
-mapping_arr[ch] = mapping[vorbis_offset[ch]];
-mapping = mapping_arr;
+if (channel_map == 1) {
+avc->channel_layout = avc->channels > 8 ? 0 :
+  ff_vorbis_channel_layouts[avc->channels - 1];
+if (avc->channels > 2 && avc->channels <= 8) {
+const uint8_t *vorbis_offset = 
ff_vorbis_channel_layout_offsets[avc->channels - 1];
+int ch;
+
+/* Remap channels from Vorbis order to ffmpeg order */
+for (ch = 0; ch < avc->channels; ch++)
+mapping_arr[ch] = mapping[vorbis_offset[ch]];
+mapping = mapping_arr;
+}
+} else if (channel_map == 2) {
+int ambisonic_order = ff_sqrt(avc->channels) - 1;
+if (avc->channels != (ambisonic_order + 1) * (ambisonic_order + 1) &&
+avc->channels != (ambisonic_order + 1) * (ambisonic_order + 1) + 
2) {
+av_log(avc, AV_LOG_ERROR,
+   "Channel mapping 2 is only specified for channel counts"
+   " which can be written as (n + 1)^2 or (n + 2)^2 + 2"
+   " for nonnegative integer n\n");
+return AVERROR_INVALIDDATA;
+}
+if (avc->channels > 227) {
+av_log(avc, AV_LOG_ERROR, "Too many channels\n");
+return AVERROR_INVALIDDATA;
+}
+avc->channel_layout = 0;
+} else {
+avc->channel_layout = 0;
 }
 
 opus->dec = opus_multistream_decoder_create(avc->sample_rate, 
avc->channels,

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


[FFmpeg-cvslog] fate: add a test for mpeg2 issue of ticket #6677

2017-10-24 Thread Zhong Li
ffmpeg | branch: master | Zhong Li  | Mon Oct 23 15:18:12 
2017 +0800| [7e294a1f09a2b7bbba5c057e23e533fffef5336d] | committer: Michael 
Niedermayer

fate: add a test for mpeg2 issue of ticket #6677

Signed-off-by: Zhong Li 
Signed-off-by: Michael Niedermayer 

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

 tests/fate/video.mak|  3 +++
 tests/ref/fate/mpeg2-ticket6677 | 12 
 2 files changed, 15 insertions(+)

diff --git a/tests/fate/video.mak b/tests/fate/video.mak
index 6f76365165..51678078a3 100644
--- a/tests/fate/video.mak
+++ b/tests/fate/video.mak
@@ -257,6 +257,9 @@ fate-mpeg2-ticket186: CMD = framecrc -flags +bitexact -idct 
simple -i $(TARGET_S
 FATE_VIDEO-$(call DEMDEC, MPEGPS, MPEG2VIDEO) += fate-mpeg2-ticket6024
 fate-mpeg2-ticket6024: CMD = framecrc -flags +bitexact -idct simple -flags 
+truncated -i $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg -an
 
+FATE_VIDEO-$(call DEMDEC, MPEGVIDEO, MPEG2VIDEO) += fate-mpeg2-ticket6677
+fate-mpeg2-ticket6677: CMD = framecrc -vsync drop -i 
$(TARGET_SAMPLES)/mpeg2/sony-ct3.bs
+
 FATE_VIDEO-$(call DEMDEC, MV, MVC1) += fate-mv-mvc1
 fate-mv-mvc1: CMD = framecrc -i $(TARGET_SAMPLES)/mv/posture.mv -an -frames 25 
-pix_fmt rgb555le
 
diff --git a/tests/ref/fate/mpeg2-ticket6677 b/tests/ref/fate/mpeg2-ticket6677
new file mode 100644
index 00..5fc7cb2a26
--- /dev/null
+++ b/tests/ref/fate/mpeg2-ticket6677
@@ -0,0 +1,12 @@
+#tb 0: 1/30
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x480
+#sar 0: 8/9
+0,  0,  0,1,   518400, 0x354b6fc3
+0,  1,  1,1,   518400, 0xd86f281b
+0,  2,  2,1,   518400, 0xdd2e2b38
+0,  3,  3,1,   518400, 0x589535d4
+0,  4,  4,1,   518400, 0x3f8f02b6
+0,  5,  5,1,   518400, 0xa81b246a
+0,  6,  6,1,   518400, 0xb98dd9f7

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


Re: [FFmpeg-cvslog] cbs_mpeg2: Fix type for marker_bit reading

2017-10-24 Thread Carl Eugen Hoyos
2017-10-25 0:09 GMT+02:00 Mark Thompson :
> ffmpeg | branch: master | Mark Thompson  | Tue Oct 24 
> 22:56:48 2017 +0100| [5b2c71bb94d7cab23ee81b5c29388f5fadbcaf22] | committer: 
> Mark Thompson
>
> cbs_mpeg2: Fix type for marker_bit reading
>
>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5b2c71bb94d7cab23ee81b5c29388f5fadbcaf22
> ---
>
>  libavcodec/cbs_mpeg2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/cbs_mpeg2.c b/libavcodec/cbs_mpeg2.c
> index d137762227..0cac29733e 100644
> --- a/libavcodec/cbs_mpeg2.c
> +++ b/libavcodec/cbs_mpeg2.c
> @@ -54,7 +54,7 @@
>  xui(width, name, current->name)
>
>  #define marker_bit() do { \
> -av_unused int one = 1; \
> +av_unused uint32_t one; \
>  CHECK(ff_cbs_read_unsigned(ctx, rw, 1, "marker_bit", &one, 1, 1)); \

The commit message doesn't match the change / is this defined behaviour?

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


[FFmpeg-cvslog] takdec: Use ISO C printf conversion specifiers where appropriate

2017-10-24 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Fri Mar 24 
17:35:06 2017 +0100| [163cc67beb3ed28aeb500c9a09df47c8df613025] | committer: 
Diego Biurrun

takdec: Use ISO C printf conversion specifiers where appropriate

libavformat/takdec.c:144:20: warning: format '%X' expects argument of type 
'unsigned int', but argument 4 has type 'uint32_t'

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

 libavformat/takdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/takdec.c b/libavformat/takdec.c
index 4b3037d9ca..b3739e446e 100644
--- a/libavformat/takdec.c
+++ b/libavformat/takdec.c
@@ -140,7 +140,7 @@ static int tak_read_header(AVFormatContext *s)
   bitstream_read(&bc, TAK_LAST_FRAME_SIZE_BITS);
 av_freep(&buffer);
 } else if (type == TAK_METADATA_ENCODER) {
-av_log(s, AV_LOG_VERBOSE, "encoder version: %0X\n",
+av_log(s, AV_LOG_VERBOSE, "encoder version: %0"PRIX32"\n",
bitstream_read(&bc, TAK_ENCODER_VERSION_BITS));
 av_freep(&buffer);
 }

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


[FFmpeg-cvslog] hevcdec: Use LOCAL_ALIGNED_* for declaring local variables with alignment

2017-10-24 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Tue Mar 28 
12:53:58 2017 +0300| [e788ca05a796c97b84758189c83183f5ffa808f4] | committer: 
Martin Storsjö

hevcdec: Use LOCAL_ALIGNED_* for declaring local variables with alignment

Not all compilers can do alignment larger than the normal stack alignment
for variables on the stack. In these cases, the LOCAL_ALIGNED_* macros
produce the workaround alignment wrapper consisting of a padded array
and a pointer variable.

This fixes the hevc fate tests on RVCT/ARMCC after adding IDCT assembly
that actually assumes/relies on this alignment.

Signed-off-by: Martin Storsjö 

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

 libavcodec/hevcdec.c | 22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index e24ce1e3c0..6a04858587 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -917,8 +917,8 @@ static void hls_residual_coding(HEVCContext *s, int x0, int 
y0,
 int vshift   = s->ps.sps->vshift[c_idx];
 uint8_t *dst = &s->frame->data[c_idx][(y0 >> vshift) * stride +
   ((x0 >> hshift) << 
s->ps.sps->pixel_shift)];
-DECLARE_ALIGNED(32, int16_t, coeffs[MAX_TB_SIZE * MAX_TB_SIZE]) = { 0 };
-DECLARE_ALIGNED(8, uint8_t, significant_coeff_group_flag[8][8]) = { { 0 } 
};
+LOCAL_ALIGNED_32(int16_t, coeffs, [MAX_TB_SIZE * MAX_TB_SIZE]);
+LOCAL_ALIGNED_8(uint8_t, significant_coeff_group_flag, [8], [8]);
 
 int trafo_size = 1 << log2_trafo_size;
 int i, qp, shift, add, scale, scale_m;
@@ -926,6 +926,8 @@ static void hls_residual_coding(HEVCContext *s, int x0, int 
y0,
 const uint8_t *scale_matrix;
 uint8_t dc_scale;
 
+memset(coeffs, 0, sizeof(int16_t) * MAX_TB_SIZE * MAX_TB_SIZE);
+memset(significant_coeff_group_flag, 0, sizeof(uint8_t) * 8 * 8);
 // Derive QP for dequant
 if (!lc->cu.cu_transquant_bypass_flag) {
 static const int qp_c[] = {
@@ -1755,8 +1757,8 @@ static void hls_prediction_unit(HEVCContext *s, int x0, 
int y0,
 }
 
 if (current_mv.pred_flag[0] && !current_mv.pred_flag[1]) {
-DECLARE_ALIGNED(16, int16_t,  tmp[MAX_PB_SIZE * MAX_PB_SIZE]);
-DECLARE_ALIGNED(16, int16_t, tmp2[MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t,  tmp, [MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t, tmp2, [MAX_PB_SIZE * MAX_PB_SIZE]);
 
 luma_mc(s, tmp, tmpstride, ref0->frame,
 ¤t_mv.mv[0], x0, y0, nPbW, nPbH, pred_idx);
@@ -1789,8 +1791,8 @@ static void hls_prediction_unit(HEVCContext *s, int x0, 
int y0,
 s->hevcdsp.put_unweighted_pred_chroma[pred_idx](dst2, 
s->frame->linesize[2], tmp2, tmpstride, nPbH / 2);
 }
 } else if (!current_mv.pred_flag[0] && current_mv.pred_flag[1]) {
-DECLARE_ALIGNED(16, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]);
-DECLARE_ALIGNED(16, int16_t, tmp2[MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t, tmp,  [MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t, tmp2, [MAX_PB_SIZE * MAX_PB_SIZE]);
 
 luma_mc(s, tmp, tmpstride, ref1->frame,
 ¤t_mv.mv[1], x0, y0, nPbW, nPbH, pred_idx);
@@ -1822,10 +1824,10 @@ static void hls_prediction_unit(HEVCContext *s, int x0, 
int y0,
 s->hevcdsp.put_unweighted_pred_chroma[pred_idx](dst2, 
s->frame->linesize[2], tmp2, tmpstride, nPbH / 2);
 }
 } else if (current_mv.pred_flag[0] && current_mv.pred_flag[1]) {
-DECLARE_ALIGNED(16, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]);
-DECLARE_ALIGNED(16, int16_t, tmp2[MAX_PB_SIZE * MAX_PB_SIZE]);
-DECLARE_ALIGNED(16, int16_t, tmp3[MAX_PB_SIZE * MAX_PB_SIZE]);
-DECLARE_ALIGNED(16, int16_t, tmp4[MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t, tmp,  [MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t, tmp2, [MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t, tmp3, [MAX_PB_SIZE * MAX_PB_SIZE]);
+LOCAL_ALIGNED_16(int16_t, tmp4, [MAX_PB_SIZE * MAX_PB_SIZE]);
 
 luma_mc(s, tmp, tmpstride, ref0->frame,
 ¤t_mv.mv[0], x0, y0, nPbW, nPbH, pred_idx);

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


[FFmpeg-cvslog] hevc: Avoid using LOCAL_ALIGNED for 4 byte alignment

2017-10-24 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Wed Mar 29 
13:43:40 2017 +0300| [26d9b60373bf45bc4f91ff6815f5fa36764d4d7b] | committer: 
Martin Storsjö

hevc: Avoid using LOCAL_ALIGNED for 4 byte alignment

The data types within the MvField struct themselves imply 4 byte alignment.

Signed-off-by: Martin Storsjö 

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

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

diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index be32e6cd40..27df7c1527 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -550,7 +550,7 @@ void ff_hevc_luma_mv_merge_mode(HEVCContext *s, int x0, int 
y0, int nPbW,
 {
 int singleMCLFlag = 0;
 int nCS = 1 << log2_cb_size;
-LOCAL_ALIGNED(4, MvField, mergecand_list, [MRG_MAX_NUM_CANDS]);
+MvField mergecand_list[MRG_MAX_NUM_CANDS];
 int nPbW2 = nPbW;
 int nPbH2 = nPbH;
 HEVCLocalContext *lc = &s->HEVClc;

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


[FFmpeg-cvslog] dcadec: remove extra indirection

2017-10-24 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Wed Mar 29 
12:04:46 2017 +0200| [6a9e331d79f8f78ba7642004ac13d744d033b98e] | committer: 
Luca Barbato

dcadec: remove extra indirection

num_core_channels is always equal to s->audio_header.prim_channels,
neither one of those variables ever get changed.

Signed-off-by: Luca Barbato 

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

 libavcodec/dcadec.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index fa2a2400fe..ed1ed2d5f3 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -1263,9 +1263,10 @@ static int scan_for_extensions(AVCodecContext *avctx)
 return ret;
 }
 
-static int set_channel_layout(AVCodecContext *avctx, int channels, int 
num_core_channels)
+static int set_channel_layout(AVCodecContext *avctx, int channels)
 {
 DCAContext *s = avctx->priv_data;
+int num_core_channels = s->audio_header.prim_channels;
 int i;
 
 if (s->amode < 16) {
@@ -1372,7 +1373,6 @@ static int dca_decode_frame(AVCodecContext *avctx, void 
*data,
 int buf_size   = avpkt->size;
 
 int lfe_samples;
-int num_core_channels = 0;
 int i, ret;
 float  **samples_flt;
 DCAContext *s = avctx->priv_data;
@@ -1406,9 +1406,6 @@ static int dca_decode_frame(AVCodecContext *avctx, void 
*data,
 }
 }
 
-/* record number of core channels incase less than max channels are 
requested */
-num_core_channels = s->audio_header.prim_channels;
-
 if (s->ext_coding)
 s->core_ext_mask = dca_ext_audio_descr_mask[s->ext_descr];
 else
@@ -1420,7 +1417,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void 
*data,
 
 full_channels = channels = s->audio_header.prim_channels + !!s->lfe;
 
-ret = set_channel_layout(avctx, channels, num_core_channels);
+ret = set_channel_layout(avctx, channels);
 if (ret < 0)
 return ret;
 avctx->channels = channels;

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


[FFmpeg-cvslog] arm: Always build the hevcdsp_init_arm.c file

2017-10-24 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Tue Mar 28 
11:05:53 2017 +0300| [fbc6f190a61810a4f3c5181822c2da1027cda154] | committer: 
Martin Storsjö

arm: Always build the hevcdsp_init_arm.c file

The main hevcdsp.c file calls this init function if HAVE_ARM is set,
regardless of whether neon support is available or not.

This fixes builds where neon isn't supported by the build tools at all.

Signed-off-by: Martin Storsjö 

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

 libavcodec/arm/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 555de160e4..b48745ad40 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -41,6 +41,7 @@ OBJS-$(CONFIG_AAC_DECODER) += 
arm/aacpsdsp_init_arm.o   \
   arm/sbrdsp_init_arm.o
 OBJS-$(CONFIG_APE_DECODER) += arm/apedsp_init_arm.o
 OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_init_arm.o
+OBJS-$(CONFIG_HEVC_DECODER)+= arm/hevcdsp_init_arm.o
 OBJS-$(CONFIG_MLP_DECODER) += arm/mlpdsp_init_arm.o
 OBJS-$(CONFIG_RV40_DECODER)+= arm/rv40dsp_init_arm.o
 OBJS-$(CONFIG_VORBIS_DECODER)  += arm/vorbisdsp_init_arm.o
@@ -134,8 +135,7 @@ NEON-OBJS-$(CONFIG_AAC_DECODER)+= 
arm/aacpsdsp_neon.o   \
 NEON-OBJS-$(CONFIG_APE_DECODER)+= arm/apedsp_neon.o
 NEON-OBJS-$(CONFIG_DCA_DECODER)+= arm/dcadsp_neon.o \
   arm/synth_filter_neon.o
-NEON-OBJS-$(CONFIG_HEVC_DECODER)   += arm/hevc_idct.o   \
-  arm/hevcdsp_init_arm.o
+NEON-OBJS-$(CONFIG_HEVC_DECODER)   += arm/hevc_idct.o
 NEON-OBJS-$(CONFIG_RV30_DECODER)   += arm/rv34dsp_neon.o
 NEON-OBJS-$(CONFIG_RV40_DECODER)   += arm/rv34dsp_neon.o\
   arm/rv40dsp_neon.o

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


[FFmpeg-cvslog] Merge commit '163cc67beb3ed28aeb500c9a09df47c8df613025'

2017-10-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Oct 24 19:25:05 
2017 -0300| [d289f3febda26b59b0c66c581c5f88935f5c0bde] | committer: James Almer

Merge commit '163cc67beb3ed28aeb500c9a09df47c8df613025'

* commit '163cc67beb3ed28aeb500c9a09df47c8df613025':
  takdec: Use ISO C printf conversion specifiers where appropriate
  dcadec: remove extra indirection
  hevcdec: Use LOCAL_ALIGNED_* for declaring local variables with alignment
  arm: Always build the hevcdsp_init_arm.c file

This commit is a noop.

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] Merge commit '26d9b60373bf45bc4f91ff6815f5fa36764d4d7b'

2017-10-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Oct 24 19:26:29 
2017 -0300| [953d55f4439ba3a302f9dcc83f8fe9577c22b804] | committer: James Almer

Merge commit '26d9b60373bf45bc4f91ff6815f5fa36764d4d7b'

* commit '26d9b60373bf45bc4f91ff6815f5fa36764d4d7b':
  hevc: Avoid using LOCAL_ALIGNED for 4 byte alignment

Merged-by: James Almer 

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

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

diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index a8f7876b59..fd0dbd9a56 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -482,7 +482,7 @@ void ff_hevc_luma_mv_merge_mode(HEVCContext *s, int x0, int 
y0, int nPbW,
 {
 int singleMCLFlag = 0;
 int nCS = 1 << log2_cb_size;
-LOCAL_ALIGNED(4, MvField, mergecand_list, [MRG_MAX_NUM_CANDS]);
+MvField mergecand_list[MRG_MAX_NUM_CANDS];
 int nPbW2 = nPbW;
 int nPbH2 = nPbH;
 HEVCLocalContext *lc = s->HEVClc;


==

diff --cc libavcodec/hevc_mvs.c
index a8f7876b59,27df7c1527..fd0dbd9a56
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@@ -482,10 -550,10 +482,10 @@@ void ff_hevc_luma_mv_merge_mode(HEVCCon
  {
  int singleMCLFlag = 0;
  int nCS = 1 << log2_cb_size;
- LOCAL_ALIGNED(4, MvField, mergecand_list, [MRG_MAX_NUM_CANDS]);
+ MvField mergecand_list[MRG_MAX_NUM_CANDS];
  int nPbW2 = nPbW;
  int nPbH2 = nPbH;
 -HEVCLocalContext *lc = &s->HEVClc;
 +HEVCLocalContext *lc = s->HEVClc;
  
  if (s->ps.pps->log2_parallel_merge_level > 2 && nCS == 8) {
  singleMCLFlag = 1;

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