On Sun, Jan 25, 2015 at 8:06 AM, Diego Biurrun <[email protected]> wrote: > > > --- a/libavcodec/hevc.c > > +++ b/libavcodec/hevc.c > > @@ -401,6 +401,12 @@ static int set_sps(HEVCContext *s, const HEVCSPS > *sps) > > s->avctx->height = sps->output_height; > > s->avctx->has_b_frames = > sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics; > > > > + if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == > AV_PIX_FMT_YUVJ420P) { > > +#if CONFIG_HEVC_DXVA2_HWACCEL > > The more common style is to fold the condition into the if and rely > on the compiler performing DCE. >
Its done this way in the expectation that more implementations will appear eventually, where having it inside the if condition makes no sense anymore. - Hendrik _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
