comparison cyuv.c @ 10704:72ff59e42756 libavcodec

cosmetics: correct formatting a bit
author kostya
date Wed, 23 Dec 2009 09:04:57 +0000
parents 5da84f0d0a55
children 126c0fef9167
comparison
equal deleted inserted replaced
10703:3be801dcc8a1 10704:72ff59e42756
85 /* sanity check the buffer size: A buffer has 3x16-bytes tables 85 /* sanity check the buffer size: A buffer has 3x16-bytes tables
86 * followed by (height) lines each with 3 bytes to represent groups 86 * followed by (height) lines each with 3 bytes to represent groups
87 * of 4 pixels. Thus, the total size of the buffer ought to be: 87 * of 4 pixels. Thus, the total size of the buffer ought to be:
88 * (3 * 16) + height * (width * 3 / 4) */ 88 * (3 * 16) + height * (width * 3 / 4) */
89 if (buf_size != 48 + s->height * (s->width * 3 / 4)) { 89 if (buf_size != 48 + s->height * (s->width * 3 / 4)) {
90 av_log(avctx, AV_LOG_ERROR, "ffmpeg: cyuv: got a buffer with %d bytes when %d were expected\n", 90 av_log(avctx, AV_LOG_ERROR, "ffmpeg: cyuv: got a buffer with %d bytes when %d were expected\n",
91 buf_size, 91 buf_size, 48 + s->height * (s->width * 3 / 4));
92 48 + s->height * (s->width * 3 / 4)); 92 return -1;
93 return -1;
94 } 93 }
95 94
96 /* pixel data starts 48 bytes in, after 3x16-byte tables */ 95 /* pixel data starts 48 bytes in, after 3x16-byte tables */
97 stream_ptr = 48; 96 stream_ptr = 48;
98 97
99 if(s->frame.data[0]) 98 if (s->frame.data[0])
100 avctx->release_buffer(avctx, &s->frame); 99 avctx->release_buffer(avctx, &s->frame);
101 100
102 s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; 101 s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
103 s->frame.reference = 0; 102 s->frame.reference = 0;
104 if(avctx->get_buffer(avctx, &s->frame) < 0) { 103 if (avctx->get_buffer(avctx, &s->frame) < 0) {
105 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); 104 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
106 return -1; 105 return -1;
107 } 106 }
108 107
109 y_plane = s->frame.data[0]; 108 y_plane = s->frame.data[0];