comparison v210enc.c @ 10131:4f974b8d8851 libavcodec

prettyprinting cosmetics
author diego
date Sat, 05 Sep 2009 11:22:36 +0000
parents 0f1318d6a52b
children 38cfe222e1a4
comparison
equal deleted inserted replaced
10130:c2d08aedeeed 10131:4f974b8d8851
46 avctx->coded_frame->pict_type = FF_I_TYPE; 46 avctx->coded_frame->pict_type = FF_I_TYPE;
47 47
48 return 0; 48 return 0;
49 } 49 }
50 50
51 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data) 51 static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
52 int buf_size, void *data)
52 { 53 {
53 const AVFrame *pic = data; 54 const AVFrame *pic = data;
54 int aligned_width = ((avctx->width + 47) / 48) * 48; 55 int aligned_width = ((avctx->width + 47) / 48) * 48;
55 int stride = aligned_width * 8 / 3; 56 int stride = aligned_width * 8 / 3;
56 int h, w; 57 int h, w;
99 } 100 }
100 101
101 pdst += stride; 102 pdst += stride;
102 memset(p, 0, pdst - p); 103 memset(p, 0, pdst - p);
103 p = pdst; 104 p = pdst;
104 y += pic->linesize[0]/2 - avctx->width; 105 y += pic->linesize[0] / 2 - avctx->width;
105 u += pic->linesize[1]/2 - avctx->width/2; 106 u += pic->linesize[1] / 2 - avctx->width / 2;
106 v += pic->linesize[2]/2 - avctx->width/2; 107 v += pic->linesize[2] / 2 - avctx->width / 2;
107 } 108 }
108 109
109 return p - buf; 110 return p - buf;
110 } 111 }
111 112