mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-27 14:39:09 +00:00
fix(encoder): make the encoder use the right color space
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
parent
1b81f7d1e2
commit
943b446d26
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Fixed
|
||||
|
||||
- Stream mapping for cases where the video stream is not the first stream in the input file (#1217).
|
||||
- The encoder using the wrong color space for the output video.
|
||||
|
||||
## [6.1.0] - 2024-11-04
|
||||
|
||||
|
@ -73,6 +73,13 @@ int init_encoder(
|
||||
codec_ctx->sample_aspect_ratio = dec_ctx->sample_aspect_ratio;
|
||||
codec_ctx->bit_rate = encoder_config->bit_rate;
|
||||
|
||||
// Set the color properties
|
||||
codec_ctx->color_range = dec_ctx->color_range;
|
||||
codec_ctx->color_primaries = dec_ctx->color_primaries;
|
||||
codec_ctx->color_trc = dec_ctx->color_trc;
|
||||
codec_ctx->colorspace = dec_ctx->colorspace;
|
||||
codec_ctx->chroma_sample_location = dec_ctx->chroma_sample_location;
|
||||
|
||||
// Set the pixel format
|
||||
if (encoder_config->pix_fmt != AV_PIX_FMT_NONE) {
|
||||
// Use the specified pixel format
|
||||
|
Loading…
Reference in New Issue
Block a user