[vlc-devel] [PATCH 2/3] nvdec: removed now-useless loop on out chromas
Thomas Guillem
thomas at gllm.fr
Fri Mar 13 17:30:03 CET 2020
Nit: For VLC, we prefer to use the imperative mood in subject line.
cf. https://chris.beams.io/posts/git-commit/#imperative
(no need to resend patches, I can change it before merging for this one)
On Fri, Mar 13, 2020, at 17:19, quentin.chateau at deepskycorp.com wrote:
> From: Quentin Chateau <quentin.chateau at deepskycorp.com>
>
> ---
> modules/hw/nvdec/nvdec.c | 20 +++++---------------
> 1 file changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
> index 4fc70a5f5c..31dc06d024 100644
> --- a/modules/hw/nvdec/nvdec.c
> +++ b/modules/hw/nvdec/nvdec.c
> @@ -866,24 +866,14 @@ static int OpenDecoder(vlc_object_t *p_this)
> goto error;
> }
>
> - vlc_fourcc_t output_chromas[2];
> - size_t chroma_idx = 0;
> - output_chromas[chroma_idx++] = MapSurfaceChroma(cudaChroma,
> i_depth_luma);
> - output_chromas[chroma_idx++] = 0;
> -
> - for (chroma_idx = 0; output_chromas[chroma_idx] != 0; chroma_idx++)
> + p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma =
> + MapSurfaceChroma(cudaChroma, i_depth_luma);
> + result = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out);
> + if (result != VLC_SUCCESS)
> {
> - p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma =
> output_chromas[chroma_idx];
> - result = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out);
> - if (result == VLC_SUCCESS)
> - {
> - msg_Dbg(p_dec, "using chroma %4.4s",
> (char*)&p_dec->fmt_out.video.i_chroma);
> - break;
> - }
> msg_Warn(p_dec, "Failed to use output chroma %4.4s",
> (char*)&p_dec->fmt_out.video.i_chroma);
> - }
> - if (result != VLC_SUCCESS)
> goto error;
> + }
>
> int deinterlace_mode = var_InheritInteger(p_dec, "nvdec-deint");
> if (deinterlace_mode <= 0)
> --
> 2.17.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list