Signed-off-by: Marc-Antoine Arnaud <[email protected]>
---
libavcodec/libopenjpegenc.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 06937cb9cac..ee2513d2a38 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -691,6 +691,17 @@ static int
libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
ret = AVERROR_EXTERNAL;
goto done;
}
+
+ if (ctx->cinema_mode == OPJ_CINEMA2K_24 || ctx->profile ==
OPJ_CINEMA2K) {
+ const char* options[2] = { "GUARD_BITS=1", NULL };
+ opj_encoder_set_extra_options(compress, options);
+ }
+
stream = opj_stream_default_create(OPJ_STREAM_WRITE);
if (!stream) {
--
2.39.3 (Apple Git-146)
Le jeu. 7 nov. 2024 à 14:06, Marc-Antoine ARNAUD <
[email protected]> a écrit :
> Signed-off-by: Marc-Antoine Arnaud <[email protected]>
> ---
> libavcodec/libopenjpegenc.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
> index 06937cb9cac..ee2513d2a38 100644
> --- a/libavcodec/libopenjpegenc.c
> +++ b/libavcodec/libopenjpegenc.c
> @@ -691,6 +691,17 @@ static int
> libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
> ret = AVERROR_EXTERNAL;
> goto done;
> }
> +
> + if (ctx->cinema_mode == OPJ_CINEMA2K_24 || ctx->profile ==
> OPJ_CINEMA2K) {
> + const char* options[4] = { NULL, NULL };
> + char szGuardBits[32];
> + int guard_bits = 1;
> + sprintf(szGuardBits, "GUARD_BITS=%d", guard_bits);
> + options[0] = szGuardBits;
> +
> + opj_encoder_set_extra_options(compress, options);
> + }
> +
> stream = opj_stream_default_create(OPJ_STREAM_WRITE);
>
> if (!stream) {
> --
> 2.39.3 (Apple Git-146)
>
--
Marc-Antoine ARNAUD
CEO & Founder
mobile: +33 6 84 71 84 45 <+33+6+84+71+84+45>
email: [email protected]
<[email protected]>
website: luminvent.com
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".