Skip to content

Commit 8df233b

Browse files
authored
Merge pull request #276 from cchampet/fix_codecColorParameters
VideoCodec: fixed value of the color parameters
2 parents cca26f0 + 3078fab commit 8df233b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/AvTranscoder/file/OutputFile.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ IOutputStream& OutputFile::addVideoStream(const VideoCodec& videoDesc)
4242
stream.codec->level = videoDesc.getAVCodecContext().level;
4343
stream.codec->field_order = videoDesc.getAVCodecContext().field_order;
4444

45+
stream.codec->colorspace = videoDesc.getAVCodecContext().colorspace;
46+
stream.codec->color_primaries = videoDesc.getAVCodecContext().color_primaries;
47+
stream.codec->color_range = videoDesc.getAVCodecContext().color_range;
48+
stream.codec->color_trc = videoDesc.getAVCodecContext().color_trc;
49+
stream.codec->chroma_sample_location = videoDesc.getAVCodecContext().chroma_sample_location;
50+
4551
setOutputStream(stream, videoDesc);
4652

4753
// need to set the time_base on the AVCodecContext and the AVStream

src/AvTranscoder/properties/VideoProperties.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ std::string VideoProperties::getColorRange() const
173173
case AVCOL_RANGE_UNSPECIFIED:
174174
return "unspecified";
175175
case AVCOL_RANGE_MPEG:
176-
return "Head";
176+
return "Limited"; //< legal TV range: 16-235 with 8bits
177177
case AVCOL_RANGE_JPEG:
178-
return "Full";
178+
return "Full"; // full range: 0-255 with 8bits
179179
case AVCOL_RANGE_NB:
180180
return "Not ABI";
181181
default:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy