aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsv.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-08-24 22:17:02 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-09 13:46:30 +0200
commitbc533ba2ae46978a826c0ace242b3e2e4cabd9fb (patch)
treed56ed549af0c244f9011502f197fbc581d48fd7a /libavcodec/qsv.h
parent5e68727fa7265a1f2eb0faf63e0b87869cc41199 (diff)
downloadffmpeg-bc533ba2ae46978a826c0ace242b3e2e4cabd9fb.tar.gz
avfilter/af_headphone: Use uint64_t for channel mapping
The headphone filter has an option for the user to specify an assignment of inputs to channels (or from pairs of channels of the second input to channels). Up until now, these channels were stored in an int containing the logarithm of the channel layout. Yet it is not the logarithm that is used lateron and so a retransformation was necessary. Therefore this commit simply stores the uint64_t as is, avoiding the retransformation. This also has the advantage that unset channels (whose corresponding entry is zero) can't be mistaken for valid channels any more; the old code had to initialize the channels to -1 to solve this problem and had to check for whether a channel is set before the retransformation (because 1 << -1 is UB). The only downside of this approach is that the size of the context increases (by 256 bytes); but this is not exceedingly much. Finally, the array has been moved to the end of the context; it is only used a few times during the initialization process and moving it decreased the offsets of lots of other entries, reducing codesize. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/qsv.h')
0 files changed, 0 insertions, 0 deletions