> +static int ff_qsv_get_continuous_buffer(AVCodecContext *avctx, AVFrame > +*frame, AVBufferPool *pool) { > + int ret = 0; > + > + ff_decode_frame_props(avctx, frame); > + > + frame->width = avctx->width; > + frame->height = avctx->height; > + frame->linesize[0] = FFALIGN(avctx->width, 128); > + frame->linesize[1] = frame->linesize[0]; > + frame->buf[0] = av_buffer_pool_get(pool); > + if (!frame->buf[0]) > + return AVERROR(ENOMEM); > + > + frame->data[0] = frame->buf[0]->data; > + frame->data[1] = frame->data[0] + > + frame->linesize[0] * FFALIGN(avctx->height, > + 64);
It is assumed there are only two planes , but this is not correct for some formats, such as RGB32. Probably ok since currently all decoder output is NV12/P010, but would be better add an assert check, since it is possible for decoder to output some other formats (e.g: it is plan to add RGB format for JPEG decoding output). _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".