You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/huffyuvenc: Avoid unnecessary function call
av_pix_fmt_get_chroma_sub_sample() is superfluous if one already has an AVPixFmtDescriptor. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -230,9 +230,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
s->yuv = !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2;
|
s->yuv = !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2;
|
||||||
s->chroma = desc->nb_components > 2;
|
s->chroma = desc->nb_components > 2;
|
||||||
s->alpha = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA);
|
s->alpha = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA);
|
||||||
av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt,
|
s->chroma_h_shift = desc->log2_chroma_w;
|
||||||
&s->chroma_h_shift,
|
s->chroma_v_shift = desc->log2_chroma_h;
|
||||||
&s->chroma_v_shift);
|
|
||||||
|
|
||||||
switch (avctx->pix_fmt) {
|
switch (avctx->pix_fmt) {
|
||||||
case AV_PIX_FMT_YUV420P:
|
case AV_PIX_FMT_YUV420P:
|
||||||
|
Reference in New Issue
Block a user