[Ffmpeg-devel] [PATCH] DV timecode

Baptiste Coudurier baptiste.coudurier
Sun Apr 15 16:22:32 CEST 2007


Michael Niedermayer wrote:
> Hi
> 
> On Sun, Apr 15, 2007 at 03:27:28PM +0200, Baptiste Coudurier wrote:
>> Michael Niedermayer wrote:
>>> [...]
>>>
>>> what a mess
>>> see opt_rec_timestamp()
>> It does not do what I want my helper function to do.
> 
> your "helper" function is much more complex than needed, also it
> uses a unaccpetable syntax, parse_date() as used in opt_rec_timestamp() is
> exactly what should be used

No, timecode is not a date, and parse_date has no support for ';'.

>>> [...]
>>>>              time_code = s->current_picture_ptr->coded_picture_number + s->avctx->timecode_frame_start;
>>>>  
>>>>              s->gop_picture_number = s->current_picture_ptr->coded_picture_number;
>>>> -            if (s->avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE) {
>>>> -                /* only works for NTSC 29.97 */
>>>> -                int d = time_code / 17982;
>>>> -                int m = time_code % 17982;
>>>> -                //if (m < 2) m += 2; /* not needed since -2,-1 / 1798 in C returns 0 */
>>>> -                time_code += 18 * d + 2 * ((m - 2) / 1798);
>>>> -            }
>>>> +            if (s->avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE)
>>>> +                time_code = ff_drop_frame_timecode_adjust(time_code);
>>>>              put_bits(&s->pb, 5, (uint32_t)((time_code / (fps * 3600)) % 24));
>>>>              put_bits(&s->pb, 6, (uint32_t)((time_code / (fps * 60)) % 60));
>>>>              put_bits(&s->pb, 1, 1);
>>> while it has been added by you in the past and not now the use of
>>> coded_picture_number is completely wrong, you MUST use the proper
>>> timestamp, even with mpeg1/2 timestamps differ from frame numbers
>>> due to frame / field repetion amongth others
>>>

It was added by YOU at r2713. Does encoder support frame/field repetition ?

>> timecode is not timestamp.
> 
> it is

No.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list