Lines Matching defs:gdv
57 GDVContext *gdv = avctx->priv_data;
61 gdv->frame_size = avctx->width * avctx->height + PREAMBLE_SIZE;
62 gdv->frame = av_calloc(gdv->frame_size, 1);
63 if (!gdv->frame)
69 gdv->frame[i * 2048 + j * 8 + k] = j;
132 static void rescale(GDVContext *gdv, uint8_t *dst, int w, int h, int scale_v, int scale_h)
136 if ((gdv->scale_v == scale_v) && (gdv->scale_h == scale_h)) {
140 if (gdv->scale_v) {
144 uint8_t *src1 = dst + PREAMBLE_SIZE + (y>>!!gdv->scale_h) * (w>>1);
148 } else if (gdv->scale_h) {
176 gdv->scale_v = scale_v;
177 gdv->scale_h = scale_h;
246 GDVContext *gdv = avctx->priv_data;
247 GetByteContext *gb = &gdv->gb;
248 GetByteContext *g2 = &gdv->g2;
249 PutByteContext *pb = &gdv->pb;
253 bytestream2_init(g2, gdv->frame, gdv->frame_size);
258 gdv->frame[c * 16 + i] = c;
288 GDVContext *gdv = avctx->priv_data;
289 GetByteContext *gb = &gdv->gb;
290 GetByteContext *g2 = &gdv->g2;
291 PutByteContext *pb = &gdv->pb;
294 bytestream2_init(g2, gdv->frame, gdv->frame_size);
335 GDVContext *gdv = avctx->priv_data;
336 GetByteContext *gb = &gdv->gb;
337 GetByteContext *g2 = &gdv->g2;
338 PutByteContext *pb = &gdv->pb;
341 bytestream2_init(g2, gdv->frame, gdv->frame_size);
404 c1 = gdv->frame[bytestream2_tell_p(pb) - real_off];
405 c2 = gdv->frame[bytestream2_tell_p(pb) - real_off + 1];
462 GDVContext *gdv = avctx->priv_data;
463 GetByteContext *gb = &gdv->gb;
464 PutByteContext *pb = &gdv->pb;
471 bytestream2_init_writer(pb, gdv->frame, gdv->frame_size);
481 ff_copy_palette(gdv->pal, avpkt, avctx);
485 rescale(gdv, gdv->frame, avctx->width, avctx->height,
490 memset(gdv->frame + PREAMBLE_SIZE, 0, gdv->frame_size - PREAMBLE_SIZE);
496 gdv->pal[i] = 0xFFU << 24 | r << 18 | g << 10 | b << 2;
519 memcpy(frame->data[1], gdv->pal, AVPALETTE_SIZE);
522 if (!gdv->scale_v && !gdv->scale_h) {
527 memcpy(dst + didx, gdv->frame + sidx, avctx->width);
536 if (!gdv->scale_v) {
537 memcpy(dst + didx, gdv->frame + sidx, avctx->width);
540 uint8_t *src2 = gdv->frame + sidx;
544 if (!gdv->scale_h || ((y & 1) == 1)) {
545 sidx += !gdv->scale_v ? avctx->width : avctx->width/2;
558 GDVContext *gdv = avctx->priv_data;
559 av_freep(&gdv->frame);
564 .p.name = "gdv",