Skip to content

Commit

Permalink
CS_{601,709}: drop _LIM suffix
Browse files Browse the repository at this point in the history
Since we (currently) use the same value for full-range (setting
ycbcr_bit_depth=0) this may be confusing.
  • Loading branch information
MartinPulec committed Oct 8, 2024
1 parent e868262 commit 36c47a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ get_color_coeffs(enum colorspace cs, int ycbcr_bit_depth)
enum colorspace
get_default_cs()
{
return get_commandline_param("color-601") != NULL ? CS_601_LIM
: CS_709_LIM;
return get_commandline_param("color-601") != NULL ? CS_601
: CS_709;
}

struct color_coeffs
Expand Down
6 changes: 3 additions & 3 deletions src/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ extern "C" {
#endif

enum colorspace {
CS_DFL = 0,
CS_601_LIM = 1,
CS_709_LIM = 2,
CS_DFL = 0,
CS_601 = 1,
CS_709 = 2,
};

struct color_coeffs {
Expand Down
6 changes: 3 additions & 3 deletions src/libavcodec/from_lavc_vid_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3028,7 +3028,7 @@ get_cs_for_conv(AVFrame *f, codec_t interm_pf, codec_t out_pf)
av_color_space_name(f->colorspace));
}
const bool have_pp = tok_in_argv(uv_argv, "y601_to_y709");
if (src_601 && get_default_cs() != CS_601_LIM && !have_pp) {
if (src_601 && get_default_cs() != CS_601 && !have_pp) {
MSG(WARNING,
"Got %s CS but not converted - consider \"--param "
"color-601\" as a hint for supported displays or "
Expand All @@ -3038,10 +3038,10 @@ get_cs_for_conv(AVFrame *f, codec_t interm_pf, codec_t out_pf)
return CS_DFL; // doesn't matter - won't be used anyways
}
if (src_601) {
return CS_601_LIM;
return CS_601;
}
if (f->colorspace == AVCOL_SPC_BT709) {
return CS_709_LIM;
return CS_709;
}
MSG(WARNING,
"Suspicious (unexpected) color space %s, using default "
Expand Down

0 comments on commit 36c47a6

Please sign in to comment.