Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
video/image_writer: tag bits_per_raw_sample when pixfmt changes
This populates the AVCodecContext->bits_per_raw_sample field value when the pixel format of the screenshot being written doesn't match the pixel format of the original video. For example, if the original video was 10-bit and the screenshot is 16-bit, it populates this field so the encoder can make use of it. Currently only the libjxl encoder respects this tag although PNG supports sBIT. Once lavc's PNG encoder respects this tag it will work seamlessly with this commit as well. This feature is only enabled if screenshot-high-bit-depth=yes is enabled, because bits_per_raw_sample shouldn't be set for 8-bit screenshots.
- Loading branch information