diff options
author | Takio Yamaoka <y.takio@gmail.com> | 2020-07-28 21:22:02 +0900 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2020-08-06 13:09:23 +0300 |
commit | cc6c56f5d900f86167f6592215e613a69341858a (patch) | |
tree | 7a1233d786fa95a2dfd41791f28954b69291f6b6 /libavformat/genh.c | |
parent | 2c35797e183279530b623b4a2a1bea89a831cf50 (diff) | |
download | ffmpeg-cc6c56f5d900f86167f6592215e613a69341858a.tar.gz |
avcodec/libx264: fix chroma quantizer offset usage
The default for the chromaoffset field in AVCodecContext
is zero, which until now always ended up overriding the
AVOption-set value, thus leading to the AVOption not working.
Additionally, the previous usage prevented the usage of
negative values, while both the variable as well as x264's
API would successfully handle such.
Thus, the default value of the AVOption is changed to match
the default of x264 (and what is currently the default for
the AVCodecContext chromaoffset field), and the checks are
changed to check for nonzero values.
This way:
1. the library default is still utilized if the value is zero.
2. both negative and positive values are correctly passed to
x264.
For historical context, this was initially similarly
implemented in 5764d38173661c29d954711dd5abfddf709e9ba4, and
then b340bd8a58c32453172404a8e4240e3317e341da broke the
value.
Partially reverts commit b340bd8a58c32453172404a8e4240e3317e341da.
Signed-off-by: Takio Yamaoka <y.takio@gmail.com>
Diffstat (limited to 'libavformat/genh.c')
0 files changed, 0 insertions, 0 deletions