]> git.sesse.net Git - ffmpeg/commit
avcodec/mlpenc: Simplify finding best codebook
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 26 Dec 2020 17:16:21 +0000 (18:16 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 31 Dec 2020 20:46:01 +0000 (21:46 +0100)
commit15072d275313e78cd101633ac79b797cae2694b2
tree87730e8239523c49bc725f2e37abc77fbe8b3f55
parent2825ed4e26f7683f0cf6baed0bbc62b095652ff9
avcodec/mlpenc: Simplify finding best codebook

Finding the best codebook involves comparing different paths, where each
path is a sequence of several decisions (namely which codebook to use).
Up until now, these sequence was encoded in a NUL-terminated string and
the actual decisions were encoded as ’\0'..'\3' (which encoded 0..3).
This commit modifies this to actually encode it via 0..3 by switching
away from a C-string to a simple array with an explicit length field.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/mlpenc.c