Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Michael Niedermayer
On Sat, Feb 13, 2016 at 06:01:21AM +0100, Mats Peterson wrote: > On 02/13/2016 05:39 AM, Mats Peterson wrote: > >On 02/13/2016 12:51 AM, Michael Niedermayer wrote: > > > >>>+if (context->has_pkt_pal) { > >>>+memcpy(context->palette->data, > >>>+ avpkt->data +

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 11:22 AM, Michael Niedermayer wrote: On Sat, Feb 13, 2016 at 06:01:21AM +0100, Mats Peterson wrote: On 02/13/2016 05:39 AM, Mats Peterson wrote: On 02/13/2016 12:51 AM, Michael Niedermayer wrote: +if (context->has_pkt_pal) { +memcpy(context->palette->data, +

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 11:28 AM, Mats Peterson wrote: Once again, how are we supposed to know how many colors the palette consists of at the end of avpkt->data? palette size = packet size - width*height Nope. You have to take the stride in account as well, not just the width and height, and it

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Paul B Mahol
On 2/13/16, Mats Peterson wrote: > On 02/13/2016 11:28 AM, Mats Peterson wrote: Once again, how are we supposed to know how many colors the palette consists of at the end of avpkt->data? >>> >>> palette size = packet size - width*height >>> >> >> Nope.

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 11:39 AM, Paul B Mahol wrote: On 2/13/16, Mats Peterson wrote: On 02/13/2016 11:28 AM, Mats Peterson wrote: Once again, how are we supposed to know how many colors the palette consists of at the end of avpkt->data? palette size = packet size -

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 11:40 AM, Mats Peterson wrote: On 02/13/2016 11:39 AM, Paul B Mahol wrote: On 2/13/16, Mats Peterson wrote: On 02/13/2016 11:28 AM, Mats Peterson wrote: Once again, how are we supposed to know how many colors the palette consists of at the end

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 11:44 AM, Mats Peterson wrote: On 02/13/2016 11:40 AM, Mats Peterson wrote: On 02/13/2016 11:39 AM, Paul B Mahol wrote: On 2/13/16, Mats Peterson wrote: On 02/13/2016 11:28 AM, Mats Peterson wrote: Once again, how are we supposed to know how

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 12:54 PM, Mats Peterson wrote: On 02/13/2016 12:52 PM, Mats Peterson wrote: just double checked, this is not the case in written pal8 nut files nor does the nut spec say anything about that. Then check an odd-width nut file like the one below. And FFmpeg doesn't care about

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 12:57 PM, Mats Peterson wrote: On 02/13/2016 12:54 PM, Mats Peterson wrote: On 02/13/2016 12:52 PM, Mats Peterson wrote: just double checked, this is not the case in written pal8 nut files nor does the nut spec say anything about that. Then check an odd-width nut file like the

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 12:58 PM, Mats Peterson wrote: On 02/13/2016 12:57 PM, Mats Peterson wrote: On 02/13/2016 12:54 PM, Mats Peterson wrote: On 02/13/2016 12:52 PM, Mats Peterson wrote: just double checked, this is not the case in written pal8 nut files nor does the nut spec say anything about

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 01:00 PM, Mats Peterson wrote: On 02/13/2016 12:58 PM, Mats Peterson wrote: On 02/13/2016 12:57 PM, Mats Peterson wrote: On 02/13/2016 12:54 PM, Mats Peterson wrote: On 02/13/2016 12:52 PM, Mats Peterson wrote: just double checked, this is not the case in written pal8 nut files

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 01:03 PM, Mats Peterson wrote: On 02/13/2016 01:00 PM, Mats Peterson wrote: On 02/13/2016 12:58 PM, Mats Peterson wrote: On 02/13/2016 12:57 PM, Mats Peterson wrote: On 02/13/2016 12:54 PM, Mats Peterson wrote: On 02/13/2016 12:52 PM, Mats Peterson wrote: just double checked,

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread wm4
On Sat, 13 Feb 2016 13:09:48 +0100 Mats Peterson wrote: > On 02/13/2016 01:03 PM, Mats Peterson wrote: > > On 02/13/2016 01:00 PM, Mats Peterson wrote: > >> On 02/13/2016 12:58 PM, Mats Peterson wrote: > >>> On 02/13/2016 12:57 PM, Mats Peterson wrote: >

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 01:24 PM, wm4 wrote: Why are you talking with yourself on the ML? Nobody is going to read everything you post. You just replied to yourself 7 times! If you want input from others, you need to properly communicate your issues. This includes: - thinking before posting - summarizing

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 01:09 PM, Mats Peterson wrote: On 02/13/2016 01:03 PM, Mats Peterson wrote: On 02/13/2016 01:00 PM, Mats Peterson wrote: On 02/13/2016 12:58 PM, Mats Peterson wrote: On 02/13/2016 12:57 PM, Mats Peterson wrote: On 02/13/2016 12:54 PM, Mats Peterson wrote: On 02/13/2016 12:52

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 01:46 PM, Mats Peterson wrote: On 02/13/2016 01:09 PM, Mats Peterson wrote: On 02/13/2016 01:03 PM, Mats Peterson wrote: On 02/13/2016 01:00 PM, Mats Peterson wrote: On 02/13/2016 12:58 PM, Mats Peterson wrote: On 02/13/2016 12:57 PM, Mats Peterson wrote: On 02/13/2016 12:54

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-13 Thread Mats Peterson
On 02/13/2016 01:49 PM, Mats Peterson wrote: Sorry, wm4, I got heated up here. I understand your feelings. I will try to limit the spam-like postings. Michael, given that there is no padding of the lines for pal8 in nut, I understand that it's possible to calculate the stride by dividing the

[FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
Now handles non-standard 8 bpp raw AVI files created with "-vcodec rawvideo" that contain the palette at the end of each frame, like nut. 8 bpp raw QuickTime files created with "-vcodec rawvideo" won't work quite right, because they contain a palette both in the video sample description and

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 12:55:59PM +0100, Mats Peterson wrote: > On 02/12/2016 12:53 PM, Mats Peterson wrote: > >ahead. I know the debug code is superfluous, though. > > But it's handy in order to check packet size / stride, since this > circus is far from over and done with. i agree about its

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 12:31:56PM +0100, Mats Peterson wrote: > On 02/12/2016 12:02 PM, Mats Peterson wrote: > >On 02/12/2016 11:26 AM, Mats Peterson wrote: > >>Now handles non-standard 8 bpp raw AVI files created with "-vcodec > >>rawvideo" that contain the palette at the end of each frame, like

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 01:41 PM, Mats Peterson wrote: On 02/12/2016 01:09 PM, Mats Peterson wrote: On 02/12/2016 01:03 PM, Mats Peterson wrote: Well, it's not because of my patch. It was the same before it. And you have more knowledge than me when it comes to fixing the muxing code. I have mostly dealt

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread wm4
On Fri, 12 Feb 2016 13:23:02 +0100 Mats Peterson wrote: > On 02/12/2016 12:49 PM, Michael Niedermayer wrote: > >> +av_log(avctx, AV_LOG_DEBUG, "PACKET SIZE: %d\n", avpkt->size); > >> +av_log(avctx, AV_LOG_DEBUG, "STRIDE: %d\n", stride); > > > > this

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 12:53 PM, Mats Peterson wrote: ahead. I know the debug code is superfluous, though. But it's handy in order to check packet size / stride, since this circus is far from over and done with. Mats ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 01:00 PM, Michael Niedermayer wrote: can you fix that ? it is very important that generated files are correct and compliant to specs Well, it's not because of my patch. It was the same before it. And you have more knowledge than me when it comes to fixing the muxing code. I

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 01:09 PM, Mats Peterson wrote: I admit it sounded like it was because of my patch, but I worded it in a confusing way, I guess. I meant that since my patch will make 1 bpp raw AVI files use pal8 internally, to produce a 1 bpp file, you can either use "-vcodec copy", or "-vcodec

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 01:09 PM, Mats Peterson wrote: On 02/12/2016 01:03 PM, Mats Peterson wrote: Well, it's not because of my patch. It was the same before it. And you have more knowledge than me when it comes to fixing the muxing code. I have mostly dealt with the demuxing side so far, since that's

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 01:02 PM, Michael Niedermayer wrote: On Fri, Feb 12, 2016 at 12:55:59PM +0100, Mats Peterson wrote: On 02/12/2016 12:53 PM, Mats Peterson wrote: ahead. I know the debug code is superfluous, though. But it's handy in order to check packet size / stride, since this circus is far

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 01:03 PM, Mats Peterson wrote: Well, it's not because of my patch. It was the same before it. And you have more knowledge than me when it comes to fixing the muxing code. I have mostly dealt with the demuxing side so far, since that's where I feel decently comfortable. Mats I

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 12:49 PM, Michael Niedermayer wrote: +av_log(avctx, AV_LOG_DEBUG, "PACKET SIZE: %d\n", avpkt->size); +av_log(avctx, AV_LOG_DEBUG, "STRIDE: %d\n", stride); this looks like some private debug code, which doesnt belong in this patch This is easy enough for you to remove,

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/12/2016 01:27 PM, wm4 wrote: This is easy enough for you to remove, isn't it? It's even easier for you. (Should be.) Well, he seems to want to split the patch up anyway, so it shouldn't be that hard to remove those lines. Mats ___

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/13/2016 05:44 AM, Mats Peterson wrote: ill try to split out some trivial parts from this patch and apply them as seperate commits after some testing though Alright. It shouldn't be that hard. Everything works just fine except that non-AVPALETTE_SIZE thing. Mats

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/13/2016 05:39 AM, Mats Peterson wrote: On 02/13/2016 12:51 AM, Michael Niedermayer wrote: +if (context->has_pkt_pal) { +memcpy(context->palette->data, + avpkt->data + avpkt->size - AVPALETTE_SIZE, AVPALETTE_SIZE); This is incorrect, the 8bit

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/13/2016 05:44 AM, Mats Peterson wrote: again, if you could help fix the bugs (which are not caused by your patch but which interact with these changes in nasty ways) that would be great The rawvideo muxing bugs (incorrect stride for AVI and QuickTime files produced with "-vcodec

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/13/2016 05:39 AM, Mats Peterson wrote: On 02/13/2016 12:51 AM, Michael Niedermayer wrote: +if (context->has_pkt_pal) { +memcpy(context->palette->data, + avpkt->data + avpkt->size - AVPALETTE_SIZE, AVPALETTE_SIZE); This is incorrect, the 8bit

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/13/2016 12:51 AM, Michael Niedermayer wrote: +if (context->has_pkt_pal) { +memcpy(context->palette->data, + avpkt->data + avpkt->size - AVPALETTE_SIZE, AVPALETTE_SIZE); This is incorrect, the 8bit palette in nut can have any number of entries up to

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/13/2016 05:48 AM, Mats Peterson wrote: It shouldn't be that hard. Everything works just fine except that non-AVPALETTE_SIZE thing. And how are we supposed to solve that? Knowing how many colors there are in the palette in the nut packets? Mats

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Mats Peterson
On 02/13/2016 05:39 AM, Mats Peterson wrote: ill try to split out some trivial parts from this patch and apply them as seperate commits after some testing though Alright. You could start with removing the monowhite switching code. Mats ___

Re: [FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 11:26:02AM +0100, Mats Peterson wrote: > Now handles non-standard 8 bpp raw AVI files created with "-vcodec > rawvideo" that contain the palette at the end of each frame, like > nut. > > 8 bpp raw QuickTime files created with "-vcodec rawvideo" won't work > quite right,