Lines Matching defs:frame
199 double SkVideoDecoder::computeTimeStamp(const AVFrame* frame) const {
201 return 1.0 * frame->pts * base.num / base.den;
204 sk_sp<SkImage> SkVideoDecoder::convertFrame(const AVFrame* frame) {
205 auto yuv_space = get_yuvspace(frame->colorspace);
208 fCSCache.update(frame->color_primaries, frame->color_trc);
210 // Are these always true? If so, we don't need to check our "cache" on each frame...
211 SkASSERT(fDecoderCtx->colorspace == frame->colorspace);
212 SkASSERT(fDecoderCtx->color_primaries == frame->color_primaries);
213 SkASSERT(fDecoderCtx->color_trc == frame->color_trc);
218 SkASSERT(fDecoderCtx->pix_fmt == frame->format);
220 switch (frame->format) {
222 if (auto image = make_yuv_420(fRecordingContext, frame->width, frame->height,
223 frame->data, frame->linesize, yuv_space, fCSCache.fCS)) {
232 const auto info = SkImageInfo::MakeN32(frame->width, frame->height,
241 auto* ctx = sws_getContext(frame->width, frame->height, (AVPixelFormat)frame->format,
248 sws_scale(ctx, frame->data, frame->linesize, 0, frame->height, dst, dst_stride);
269 // to have at least one frame available.