FFmpeg: clean up format lookups


We have the same lookup patterns to map between Qt and FFmpeg types in
different places.
* move all to the top of the file
* perform lookup via flatmap loop to make them O(log(n))

Pick-to: 6.12
Change-Id: I2bef33a5286c003000eb60965c65fea57919a72d
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
commit19f99832e3291f6b0d7ae8aca2f87879e4a521db
parent701c4322da6fb62fb28bb22c38cdfa1b825ba22d
authorTim Blechmann <tim.blechmann@qt.io>
committerTim Blechmann <tim.blechmann@qt.io>
commit timeTue, 11 Aug 2026 04:58:24 +0000