[FFmpeg-cvslog] lavc: restore ABI compatibility with 3.x (sub_text_format)

2016-03-05 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sat Mar  5 10:15:30 
2016 +0100| [0443b2cf790f62fa1405ec7e916a9416a7dc4b16] | committer: Clément 
Bœsch

lavc: restore ABI compatibility with 3.x (sub_text_format)

Regression introduced in 2941282.

Reported-by: Michael Niedermayer 

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

 libavcodec/avcodec.h |   18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5dc4b73..e249e65 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3289,12 +3289,6 @@ typedef struct AVCodecContext {
 #define FF_SUB_CHARENC_MODE_AUTOMATIC0  ///< libavcodec will select the 
mode itself
 #define FF_SUB_CHARENC_MODE_PRE_DECODER  1  ///< the AVPacket data needs to be 
recoded to UTF-8 before being fed to the decoder, requires iconv
 
-int sub_text_format;
-#define FF_SUB_TEXT_FMT_ASS  0
-#if FF_API_ASS_TIMING
-#define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS 1
-#endif
-
 /**
  * Skip processing alpha if supported by codec.
  * Note that if the format uses pre-multiplied alpha (common with VP6,
@@ -3387,6 +3381,18 @@ typedef struct AVCodecContext {
  * afterwards owned and managed by libavcodec.
  */
 AVBufferRef *hw_frames_ctx;
+
+/**
+ * Control the form of AVSubtitle.rects[N]->ass
+ * - decoding: set by user
+ * - encoding: unused
+ */
+int sub_text_format;
+#define FF_SUB_TEXT_FMT_ASS  0
+#if FF_API_ASS_TIMING
+#define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS 1
+#endif
+
 } AVCodecContext;
 
 AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);

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


[FFmpeg-cvslog] lavf/riffenc: Handle palette for non-raw codecs

2016-03-05 Thread Mats Peterson
ffmpeg | branch: master | Mats Peterson  | Thu Mar  3 
00:28:23 2016 +0100| [698fdc85478f5782dda9f390ff4327fe8053000d] | committer: 
Michael Niedermayer

lavf/riffenc: Handle palette for non-raw codecs

Signed-off-by: Michael Niedermayer 

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

 libavformat/riffenc.c |   20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
index 1dd7971..195a58e 100644
--- a/libavformat/riffenc.c
+++ b/libavformat/riffenc.c
@@ -209,12 +209,17 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext 
*enc,
 int keep_height = enc->extradata_size >= 9 &&
   !memcmp(enc->extradata + enc->extradata_size - 9, 
"BottomUp", 9);
 int extradata_size = enc->extradata_size - 9*keep_height;
-int raw_pal_avi;
+enum AVPixelFormat pix_fmt = enc->pix_fmt;
+int pal_avi;
 
-raw_pal_avi = !for_asf && enc->codec_id == AV_CODEC_ID_RAWVIDEO &&
-  !enc->codec_tag &&
-enc->bits_per_coded_sample >= 1 && enc->bits_per_coded_sample <= 8;
-if (!enc->extradata_size && raw_pal_avi)
+if (pix_fmt == AV_PIX_FMT_NONE && enc->bits_per_coded_sample == 1)
+pix_fmt = AV_PIX_FMT_MONOWHITE;
+pal_avi = !for_asf &&
+  (pix_fmt == AV_PIX_FMT_PAL8 ||
+   pix_fmt == AV_PIX_FMT_MONOWHITE ||
+   pix_fmt == AV_PIX_FMT_MONOBLACK);
+
+if (!enc->extradata_size && pal_avi)
 extradata_size = 4 * (1 << enc->bits_per_coded_sample);
 
 /* size */
@@ -239,11 +244,8 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext 
*enc,
 avio_write(pb, enc->extradata, extradata_size);
 if (!for_asf && extradata_size & 1)
 avio_w8(pb, 0);
-} else if (raw_pal_avi) {
+} else if (pal_avi) {
 int i;
-enum AVPixelFormat pix_fmt = enc->pix_fmt;
-if (pix_fmt == AV_PIX_FMT_NONE && enc->bits_per_coded_sample == 1)
-pix_fmt = AV_PIX_FMT_MONOWHITE;
 for (i = 0; i < 1 << enc->bits_per_coded_sample; i++) {
 /* Initialize 1 bpp palette to black & white */
 if (i == 0 && pix_fmt == AV_PIX_FMT_MONOWHITE)

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


[FFmpeg-cvslog] lavf/avienc: Add support for palette side data

2016-03-05 Thread Mats Peterson
ffmpeg | branch: master | Mats Peterson  | Sat Mar  5 
12:16:57 2016 +0100| [2df0bbaca5ab0f66d3554ff751f89eba3a95d042] | committer: 
Michael Niedermayer

lavf/avienc: Add support for palette side data

Signed-off-by: Michael Niedermayer 

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

 libavformat/avienc.c |   91 ++
 1 file changed, 62 insertions(+), 29 deletions(-)

diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index ca505f4..9bf755e 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -49,6 +49,8 @@ typedef struct AVIIentry {
 
 #define AVI_INDEX_CLUSTER_SIZE 16384
 
+#define AVISF_VIDEO_PALCHANGES 0x0001
+
 typedef struct AVIIndex {
 int64_t indx_start;
 int64_t audio_strm_offset;
@@ -74,12 +76,15 @@ typedef struct AVIStream {
 int max_size;
 int sample_requested;
 
-int64_t pal_offset;
-int hdr_pal_done;
-
 int64_t last_dts;
 
 AVIIndex indexes;
+
+int64_t strh_flags_offset;
+
+uint32_t palette[AVPALETTE_COUNT];
+uint32_t old_palette[AVPALETTE_COUNT];
+int64_t pal_offset;
 } AVIStream;
 
 static int avi_write_packet_internal(AVFormatContext *s, AVPacket *pkt);
@@ -301,6 +306,8 @@ static int avi_write_header(AVFormatContext *s)
 avio_wl32(pb, enc->codec_tag);
 else
 avio_wl32(pb, 1);
+if (enc->codec_type == AVMEDIA_TYPE_VIDEO && pb->seekable)
+avist->strh_flags_offset = avio_tell(pb);
 avio_wl32(pb, 0); /* flags */
 avio_wl16(pb, 0); /* priority */
 avio_wl16(pb, 0); /* language */
@@ -362,7 +369,8 @@ static int avi_write_header(AVFormatContext *s)
 && enc->pix_fmt == AV_PIX_FMT_RGB555LE
 && enc->bits_per_coded_sample == 15)
 enc->bits_per_coded_sample = 16;
-avist->pal_offset = avio_tell(pb) + 40;
+if (pb->seekable)
+avist->pal_offset = avio_tell(pb) + 40;
 ff_put_bmp_header(pb, enc, ff_codec_bmp_tags, 0, 0);
 pix_fmt = avpriv_find_pix_fmt(avpriv_pix_fmt_bps_avi,
   enc->bits_per_coded_sample);
@@ -652,11 +660,11 @@ static int avi_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 {
 unsigned char tag[5];
 const int stream_index = pkt->stream_index;
-const uint8_t *data= pkt->data;
-int size   = pkt->size;
 AVIOContext *pb = s->pb;
 AVCodecContext *enc = s->streams[stream_index]->codec;
 AVIStream *avist= s->streams[stream_index]->priv_data;
+AVPacket *opkt = pkt;
+enum AVPixelFormat pix_fmt = enc->pix_fmt;
 int ret;
 
 if (enc->codec_id == AV_CODEC_ID_H264 && enc->codec_tag == 
MKTAG('H','2','6','4') && pkt->size) {
@@ -668,39 +676,64 @@ static int avi_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 if ((ret = write_skip_frames(s, stream_index, pkt->dts)) < 0)
 return ret;
 
-if (enc->codec_id == AV_CODEC_ID_RAWVIDEO && enc->codec_tag == 0) {
-int64_t bpc = enc->bits_per_coded_sample != 15 ? 
enc->bits_per_coded_sample : 16;
-int expected_stride = ((enc->width * bpc + 31) >> 5)*4;
-
-ret = ff_reshuffle_raw_rgb(s, &pkt, enc, expected_stride);
-if (ret < 0)
-return ret;
-if (ret) {
-if (ret == CONTAINS_PAL) {
-int pc_tag, i;
+if (!pkt->size)
+return avi_write_packet_internal(s, pkt); /* Passthrough */
+
+if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
+if (enc->codec_id == AV_CODEC_ID_RAWVIDEO && enc->codec_tag == 0) {
+int64_t bpc = enc->bits_per_coded_sample != 15 ? 
enc->bits_per_coded_sample : 16;
+int expected_stride = ((enc->width * bpc + 31) >> 5)*4;
+ret = ff_reshuffle_raw_rgb(s, &pkt, enc, expected_stride);
+if (ret < 0)
+return ret;
+} else
+ret = 0;
+if (pix_fmt == AV_PIX_FMT_NONE && enc->bits_per_coded_sample == 1)
+pix_fmt = AV_PIX_FMT_MONOWHITE;
+if (pix_fmt == AV_PIX_FMT_PAL8 ||
+pix_fmt == AV_PIX_FMT_MONOWHITE ||
+pix_fmt == AV_PIX_FMT_MONOBLACK) {
+int ret2 = ff_get_packet_palette(s, opkt, ret, avist->palette);
+if (ret2 < 0)
+return ret2;
+if (ret2) {
 int pal_size = 1 << enc->bits_per_coded_sample;
-if (!avist->hdr_pal_done) {
+int pc_tag, i;
+if (pb->seekable && avist->pal_offset) {
 int64_t cur_offset = avio_tell(pb);
 avio_seek(pb, avist->pal_offset, SEEK_SET);
 for (i = 0; i < pal_size; i++) {
-uint32_t v = AV_RL32(data + size - 4*pal_size + 4*i);
+uint32_t v = avist->palette[i];
 

[FFmpeg-cvslog] avformat/avienc: assert that bits_per_coded_sample is within the supported range ( out of array access otherwise)

2016-03-05 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Mar  5 18:18:07 2016 +0100| [e0f5f9267a8bc104ec3cefe03873dd2508c46650] | 
committer: Michael Niedermayer

avformat/avienc: assert that bits_per_coded_sample is within the supported 
range (out of array access otherwise)

Signed-off-by: Michael Niedermayer 

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

 libavformat/avienc.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 9bf755e..0cfffb7 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -699,6 +699,9 @@ static int avi_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 if (ret2) {
 int pal_size = 1 << enc->bits_per_coded_sample;
 int pc_tag, i;
+
+av_assert0(enc->bits_per_coded_sample >= 0 && 
enc->bits_per_coded_sample <= 8);
+
 if (pb->seekable && avist->pal_offset) {
 int64_t cur_offset = avio_tell(pb);
 avio_seek(pb, avist->pal_offset, SEEK_SET);

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


[FFmpeg-cvslog] fate: Add pal8 copy test for avi

2016-03-05 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Mar  5 17:39:48 2016 +0100| [76019f5fed066f350fd8c9e55ec2c47ddb47f2a8] | 
committer: Michael Niedermayer

fate: Add pal8 copy test for avi

Signed-off-by: Michael Niedermayer 

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

 tests/fate/avformat.mak  |1 +
 tests/lavf-regression.sh |4 
 tests/ref/lavf-fate/avi_cram |3 +++
 3 files changed, 8 insertions(+)

diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
index 02c1345..bcfe2e3 100644
--- a/tests/fate/avformat.mak
+++ b/tests/fate/avformat.mak
@@ -70,6 +70,7 @@ FATE_LAVF_FATE-$(call ALLYES, MATROSKA_DEMUXER   OGG_MUXER)   
   += ogg_vp3
 FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXERLATM_MUXER) += latm
 FATE_LAVF_FATE-$(call ALLYES, MP3_DEMUXERMP3_MUXER)  += mp3
 FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXERMOV_MUXER)  += 
mov_qtrle_mace6
+FATE_LAVF_FATE-$(call ALLYES, AVI_DEMUXERAVI_MUXER)  += 
avi_cram
 
 FATE_LAVF_FATE +=  $(FATE_LAVF_FATE-yes:%=fate-lavf-fate-%)
 $(FATE_LAVF_FATE): CMD = lavffatetest
diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index a219488..f390dd9 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -170,6 +170,10 @@ DEC_OPTS="$DEC_OPTS -idct auto"
 do_lavf_fate mov "qtrle/Animation-16Greys.mov"
 fi
 
+if [ -n "$do_avi_cram" ] ; then
+DEC_OPTS="$DEC_OPTS -idct auto"
+do_lavf_fate avi "cram/toon.avi"
+fi
 
 if [ -n "$do_wtv" ] ; then
 do_lavf wtv "" "-acodec mp2 -threads 1"
diff --git a/tests/ref/lavf-fate/avi_cram b/tests/ref/lavf-fate/avi_cram
new file mode 100644
index 000..7864ab9
--- /dev/null
+++ b/tests/ref/lavf-fate/avi_cram
@@ -0,0 +1,3 @@
+e202447ccd6660149c17070204d258a4 *./tests/data/lavf-fate/lavf.avi
+928228 ./tests/data/lavf-fate/lavf.avi
+./tests/data/lavf-fate/lavf.avi CRC=0xa4770de2

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


[FFmpeg-cvslog] avfilter/vf_waveform: only use available components

2016-03-05 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sat Mar  5 20:22:35 
2016 +0100| [f3c00be2a3ddc38c1851e0cd42de754a54d6af69] | committer: Paul B Mahol

avfilter/vf_waveform: only use available components

Signed-off-by: Paul B Mahol 

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

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

diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index fa78264..a84e3f2 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -1158,7 +1158,7 @@ static int config_output(AVFilterLink *outlink)
 if (!s->peak)
 return AVERROR(ENOMEM);
 
-for (p = 0; p < 4; p++) {
+for (p = 0; p < s->ncomp; p++) {
 const int is_chroma = (p == 1 || p == 2);
 const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0);
 const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0);

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


[FFmpeg-cvslog] fate/aac: Increase fuzz from of fate-aac-pns-encode from 72 to 74 for Loongson

2016-03-05 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Mar  5 21:58:16 2016 +0100| [4ac4a2f4969d66176cbb4372dcb3ea90cc3b27f5] | 
committer: Michael Niedermayer

fate/aac: Increase fuzz from of fate-aac-pns-encode from 72 to 74 for Loongson

Signed-off-by: Michael Niedermayer 

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

 tests/fate/aac.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 8d1e303..324b05d 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -175,7 +175,7 @@ fate-aac-pns-encode: REF = 
$(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.w
 fate-aac-pns-encode: CMP_SHIFT = -4096
 fate-aac-pns-encode: CMP_TARGET = 616
 fate-aac-pns-encode: SIZE_TOLERANCE = 3560
-fate-aac-pns-encode: FUZZ = 72
+fate-aac-pns-encode: FUZZ = 74
 
 FATE_AAC_ENCODE += fate-aac-tns-encode
 fate-aac-tns-encode: CMD = enc_dec_pcm adts wav s16le 
$(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -c:a aac 
-aac_tns 1 -aac_is 0 -aac_pns 0 -aac_ms 0 -b:a 128k -cutoff 22050  -fflags 
+bitexact -flags +bitexact

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


[FFmpeg-cvslog] avfilter/vf_waveform: add graticule support

2016-03-05 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Thu Mar  3 19:44:00 
2016 +0100| [361e48f0eda0788ec953a2e32619a60c236c879d] | committer: Paul B Mahol

avfilter/vf_waveform: add graticule support

Signed-off-by: Paul B Mahol 

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

 doc/filters.texi  |   14 
 libavfilter/vf_waveform.c |  173 +
 2 files changed, 187 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index 4ec7507..3f7153d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -13161,6 +13161,20 @@ Similar as above, but shows difference between blue 
and red chroma.
 @item color
 Displays actual color value on waveform.
 @end table
+
+@item graticule, g
+Set which graticule to display.
+
+@table @samp
+@item none
+Do not display graticule.
+
+@item green
+Display green graticule showing legal broadcast ranges.
+@end table
+
+@item opacity, o
+Set graticule opacity.
 @end table
 
 @section xbr
diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index a84e3f2..c5a7ae9 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -49,6 +49,8 @@ typedef struct WaveformContext {
 intmirror;
 intdisplay;
 intenvelope;
+intgraticule;
+float  opacity;
 intestart[4];
 inteend[4];
 int*emax[4][4];
@@ -60,6 +62,7 @@ typedef struct WaveformContext {
 intsize;
 void (*waveform)(struct WaveformContext *s, AVFrame *in, AVFrame *out,
  int component, int intensity, int offset, int column);
+void (*graticulef)(struct WaveformContext *s, AVFrame *out);
 const AVPixFmtDescriptor *desc;
 } WaveformContext;
 
@@ -95,6 +98,12 @@ static const AVOption waveform_options[] = {
 { "chroma",  NULL, 0, AV_OPT_TYPE_CONST, {.i64=CHROMA},  0, 0, FLAGS, 
"filter" },
 { "achroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ACHROMA}, 0, 0, FLAGS, 
"filter" },
 { "color",   NULL, 0, AV_OPT_TYPE_CONST, {.i64=COLOR},   0, 0, FLAGS, 
"filter" },
+{ "graticule", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, 
{.i64=0}, 0, 1, FLAGS, "graticule" },
+{ "g", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, 
{.i64=0}, 0, 1, FLAGS, "graticule" },
+{ "none",  NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
"graticule" },
+{ "green", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
"graticule" },
+{ "opacity", "set graticule opacity", OFFSET(opacity), AV_OPT_TYPE_FLOAT, 
{.dbl=0.75}, 0, 1, FLAGS },
+{ "o",   "set graticule opacity", OFFSET(opacity), AV_OPT_TYPE_FLOAT, 
{.dbl=0.75}, 0, 1, FLAGS },
 { NULL }
 };
 
@@ -1081,7 +1090,163 @@ static void color(WaveformContext *s, AVFrame *in, 
AVFrame *out,
 }
 
 static const uint8_t black_yuva_color[4] = { 0, 127, 127, 255 };
+static const uint8_t green_yuva_color[4] = { 255, 0, 0, 255 };
 static const uint8_t black_gbrp_color[4] = { 0, 0, 0, 255 };
+static const uint8_t lines[4][2] = { { 16, 235 }, { 16, 240 }, { 16, 240 }, { 
0, 255 } };
+
+static void blend_vline(uint8_t *dst, int height, int linesize, float o1, 
float o2, int v)
+{
+int y;
+
+for (y = 0; y < height; y++) {
+dst[0] = v * o1 + dst[0] * o2;
+
+dst += linesize;
+}
+}
+
+static void blend_vline16(uint16_t *dst, int height, int linesize, float o1, 
float o2, int v)
+{
+int y;
+
+for (y = 0; y < height; y++) {
+dst[0] = v * o1 + dst[0] * o2;
+
+dst += linesize / 2;
+}
+}
+
+static void blend_hline(uint8_t *dst, int width, float o1, float o2, int v)
+{
+int x;
+
+for (x = 0; x < width; x++) {
+dst[x] = v * o1 + dst[x] * o2;
+}
+}
+
+static void blend_hline16(uint16_t *dst, int width, float o1, float o2, int v)
+{
+int x;
+
+for (x = 0; x < width; x++) {
+dst[x] = v * o1 + dst[x] * o2;
+}
+}
+
+static void graticule_none(WaveformContext *s, AVFrame *out)
+{
+}
+
+static void graticule_green_row(WaveformContext *s, AVFrame *out)
+{
+const float o1 = s->opacity;
+const float o2 = 1. - o1;
+int c, p, l, offset = 0;
+
+for (c = 0; c < s->ncomp; c++) {
+if (!((1 << c) & s->pcomp))
+continue;
+
+for (p = 0; p < s->ncomp; p++) {
+const int is_chroma = (p == 1 || p == 2);
+const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0);
+const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0);
+const int v = green_yuva_color[p];
+for (l = 0; l < FF_ARRAY_ELEMS(lines[0]); l++) {
+int x = offset + (s->mirror ? 255 - lines[c][l] : lines[c][l]);
+uint8_t *dst = out->data[p] + (x >> shift_w);
+
+blend_vline(dst, out->height >> shift_h, out->linesize[p], o1, 
o2, v);
+}
+}
+
+offset += 256

[FFmpeg-cvslog] fate/aac: Increase fuzz from of fate-aac-pns-encode from 72 to 74 for Loongson

2016-03-05 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Mar  5 21:58:16 2016 +0100| [c78a7267175a3d1e07b88be42f949f95124925e3] | 
committer: Michael Niedermayer

fate/aac: Increase fuzz from of fate-aac-pns-encode from 72 to 74 for Loongson

Signed-off-by: Michael Niedermayer 

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

 tests/fate/aac.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 8d1e303..324b05d 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -175,7 +175,7 @@ fate-aac-pns-encode: REF = 
$(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.w
 fate-aac-pns-encode: CMP_SHIFT = -4096
 fate-aac-pns-encode: CMP_TARGET = 616
 fate-aac-pns-encode: SIZE_TOLERANCE = 3560
-fate-aac-pns-encode: FUZZ = 72
+fate-aac-pns-encode: FUZZ = 74
 
 FATE_AAC_ENCODE += fate-aac-tns-encode
 fate-aac-tns-encode: CMD = enc_dec_pcm adts wav s16le 
$(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -c:a aac 
-aac_tns 1 -aac_is 0 -aac_pns 0 -aac_ms 0 -b:a 128k -cutoff 22050  -fflags 
+bitexact -flags +bitexact

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


[FFmpeg-cvslog] avformat/dump: Fix context/level for payload dump

2016-03-05 Thread Mark Harris
ffmpeg | branch: master | Mark Harris  | Sat Mar  5 
09:10:00 2016 -0800| [238ddd6482d7aea2e917760a9bef291030a11e61] | committer: 
Michael Niedermayer

avformat/dump: Fix context/level for payload dump

Use the context and level specified to av_pkt_dump_log2(),
instead of panic level (0), for dumping packet payload.

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 9e7c12b..86bb82d 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -101,7 +101,7 @@ static void pkt_dump_internal(void *avcl, FILE *f, int 
level, const AVPacket *pk
 HEXDUMP_PRINT("\n");
 HEXDUMP_PRINT("  size=%d\n", pkt->size);
 if (dump_payload)
-av_hex_dump(f, pkt->data, pkt->size);
+hex_dump_internal(avcl, f, level, pkt->data, pkt->size);
 }
 
 void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const 
AVStream *st)

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