[FFmpeg-devel] [PATCH v5 1/4 v3] lavf/avienc: Add support for palette side data
Mats Peterson
matsp888 at yahoo.com
Sat Mar 5 04:23:36 CET 2016
On 03/05/2016 04:19 AM, Mats Peterson wrote:
> On 03/05/2016 01:08 AM, Michael Niedermayer wrote:
>> On Fri, Mar 04, 2016 at 10:12:41PM +0100, Mats Peterson wrote:
>>> On 03/04/2016 10:02 PM, Mats Peterson wrote:
>>>> On 03/04/2016 09:52 PM, Mats Peterson wrote:
>>>>> On 03/04/2016 08:44 PM, Michael Niedermayer wrote:
>>>>>> On Fri, Mar 04, 2016 at 11:59:11AM +0100, Mats Peterson wrote:
>>>>>>> On 03/04/2016 05:59 AM, Mats Peterson wrote:
>>>>>>>> Removed some unused variables in AVIStream.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I would like to remind you of the fact that this patch (and the one
>>>>>>> for riffenc.c) is needed for stream copying of Microsoft Video 1
>>>>>>> (CRAM) in 8-bit mode, Microsoft RLE4 and Microsoft RLE8. There are
>>>>>>> possibly more codecs using a palette, but these are the ones I can
>>>>>>> come up with at the moment.
>>>>>>
>>>>>> i tried CRAM and MSRLE, but these already work when streamcopied
>>>>>> before, do you have a testcase that does not work
>>>>>>
>>>>>
>>>>> It works, but only so much. On stream copy, it will only write the
>>>>> palette after BITMAPINFOHEADER to the destination file. It won't write
>>>>> any xxpc palette switching chunks to the file.
>>>>>
>>>>> Mats
>>>>>
>>>> The xxpc chunks come as palette side data.
>>>>
>>>> Mats
>>>
>>>
>>> Try ffmpeg -i 8bpp_129.avi -vcodec copy test.avi, with and without
>>
>> where can i find that file ?
>>
>
> Thought you had it already?
> https://drive.google.com/open?id=0B3_pEBoLs0faekxWUTdkVGNTTlk
>
>>
>>> the avienc.c and riffenc.c patch. The destination file will only
>>> contain xxpc chunks with my patch applied.
>>
>> pc chunks are only needed when the palette changes, if its the same
>> for the whole file and after BITMAPINFOHEADER then theres no need
>> for pc chunks
>
> And what do you suggest in order to detect this? 1 kb more per frame
> isn't that much. Nut uses it all the time.
>
> You were the one who proposed to use a shared function, and the option
> for a calling program to deliver the palette as side data. That's why I
> wrote the function, to be shared by avienc, movenc and possibly more
> muxers. It would be nice if you could apply these remaining patches now,
> thank you.
>
Or rather, it was Reimar who was first complaining at the muxers lacking
the ability to handle palette side data.
Mats
More information about the ffmpeg-devel
mailing list