Skip to content

Commit 77476a9

Browse files
committed
video/out/vo_gpu_next: don't make sdr-adjust-gamma=auto behave like "no" on macOS
On macOS, global color management is always enabled, so there's no need to make "auto" behave like "no". Signed-off-by: Shengyu Qu <[email protected]>
1 parent 5a6863d commit 77476a9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

DOCS/man/options.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7377,7 +7377,8 @@ them.
73777377
``yes``, it will be converted based on the available metadata.
73787378

73797379
``auto`` (default) behaves like ``no``, except when ``--target-trc`` is
7380-
explicitly set, in which case it behaves like ``yes``.
7380+
explicitly set, in which case it behaves like ``yes``. On macOS it
7381+
should always behave like ``yes``.
73817382

73827383
Generally it's recommended to enable this option, if you can ensure that
73837384
both source and target metadata is correct. Besides, on color managed

video/out/vo_gpu_next.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,10 @@ static bool draw_frame(struct vo *vo, struct vo_frame *frame)
12721272
case PL_COLOR_TRC_BT_1886:
12731273
case PL_COLOR_TRC_GAMMA22:
12741274
case PL_COLOR_TRC_SRGB:
1275+
#ifdef __APPLE__
1276+
if (opts->sdr_adjust_gamma == 0)
1277+
break;
1278+
#endif
12751279
target.color.transfer = frame->current->params.color.transfer;
12761280
}
12771281
}

0 commit comments

Comments
 (0)