[FFmpeg-devel] [PATCH 4/5] avcodec/cuviddec: Add support for decoding HEVC 4:4:4 content

Philip Langdale philipl at overt.org
Sun Oct 21 01:04:41 EEST 2018


On Sat, 20 Oct 2018 23:10:57 +0200
Timo Rothenpieler <timo at 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


More information about the ffmpeg-devel mailing list