[x264-devel] Re: [PATCH] add pps_id option and define sps_id and pps_id as uint8_t

Limin Wang lance.lmwang at gmail.com
Wed Jan 31 13:56:49 CET 2007


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

* Loren Merritt <lorenm at u.washington.edu> [2007-01-31 04:35:24 -0700]:

> On Wed, 31 Jan 2007, Limin Wang wrote:
> 
> >The patch try to allow user configure sps_id and pps_id with different 
> >value.
> >In addition, by the specs, sps_id range is from 0 to 31, pps range is from
> >0 to 255, so replace int with uint8_t type. Please review it.
> 
> Just because the range happens to be 0..255 is no reason to use uint8_t 
> over int, it's a reason to explicitly boundscheck.
Both id should be >=0, so it can be defined as unsigned. In addition, they're
less than 256, so define as int8_t. Then we don't need do extra check for int
may <0, or >255.

> And unless you can provide a reason to do otherwise, I'll just restrict 
> the range to 0..31 and continue using one parameter for both ids.

Now x264 support one SPS and PPS only, so it's ok in this case. If we want
to support more than one SPS and PPS, then it's too limited to configure the
both ids the same. I'm also confused why specs limit sps_id and pps_id
to different range, any good reason?

 
> --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)

iQEVAwUBRcCSEUztbf7dKiuoAQKJKQgAiBe/wQNz6/izC2PraxJsL8k+6fDSBCfR
+ZGmSq0FZviX47Y6WwSflLtwdVjvaoIIx1wXx3WRWli/67cBhtMHHMQLOQyxnPWU
3zZsM2/rSii0RbNGitYsSm3WD00lHHeKDicb5dRh257cUTWfG5PriaSOEo885aye
UaoCfKcWQ9ew0hBHTO7V9t1bkvqJDJoyRLMHL3+z+6Q/EIzIPS0Zt44WUs5aM3/P
ahtzdmcdel8/TOP9KHxxpzmPmDLUuGRNJlQ75VVVOg36xwICqYjrYNmNnBoiT2ry
qnCGYSDSf6/DEeZBE8aYzLjMrRcE5b79NwJV8GYcQaH3QyWIewm8QQ==
=cmhw
-----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