codec/h264/h264dec: made maxi faster and more readable

This commit is contained in:
Saxon 2019-08-15 01:16:28 +09:30
parent a4130404fd
commit 4e29a70b78
1 changed files with 4 additions and 1 deletions

View File

@ -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 {