[x264-devel] Re: [patch] minor code cleanup and fix for x264.c

Limin Wang lance.lmwang at gmail.com
Mon Jan 22 03:02:44 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Loren Merritt <lorenm at u.washington.edu> [2007-01-21 02:02:25 -0700]:

> On Mon, 15 Jan 2007, Limin Wang wrote:
> >Loren Merritt 2007-01-15 00:07:58 -0700:
> >>
> >>i_frame_total == 0 means unkown, i.e. piped input or some muxer that
> >>doesn't store the movie length. I suppose using INT_MAX for that instead
> >>would slightly reduce the code size.
> >
> >We can mark frame total count is zero without issue. For in case 
> >i_frame_total
> >is 0, the code execution will never enter encode "for" loop.
> 
> Is your statement supposed to be a feature request, or a description of 
> the current code? Because it's not true now.

Thanks, now I understand what's your meaning totally. So INT_MAX means unknown
is better than zero I think. If the file is zero byte, then it's known to
get i_frame_total = 0.

 
> >I prefer to checking i_frame_total before encode, if i_frame_total == 0,
> >report error and return directly.
> 
> You'd also have to check whether the demuxer is supposed to know the
> movie length. Because if it doesn't know, then the correct behavior is
> to just encode until it stops returning input frames, and don't display
> a percentage progress report.
Yes, I got it.

 
> --Loren Merritt
> 
> -- 
> This is the x264-devel mailing-list
> To unsubscribe, go to: http://developers.videolan.org/lists.html
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRbQbREztbf7dKiuoAQLOPwgAgZf1zqtp7uH4HZe5DfHx9hpBpLkNOxag
GC8eYi4rYBbIZT/WfuY8SUKNbAmxep2YI78SYRsq99ph89OlBPvQDln+UTx3cj1v
5iUDTj9Os3EgjA/w0C7Dw4iROGnrNJwAzM8SjZ1n+y/Kks6w49i1Ecp2//1Tr0FU
toqwhk0eAlYG2URfGdYM+xJjmmZryl4r+0VdeCzNiu6ilc13M0EBNar2enDY8G/4
VjpQ5dUPQGfJExjzHhyBC26PBhB9lvhzwdE+8fN+6NcbiwBYZZ6YK3Lvap3fHKzm
gJ/Uo36tpEc2nA0e1YToIiX2LbNVQC3nk8tjZ38dlxyHhlsAi2vDDw==
=Spzo
-----END PGP SIGNATURE-----

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list