Lines Matching defs:io

246 static int FinishRow(VP8Decoder* const dec, VP8Io* const io) {
274 if (io->put != NULL) {
279 io->y = ydst;
280 io->u = udst;
281 io->v = vdst;
283 io->y = dec->cache_y_ + y_offset;
284 io->u = dec->cache_u_ + uv_offset;
285 io->v = dec->cache_v_ + uv_offset;
291 if (y_end > io->crop_bottom) {
292 y_end = io->crop_bottom; // make sure we don't overflow on last row.
294 io->a = NULL;
298 io->a = VP8DecompressAlphaRows(dec, y_start, y_end - y_start);
299 if (io->a == NULL) {
304 if (y_start < io->crop_top) {
305 const int delta_y = io->crop_top - y_start;
306 y_start = io->crop_top;
308 io->y += dec->cache_y_stride_ * delta_y;
309 io->u += dec->cache_uv_stride_ * (delta_y >> 1);
310 io->v += dec->cache_uv_stride_ * (delta_y >> 1);
311 if (io->a != NULL) {
312 io->a += io->width * delta_y;
316 io->y += io->crop_left;
317 io->u += io->crop_left >> 1;
318 io->v += io->crop_left >> 1;
319 if (io->a != NULL) {
320 io->a += io->crop_left;
322 io->mb_y = y_start - io->crop_top;
323 io->mb_w = io->crop_right - io->crop_left;
324 io->mb_h = y_end - y_start;
325 ok = io->put(io);
344 int VP8ProcessRow(VP8Decoder* const dec, VP8Io* const io) {
355 ok = FinishRow(dec, io);
362 ctx->io_ = *io;
392 VP8StatusCode VP8EnterCritical(VP8Decoder* const dec, VP8Io* const io) {
393 // Call setup() first. This may trigger additional decoding features on 'io'.
395 if (io->setup != NULL && !io->setup(io)) {
401 if (io->bypass_filtering) {
428 dec->tl_mb_x_ = (io->crop_left - extra_pixels) >> 4;
429 dec->tl_mb_y_ = (io->crop_top - extra_pixels) >> 4;
434 dec->br_mb_y_ = (io->crop_bottom + 15 + extra_pixels) >> 4;
435 dec->br_mb_x_ = (io->crop_right + 15 + extra_pixels) >> 4;
447 int VP8ExitCritical(VP8Decoder* const dec, VP8Io* const io) {
453 if (io->teardown != NULL) {
454 io->teardown(io);
481 // io->put: [ 0..15][16..31][ 0..15][...
636 static void InitIo(VP8Decoder* const dec, VP8Io* io) {
637 // prepare 'io'
638 io->mb_y = 0;
639 io->y = dec->cache_y_;
640 io->u = dec->cache_u_;
641 io->v = dec->cache_v_;
642 io->y_stride = dec->cache_y_stride_;
643 io->uv_stride = dec->cache_uv_stride_;
644 io->a = NULL;
647 int VP8InitFrame(VP8Decoder* const dec, VP8Io* io) {
650 InitIo(dec, io);