Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Mats Peterson

On 02/17/2016 02:07 PM, Michael Niedermayer wrote:

the number of mails you send need time to write and if you had
something more important to do you wouldnt be so obsessed with that
one patch


I'm not more obsessed about this patch than anyone else here who wants 
his/her patch applied. But you seem ridiculously reluctant about 
removing this totally unnecessary monowhite switching code for some reason.


Mats

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


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Mats Peterson

On 02/17/2016 02:10 PM, Mats Peterson wrote:

On 02/17/2016 02:07 PM, Michael Niedermayer wrote:

and i know you understand the muxing side reasonable well as you
stated in your mails how its supposed to work, which matches what
i remember ...


No, Michael. I'm fairly new at FFmpeg development, and I have mostly
dealt with fixing demuxer issues regarding QuickTime palette in Matroska
and the like. The fact that I can see what it takes to fix the muxer
side doesn't mean that I'm able to realize it myself.



I fully realize that we all have different agendas, and I can really 
feel that you don't think digging into these issues is very much fun at 
all. But you have *much* more knowledge about FFmpeg than me, Michael. 
I'm a "newbie" in comparison, to use a popular word.


Mats

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


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Mats Peterson

On 02/17/2016 02:10 PM, Mats Peterson wrote:

On 02/17/2016 02:07 PM, Michael Niedermayer wrote:

and i know you understand the muxing side reasonable well as you
stated in your mails how its supposed to work, which matches what
i remember ...


No, Michael. I'm fairly new at FFmpeg development, and I have mostly
dealt with fixing demuxer issues regarding QuickTime palette in Matroska
and the like. The fact that I can see what it takes to fix the muxer
side doesn't mean that I'm able to realize it myself.

Mats


Furthermore, I don't see why one would have to fix the muxer side before 
removing that nasty monowhite switching code.


Mats

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


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Mats Peterson

On 02/17/2016 02:07 PM, Michael Niedermayer wrote:

and i know you understand the muxing side reasonable well as you
stated in your mails how its supposed to work, which matches what
i remember ...


No, Michael. I'm fairly new at FFmpeg development, and I have mostly 
dealt with fixing demuxer issues regarding QuickTime palette in Matroska 
and the like. The fact that I can see what it takes to fix the muxer 
side doesn't mean that I'm able to realize it myself.


Mats

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


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Michael Niedermayer
On Wed, Feb 17, 2016 at 12:41:52PM +0100, Mats Peterson wrote:
> Michael Niedermayer  skrev: (17 februari 2016 
> 12:36:58 CET)
> >On Tue, Feb 16, 2016 at 03:42:40PM +0100, Mats Peterson wrote:
> >> On 02/16/2016 03:34 PM, Michael Niedermayer wrote:
> >> >
> >> >no, that patch is left for others to decide, my oppinion is that the
> >> >muxer bug must be fixed first to prevent the generation of invalid
> >> >files. I wanted to look into it as you dont look into it but i dont
> >> >have time now
> >> >
> >> 
> >> That's OK regarding not having time. But the reason I don't look
> >> into it is that I'm afraid of messing things up. I don't have enough
> >> knowledge about the details when it comes to the muxing side of
> >> things.
> >
> >your knowledge of avi/mov muxing related to rawvideo is sufficient
> >also you seem to have time and interrest in this
> >
> >[...]
> 
> How do you know.

the number of mails you send need time to write and if you had
something more important to do you wouldnt be so obsessed with that
one patch

and i know you understand the muxing side reasonable well as you
stated in your mails how its supposed to work, which matches what
i remember ...


> And I have already observed several intricacies related to implementing 
> proper palette inclusion in AVI and QuickTime, that is better left to someone 
> else to solve, Michael.
> -- 
> Mats Peterson
> http://matsp888.no-ip.org/~mats/
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.


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] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Mats Peterson
Mats Peterson  skrev: (17 februari 2016 
12:41:52 CET)
>Michael Niedermayer  skrev: (17 februari 2016
>12:36:58 CET)
>>On Tue, Feb 16, 2016 at 03:42:40PM +0100, Mats Peterson wrote:
>>> On 02/16/2016 03:34 PM, Michael Niedermayer wrote:
>>> >
>>> >no, that patch is left for others to decide, my oppinion is that
>the
>>> >muxer bug must be fixed first to prevent the generation of invalid
>>> >files. I wanted to look into it as you dont look into it but i dont
>>> >have time now
>>> >
>>> 
>>> That's OK regarding not having time. But the reason I don't look
>>> into it is that I'm afraid of messing things up. I don't have enough
>>> knowledge about the details when it comes to the muxing side of
>>> things.
>>
>>your knowledge of avi/mov muxing related to rawvideo is sufficient
>>also you seem to have time and interrest in this
>>
>>[...]
>
>How do you know. And I have already observed several intricacies
>related to implementing proper palette inclusion in AVI and QuickTime,
>that is better left to someone else to solve, Michael.
>-- 
>Mats Peterson
>http://matsp888.no-ip.org/~mats/
>___
>ffmpeg-devel mailing list
>ffmpeg-devel@ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

At the moment I have more interest in not using monow for 1 bpp raw AVI without 
a palette. Until the muxer issues are completely solved, one might add a blurb 
to the documentation telling users to use nut instead of AVI or QuickTime when 
creating files with "-vcodec rawvideo".
-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Mats Peterson
Mats Peterson  skrev: (17 februari 2016 
12:41:52 CET)
>Michael Niedermayer  skrev: (17 februari 2016
>12:36:58 CET)
>>On Tue, Feb 16, 2016 at 03:42:40PM +0100, Mats Peterson wrote:
>>> On 02/16/2016 03:34 PM, Michael Niedermayer wrote:
>>> >
>>> >no, that patch is left for others to decide, my oppinion is that
>the
>>> >muxer bug must be fixed first to prevent the generation of invalid
>>> >files. I wanted to look into it as you dont look into it but i dont
>>> >have time now
>>> >
>>> 
>>> That's OK regarding not having time. But the reason I don't look
>>> into it is that I'm afraid of messing things up. I don't have enough
>>> knowledge about the details when it comes to the muxing side of
>>> things.
>>
>>your knowledge of avi/mov muxing related to rawvideo is sufficient
>>also you seem to have time and interrest in this
>>
>>[...]
>
>How do you know. And I have already observed several intricacies
>related to implementing proper palette inclusion in AVI and QuickTime,
>that is better left to someone else to solve, Michael.
>-- 
>Mats Peterson
>http://matsp888.no-ip.org/~mats/
>___
>ffmpeg-devel mailing list
>ffmpeg-devel@ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Should be a question mark after "How do you know" :-)
-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Mats Peterson
Michael Niedermayer  skrev: (17 februari 2016 12:36:58 
CET)
>On Tue, Feb 16, 2016 at 03:42:40PM +0100, Mats Peterson wrote:
>> On 02/16/2016 03:34 PM, Michael Niedermayer wrote:
>> >
>> >no, that patch is left for others to decide, my oppinion is that the
>> >muxer bug must be fixed first to prevent the generation of invalid
>> >files. I wanted to look into it as you dont look into it but i dont
>> >have time now
>> >
>> 
>> That's OK regarding not having time. But the reason I don't look
>> into it is that I'm afraid of messing things up. I don't have enough
>> knowledge about the details when it comes to the muxing side of
>> things.
>
>your knowledge of avi/mov muxing related to rawvideo is sufficient
>also you seem to have time and interrest in this
>
>[...]

How do you know. And I have already observed several intricacies related to 
implementing proper palette inclusion in AVI and QuickTime, that is better left 
to someone else to solve, Michael.
-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread Michael Niedermayer
On Tue, Feb 16, 2016 at 03:42:40PM +0100, Mats Peterson wrote:
> On 02/16/2016 03:34 PM, Michael Niedermayer wrote:
> >
> >no, that patch is left for others to decide, my oppinion is that the
> >muxer bug must be fixed first to prevent the generation of invalid
> >files. I wanted to look into it as you dont look into it but i dont
> >have time now
> >
> 
> That's OK regarding not having time. But the reason I don't look
> into it is that I'm afraid of messing things up. I don't have enough
> knowledge about the details when it comes to the muxing side of
> things.

your knowledge of avi/mov muxing related to rawvideo is sufficient
also you seem to have time and interrest in this

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

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


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] lavc/rawdec: Retrieve nut palette from packets

2016-02-17 Thread wm4
On Tue, 16 Feb 2016 15:37:40 +0100
Mats Peterson  wrote:

> On 02/16/2016 03:34 PM, Michael Niedermayer wrote:
> >>> And what about the monowhite switching code?
> >>>  
> >>
> >> Did you forget that one??  
> >
> > no, that patch is left for others to decide, my oppinion is that the
> > muxer bug must be fixed first to prevent the generation of invalid
> > files. I wanted to look into it as you dont look into it but i dont
> > have time now
> >
> > Please be patient, also its not going to be done sooner by asked 10
> > times a day privately and on the ML
> >  
> 
> wm4 has already agreed on its redundant character.

So since I'm mentioned here...

I thought michaelni had kind of a point with the codec copy case, and
that was the point where I decided to ignore this whole discussion. I
don't know the current consensus.

Also, how about you stop sending redundant followup mails?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-16 Thread Mats Peterson

On 02/16/2016 03:34 PM, Michael Niedermayer wrote:


no, that patch is left for others to decide, my oppinion is that the
muxer bug must be fixed first to prevent the generation of invalid
files. I wanted to look into it as you dont look into it but i dont
have time now



That's OK regarding not having time. But the reason I don't look into it 
is that I'm afraid of messing things up. I don't have enough knowledge 
about the details when it comes to the muxing side of things.


Mats

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


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-16 Thread Mats Peterson

On 02/16/2016 03:34 PM, Michael Niedermayer wrote:

And what about the monowhite switching code?



Did you forget that one??


no, that patch is left for others to decide, my oppinion is that the
muxer bug must be fixed first to prevent the generation of invalid
files. I wanted to look into it as you dont look into it but i dont
have time now

Please be patient, also its not going to be done sooner by asked 10
times a day privately and on the ML



wm4 has already agreed on its redundant character. And as I have stated 
thousands of times, monow/monob shouldn't be used for palettized data. 
Just because a 1 bpp raw AVI file lacks a palette, it doesn't suddenly 
become monochrome. monow/monob is suitable for file formats with 
explicit black & white modes, like nut, TIFF and PNG. The BMP code does 
the right thing, it uses pal8 exclusively for 1 bpp.


Regarding "generation of invalid files", the only valid files FFmpeg 
will currently generate when using rawvideo is nut, regardless of using 
pal8 for 1 bpp raw AVI or not. The stride is incorrect for AVI and 
QuickTime files created with "-vcodec rawvideo", regardless of bit depth.


Mats


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


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-16 Thread Michael Niedermayer
On Tue, Feb 16, 2016 at 03:06:35PM +0100, Mats Peterson wrote:
> On 02/16/2016 03:04 PM, Mats Peterson wrote:
> >Michael Niedermayer  skrev: (16 februari 2016 
> >15:03:13 CET)
> >>On Tue, Feb 16, 2016 at 11:49:31AM +0100, Mats Peterson wrote:
> >>>I have removed the 4-byte alignment line.
> >>>
> >>>--
> >>>Mats Peterson
> >>>http://matsp888.no-ip.org/~mats/
> >>
> >>>  rawdec.c |8 +++-
> >>>  1 file changed, 7 insertions(+), 1 deletion(-)
> >>>8368a0a3c0eab1db6651662f5108dac88e986c59
> >>0002-lavc-rawdec-Retrieve-nut-palette-from-packets.patch
> >>> From 6256d18629e70c24260e4cfb1993411ccebfac73 Mon Sep 17 00:00:00
> >>2001
> >>>From: Mats Peterson 
> >>>Date: Tue, 16 Feb 2016 11:44:50 +0100
> >>>Subject: [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets
> >>
> >>applied
> >>
> >>thanks
> >>
> >>[...]
> >
> >And what about the monowhite switching code?
> >
> 
> Did you forget that one??

no, that patch is left for others to decide, my oppinion is that the
muxer bug must be fixed first to prevent the generation of invalid
files. I wanted to look into it as you dont look into it but i dont
have time now

Please be patient, also its not going to be done sooner by asked 10
times a day privately and on the ML

[...]
-- 
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 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-16 Thread Mats Peterson

On 02/16/2016 03:04 PM, Mats Peterson wrote:

Michael Niedermayer  skrev: (16 februari 2016 15:03:13 
CET)

On Tue, Feb 16, 2016 at 11:49:31AM +0100, Mats Peterson wrote:

I have removed the 4-byte alignment line.

--
Mats Peterson
http://matsp888.no-ip.org/~mats/



  rawdec.c |8 +++-
  1 file changed, 7 insertions(+), 1 deletion(-)
8368a0a3c0eab1db6651662f5108dac88e986c59

0002-lavc-rawdec-Retrieve-nut-palette-from-packets.patch

 From 6256d18629e70c24260e4cfb1993411ccebfac73 Mon Sep 17 00:00:00

2001

From: Mats Peterson 
Date: Tue, 16 Feb 2016 11:44:50 +0100
Subject: [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets


applied

thanks

[...]


And what about the monowhite switching code?



Did you forget that one??

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-16 Thread Mats Peterson
Michael Niedermayer  skrev: (16 februari 2016 15:03:13 
CET)
>On Tue, Feb 16, 2016 at 11:49:31AM +0100, Mats Peterson wrote:
>> I have removed the 4-byte alignment line.
>> 
>> -- 
>> Mats Peterson
>> http://matsp888.no-ip.org/~mats/
>
>>  rawdec.c |8 +++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>> 8368a0a3c0eab1db6651662f5108dac88e986c59 
>0002-lavc-rawdec-Retrieve-nut-palette-from-packets.patch
>> From 6256d18629e70c24260e4cfb1993411ccebfac73 Mon Sep 17 00:00:00
>2001
>> From: Mats Peterson 
>> Date: Tue, 16 Feb 2016 11:44:50 +0100
>> Subject: [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets
>
>applied
>
>thanks
>
>[...]

And what about the monowhite switching code?
-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-16 Thread Michael Niedermayer
On Tue, Feb 16, 2016 at 11:49:31AM +0100, Mats Peterson wrote:
> I have removed the 4-byte alignment line.
> 
> -- 
> Mats Peterson
> http://matsp888.no-ip.org/~mats/

>  rawdec.c |8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 8368a0a3c0eab1db6651662f5108dac88e986c59  
> 0002-lavc-rawdec-Retrieve-nut-palette-from-packets.patch
> From 6256d18629e70c24260e4cfb1993411ccebfac73 Mon Sep 17 00:00:00 2001
> From: Mats Peterson 
> Date: Tue, 16 Feb 2016 11:44:50 +0100
> Subject: [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 


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


[FFmpeg-devel] [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

2016-02-16 Thread Mats Peterson

I have removed the 4-byte alignment line.

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From 6256d18629e70c24260e4cfb1993411ccebfac73 Mon Sep 17 00:00:00 2001
From: Mats Peterson 
Date: Tue, 16 Feb 2016 11:44:50 +0100
Subject: [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets

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

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 10bca05..eb9fe48 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -365,7 +365,6 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
 const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE,
  NULL);
-
 if (pal) {
 av_buffer_unref(&context->palette);
 context->palette = av_buffer_alloc(AVPALETTE_SIZE);
@@ -375,6 +374,13 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
 }
 memcpy(context->palette->data, pal, AVPALETTE_SIZE);
 frame->palette_has_changed = 1;
+} else if (context->is_nut_pal8) {
+int vid_size = avctx->width * avctx->height;
+if (avpkt->size - vid_size) {
+pal = avpkt->data + vid_size;
+memcpy(context->palette->data, pal, avpkt->size - vid_size);
+frame->palette_has_changed = 1;
+}
 }
 }
 
-- 
1.7.10.4

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