[FFmpeg-devel] [PATCH] lavc/mpeg12dec.c: Read cc words field-wise, limit to cc_count and support extra field.

Jonathan Campbell jonathan at impactstudiopro.com
Thu Sep 15 22:52:19 EEST 2016

On 09/15/2016 12:31 PM, Carl Eugen Hoyos wrote:
> 2016-09-15 20:49 GMT+02:00 Jonathan Campbell <jonathan at impactstudiopro.com>:
>> This updates the mpeg12dec.c DVD caption decoding to decode
>> field-wise and handle caption packets with an extra field. It obeys
>> the cc_count field, though still validates the count like the prior code.
> Is there a sample that shows the difference?
The DVD release of "Big Hero 6" has CC data packets in the VOB that frequently encode one extra field then start on the opposite field in the next packet.
Assuming that the caption data comes in pairs per frame means that you miss out on the last caption word and captions get slightly garbled.
That problem is also visible when playing the same VOB in VLC player with the captions (under "subtitles") enabled.
My patch decodes the caption data field-wise so the extra field is not missed which then fixes the slightly garbled captions.

Do you need me to upload a small 20-second clip of the VOB where the garbled captions are visible?

>> I will start on a patch to mpeg12enc.c to encode A53 captions
>> from the side data.
> That's great!


> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list