[FFmpeg-devel] [PATCH 2/2] fate: add decoder test for ATRAC9

2018-07-01 Thread Rostislav Pehlivanov
Signed-off-by: Rostislav Pehlivanov 
---
 tests/fate/atrac.mak | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak
index acf79a539c..38a5f33150 100644
--- a/tests/fate/atrac.mak
+++ b/tests/fate/atrac.mak
@@ -33,7 +33,17 @@ fate-atrac3p-2: REF = 
$(SAMPLES)/atrac3p/sonateno14op27-2-cut.pcm
 
 FATE_ATRAC3P-$(call DEMDEC, OMA, ATRAC3P) += $(FATE_ATRAC3P)
 
-FATE_ATRAC_ALL = $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes) $(FATE_ATRAC3P-yes)
+FATE_ATRAC9 += fate-atrac9-1
+fate-atrac9-1: CMD = pcm -i $(TARGET_SAMPLES)/atrac9/sy_title01.at9
+fate-atrac9-1: REF = $(SAMPLES)/atrac9/sy_title01.at9.pcm
+
+FATE_ATRAC9 += fate-atrac9-2
+fate-atrac9-2: CMD = pcm -i 
$(TARGET_SAMPLES)/atrac9/3_br144_nb10_ib10_g04_bex1_sf1_d1.at9
+fate-atrac9-2: REF = 
$(SAMPLES)/atrac9/3_br144_nb10_ib10_g04_bex1_sf1_d1.at9.pcm
+
+FATE_ATRAC9-$(call DEMDEC, OMA, ATRAC9) += $(FATE_ATRAC9)
+
+FATE_ATRAC_ALL = $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes) $(FATE_ATRAC3P-yes) 
$(FATE_ATRAC9-yes)
 
 $(FATE_ATRAC_ALL): CMP = oneoff
 
@@ -42,3 +52,4 @@ FATE_SAMPLES_AVCONV += $(FATE_ATRAC_ALL)
 fate-atrac:   $(FATE_ATRAC_ALL)
 fate-atrac3:  $(FATE_ATRAC3-yes)
 fate-atrac3p: $(FATE_ATRAC3P-yes)
+fate-atrac9:  $(FATE_ATRAC9-yes)
-- 
2.18.0

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


Re: [FFmpeg-devel] [PATCH v3 0/3] libavformat/aadec: seek support

2018-07-01 Thread Karsten Otto
Bump… I’d like a review please :-)

Cheers, Karsten

> Am 21.06.2018 um 18:58 schrieb Karsten Otto :
> 
> A patch series adding seek support to libavformat/aadec.
> 
> This third version of the series addresses all the earlier comments from the
> mailing list (thanks again!). It also introduces much better timestamps with
> sub-second precision.
> 
> The new patch 3/3 improves handling of mp3 content in the aa container: After
> a seek operation, it skips to the next valid frame header, which prevents
> audible glitches from partial frame playback.
> 
> Karsten Otto (3):
>  aadec: improve eof detection
>  aadec: add chapters and seeking
>  aadec: fix seeking in mp3 content
> 
> libavformat/aadec.c | 129 
> 1 file changed, 121 insertions(+), 8 deletions(-)
> 
> -- 
> 2.14.3 (Apple Git-98)
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH 3/3] lavc: implement an ATRAC9 decoder

2018-07-01 Thread Carl Eugen Hoyos
2018-07-01 13:45 GMT+02:00, Rostislav Pehlivanov :

> Here's the last patch which fixes the lack of timestamps. Seems
> like what's done for atrac3p is enough.

You should bump some version number for the new feature, I believe
we have always bumped minor for new codecs, you could merge
patches one and three.

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


Re: [FFmpeg-devel] [PATCH 2/2] fate: add decoder test for ATRAC9

2018-07-01 Thread Michael Niedermayer
On Sun, Jul 01, 2018 at 12:46:00PM +0100, Rostislav Pehlivanov wrote:
> Signed-off-by: Rostislav Pehlivanov 
> ---
>  tests/fate/atrac.mak | 13 -
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak
> index acf79a539c..38a5f33150 100644
> --- a/tests/fate/atrac.mak
> +++ b/tests/fate/atrac.mak
> @@ -33,7 +33,17 @@ fate-atrac3p-2: REF = 
> $(SAMPLES)/atrac3p/sonateno14op27-2-cut.pcm

fails on mips:
stddev:  200.81 PSNR: 50.27 MAXDIFF: 2448 bytes:   937984/   937984
MAXDIFF: |2448 - 0| >= 1
Test atrac9-2 failed. Look at tests/data/fate/atrac9-2.err for details.
make: *** [fate-atrac9-2] Error 1
make: *** Waiting for unfinished jobs



[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] fate: add decoder test for ATRAC9

2018-07-01 Thread James Almer
On 7/1/2018 8:46 AM, Rostislav Pehlivanov wrote:
> Signed-off-by: Rostislav Pehlivanov 
> ---
>  tests/fate/atrac.mak | 13 -
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak
> index acf79a539c..38a5f33150 100644
> --- a/tests/fate/atrac.mak
> +++ b/tests/fate/atrac.mak
> @@ -33,7 +33,17 @@ fate-atrac3p-2: REF = 
> $(SAMPLES)/atrac3p/sonateno14op27-2-cut.pcm
>  
>  FATE_ATRAC3P-$(call DEMDEC, OMA, ATRAC3P) += $(FATE_ATRAC3P)
>  
> -FATE_ATRAC_ALL = $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes) $(FATE_ATRAC3P-yes)
> +FATE_ATRAC9 += fate-atrac9-1
> +fate-atrac9-1: CMD = pcm -i $(TARGET_SAMPLES)/atrac9/sy_title01.at9
> +fate-atrac9-1: REF = $(SAMPLES)/atrac9/sy_title01.at9.pcm
> +
> +FATE_ATRAC9 += fate-atrac9-2
> +fate-atrac9-2: CMD = pcm -i 
> $(TARGET_SAMPLES)/atrac9/3_br144_nb10_ib10_g04_bex1_sf1_d1.at9
> +fate-atrac9-2: REF = 
> $(SAMPLES)/atrac9/3_br144_nb10_ib10_g04_bex1_sf1_d1.at9.pcm

Are these pcm files from a test suit (if any), or at least created by an
official binary decoder?
I'd rather avoid adding tests using reference files created by this same
decoder, seeing you for example resent the patch three times to fix a
wrong calculation each time. You never know if you'll find others later,
which could result in different output that may just be different enough
to fail on some hardware (usually mips/arm/x86_32).

But if there is no other way, make sure to create the reference files
using cpuflags 0 using an x86_32 build (for x87 float math), and not
with asm enabled (imdct and such), or with an x86_64 build.
If you can't run a x86_32 build, I or someone else could do it instead.

> +
> +FATE_ATRAC9-$(call DEMDEC, OMA, ATRAC9) += $(FATE_ATRAC9)
> +
> +FATE_ATRAC_ALL = $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes) $(FATE_ATRAC3P-yes) 
> $(FATE_ATRAC9-yes)
>  
>  $(FATE_ATRAC_ALL): CMP = oneoff
>  
> @@ -42,3 +52,4 @@ FATE_SAMPLES_AVCONV += $(FATE_ATRAC_ALL)
>  fate-atrac:   $(FATE_ATRAC_ALL)
>  fate-atrac3:  $(FATE_ATRAC3-yes)
>  fate-atrac3p: $(FATE_ATRAC3P-yes)
> +fate-atrac9:  $(FATE_ATRAC9-yes)
> 

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


Re: [FFmpeg-devel] Reimbursement request

2018-07-01 Thread Thomas Volkert

On 23.03.2018 22:12, Thilo Borgmann wrote:
> Am 18.03.18 um 20:57 schrieb Thilo Borgmann:
>> Hi,
>>
>>> As already discussed, FFmpeg was present on Chemnitzer Linux Tage, in
>>> addition, Thilo and I went to Brussels for FOSDEM where we attended
>>> the talks in the multimedia room kindly (co-) organized by Kieran and
>>> answered some questions. I would like to request reimbursement for the
>>> travel costs, that's flights-only, Thilo payed the gasoline and the
>>> hotel.
>> from my side there are hotel & gas for Chemnitz, and flight & hotel for 
>> Brussels that I'd like to ask to reimburse for. For Chemnitz it is the usual 
>> drive by car Carl Eugen and me do from Berlin, which are around 290 km one 
>> way as well as a shared hotel room (they did not manage to put all of us 
>> into one suite this time, so we had to stick to two rooms for all four of 
>> us):
>>
>>> Chemnitz: 125,85
>> Hotel: 194.00 EUR
>> Gas:   36.62 + 21.67 + 39.51 =  97.80 EUR
>> -
>> Total: 291,80 EUR
>>
>>
>>> Brussels: 192,41
>> Flight:111.81 EUR
>> Hotel: 186.69 EUR
>> -
>> Total: 298,50 EUR
>>
>>
>> BTW, on both events some of our T-Shirts have found their way to some users, 
>> forgot to mention this in the CLT report. Also, we ran out of stock of our 
>> stickers during CLT, so I will order new ones asap. I also forgot to mention 
>> that we have met the organizers of a similar event in Prague in October 
>> (LinuxDays) [1]. I'll try to have us there with a booth, too!
>>
>> Also, regarding FOSDEM, I'd really like to have a booth there from next year 
>> on. In contrast to Chemnitz (and possibly Prague), Brussels is an expensive 
>> place in general though I could get an AirBNB near the price of an actual 
>> hotel in Chemnitz. FOSDEM of course is the biggest event with a bigger 
>> audience of technical knowledge in our field, so we really should consider a 
>> booth at FOSDEM, IMHO. (However this is almost a year in the future)
>>
>> If there are no objections, I'll send all the invoices to Stefano privately 
>> (like I almost always do...;)
>>

My expenses contained:
- 184 € for 1080 km of traveling from the area of Stuttgart to Chemnitz
(transporting monitor and other equipment, stopped midway again)
- 194€ for the hotel double room during the weekend for Alexander
Strasser and me.
=> 378 €

I will send the invoice to Stefano.

(pictures are already on our Facebook page)


Best regards,
Thomas.

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


[FFmpeg-devel] [PATCH 1/2] avcodec/truemotion2: Check len in tm2_read_stream()

2018-07-01 Thread Michael Niedermayer
Fixes: Timeout
Fixes: 
8774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5942199639343104

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
---
 libavcodec/truemotion2.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index b689efdb99..58a577f53c 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -377,6 +377,10 @@ static int tm2_read_stream(TM2Context *ctx, const uint8_t 
*buf, int stream_id, i
 }
 }
 } else {
+if (len < 0) {
+ret = AVERROR_INVALIDDATA;
+goto end;
+}
 for (i = 0; i < toks; i++) {
 ctx->tokens[stream_id][i] = codes.recode[0];
 if (stream_id <= TM2_MOT && ctx->tokens[stream_id][i] >= 
TM2_DELTAS) {
-- 
2.18.0

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


[FFmpeg-devel] [PATCH 2/2] avcodec/indeo4: Check for end of bitstream in decode_mb_info()

2018-07-01 Thread Michael Niedermayer
Fixes: Timeout
Fixes: 
8776/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5361788798369792

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/indeo4.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 7dff9db877..15ad6f8afc 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -492,6 +492,11 @@ static int decode_mb_info(IVI45DecContext *ctx, 
IVIBandDesc *band,
 mb->b_mv_x   =
 mb->b_mv_y   = 0;
 
+if (get_bits_left(&ctx->gb) < 1) {
+av_log(avctx, AV_LOG_ERROR, "Insufficient input for mb 
info\n");
+return AVERROR_INVALIDDATA;
+}
+
 if (get_bits1(&ctx->gb)) {
 if (ctx->frame_type == IVI4_FRAMETYPE_INTRA) {
 av_log(avctx, AV_LOG_ERROR, "Empty macroblock in an INTRA 
picture!\n");
-- 
2.18.0

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


Re: [FFmpeg-devel] [PATCH v3 1/3] aadec: improve eof detection

2018-07-01 Thread Michael Niedermayer
On Thu, Jun 21, 2018 at 06:58:24PM +0200, Karsten Otto wrote:
> Remember the end position of audio content in the file and check it during
> read_packet. There always seems to be other data beyond it, which could be
> misinterpreted as more audio.

What is this additional data ?

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 1/4] configure: fix check for opencl_vaapi_intel_media.

2018-07-01 Thread myp...@gmail.com
On Thu, Jun 28, 2018 at 11:51 PM Mark Thompson  wrote:
>
> On 21/06/18 12:45, Jun Zhao wrote:
> > opencl_vaapi_intel_media doesn't depend on libmfx, OpenCL™ Drivers
> > and Runtimes for Intel® Architectureis is a standalone release, more
> > information can be found in the link:
> > https://software.intel.com/en-us/articles/opencl-drivers.
> >
> > Signed-off-by: Jun Zhao 
> > ---
> >  configure| 6 ++
> >  libavutil/hwcontext_opencl.c | 7 ++-
> >  2 files changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/configure b/configure
> > index 6ad5ce8..717b2f1 100755
> > --- a/configure
> > +++ b/configure
> > @@ -6336,10 +6336,8 @@ fi
> >
> >  if enabled_all opencl vaapi ; then
> >  enabled opencl_drm_beignet && enable opencl_vaapi_beignet
> > -if enabled libmfx ; then
> > -check_type "CL/cl.h CL/va_ext.h" 
> > "clCreateFromVA_APIMediaSurfaceINTEL_fn" &&
> > -enable opencl_vaapi_intel_media
> > -fi
> > +check_type "CL/cl.h CL/va_ext.h" 
> > "clCreateFromVA_APIMediaSurfaceINTEL_fn" &&
> > +enable opencl_vaapi_intel_media
> >  fi
> >
> >  if enabled_all opencl dxva2 ; then
> > diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
> > index 07458c2..f6cceef 100644
> > --- a/libavutil/hwcontext_opencl.c
> > +++ b/libavutil/hwcontext_opencl.c
> > @@ -46,7 +46,9 @@
> >  #endif
> >
> >  #if HAVE_OPENCL_VAAPI_INTEL_MEDIA
> > +#if CONFIG_LIBMFX
> >  #include 
> > +#endif
> >  #include 
> >  #include 
> >  #include "hwcontext_vaapi.h"
> > @@ -2249,10 +2251,13 @@ static int opencl_map_from_qsv(AVHWFramesContext 
> > *dst_fc, AVFrame *dst,
> >  cl_int cle;
> >  int err, p;
> >
> > +#if CONFIG_LIBMFX
> >  if (src->format == AV_PIX_FMT_QSV) {
> >  mfxFrameSurface1 *mfx_surface = (mfxFrameSurface1*)src->data[3];
> >  va_surface = *(VASurfaceID*)mfx_surface->Data.MemId;
> > -} else if (src->format == AV_PIX_FMT_VAAPI) {
> > +} else
> > +#endif
> > +if (src->format == AV_PIX_FMT_VAAPI) {
> >  va_surface = (VASurfaceID)(uintptr_t)src->data[3];
> >  } else {
> >  return AVERROR(ENOSYS);
> >
>
> Looks ok to me.
>
> Thanks,
Applied, thanks
>
> - Mark
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 4/4] hwcontext_opencl: remove an unused variable

2018-07-01 Thread myp...@gmail.com
On Thu, Jun 28, 2018 at 11:52 PM Mark Thompson  wrote:
>
> On 21/06/18 12:45, Jun Zhao wrote:
> > remove an unused variable
> >
> > Signed-off-by: Jun Zhao 
> > ---
> >  libavutil/hwcontext_opencl.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
> > index 295d6be..4718a86 100644
> > --- a/libavutil/hwcontext_opencl.c
> > +++ b/libavutil/hwcontext_opencl.c
> > @@ -929,7 +929,6 @@ static int 
> > opencl_enumerate_intel_media_vaapi_devices(AVHWDeviceContext *hwdev,
> >  clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn
> >  clGetDeviceIDsFromVA_APIMediaAdapterINTEL;
> >  cl_int cle;
> > -int err;
> >
> >  clGetDeviceIDsFromVA_APIMediaAdapterINTEL =
> >  clGetExtensionFunctionAddressForPlatform(platform_id,
> >
>
> LGTM.
>
> Thanks,
>
> - Mark
Applied, thanks
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 3/4] hwcontext_opencl: Remove the opencl_device_init in opencl_device_derive

2018-07-01 Thread myp...@gmail.com
On Thu, Jun 28, 2018 at 11:50 PM Mark Thompson  wrote:
>
> On 21/06/18 12:45, Jun Zhao wrote:
> > In opencl device derived case, don't need to call opencl_device_init.
> >
> > Signed-off-by: Jun Zhao 
> > ---
> >  libavutil/hwcontext_opencl.c | 7 ++-
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
> > index 9e96e96..295d6be 100644
> > --- a/libavutil/hwcontext_opencl.c
> > +++ b/libavutil/hwcontext_opencl.c
> > @@ -1196,7 +1196,7 @@ static int opencl_device_derive(AVHWDeviceContext 
> > *hwdev,
> >  AVHWDeviceContext *src_ctx,
> >  int flags)
> >  {
> > -int err;
> > +int err = 0;
>
> This looks wrong - initialising it here may hide useful warnings.  If there 
> is a specific case where it isn't set then set it there.
Fixed this part and applied, thanks.
>
> >  switch (src_ctx->type) {
> >
> >  #if HAVE_OPENCL_DRM_BEIGNET
> > @@ -1362,10 +1362,7 @@ static int opencl_device_derive(AVHWDeviceContext 
> > *hwdev,
> >  break;
> >  }
> >
> > -if (err < 0)
> > -return err;
> > -
> > -return opencl_device_init(hwdev);
> > +return err;
>
> This part looks good.  (Not sure how I missed this case, the hwdevice test 
> does show it when run at higher debug level.)
>
> >  }
> >
> >  static int opencl_get_plane_format(enum AVPixelFormat pixfmt,
> >
>
> Thanks,
>
> - Mark
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



-- 
===
Jun zhao/赵军
+++
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 1/3] aadec: improve eof detection

2018-07-01 Thread Karsten Otto

> Am 02.07.2018 um 02:33 schrieb Michael Niedermayer :
> 
>> […]
> 
> What is this additional data ?
> 

Short answer: Since there is no official format specification, nobody really 
knows.

Longer answer: From what I have read, the aa format is a generic frame, 
containing several "tagged“ sections, where the first contains a metadata 
dictionary, and the largest section contains the encrypted audio. The current 
aadec.c code is working on this level. From personal experience with the 
official player I know the format usually contains a cover image; I guess this 
might be in one of the sections after the audio. If anybody ever finds out what 
these sections are good for and how to use them, that would be another patch 
series. I only know that it is not a good idea to try and play them, hence this 
fix to improve eof detection.

Cheers, Karsten

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