[FFmpeg-devel] DXVA Question.

2015-04-26 Thread Anton Fedchin
Hi,

I'm working on porting our project Kodi to DirectX11. We also use ffmpeg
and I've implemented patch to ffmpeg dxva related code to work with d3d11
video API. It works good. Before we send the patch we have a question.

Question is what you prefer a configure switch or something else?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] DXVA Question.

2015-04-26 Thread Hendrik Leppkes
On Sun, Apr 26, 2015 at 8:45 AM, Anton Fedchin  wrote:
> Hi,
>
> I'm working on porting our project Kodi to DirectX11. We also use ffmpeg
> and I've implemented patch to ffmpeg dxva related code to work with d3d11
> video API. It works good. Before we send the patch we have a question.
>
> Question is what you prefer a configure switch or something else?

Part of the dxva support in ffmpeg is public API (ie. dxva_context).
Unfortunately, you cannot touch this struct without a major version
bump of ffmpeg.
This being public API also means that you cannot modify it based on
configure switches, since the API must remain the same.

So keeping in mind that you cannot touch the public API, personally, I
think the cleanest way to do this would be to just leave ffmpeg alone,
and a user-app that needs D3D11 could just write a simple wrapper
IDirectXVideoDecoder that internally calls ID3D11VideoContext instead.
This would not need any changes to the public API, or ffmpeg at all,
at only a small level of effort to write this wrapper (which is
probably half an hour).

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


Re: [FFmpeg-devel] [PATCH] Using struct for StyleRecords and implementing support for large boxes(>32 bit) for 3gpp timed text

2015-04-26 Thread Niklesh Lalwani
On 26-Apr-2015 10:46 AM, "Philip Langdale"  wrote:
>
> On Sun, 26 Apr 2015 05:04:07 +0200
> Michael Niedermayer  wrote:
>
> > On Sun, Apr 26, 2015 at 08:22:56AM +0530, Niklesh Lalwani wrote:
> > > On Sun, Apr 26, 2015 at 6:56 AM, Michael Niedermayer
> > > 
> > > > wrote:
> > > >
> > > >>
> > > >> > +struct __attribute__((__packed__)) StyleRecord {
> > > >
> > > >
> > > >> you cant do this
> > > >
> > > > attribute packed is not ANSI/ISO C
> > > >
> > > >
> > > >> How do I implement packed structures then here? ( since I don't
> > > >> want
> > > padding for proper alignment with the text sample)
> >
> > you cant create packed structs, theres no portable way to do so
> > also there likely would be issues on either big or little endian
> > with such structs if they where used for reading data
>
> You're right. This was my suggestion. Niklesh - you can still use the
> struct, but you'd have to read the members of the struct out one by
> one. It's not clear whether that provides any meaningful benefit. You
> still end up losing the benefit of being able to directly address the
> styles. I think we have to abandon this approach. Sorry.
>
> --phil
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

No problem. I had never used packed structs before so it was good to learn
about them. So should I just post the patch for implementing support for
large boxes for now?

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


Re: [FFmpeg-devel] [PATCH] libavcodec/exr.c : exr lossy compression B44 added

2015-04-26 Thread Michael Niedermayer
On Sun, Apr 26, 2015 at 11:11:58AM +0530, greeshma wrote:
> Updated Patch

[...]

>  0001-exr-lossy-compression-B44-added.patch |  151 
> +
>  1 file changed, 151 insertions(+)
> 0efe2282ed40546e0736c2e46f092a9ddd2c5808  
> 0001-B44-compression-techinique-added.patch
> From d857196db9c6d388e49a9160da4e63c8a19839ae Mon Sep 17 00:00:00 2001
> From: greeshmab 
> Date: Sun, 26 Apr 2015 10:14:34 +0530
> Subject: [PATCH] B44 compression techinique added
> 
> ---
>  0001-exr-lossy-compression-B44-added.patch | 151 
> +
>  1 file changed, 151 insertions(+)
>  create mode 100644 0001-exr-lossy-compression-B44-added.patch
> 
> diff --git a/0001-exr-lossy-compression-B44-added.patch 
> b/0001-exr-lossy-compression-B44-added.patch
> new file mode 100644
> index 000..535efcc
> --- /dev/null
> +++ b/0001-exr-lossy-compression-B44-added.patch
> @@ -0,0 +1,151 @@
> +From c10e182e56310cfc5ebd6c6f8801128668042a2a Mon Sep 17 00:00:00 2001
> +From: greeshmab 
> +Date: Mon, 20 Apr 2015 23:33:55 +0530
> +Subject: [PATCH] exr lossy compression B44 added
> +
> +---
> + libavcodec/exr.c | 114 
> +++
> + 1 file changed, 114 insertions(+)
> +
> +diff --git a/libavcodec/exr.c b/libavcodec/exr.c
> +index f9525ec..92ecc9b 100644
> +--- a/libavcodec/exr.c
>  b/libavcodec/exr.c
> +@@ -770,6 +770,115 @@ static int piz_uncompress(EXRContext *s, const uint8_t 
> *src, int ssize,
> + return 0;
> + }
> + 
> ++static void B44_unpack14 ( GetByteContext *gb, uint16_t out[16]){

thats not a updated patch, thats a patch adding a patch




[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA


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


Re: [FFmpeg-devel] [PATCH] Using struct for StyleRecords and implementing support for large boxes(>32 bit) for 3gpp timed text

2015-04-26 Thread wm4
On Sun, 26 Apr 2015 08:33:34 +0530
Niklesh Lalwani  wrote:

> >
> >
> >
> > On Sun, Apr 26, 2015 at 7:05 AM, Carl Eugen Hoyos 
> > wrote:
> >
> > Niklesh Lalwani  iitb.ac.in> writes:
> >
> >
> >> > +if ((text_style + i)->face_style_flags
> >
> >
> >> This looks very strange imo...
> >
> >
> What's wrong? I point my structure to the start of the style records, so,
> (text_style + i)->face_style_flags will give me the value of the attribute
> face_style_flags of (i+1)th style record.

We usually write: text_style[i].face_style_flags

It's the same.

> 
> >> > +long tsmb_size;
> >
> >
> >> int64_t ?
> >
> >
> >>
> My bad. Yes, I intended to use int64_t / double. I will correct it.
> 

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


Re: [FFmpeg-devel] DXVA Question.

2015-04-26 Thread Matt Oliver
On 26 April 2015 at 18:01, Hendrik Leppkes  wrote:

> On Sun, Apr 26, 2015 at 8:45 AM, Anton Fedchin  wrote:
> > Hi,
> >
> > I'm working on porting our project Kodi to DirectX11. We also use ffmpeg
> > and I've implemented patch to ffmpeg dxva related code to work with d3d11
> > video API. It works good. Before we send the patch we have a question.
> >
> > Question is what you prefer a configure switch or something else?
>
> Part of the dxva support in ffmpeg is public API (ie. dxva_context).
> Unfortunately, you cannot touch this struct without a major version
> bump of ffmpeg.
> This being public API also means that you cannot modify it based on
> configure switches, since the API must remain the same.
>
> So keeping in mind that you cannot touch the public API, personally, I
> think the cleanest way to do this would be to just leave ffmpeg alone,
> and a user-app that needs D3D11 could just write a simple wrapper
> IDirectXVideoDecoder that internally calls ID3D11VideoContext instead.
> This would not need any changes to the public API, or ffmpeg at all,
> at only a small level of effort to write this wrapper (which is
> probably half an hour).


Having the DXVA context as public API is a bit of a hindrance with respect
to updates obviously. Although given that the context is already there from
a usability and functionality stand point it would be better to have an
updated version than rely on users to write their own code to get around it
(kind of goes in the category of whats the point of having it if people
have to write around it in the first place).

But that said I understand version bumps are a pain so anything that can
avoid that would be recommended (worst case an additional dx11_context?).
Also given that the existing context only contains pointers for DX related
stuff (like the D3D9 surface) if a version bump is out of the question then
would it be suitable to perhaps use the existing context but change the
types pointed to internally (i.e. if DX11 then treat as D3D11 surface
internally etc.)? Just trying to think of alternatives here.

Either way I would recommend atleast putting a patch up as people might be
able to work around it and then its publicly available on the mailing list
for those that want to apply it to their local repos anyway (assuming its
not to much effort). Or at the very least ready and waiting for when FFmpeg
has to do a version bump anyway.

PS. Big fan of Kodi ;)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avfoundation: do not report an I/O error if devices are listed

2015-04-26 Thread Thomas Volkert
From: ThomasVolkert 

---
 libavdevice/avfoundation.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 763e675..aa8e825 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -708,7 +708,9 @@ static int avf_read_header(AVFormatContext *s)
 int index  = [devices indexOfObject:device];
 av_log(ctx, AV_LOG_INFO, "[%d] %s\n", index, name);
 }
- goto fail;
+
+[pool release];
+return 0;
 }
 
 // parse input filename for video and audio device
-- 
1.8.5.2 (Apple Git-48)

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


Re: [FFmpeg-devel] DXVA Question.

2015-04-26 Thread Hendrik Leppkes
On Sun, Apr 26, 2015 at 12:52 PM, Matt Oliver  wrote:
> On 26 April 2015 at 18:01, Hendrik Leppkes  wrote:
>
>> On Sun, Apr 26, 2015 at 8:45 AM, Anton Fedchin  wrote:
>> > Hi,
>> >
>> > I'm working on porting our project Kodi to DirectX11. We also use ffmpeg
>> > and I've implemented patch to ffmpeg dxva related code to work with d3d11
>> > video API. It works good. Before we send the patch we have a question.
>> >
>> > Question is what you prefer a configure switch or something else?
>>
>> Part of the dxva support in ffmpeg is public API (ie. dxva_context).
>> Unfortunately, you cannot touch this struct without a major version
>> bump of ffmpeg.
>> This being public API also means that you cannot modify it based on
>> configure switches, since the API must remain the same.
>>
>> So keeping in mind that you cannot touch the public API, personally, I
>> think the cleanest way to do this would be to just leave ffmpeg alone,
>> and a user-app that needs D3D11 could just write a simple wrapper
>> IDirectXVideoDecoder that internally calls ID3D11VideoContext instead.
>> This would not need any changes to the public API, or ffmpeg at all,
>> at only a small level of effort to write this wrapper (which is
>> probably half an hour).
>
>
> Having the DXVA context as public API is a bit of a hindrance with respect
> to updates obviously. Although given that the context is already there from
> a usability and functionality stand point it would be better to have an
> updated version than rely on users to write their own code to get around it
> (kind of goes in the category of whats the point of having it if people
> have to write around it in the first place).

The context always needs to be public API, or you couldn't use/fill it
(or you use an opaque context with AVOptions, but I really don't like
passing pointers through AVOptions).
That in itself isn't terrible, as we have plenty public contexts. The
problem is that the size is also part of the ABI right now - which
means you cannot even extend it by adding new fields.
Obviously a better design would be if at least it had an allocation
function, so that it could be extended with new fields at the end
freely, without violating the ABI - but while we can introduce that
function now, we still cannot change the size of the struct until a
major bump.

>
> But that said I understand version bumps are a pain so anything that can
> avoid that would be recommended (worst case an additional dx11_context?).
> Also given that the existing context only contains pointers for DX related
> stuff (like the D3D9 surface) if a version bump is out of the question then
> would it be suitable to perhaps use the existing context but change the
> types pointed to internally (i.e. if DX11 then treat as D3D11 surface
> internally etc.)? Just trying to think of alternatives here.

D3D11 needs one additional pointer at least (ie. instead of only the
decoder, it needs a decoding context and a decoder), so you cannot
cheat it like that, not without really evil hackery.

As a kind-of-maintainer of the DXVA2 code (really just the only one
who touched it over the last few years), I'm not sure I would like to
see a hack solution just to get it working right now.
The approach I suggested has the added benefit that it works with any
past version of ffmpeg as well, so there is no need to hurry in
anything now, and we could think about supporting both cleanly and in
parallel in the future.

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


Re: [FFmpeg-devel] [PATCH] libavcodec/exr.c : exr lossy compression B44 added

2015-04-26 Thread greeshma
Sorry,My mistake
New patch attached.



Greeshma


On Sun, Apr 26, 2015 at 3:42 PM, Michael Niedermayer 
wrote:

> On Sun, Apr 26, 2015 at 11:11:58AM +0530, greeshma wrote:
> > Updated Patch
>
> [...]
>
> >  0001-exr-lossy-compression-B44-added.patch |  151
> +
> >  1 file changed, 151 insertions(+)
> > 0efe2282ed40546e0736c2e46f092a9ddd2c5808
> 0001-B44-compression-techinique-added.patch
> > From d857196db9c6d388e49a9160da4e63c8a19839ae Mon Sep 17 00:00:00 2001
> > From: greeshmab 
> > Date: Sun, 26 Apr 2015 10:14:34 +0530
> > Subject: [PATCH] B44 compression techinique added
> >
> > ---
> >  0001-exr-lossy-compression-B44-added.patch | 151
> +
> >  1 file changed, 151 insertions(+)
> >  create mode 100644 0001-exr-lossy-compression-B44-added.patch
> >
> > diff --git a/0001-exr-lossy-compression-B44-added.patch
> b/0001-exr-lossy-compression-B44-added.patch
> > new file mode 100644
> > index 000..535efcc
> > --- /dev/null
> > +++ b/0001-exr-lossy-compression-B44-added.patch
> > @@ -0,0 +1,151 @@
> > +From c10e182e56310cfc5ebd6c6f8801128668042a2a Mon Sep 17 00:00:00 2001
> > +From: greeshmab 
> > +Date: Mon, 20 Apr 2015 23:33:55 +0530
> > +Subject: [PATCH] exr lossy compression B44 added
> > +
> > +---
> > + libavcodec/exr.c | 114
> +++
> > + 1 file changed, 114 insertions(+)
> > +
> > +diff --git a/libavcodec/exr.c b/libavcodec/exr.c
> > +index f9525ec..92ecc9b 100644
> > +--- a/libavcodec/exr.c
> >  b/libavcodec/exr.c
> > +@@ -770,6 +770,115 @@ static int piz_uncompress(EXRContext *s, const
> uint8_t *src, int ssize,
> > + return 0;
> > + }
> > +
> > ++static void B44_unpack14 ( GetByteContext *gb, uint16_t out[16]){
>
> thats not a updated patch, thats a patch adding a patch
>
>
>
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> In fact, the RIAA has been known to suggest that students drop out
> of college or go to community college in order to be able to afford
> settlements. -- The RIAA
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
From 2a64a7420d2ff3d3a2411ee3979155333603edce Mon Sep 17 00:00:00 2001
From: greeshmab 
Date: Sun, 26 Apr 2015 17:54:23 +0530
Subject: [PATCH] updated patch for B44 compression exr

---
 libavcodec/exr.c | 110 +++
 1 file changed, 110 insertions(+)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index f9525ec..a0715e6 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -770,6 +770,111 @@ static int piz_uncompress(EXRContext *s, const uint8_t *src, int ssize,
 return 0;
 }
 
+static void B44_unpack14 ( const uint8_t r[14], uint16_t out[16]){
+uint16_t shift;
+av_assert0(r[2] != 0xfc);
+out[0] = (r[0] << 8) | r[1];
+shift = (r[2] >> 2);
+out[ 1] = out[ 0] + ((r[ 5] >> 2) << shift);
+out[ 2] = out[ 1] + ((r[ 8] >> 2) << shift);
+out[ 3] = out[ 2] + ((r[11] >> 2) << shift);
+out[ 4] = out[ 0] + (((r[ 2] << 4) | (r[ 3] >> 4)) << shift);
+out[ 5] = out[ 4] + (((r[ 5] << 4) | (r[ 6] >> 4)) << shift);
+out[ 6] = out[ 5] + (((r[ 8] << 4) | (r[ 9] >> 4)) << shift);
+out[ 7] = out[ 6] + (((r[11] << 4) | (r[12] >> 4)) << shift);
+out[ 8] = out[ 4] + (((r[ 3] << 2) | (r[ 4] >> 6)) << shift);
+out[ 9] = out[ 8] + (((r[ 6] << 2) | (r[ 7] >> 6)) << shift);
+out[10] = out[ 9] + (((r[ 9] << 2) | (r[10] >> 6)) << shift);
+out[11] = out[10] + (((r[12] << 2) | (r[13] >> 6)) << shift);
+out[12] = out[ 8] + (r[ 4]  << shift);
+out[13] = out[12] + (r[ 7]  << shift);
+out[14] = out[13] + (r[10]  << shift);
+out[15] = out[14] + (r[13]  << shift);
+for (int i = 0; i < 16; ++i) {  //if any out value exceeds 16bits 
+if (out[i] & 0x8000)
+out[i] &= 0x7fff;
+else
+out[i] = ~out[i];
+}
+}
+
+static void B44_unpack3 ( const uint8_t r[3], uint16_t out[16]){//pixels have the same value
+av_assert0(r[2] == 0xfc);
+out[0] = (r[0] << 8) | r[1];
+if (out[0] & 0x8000)
+out[0] &= 0x7fff;
+else
+out[0] = ~out[0];
+for (int i = 1; i < 16; ++i)
+out[i] = out[0];
+}
+
+static int b44_uncompress(EXRContext *s, const uint8_t *src,int ssize, int dsize, EXRThreadData *td){
+GetByteContext gb;
+unsigned long  dest_len = dsize;
+uint8_t *out;
+int i, j;
+uint16_t *tmp = (uint16_t *)td->tmp;
+out = td->uncompressed_data;
+bytestream2_init(&gb, src, ssize);
+for (i = 0; i < s->nb_channels; i++) {
+EXRChannel *channel = &s->channels[i];
+int size = channel->pixel_type;
+int inSize = ssize;
+if (channel->pixel_type != EXR_HALF) {  // UINT or FLOAT channel.
+int n = s->xdelta * s->ydelta * size * sizeof (*tmp);
+memc

Re: [FFmpeg-devel] [PATCH] Using struct for StyleRecords and implementing support for large boxes(>32 bit) for 3gpp timed text

2015-04-26 Thread Niklesh Lalwani
On 26-Apr-2015 4:00 PM, "wm4"  wrote:
>
>
> We usually write: text_style[i].face_style_flags
>
> It's the same.

Got it. Thank you. :)

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


Re: [FFmpeg-devel] [PATCH] libavcodec/exr.c : exr lossy compression B44 added

2015-04-26 Thread Michael Niedermayer
On Sun, Apr 26, 2015 at 05:55:55PM +0530, greeshma wrote:
> Sorry,My mistake
> New patch attached.

segfaults with
./ffmpeg_g -i FFmpeg_Logo_B44_HalfRGBA.exr -f null -
[...]
==22198== Invalid write of size 2
==22198==at 0x4C2E1B4: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:877)
==22198==by 0x736EBD: b44_uncompress (exr.c:850)
==22198==by 0x73768B: decode_block (exr.c:998)
==22198==by 0xAA804C: avcodec_default_execute2 (utils.c:1118)
==22198==by 0x738AEF: decode_frame (exr.c:1441)
==22198==by 0xAABE8C: avcodec_decode_video2 (utils.c:2379)
==22198==by 0x676CDE: try_decode_frame (utils.c:2671)
==22198==by 0x679779: avformat_find_stream_info (utils.c:3314)
==22198==by 0x41C4C7: open_input_file (ffmpeg_opt.c:911)
==22198==by 0x42457A: open_files (ffmpeg_opt.c:2748)
==22198==by 0x4246F8: ffmpeg_parse_options (ffmpeg_opt.c:2785)
==22198==by 0x438993: main (ffmpeg.c:4045)
==22198==  Address 0x11233f3e is not stack'd, malloc'd or (recently) free'd

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.


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


Re: [FFmpeg-devel] [PATCH] Using struct for StyleRecords and implementing support for large boxes(>32 bit) for 3gpp timed text

2015-04-26 Thread Philip Langdale
On Sun, 26 Apr 2015 14:32:31 +0530
Niklesh Lalwani  wrote:

> On 26-Apr-2015 10:46 AM, "Philip Langdale"  wrote:
> 
> No problem. I had never used packed structs before so it was good to
> learn about them. So should I just post the patch for implementing
> support for large boxes for now?

Yes please. And, as we discussed, change the dynarrays from int** to
int*.

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


[FFmpeg-devel] [PATCH 1/2] tests/subtitles: fix microdvd crlf in ref

2015-04-26 Thread Clément Bœsch
---
 tests/ref/fate/sub-microdvd | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/ref/fate/sub-microdvd b/tests/ref/fate/sub-microdvd
index 4a2e00c..d2170bc 100644
--- a/tests/ref/fate/sub-microdvd
+++ b/tests/ref/fate/sub-microdvd
@@ -7,12 +7,12 @@ PlayResY: 288
 [V4+ Styles]
 Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, 
Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, 
MarginV, Encoding
 Style: Default,Comic Sans 
MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
-
-[Events]
-Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
-Dialogue: 
0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
-Dialogue: 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
-Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
+
+[Events]
+Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
+Dialogue: 
0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
+Dialogue: 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
+Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
 Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
 Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more crazy 
stuff
 Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
-- 
2.3.6

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


[FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Clément Bœsch
This will test properly CRLF with make fate and any make fate-sub-*
test. The rawdiff was currently triggered only by make fate-subtitles.
---
 tests/fate/subtitles.mak | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
index 53cd4cb..3f9a3af 100644
--- a/tests/fate/subtitles.mak
+++ b/tests/fate/subtitles.mak
@@ -64,6 +64,8 @@ fate-sub-charenc: CMD = fmtstdout ass -sub_charenc cp1251 -i 
$(TARGET_SAMPLES)/s
 FATE_SUBTITLES-$(call ENCMUX, ASS, ASS) += $(FATE_SUBTITLES_ASS-yes)
 FATE_SUBTITLES += $(FATE_SUBTITLES-yes)
 
+fate-sub-%: CMP = rawdiff
+
 FATE_SAMPLES_FFMPEG += $(FATE_SUBTITLES)
 fate-subtitles: CMP = rawdiff
 fate-subtitles: $(FATE_SUBTITLES)
-- 
2.3.6

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


Re: [FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Michael Niedermayer
On Sun, Apr 26, 2015 at 07:30:59PM +0200, Clément Bœsch wrote:
> This will test properly CRLF with make fate and any make fate-sub-*
> test. The rawdiff was currently triggered only by make fate-subtitles.
> ---
>  tests/fate/subtitles.mak | 2 ++
>  1 file changed, 2 insertions(+)

fails with:

@@ -4,18 +4,18 @@
 PlayResX: 384
 PlayResY: 288

-[V4+ Styles]
-Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, 
Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, 
MarginV, Encoding
-Style: Default,Comic Sans 
MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
-
-[Events]
-Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
-Dialogue: 
0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
-Dialogue: 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
-Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
-Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
-Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more crazy 
stuff
-Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
+[V4+ Styles]
+Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, 
Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, 
MarginV, Encoding
+Style: Default,Comic Sans 
MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
+
+[Events]
+Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
+Dialogue: 
0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
+Dialogue: 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
+Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
+Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
+Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more crazy 
stuff
+Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
 Dialogue: 0,0:02:15.60,0:02:40.00,Default,,0,0,0,,...continues up to...
 Dialogue: 0,0:02:40.00,0:03:00.00,Default,,0,0,0,,this one.
 Dialogue: 0,0:03:04.00,0:03:12.00,Default,,0,0,0,,and now...

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

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


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


Re: [FFmpeg-devel] [PATCH] avfoundation: do not report an I/O error if devices are listed

2015-04-26 Thread Thilo Borgmann
Am 26.04.15 um 12:59 schrieb Thomas Volkert:
> From: ThomasVolkert 
> 
> ---
>  libavdevice/avfoundation.m | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
> index 763e675..aa8e825 100644
> --- a/libavdevice/avfoundation.m
> +++ b/libavdevice/avfoundation.m
> @@ -708,7 +708,9 @@ static int avf_read_header(AVFormatContext *s)
>  int index  = [devices indexOfObject:device];
>  av_log(ctx, AV_LOG_INFO, "[%d] %s\n", index, name);
>  }
> - goto fail;
> +
> +[pool release];
> +return 0;
>  }
>  
>  // parse input filename for video and audio device
> 

Have you checked that a call to destroy_context is not necessary in that
case? If it is not needed, please add another label and jump there
instead (three lines above the existing fail label). As is, this patch
introduces redundancy.

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


Re: [FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Clément Bœsch
On Sun, Apr 26, 2015 at 08:36:28PM +0200, Michael Niedermayer wrote:
> On Sun, Apr 26, 2015 at 07:30:59PM +0200, Clément Bœsch wrote:
> > This will test properly CRLF with make fate and any make fate-sub-*
> > test. The rawdiff was currently triggered only by make fate-subtitles.
> > ---
> >  tests/fate/subtitles.mak | 2 ++
> >  1 file changed, 2 insertions(+)
> 
> fails with:
> 
> @@ -4,18 +4,18 @@
>  PlayResX: 384
>  PlayResY: 288
> 
> -[V4+ Styles]
> -Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> MarginR, MarginV, Encoding
> -Style: Default,Comic Sans 
> MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> -
> -[Events]
> -Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, 
> Text
> -Dialogue: 
> 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> -Dialogue: 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
> bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> -Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> -Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> -Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> crazy stuff
> -Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> +[V4+ Styles]
> +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> MarginR, MarginV, Encoding
> +Style: Default,Comic Sans 
> MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> +
> +[Events]
> +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, 
> Text
> +Dialogue: 
> 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> +Dialogue: 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
> bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> +Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> +Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> +Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> crazy stuff
> +Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
>  Dialogue: 0,0:02:15.60,0:02:40.00,Default,,0,0,0,,...continues up to...
>  Dialogue: 0,0:02:40.00,0:03:00.00,Default,,0,0,0,,this one.
>  Dialogue: 0,0:03:04.00,0:03:12.00,Default,,0,0,0,,and now...
> 

Weird, I can't reproduce. I wonder if that's because of the mail layer...
Can you try https://github.com/ubitux/FFmpeg/compare/microdvd-fate-fix
instead?

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Michael Niedermayer
On Sun, Apr 26, 2015 at 08:55:02PM +0200, Clément Bœsch wrote:
> On Sun, Apr 26, 2015 at 08:36:28PM +0200, Michael Niedermayer wrote:
> > On Sun, Apr 26, 2015 at 07:30:59PM +0200, Clément Bœsch wrote:
> > > This will test properly CRLF with make fate and any make fate-sub-*
> > > test. The rawdiff was currently triggered only by make fate-subtitles.
> > > ---
> > >  tests/fate/subtitles.mak | 2 ++
> > >  1 file changed, 2 insertions(+)
> > 
> > fails with:
> > 
> > @@ -4,18 +4,18 @@
> >  PlayResX: 384
> >  PlayResY: 288
> > 
> > -[V4+ Styles]
> > -Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> > ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> > MarginR, MarginV, Encoding
> > -Style: Default,Comic Sans 
> > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > -
> > -[Events]
> > -Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, 
> > Text
> > -Dialogue: 
> > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > -Dialogue: 
> > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic bold 
> > underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > -Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > -Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > -Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> > crazy stuff
> > -Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > +[V4+ Styles]
> > +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> > ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> > MarginR, MarginV, Encoding
> > +Style: Default,Comic Sans 
> > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > +
> > +[Events]
> > +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, 
> > Text
> > +Dialogue: 
> > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > +Dialogue: 
> > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic bold 
> > underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > +Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > +Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > +Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> > crazy stuff
> > +Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> >  Dialogue: 0,0:02:15.60,0:02:40.00,Default,,0,0,0,,...continues up to...
> >  Dialogue: 0,0:02:40.00,0:03:00.00,Default,,0,0,0,,this one.
> >  Dialogue: 0,0:03:04.00,0:03:12.00,Default,,0,0,0,,and now...
> > 
> 
> Weird, I can't reproduce. I wonder if that's because of the mail layer...
> Can you try https://github.com/ubitux/FFmpeg/compare/microdvd-fate-fix
> instead?

yes, that works


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


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


Re: [FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Michael Niedermayer
On Sun, Apr 26, 2015 at 10:07:09PM +0200, Michael Niedermayer wrote:
> On Sun, Apr 26, 2015 at 08:55:02PM +0200, Clément Bœsch wrote:
> > On Sun, Apr 26, 2015 at 08:36:28PM +0200, Michael Niedermayer wrote:
> > > On Sun, Apr 26, 2015 at 07:30:59PM +0200, Clément Bœsch wrote:
> > > > This will test properly CRLF with make fate and any make fate-sub-*
> > > > test. The rawdiff was currently triggered only by make fate-subtitles.
> > > > ---
> > > >  tests/fate/subtitles.mak | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > 
> > > fails with:
> > > 
> > > @@ -4,18 +4,18 @@
> > >  PlayResX: 384
> > >  PlayResY: 288
> > > 
> > > -[V4+ Styles]
> > > -Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> > > ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> > > MarginR, MarginV, Encoding
> > > -Style: Default,Comic Sans 
> > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > -
> > > -[Events]
> > > -Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > Effect, Text
> > > -Dialogue: 
> > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > -Dialogue: 
> > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic bold 
> > > underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > -Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > -Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > -Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> > > crazy stuff
> > > -Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > > +[V4+ Styles]
> > > +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> > > ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> > > MarginR, MarginV, Encoding
> > > +Style: Default,Comic Sans 
> > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > +
> > > +[Events]
> > > +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > Effect, Text
> > > +Dialogue: 
> > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > +Dialogue: 
> > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic bold 
> > > underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > +Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > +Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > +Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> > > crazy stuff
> > > +Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > >  Dialogue: 0,0:02:15.60,0:02:40.00,Default,,0,0,0,,...continues up to...
> > >  Dialogue: 0,0:02:40.00,0:03:00.00,Default,,0,0,0,,this one.
> > >  Dialogue: 0,0:03:04.00,0:03:12.00,Default,,0,0,0,,and now...
> > > 
> > 
> > Weird, I can't reproduce. I wonder if that's because of the mail layer...
> > Can you try https://github.com/ubitux/FFmpeg/compare/microdvd-fate-fix
> > instead?
> 
> yes, that works

fails on mingw

--- /home/michael/ffmpeg-git/ffmpeg/tests/ref/fate/sub-movtextenc   
2015-04-26 21:54:27.091838220 +0200
+++ tests/data/fate/sub-movtextenc  2015-04-26 22:09:25.663857151 +0200
@@ -1 +1 @@
-ef264064c522389d0cf267c4d6235561
+ef264064c522389d0cf267c4d6235561
Test sub-movtextenc failed. Look at tests/data/fate/sub-movtextenc.err for 
details.



[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato


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


Re: [FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Clément Bœsch
On Sun, Apr 26, 2015 at 10:18:24PM +0200, Michael Niedermayer wrote:
> On Sun, Apr 26, 2015 at 10:07:09PM +0200, Michael Niedermayer wrote:
> > On Sun, Apr 26, 2015 at 08:55:02PM +0200, Clément Bœsch wrote:
> > > On Sun, Apr 26, 2015 at 08:36:28PM +0200, Michael Niedermayer wrote:
> > > > On Sun, Apr 26, 2015 at 07:30:59PM +0200, Clément Bœsch wrote:
> > > > > This will test properly CRLF with make fate and any make fate-sub-*
> > > > > test. The rawdiff was currently triggered only by make fate-subtitles.
> > > > > ---
> > > > >  tests/fate/subtitles.mak | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > 
> > > > fails with:
> > > > 
> > > > @@ -4,18 +4,18 @@
> > > >  PlayResX: 384
> > > >  PlayResY: 288
> > > > 
> > > > -[V4+ Styles]
> > > > -Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> > > > ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, 
> > > > MarginL, MarginR, MarginV, Encoding
> > > > -Style: Default,Comic Sans 
> > > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > > -
> > > > -[Events]
> > > > -Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > > Effect, Text
> > > > -Dialogue: 
> > > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > > -Dialogue: 
> > > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic bold 
> > > > underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > > -Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > > -Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > > -Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some 
> > > > more crazy stuff
> > > > -Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > > > +[V4+ Styles]
> > > > +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> > > > ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, 
> > > > MarginL, MarginR, MarginV, Encoding
> > > > +Style: Default,Comic Sans 
> > > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > > +
> > > > +[Events]
> > > > +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > > Effect, Text
> > > > +Dialogue: 
> > > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > > +Dialogue: 
> > > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic bold 
> > > > underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > > +Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > > +Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > > +Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some 
> > > > more crazy stuff
> > > > +Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > > >  Dialogue: 0,0:02:15.60,0:02:40.00,Default,,0,0,0,,...continues up to...
> > > >  Dialogue: 0,0:02:40.00,0:03:00.00,Default,,0,0,0,,this one.
> > > >  Dialogue: 0,0:03:04.00,0:03:12.00,Default,,0,0,0,,and now...
> > > > 
> > > 
> > > Weird, I can't reproduce. I wonder if that's because of the mail layer...
> > > Can you try https://github.com/ubitux/FFmpeg/compare/microdvd-fate-fix
> > > instead?
> > 
> > yes, that works
> 
> fails on mingw
> 
> --- /home/michael/ffmpeg-git/ffmpeg/tests/ref/fate/sub-movtextenc   
> 2015-04-26 21:54:27.091838220 +0200
> +++ tests/data/fate/sub-movtextenc  2015-04-26 22:09:25.663857151 +0200
> @@ -1 +1 @@
> -ef264064c522389d0cf267c4d6235561
> +ef264064c522389d0cf267c4d6235561
> Test sub-movtextenc failed. Look at tests/data/fate/sub-movtextenc.err for 
> details.
> 

Is this better? (also available on my branch)

-- 
Clément B.
From bd2c7706cf52affde2ff3202e73048ddf1b59201 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= 
Date: Sun, 26 Apr 2015 19:29:40 +0200
Subject: [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

This will test properly CRLF with make fate and any make fate-sub-*
test. The rawdiff was currently triggered only by make fate-subtitles.

Also make sure fate-sub-* only match the tests relying on fmtstdout
command, to at least avoid failing on MingW. See
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-April/172395.html
---
 tests/fate/subtitles.mak | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
index 53cd4cb..07d886a 100644
--- a/tests/fate/subtitles.mak
+++ b/tests/fate/subtitles.mak
@@ -13,8 +13,8 @@ fate-sub-microdvd-remux: CMD = fmtstdout microdvd -i $(TARGET_SAMPLES)/sub/Micro
 FATE_SUBTITLES_ASS-$(call DEMDEC, MOV, MOVTEXT) += fate-sub-movtext
 fate-sub-movtext: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4
 
-FATE_SUBTITLES-$(call ENCDEC, M

Re: [FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Clément Bœsch
On Sun, Apr 26, 2015 at 10:30:14PM +0200, Clément Bœsch wrote:
> On Sun, Apr 26, 2015 at 10:18:24PM +0200, Michael Niedermayer wrote:
> > On Sun, Apr 26, 2015 at 10:07:09PM +0200, Michael Niedermayer wrote:
> > > On Sun, Apr 26, 2015 at 08:55:02PM +0200, Clément Bœsch wrote:
> > > > On Sun, Apr 26, 2015 at 08:36:28PM +0200, Michael Niedermayer wrote:
> > > > > On Sun, Apr 26, 2015 at 07:30:59PM +0200, Clément Bœsch wrote:
> > > > > > This will test properly CRLF with make fate and any make fate-sub-*
> > > > > > test. The rawdiff was currently triggered only by make 
> > > > > > fate-subtitles.
> > > > > > ---
> > > > > >  tests/fate/subtitles.mak | 2 ++
> > > > > >  1 file changed, 2 insertions(+)
> > > > > 
> > > > > fails with:
> > > > > 
> > > > > @@ -4,18 +4,18 @@
> > > > >  PlayResX: 384
> > > > >  PlayResY: 288
> > > > > 
> > > > > -[V4+ Styles]
> > > > > -Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, 
> > > > > ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, 
> > > > > Alignment, MarginL, MarginR, MarginV, Encoding
> > > > > -Style: Default,Comic Sans 
> > > > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > > > -
> > > > > -[Events]
> > > > > -Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > > > Effect, Text
> > > > > -Dialogue: 
> > > > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > > > -Dialogue: 
> > > > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
> > > > > bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > > > -Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > > > -Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > > > -Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some 
> > > > > more crazy stuff
> > > > > -Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > > > > +[V4+ Styles]
> > > > > +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, 
> > > > > ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, 
> > > > > Alignment, MarginL, MarginR, MarginV, Encoding
> > > > > +Style: Default,Comic Sans 
> > > > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > > > +
> > > > > +[Events]
> > > > > +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > > > Effect, Text
> > > > > +Dialogue: 
> > > > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > > > +Dialogue: 
> > > > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
> > > > > bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > > > +Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > > > +Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > > > +Dialogue: 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some 
> > > > > more crazy stuff
> > > > > +Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > > > >  Dialogue: 0,0:02:15.60,0:02:40.00,Default,,0,0,0,,...continues up 
> > > > > to...
> > > > >  Dialogue: 0,0:02:40.00,0:03:00.00,Default,,0,0,0,,this one.
> > > > >  Dialogue: 0,0:03:04.00,0:03:12.00,Default,,0,0,0,,and now...
> > > > > 
> > > > 
> > > > Weird, I can't reproduce. I wonder if that's because of the mail 
> > > > layer...
> > > > Can you try https://github.com/ubitux/FFmpeg/compare/microdvd-fate-fix
> > > > instead?
> > > 
> > > yes, that works
> > 
> > fails on mingw
> > 
> > --- /home/michael/ffmpeg-git/ffmpeg/tests/ref/fate/sub-movtextenc   
> > 2015-04-26 21:54:27.091838220 +0200
> > +++ tests/data/fate/sub-movtextenc  2015-04-26 22:09:25.663857151 +0200
> > @@ -1 +1 @@
> > -ef264064c522389d0cf267c4d6235561
> > +ef264064c522389d0cf267c4d6235561
> > Test sub-movtextenc failed. Look at tests/data/fate/sub-movtextenc.err for 
> > details.
> > 
> 
> Is this better? (also available on my branch)
> 

Sorry, proper patch attached.

-- 
Clément B.
From d58e72522416d3824e5ca21bfc8896b1e81b6cca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= 
Date: Sun, 26 Apr 2015 19:29:40 +0200
Subject: [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

This will test properly CRLF with make fate and any make fate-sub-*
test. The rawdiff was currently triggered only by make fate-subtitles.

Also make sure fate-sub-* only match the tests relying on fmtstdout
command, to at least avoid failing on MingW. See
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-April/172395.html
---
 tests/fate/subtitles.mak | 7 ---
 tests/ref/fate/binsub-movtextenc | 1 +
 tests/ref/fate/sub-movtextenc| 1 -
 3 files changed, 5 insertions(+), 4 deletions(-)
 create mode 100644 tests/ref/fate/binsub-movtextenc
 delete mode 100

Re: [FFmpeg-devel] [PATCH 2/2] tests: make sure subtitles test are run with a rawdiff

2015-04-26 Thread Michael Niedermayer
On Sun, Apr 26, 2015 at 10:34:49PM +0200, Clément Bœsch wrote:
> On Sun, Apr 26, 2015 at 10:30:14PM +0200, Clément Bœsch wrote:
> > On Sun, Apr 26, 2015 at 10:18:24PM +0200, Michael Niedermayer wrote:
> > > On Sun, Apr 26, 2015 at 10:07:09PM +0200, Michael Niedermayer wrote:
> > > > On Sun, Apr 26, 2015 at 08:55:02PM +0200, Clément Bœsch wrote:
> > > > > On Sun, Apr 26, 2015 at 08:36:28PM +0200, Michael Niedermayer wrote:
> > > > > > On Sun, Apr 26, 2015 at 07:30:59PM +0200, Clément Bœsch wrote:
> > > > > > > This will test properly CRLF with make fate and any make 
> > > > > > > fate-sub-*
> > > > > > > test. The rawdiff was currently triggered only by make 
> > > > > > > fate-subtitles.
> > > > > > > ---
> > > > > > >  tests/fate/subtitles.mak | 2 ++
> > > > > > >  1 file changed, 2 insertions(+)
> > > > > > 
> > > > > > fails with:
> > > > > > 
> > > > > > @@ -4,18 +4,18 @@
> > > > > >  PlayResX: 384
> > > > > >  PlayResY: 288
> > > > > > 
> > > > > > -[V4+ Styles]
> > > > > > -Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > > > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, 
> > > > > > ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, 
> > > > > > Alignment, MarginL, MarginR, MarginV, Encoding
> > > > > > -Style: Default,Comic Sans 
> > > > > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > > > > -
> > > > > > -[Events]
> > > > > > -Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > > > > Effect, Text
> > > > > > -Dialogue: 
> > > > > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > > > > -Dialogue: 
> > > > > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
> > > > > > bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > > > > -Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > > > > -Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > > > > -Dialogue: 
> > > > > > 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> > > > > > crazy stuff
> > > > > > -Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > > > > > +[V4+ Styles]
> > > > > > +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > > > > > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, 
> > > > > > ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, 
> > > > > > Alignment, MarginL, MarginR, MarginV, Encoding
> > > > > > +Style: Default,Comic Sans 
> > > > > > MS,30,&H123456,&H123456,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > > > > > +
> > > > > > +[Events]
> > > > > > +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, 
> > > > > > Effect, Text
> > > > > > +Dialogue: 
> > > > > > 0,0:00:40.00,0:00:52.00,Default,,0,0,0,,{\c&H345678&}foo{\c}\N{\c&HABCDEF&}bar{\c}\Nbla
> > > > > > +Dialogue: 
> > > > > > 0,0:00:52.00,0:00:56.00,Default,,0,0,0,,{\u1}{\s1}{\i1}{\b1}italic 
> > > > > > bold underline strike{\s0}{\u0}\Nitalic bold no-underline no-strike
> > > > > > +Dialogue: 0,0:00:56.00,0:01:00.00,Default,,0,0,0,,back to
> > > > > > +Dialogue: 0,0:01:00.00,0:01:04.00,Default,,0,0,0,,the future
> > > > > > +Dialogue: 
> > > > > > 0,0:01:20.00,0:01:24.92,Default,,0,0,0,,{\pos(10,20)}Some more 
> > > > > > crazy stuff
> > > > > > +Dialogue: 0,0:02:14.00,0:02:15.60,Default,,0,0,0,,this subtitle...
> > > > > >  Dialogue: 0,0:02:15.60,0:02:40.00,Default,,0,0,0,,...continues up 
> > > > > > to...
> > > > > >  Dialogue: 0,0:02:40.00,0:03:00.00,Default,,0,0,0,,this one.
> > > > > >  Dialogue: 0,0:03:04.00,0:03:12.00,Default,,0,0,0,,and now...
> > > > > > 
> > > > > 
> > > > > Weird, I can't reproduce. I wonder if that's because of the mail 
> > > > > layer...
> > > > > Can you try https://github.com/ubitux/FFmpeg/compare/microdvd-fate-fix
> > > > > instead?
> > > > 
> > > > yes, that works
> > > 
> > > fails on mingw
> > > 
> > > --- /home/michael/ffmpeg-git/ffmpeg/tests/ref/fate/sub-movtextenc   
> > > 2015-04-26 21:54:27.091838220 +0200
> > > +++ tests/data/fate/sub-movtextenc  2015-04-26 22:09:25.663857151 
> > > +0200
> > > @@ -1 +1 @@
> > > -ef264064c522389d0cf267c4d6235561
> > > +ef264064c522389d0cf267c4d6235561
> > > Test sub-movtextenc failed. Look at tests/data/fate/sub-movtextenc.err 
> > > for details.
> > > 
> > 
> > Is this better? (also available on my branch)
> > 
> 
> Sorry, proper patch attached.

testes your git branch
seems working
[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato


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


[FFmpeg-devel] [PATCH 1/2] Support for large boxes(>32 bit) for 3gpp timed text

2015-04-26 Thread Niklesh Lalwani
From: Niklesh 

Signed-off-by: Niklesh 
---
 libavcodec/movtextdec.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index ab4efdb..a5d995d 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -96,7 +96,9 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
 char *ptr = avpkt->data;
 char *end;
 //char *ptr_temp;
-int text_length, tsmb_type, style_entries, tsmb_size;
+int text_length, style_entries;
+uint32_t tsmb_type;
+uint64_t tsmb_size;
 int **style_start = {0,};
 int **style_end = {0,};
 int **style_flags = {0,};
@@ -145,6 +147,11 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
 tsmb_type = AV_RB32(tsmb);
 tsmb += 4;
 
+if (tsmb_size == 0x) {
+tsmb_size = AV_RB64(tsmb);
+tsmb += 8;
+}
+
 if (tsmb_type == MKBETAG('s','t','y','l')) {
 style_entries = AV_RB16(tsmb);
 tsmb += 2;
-- 
1.9.1

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


[FFmpeg-devel] [PATCH 2/2] Using size_t* instead of int** for dynarrays

2015-04-26 Thread Niklesh Lalwani
From: Niklesh 

Signed-off-by: Niklesh 
---
 libavcodec/movtextdec.c | 45 -
 1 file changed, 20 insertions(+), 25 deletions(-)

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index a5d995d..ad1d324 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -32,19 +32,19 @@
 #define STYLE_FLAG_UNDERLINE4
 
 static int text_to_ass(AVBPrint *buf, const char *text, const char *text_end,
-int **style_start, int **style_end,
-int **style_flags, int style_entries)
+size_t *style_start, size_t *style_end,
+size_t *style_flags, int style_entries)
 {
 int i = 0;
 int style_pos = 0;
 while (text < text_end) {
 for (i = 0; i < style_entries; i++) {
-if (*style_flags[i] && style_pos == *style_start[i]) {
-if (*style_flags[i] & STYLE_FLAG_BOLD)
+if (style_flags[i] && style_pos == style_start[i]) {
+if (style_flags[i] & STYLE_FLAG_BOLD)
 av_bprintf(buf, "{\\b1}");
-if (*style_flags[i] & STYLE_FLAG_ITALIC)
+if (style_flags[i] & STYLE_FLAG_ITALIC)
 av_bprintf(buf, "{\\i1}");
-if (*style_flags[i] & STYLE_FLAG_UNDERLINE)
+if (style_flags[i] & STYLE_FLAG_UNDERLINE)
 av_bprintf(buf, "{\\u1}");
 }
 }
@@ -61,12 +61,12 @@ static int text_to_ass(AVBPrint *buf, const char *text, 
const char *text_end,
 }
 
 for (i = 0; i < style_entries; i++) {
-if (*style_flags[i] && style_pos == *style_end[i]) {
-if (*style_flags[i] & STYLE_FLAG_BOLD)
+if (style_flags[i] && style_pos == style_end[i]) {
+if (style_flags[i] & STYLE_FLAG_BOLD)
 av_bprintf(buf, "{\\b0}");
-if (*style_flags[i] & STYLE_FLAG_ITALIC)
+if (style_flags[i] & STYLE_FLAG_ITALIC)
 av_bprintf(buf, "{\\i0}");
-if (*style_flags[i] & STYLE_FLAG_UNDERLINE)
+if (style_flags[i] & STYLE_FLAG_UNDERLINE)
 av_bprintf(buf, "{\\u0}");
 }
 }
@@ -95,17 +95,15 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
 AVBPrint buf;
 char *ptr = avpkt->data;
 char *end;
-//char *ptr_temp;
 int text_length, style_entries;
 uint32_t tsmb_type;
 uint64_t tsmb_size;
-int **style_start = {0,};
-int **style_end = {0,};
-int **style_flags = {0,};
+size_t *style_start = { 0, };
+size_t *style_end = { 0, };
+size_t *style_flags = { 0, };
 const uint8_t *tsmb;
 int index, i;
-int *flag;
-int *style_pos;
+int flag, style_pos;
 
 if (!ptr || avpkt->size < 2)
 return AVERROR_INVALIDDATA;
@@ -157,22 +155,19 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
 tsmb += 2;
 
 for(i = 0; i < style_entries; i++) {
-style_pos = av_malloc(4);
-*style_pos = AV_RB16(tsmb);
+style_pos = AV_RB16(tsmb);
 index = i;
-av_dynarray_add(&style_start, &index, style_pos);
+av_dynarray_add(&style_start, &index, 
(void*)(size_t)style_pos);
 tsmb += 2;
-style_pos = av_malloc(4);
-*style_pos = AV_RB16(tsmb);
+style_pos = AV_RB16(tsmb);
 index = i;
-av_dynarray_add(&style_end, &index, style_pos);
+av_dynarray_add(&style_end, &index, 
(void*)(size_t)style_pos);
 tsmb += 2;
 // fontID = AV_RB16(tsmb);
 tsmb += 2;
-flag = av_malloc(4);
-*flag = AV_RB8(tsmb);
+flag = AV_RB8(tsmb);
 index = i;
-av_dynarray_add(&style_flags, &index, flag);
+av_dynarray_add(&style_flags, &index, (void*)(size_t)flag);
 //fontsize = AV_RB8(tsmb);
 tsmb += 2;
 // text-color-rgba
-- 
1.9.1

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


[FFmpeg-devel] [PATCH] avcodec/ffv1enc: Store the picture dimensions in v3.5+

2015-04-26 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavcodec/ffv1enc.c  |6 --
 tests/ref/seek/vsynth_lena-ffv1   |   40 ++---
 tests/ref/vsynth/vsynth1-ffv1 |4 ++--
 tests/ref/vsynth/vsynth2-ffv1 |4 ++--
 tests/ref/vsynth/vsynth3-ffv1 |4 ++--
 tests/ref/vsynth/vsynth_lena-ffv1 |4 ++--
 6 files changed, 32 insertions(+), 30 deletions(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index af727a5..e559029 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -559,9 +559,9 @@ static int write_extradata(FFV1Context *f)
 put_symbol(c, state, f->version, 0);
 if (f->version > 2) {
 if (f->version == 3) {
-f->micro_version = 4;
+f->micro_version = 5;
 } else if (f->version == 4)
-f->micro_version = 2;
+f->micro_version = 3;
 put_symbol(c, state, f->micro_version, 0);
 }
 
@@ -603,6 +603,8 @@ static int write_extradata(FFV1Context *f)
 if (f->version > 2) {
 put_symbol(c, state, f->ec, 0);
 put_symbol(c, state, f->intra = (f->avctx->gop_size < 2), 0);
+put_symbol(c, state, f->width, 0);
+put_symbol(c, state, f->height, 0);
 }
 
 f->avctx->extradata_size = ff_rac_terminate(c);
diff --git a/tests/ref/seek/vsynth_lena-ffv1 b/tests/ref/seek/vsynth_lena-ffv1
index 5758368..17958d4 100644
--- a/tests/ref/seek/vsynth_lena-ffv1
+++ b/tests/ref/seek/vsynth_lena-ffv1
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5694 size: 
71707
+ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5698 size: 
71707
 ret: 0 st:-1 flags:0  ts:-1.00
-ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5694 size: 
71707
+ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5698 size: 
71707
 ret: 0 st:-1 flags:1  ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos:2499442 size: 
75965
+ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos:2499446 size: 
75965
 ret: 0 st: 0 flags:0  ts: 0.80
-ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos:1631574 size: 
72710
+ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos:1631578 size: 
72710
 ret:-1 st: 0 flags:1  ts:-0.32
 ret:-1 st:-1 flags:0  ts: 2.576668
 ret: 0 st:-1 flags:1  ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos:2499442 size: 
75965
+ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos:2499446 size: 
75965
 ret: 0 st: 0 flags:0  ts: 0.36
-ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 801638 size: 
69485
+ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 801642 size: 
69485
 ret:-1 st: 0 flags:1  ts:-0.76
 ret:-1 st:-1 flags:0  ts: 2.153336
 ret: 0 st:-1 flags:1  ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos:1631574 size: 
72710
+ret: 0 st: 0 flags:1 dts: 0.96 pts: 0.96 pos:1631578 size: 
72710
 ret: 0 st: 0 flags:0  ts:-0.04
-ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5694 size: 
71707
+ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5698 size: 
71707
 ret: 0 st: 0 flags:1  ts: 2.84
-ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos:3393894 size: 
77489
+ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos:3393898 size: 
77489
 ret: 0 st:-1 flags:0  ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos:3393894 size: 
77489
+ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos:3393898 size: 
77489
 ret: 0 st:-1 flags:1  ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 801638 size: 
69485
+ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos: 801642 size: 
69485
 ret: 0 st: 0 flags:0  ts:-0.48
-ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5694 size: 
71707
+ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5698 size: 
71707
 ret: 0 st: 0 flags:1  ts: 2.40
-ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos:3393894 size: 
77489
+ret: 0 st: 0 flags:1 dts: 1.92 pts: 1.92 pos:3393898 size: 
77489
 ret: 0 st:-1 flags:0  ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos:2499442 size: 
75965
+ret: 0 st: 0 flags:1 dts: 1.44 pts: 1.44 pos:2499446 size: 
75965
 ret: 0 st:-1 flags:1  ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5694 size: 
71707
+ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5698 size: 
71707
 ret: 0 st: 0 flags:0  ts:-0.92
-ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5694 size: 
71707
+ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos:   5698 size: 
7170

Re: [FFmpeg-devel] Loongson Optimization Patchs and Machine Express Issuse

2015-04-26 Thread Michael Niedermayer
On Sun, Apr 26, 2015 at 11:38:10AM +0800, 周晓勇 wrote:
> HAVE_LOONGSON is insteaded by HAVE_LOONGSON3. Even Loongson-2E and 2F support 
> Loongson SIMD instructs but have low performance for decoding. We plan to 
> fucus on optimizing Loongson-3A1000, 3B1500 and 3A1500, and modify the 
> configure file to support Loongson-2 series later by adding HAVE_LOONGSON2.

ok, applied patch 0003-avcodec-optimize-mathops-for-Loongson-3-v1.patch

thanks

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

The real ebay dictionary, page 1
"Used only once"- "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."


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


Re: [FFmpeg-devel] [PATCH 2/2] Using size_t* instead of int** for dynarrays

2015-04-26 Thread Michael Niedermayer
On Mon, Apr 27, 2015 at 04:56:45AM +0530, Niklesh Lalwani wrote:
> From: Niklesh 
> 
> Signed-off-by: Niklesh 
> ---
>  libavcodec/movtextdec.c | 45 -
>  1 file changed, 20 insertions(+), 25 deletions(-)

this doesnt apply cleanly (can be applied with patch -F9 though it
seems)
btw, can you add a fate test ?

or provide some testcase for (i hope you didnt already and i forgot)

Thanks

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.


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


Re: [FFmpeg-devel] [PATCH 2/2] Using size_t* instead of int** for dynarrays

2015-04-26 Thread Niklesh Lalwani
On Mon, Apr 27, 2015 at 7:10 AM, Michael Niedermayer 
>> wrote:
>>
>> > From: Niklesh 
>> >
>> > Signed-off-by: Niklesh 
>> > ---
>> >  libavcodec/movtextdec.c | 45
>> -
>> >  1 file changed, 20 insertions(+), 25 deletions(-)
>> this doesnt apply cleanly (can be applied with patch -F9 though it
>> seems)
>>
>> Did you apply this patch over [PATCH 1/2] posted? Could this be the
problem?

> btw, can you add a fate test ?
>>
>> I haven't used FATE yet, so it might take a while for me to understand it
and add a fate test (I do intend to get familiar with it in a few days).

> or provide some testcase for (i hope you didnt already and i forgot)
>>
>>  Can I provide the 3gpp file I used my code for testing?

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


Re: [FFmpeg-devel] Loongson Optimization Patchs and Machine Express Issuse

2015-04-26 Thread 周晓勇
The imgtec's msa optimization had changed the Makefile earlier than me, it's ok 
now.


> -原始邮件-
> 发件人: "Michael Niedermayer" 
> 发送时间: 2015年4月25日 星期六
> 收件人: "FFmpeg development discussions and patches" 
> 抄送: gaoxiang , "孟小甫" 
> 主题: Re: [FFmpeg-devel] Loongson Optimization Patchs and Machine Express Issuse
> 
> On Wed, Apr 22, 2015 at 02:27:11PM +0800, 周晓勇 wrote:
> >  Makefile |2 +-
> >  arch.mak |1 +
> >  libavcodec/mips/Makefile |2 ++
> >  3 files changed, 4 insertions(+), 1 deletion(-)
> > 26e64031017485302c85e184adcc941a26889962  
> > 0004-makefile-add-Loongson-3-support.patch
> > From aae2e408d57d79aac8760b03eac98b03e04451b1 Mon Sep 17 00:00:00 2001
> > From: ZhouXiaoyong 
> > Date: Wed, 15 Apr 2015 20:26:31 +0800
> > Subject: [PATCH 04/11] makefile: add Loongson-3 support
> 
> doesnt apply cleanly:
> 
> Applying: makefile: add Loongson-3 support
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> Auto-merging libavcodec/mips/Makefile
> CONFLICT (content): Merge conflict in libavcodec/mips/Makefile
> Auto-merging arch.mak
> CONFLICT (content): Merge conflict in arch.mak
> Auto-merging Makefile
> CONFLICT (content): Merge conflict in Makefile
> Failed to merge in the changes.
> Patch failed at 0001 makefile: add Loongson-3 support
> 
> [...]
> 
> -- 
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> If you think the mosad wants you dead since a long time then you are either
> wrong or dead since a long time.



--
周晓勇 @系统研发部
Christian Zhou @System R & D

龙芯中科技术有限公司
Loongson Technology Corporation Limited

北京市海淀区温泉镇中关村环保科技示范园龙芯产业园2号楼
Loongson Industrial Park, building 2 , Zhongguancun Environmental protection 
park,
Haidian District, Beijing, China



0001-makefile-add-Loongson-3-support.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] avformat/avio: add resizeable field to AVIOContext

2015-04-26 Thread Michael Niedermayer
On Tue, Apr 21, 2015 at 02:23:19PM +0200, wm4 wrote:
> On Tue, 21 Apr 2015 13:22:00 +0200
> Michael Niedermayer  wrote:
> 
> > This indicates that its safe to use av_free/av_malloc on the IO context
> > 
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavformat/avio.h|7 +++
> >  libavformat/aviobuf.c |1 +
> >  libavformat/segment.c |1 +
> >  libavformat/wtvdec.c  |3 ++-
> >  4 files changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/avio.h b/libavformat/avio.h
> > index 51913e3..73d1645 100644
> > --- a/libavformat/avio.h
> > +++ b/libavformat/avio.h
> > @@ -196,6 +196,13 @@ typedef struct AVIOContext {
> >   * This field is internal to libavformat and access from outside is 
> > not allowed.
> >   */
> >  int orig_buffer_size;
> > +
> > +/**
> > + * The io buffer can be resized or freed with av_free / av_malloc.
> > + * The user application does not keep a private copy of the buffer 
> > pointer
> > + * which would become stale on such reallocation.
> > + */
> > +int resizeable;
> >  } AVIOContext;
> >  
> >  /* unbuffered I/O */
> > diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> > index 7de59f1..b32ff9f 100644
> > --- a/libavformat/aviobuf.c
> > +++ b/libavformat/aviobuf.c
> > @@ -793,6 +793,7 @@ int ffio_fdopen(AVIOContext **s, URLContext *h)
> >  (*s)->read_seek  = (int64_t (*)(void *, int, int64_t, 
> > int))h->prot->url_read_seek;
> >  }
> >  (*s)->av_class = &ff_avio_class;
> > +(*s)->resizeable = 1;
> >  return 0;
> >  }
> >  
> > diff --git a/libavformat/segment.c b/libavformat/segment.c
> > index 1162ea2..6504b46 100644
> > --- a/libavformat/segment.c
> > +++ b/libavformat/segment.c
> > @@ -511,6 +511,7 @@ static int open_null_ctx(AVIOContext **ctx)
> >  av_free(buf);
> >  return AVERROR(ENOMEM);
> >  }
> > +(*ctx)->resizeable = 1;
> >  return 0;
> >  }
> >  
> > diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
> > index e226690..7b5477b 100644
> > --- a/libavformat/wtvdec.c
> > +++ b/libavformat/wtvdec.c
> > @@ -243,7 +243,8 @@ static AVIOContext * wtvfile_open_sector(int 
> > first_sector, uint64_t length, int
> >  av_freep(&buffer);
> >  av_freep(&wf->sectors);
> >  av_freep(&wf);
> > -}
> > +} else
> > +pb->resizeable = 1;
> >  return pb;
> >  }
> >  
> 
> Looking at it again, ffio_ensure_seekback and ffio_set_buf_size are
> functions which resize the buffer (but by allocating a new buffer to
> avoid av_realloc incompatibility, as Nicolas pointed out).
> 

> So what's the point of this patch?

it intends to prevent memory bugs, like double frees, freeing
randon addresses on the stack and things like that

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

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato


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


Re: [FFmpeg-devel] [PATCH 2/2] Using size_t* instead of int** for dynarrays

2015-04-26 Thread Michael Niedermayer
On Mon, Apr 27, 2015 at 07:33:59AM +0530, Niklesh Lalwani wrote:
> On Mon, Apr 27, 2015 at 7:10 AM, Michael Niedermayer 
> >> wrote:
> >>
> >> > From: Niklesh 
> >> >
> >> > Signed-off-by: Niklesh 
> >> > ---
> >> >  libavcodec/movtextdec.c | 45
> >> -
> >> >  1 file changed, 20 insertions(+), 25 deletions(-)
> >> this doesnt apply cleanly (can be applied with patch -F9 though it
> >> seems)
> >>
> >> Did you apply this patch over [PATCH 1/2] posted? Could this be the
> problem?

i tried to apply patch 1 and then patch 2 IIRC


> 
> > btw, can you add a fate test ?
> >>
> >> I haven't used FATE yet, so it might take a while for me to understand it
> and add a fate test (I do intend to get familiar with it in a few days).

sure, no hurry


> 
> > or provide some testcase for (i hope you didnt already and i forgot)
> >>
> Can I provide the 3gpp file I used my code for testing?

yes

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.


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


[FFmpeg-devel] [PATCH] Using size_t* instead of int** for dynarrays and add support for large boxes

2015-04-26 Thread Niklesh Lalwani
From: Niklesh 

Signed-off-by: Niklesh 
---
 libavcodec/movtextdec.c | 54 +
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 3059599..b134ac5 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -32,19 +32,19 @@
 #define STYLE_FLAG_UNDERLINE4
 
 static int text_to_ass(AVBPrint *buf, const char *text, const char *text_end,
-int **style_start, int **style_end,
-int **style_flags, int style_entries)
+size_t *style_start, size_t *style_end,
+size_t *style_flags, int style_entries)
 {
 int i = 0;
 int style_pos = 0;
 while (text < text_end) {
 for (i = 0; i < style_entries; i++) {
-if (*style_flags[i] && style_pos == *style_start[i]) {
-if (*style_flags[i] & STYLE_FLAG_BOLD)
+if (style_flags[i] && style_pos == style_start[i]) {
+if (style_flags[i] & STYLE_FLAG_BOLD)
 av_bprintf(buf, "{\\b1}");
-if (*style_flags[i] & STYLE_FLAG_ITALIC)
+if (style_flags[i] & STYLE_FLAG_ITALIC)
 av_bprintf(buf, "{\\i1}");
-if (*style_flags[i] & STYLE_FLAG_UNDERLINE)
+if (style_flags[i] & STYLE_FLAG_UNDERLINE)
 av_bprintf(buf, "{\\u1}");
 }
 }
@@ -61,12 +61,12 @@ static int text_to_ass(AVBPrint *buf, const char *text, 
const char *text_end,
 }
 
 for (i = 0; i < style_entries; i++) {
-if (*style_flags[i] && style_pos == *style_end[i]) {
-if (*style_flags[i] & STYLE_FLAG_BOLD)
+if (style_flags[i] && style_pos == style_end[i]) {
+if (style_flags[i] & STYLE_FLAG_BOLD)
 av_bprintf(buf, "{\\b0}");
-if (*style_flags[i] & STYLE_FLAG_ITALIC)
+if (style_flags[i] & STYLE_FLAG_ITALIC)
 av_bprintf(buf, "{\\i0}");
-if (*style_flags[i] & STYLE_FLAG_UNDERLINE)
+if (style_flags[i] & STYLE_FLAG_UNDERLINE)
 av_bprintf(buf, "{\\u0}");
 }
 }
@@ -95,15 +95,15 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
 AVBPrint buf;
 char *ptr = avpkt->data;
 char *end;
-//char *ptr_temp;
-int text_length, tsmb_type, style_entries, tsmb_size;
-int **style_start = {0,};
-int **style_end = {0,};
-int **style_flags = {0,};
+int text_length, style_entries;
+uint32_t tsmb_type;
+uint64_t tsmb_size;
+size_t *style_start = { 0, };
+size_t *style_end = { 0, };
+size_t *style_flags = { 0, };
 const uint8_t *tsmb;
 int index, i;
-int *flag;
-int *style_pos;
+int flag, style_pos;
 
 if (!ptr || avpkt->size < 2)
 return AVERROR_INVALIDDATA;
@@ -145,27 +145,29 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
 tsmb_type = AV_RB32(tsmb);
 tsmb += 4;
 
+if (tsmb_size == 0x) {
+tsmb_size = AV_RB64(tsmb);
+tsmb += 8;
+}
+
 if (tsmb_type == MKBETAG('s','t','y','l')) {
 style_entries = AV_RB16(tsmb);
 tsmb += 2;
 
 for(i = 0; i < style_entries; i++) {
-style_pos = av_malloc(4);
-*style_pos = AV_RB16(tsmb);
+style_pos = AV_RB16(tsmb);
 index = i;
-av_dynarray_add(&style_start, &index, style_pos);
+av_dynarray_add(&style_start, &index, 
(void*)(size_t)style_pos);
 tsmb += 2;
-style_pos = av_malloc(4);
-*style_pos = AV_RB16(tsmb);
+style_pos = AV_RB16(tsmb);
 index = i;
-av_dynarray_add(&style_end, &index, style_pos);
+av_dynarray_add(&style_end, &index, 
(void*)(size_t)style_pos);
 tsmb += 2;
 // fontID = AV_RB16(tsmb);
 tsmb += 2;
-flag = av_malloc(4);
-*flag = AV_RB8(tsmb);
+flag = AV_RB8(tsmb);
 index = i;
-av_dynarray_add(&style_flags, &index, flag);
+av_dynarray_add(&style_flags, &index, (void*)(size_t)flag);
 //fontsize=AV_RB8(tsmb);
 tsmb += 2;
 // text-color-rgba
-- 
1.9.1

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


Re: [FFmpeg-devel] [PATCH] Using size_t* instead of int** for dynarrays and add support for large boxes

2015-04-26 Thread Niklesh Lalwani
This patch should apply properly. This contains both the patches- support
for large boxes, and using size_t for dynarrays.
I found out that the earlier patches was created against a branch which had
a single line different from the master. Hence, the patch didn't apply. My
bad. Apologies for the inconvenience caused.

Also, the test samples I am using-
https://www.dropbox.com/s/rnbbjc75q6ilx77/hlightstylemultiple.3gp?dl=0
https://www.dropbox.com/s/7oqi2gag799exgk/subtitle-test.3gp?dl=0

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


[FFmpeg-devel] Patch[1/2] to fix bug for PPC LE in file libswscale/ppc/swscale_altivec.c

2015-04-26 Thread rongyan
Hi,
GCC tool has a bug of PPC intrinsic interpret, which has been fixed in GCC 
4.9.1. This bug lead to errors in two of our previous patches. We found this 
when we update our GCC tools to 4.9.1 and by reading the related info on GCC 
website. We fix our previous error in two seperate patches:
 1. The first patch is to fix libswscale/ppc/swscale_altivec.c by remove the 
macro GET_VF().
 2. The second patch is to roll back the commit 
af5fec9538d88540af5bb2dd0e4b91162ce6fa13 on Apr. 3rd for file 
libavcodec/ppc/fdctdsp.c, wherer the macros VEC_FMERGEH() and VEC_FMERGEL() are 
removed.
 This is the first patch.
  
 The fate test result on both BE and LE is as follows:

 
  
 Thanks for your review.
 Rong Yan___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] DXVA Question.

2015-04-26 Thread Anton Fedchin
Hendrik Leppkes  gmail.com> writes:

> 
> On Sun, Apr 26, 2015 at 8:45 AM, Anton Fedchin  gmail.com> 
wrote:
> > Hi,
> >
> > I'm working on porting our project Kodi to DirectX11. We also use ffmpeg
> > and I've implemented patch to ffmpeg dxva related code to work with 
d3d11
> > video API. It works good. Before we send the patch we have a question.
> >
> > Question is what you prefer a configure switch or something else?
> 
> Part of the dxva support in ffmpeg is public API (ie. dxva_context).
> Unfortunately, you cannot touch this struct without a major version
> bump of ffmpeg.
> This being public API also means that you cannot modify it based on
> configure switches, since the API must remain the same.
> 
> So keeping in mind that you cannot touch the public API, personally, I
> think the cleanest way to do this would be to just leave ffmpeg alone,
> and a user-app that needs D3D11 could just write a simple wrapper
> IDirectXVideoDecoder that internally calls ID3D11VideoContext instead.
> This would not need any changes to the public API, or ffmpeg at all,
> at only a small level of effort to write this wrapper (which is
> probably half an hour).
> 
> - Hendrik
> 
Hi Hendrik,

Your solution is better than my. Why didn't I think of that? :) Thanks. 

But I think in future MS will drop the old D3D API and I hope what ffmepg 
will be ready to that and will support both APIs.

Thank you in any case.

BR,
Anton.



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


[FFmpeg-devel] Patch[1/2]: Fix bug for PPC LE in file libswscale/ppc/swscale_altivec.c

2015-04-26 Thread rongyan
Hi,
GCC tool has a bug of PPC intrinsic interpret, which has been fixed in GCC 
4.9.1. This bug lead to errors in two of our previous patches. We found this 
when we update our GCC tools to 4.9.1 and by reading the related info on GCC 
website. We fix our previous error in two seperate patches:
 1. The first patch is to fix libswscale/ppc/swscale_altivec.c by remove the 
macro GET_VF().
 2. The second patch is to roll back the commit 
af5fec9538d88540af5bb2dd0e4b91162ce6fa13 on Apr. 3rd for file 
libavcodec/ppc/fdctdsp.c, wherer the macros VEC_FMERGEH() and VEC_FMERGEL() are 
removed.
 This is the first patch.
  
 The fate test result on both BE and LE is as follows:

 
  
 Thanks for your review.
 Rong Yan

0001-libswscale-ppc-swscale_altivec.c-POWER-LE-support-in.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Patch[2/2]: Fix bug for PPC LE in file libavcodec/ppc/fdctdsp.c

2015-04-26 Thread rongyan
Hi,
GCC tool has a bug of PPC intrinsic interpret, which has been fixed in GCC 
4.9.1. This bug lead to errors in two of our previous patches. We found this 
when we update our GCC tools to 4.9.1 and by reading the related info on GCC 
website. We fix our previous error in two seperate patches:
1. The first patch is to fix libswscale/ppc/swscale_altivec.c by remove the 
macro GET_VF().
2. The second patch is to roll back the commit 
af5fec9538d88540af5bb2dd0e4b91162ce6fa13 on Apr. 3rd for file 
libavcodec/ppc/fdctdsp.c, wherer the macros VEC_FMERGEH() and VEC_FMERGEL() are 
removed.
This is the second patch.
  
 The fate test results on both POWER8 BE and POWER8 LE are as follows:
 
  
 Thanks for your review.
 Rong Yan

0002-avcodec-ppc-fdctdsp-POWER-LE-support-in-ff_fdct_alti.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel