[FFmpeg-devel] [PATCH] dvbsub fix transcoding

Anshul anshul.ffmpeg at gmail.com
Mon Jun 2 16:33:51 CEST 2014


On June 2, 2014 6:47:44 PM IST, Wim Vander Schelden <lists at fixnum.org> wrote:
>Hi Anshul,
>
>Could you explain what your patch does? I've read the patch but I don't
>fully understand what changed conceptually.You moved the a bunch of
>code in
>the decoder from dvbsub_display_end_segment to
>dvbsub_parse_page_segment.
>What does this mean for the decoded subtitle? Will the timings still be
>correct?
>
Yes timing is correct, 
i copied the dvb spec section while sending the patch, spec say that we should not use end segment for any other purpose.

Now dvb decoder take start time when we recieve display segment.
Previously timeout in page segment was used for end time,but now u have used the pts of another page segment for end time.

Since we dont keep timing for each subtitle rectangle, therefore whether its new page, refreshed page or modified page is received that means that previous subtitle does not exist. Which also mean its end time is reached. This patch also take care of destroying rectangle even if no new subtitle are there, specs say you should send segment with no rectangle and page refresh state in page segment.


>My understanding - as I explained before - is that the problem with the
>transcoding is rooted in the operation of the dvbsub *en*coder. 

I know problem was and is there in encoder, but those problems were not interfering in transcoding.

Problem was that, due to insane value of display end time makes the pts of second packet(dummy refresh display) from encoder place the packet much far away in timeline, and when second actual subtitle comes its previous in timeline, it was breaking write frame api when nonmonotonus packet was encountered.


 >How
>does
>this change fix the problem?
I corrected end display time.

I sended two patch, in previous hack, I stoped dummy refresh packet if decoder is dvbsub.
Trying that hack might give you idea that problem is in decoder.
>I just don't understand if and how it might fix it.
>

If could be cleared if you add this patch in your tree and test it.
For how I have given a try.

>Did anyone compare the timings on the subtitles?
>
I compared them but just by looking both video, since dumping time and checking it does not make sense to me, because i consider problem was there only.

>King regards,
>
>Wim
>

-Anshul 


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the ffmpeg-devel mailing list