27 #define Y4M_LINE_MAX 256
33 int raten, rated, aspectn, aspectd,
n;
48 if (aspectn == 0 && aspectd == 1)
56 default: inter =
'p';
break;
61 colorspace =
" Cmono";
64 colorspace =
" Cmono16";
67 colorspace =
" C411 XYSCSS=411";
73 default: colorspace =
" C420jpeg XYSCSS=420JPEG";
break;
77 colorspace =
" C422 XYSCSS=422";
80 colorspace =
" C444 XYSCSS=444";
83 colorspace =
" C420p9 XYSCSS=420P9";
86 colorspace =
" C422p9 XYSCSS=422P9";
89 colorspace =
" C444p9 XYSCSS=444P9";
92 colorspace =
" C420p10 XYSCSS=420P10";
95 colorspace =
" C422p10 XYSCSS=422P10";
98 colorspace =
" C444p10 XYSCSS=444P10";
101 colorspace =
" C420p12 XYSCSS=420P12";
104 colorspace =
" C422p12 XYSCSS=422P12";
107 colorspace =
" C444p12 XYSCSS=444P12";
110 colorspace =
" C420p14 XYSCSS=420P14";
113 colorspace =
" C422p14 XYSCSS=422P14";
116 colorspace =
" C444p14 XYSCSS=444P14";
119 colorspace =
" C420p16 XYSCSS=420P16";
122 colorspace =
" C422p16 XYSCSS=422P16";
125 colorspace =
" C444p16 XYSCSS=444P16";
131 Y4M_MAGIC, width, height, raten, rated, inter,
132 aspectn, aspectd, colorspace);
150 picture = &picture_tmp;
157 "Error. YUV4MPEG stream header write failed.\n");
172 ptr = picture->
data[0];
205 for (i = 0; i <
height; i++) {
218 ptr1 = picture->
data[1];
219 ptr2 = picture->
data[2];
220 for (i = 0; i <
height; i++) {
224 for (i = 0; i <
height; i++) {
248 "stream, some mjpegtools might not work.\n");
273 "Use '-strict -1' to encode to this pixel format.\n",
278 "Mjpegtools will not work.\n");
282 "yuv444p, yuv422p, yuv420p, yuv411p and gray8 pixel formats. "
283 "And using 'strict -1' also yuv444p9, yuv422p9, yuv420p9, "
284 "yuv444p10, yuv422p10, yuv420p10, "
285 "yuv444p12, yuv422p12, yuv420p12, "
286 "yuv444p14, yuv422p14, yuv420p14, "
287 "yuv444p16, yuv422p16, yuv420p16 "
288 "and gray16 pixel formats. "
289 "Use -pix_fmt to select one.\n");
298 .
name =
"yuv4mpegpipe",
301 .priv_data_size =
sizeof(int),