* [FFmpeg-devel] [PATCH] avcodec/proresdec2: set color information on frames instead of the decoder context
@ 2022-12-10 15:33 James Almer
0 siblings, 0 replies; only message in thread
From: James Almer @ 2022-12-10 15:33 UTC (permalink / raw)
To: ffmpeg-devel
Similar to how the encoder looks at frame color information to write the frame
header bitstream.
Should workaround ticket #10091, where container level color parameters passed
to the decoder context were being overwritten.
Signed-off-by: James Almer <jamrial@gmail.com>
---
vf_scale should properly set output frame color fields to really fix this,
since this information is in a per frame basis in the prores bitstream and as
such making the encoder write encoder context fields into them would not be
correct.
libavcodec/proresdec2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index b0d7f8d5d5..c821a07849 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -289,10 +289,10 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
avctx->pix_fmt = ret;
}
- avctx->color_primaries = buf[14];
- avctx->color_trc = buf[15];
- avctx->colorspace = buf[16];
- avctx->color_range = AVCOL_RANGE_MPEG;
+ ctx->frame->color_primaries = buf[14];
+ ctx->frame->color_trc = buf[15];
+ ctx->frame->colorspace = buf[16];
+ ctx->frame->color_range = AVCOL_RANGE_MPEG;
ptr = buf + 20;
flags = buf[19];
--
2.38.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-10 15:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-10 15:33 [FFmpeg-devel] [PATCH] avcodec/proresdec2: set color information on frames instead of the decoder context James Almer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git