mirror of https://bitbucket.org/ausocean/av.git
codec/h264/h264dec: made maxi faster and more readable
This commit is contained in:
parent
a4130404fd
commit
4e29a70b78
|
@ -44,7 +44,10 @@ func binToSlice(s string) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func maxi(a, b int) int {
|
func maxi(a, b int) int {
|
||||||
return int(math.Max(float64(a), float64(b)))
|
if a > b {
|
||||||
|
return a
|
||||||
|
}
|
||||||
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
func mini(a, b int) int {
|
func mini(a, b int) int {
|
||||||
|
|
Loading…
Reference in New Issue