On Sat, 20 Oct 2018 23:10:57 +0200 Timo Rothenpieler <t...@rothenpieler.org> wrote:
> > > > - for (i = 0; i < 2; i++) { > > + pixdesc = av_pix_fmt_desc_get(avctx->sw_pix_fmt); > > + > > + for (i = 0; i < pixdesc->nb_components; i++) { > > + size_t height = avctx->height >> (i ? > > pixdesc->log2_chroma_h : 0); > > Is there a specific reason size_t is used here? It's the first use in > the entire file. Default habit from other projects. Fixed. > > + size_t offset = 0; > > Same here about size_t Also fixed. > > + for (i = 0; i < pixdesc->nb_components; i++) { > > + tmp_frame->data[i] = (uint8_t*)mapped_frame + > > offset; > > + tmp_frame->linesize[i] = pitch; > > I'd kinda like to have a comment here explaining that if YUV420P > would be used, pitch would need special handling, because it also > gets shifted there for the U/V planes. Added. Thanks, --phil _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel