Mercurial > libavformat.hg
comparison grab.c @ 1760:8cba5672faa4 libavformat
Replace deprecated PIX_FMT names by the newer variants.
author | diego |
---|---|
date | Wed, 07 Feb 2007 01:48:09 +0000 |
parents | 30b51285b882 |
children | eb16c64144ee |
comparison
equal
deleted
inserted
replaced
1759:9eaf71a70ac1 | 1760:8cba5672faa4 |
---|---|
122 desired_palette = -1; | 122 desired_palette = -1; |
123 desired_depth = -1; | 123 desired_depth = -1; |
124 if (ap->pix_fmt == PIX_FMT_YUV420P) { | 124 if (ap->pix_fmt == PIX_FMT_YUV420P) { |
125 desired_palette = VIDEO_PALETTE_YUV420P; | 125 desired_palette = VIDEO_PALETTE_YUV420P; |
126 desired_depth = 12; | 126 desired_depth = 12; |
127 } else if (ap->pix_fmt == PIX_FMT_YUV422) { | 127 } else if (ap->pix_fmt == PIX_FMT_YUYV422) { |
128 desired_palette = VIDEO_PALETTE_YUV422; | 128 desired_palette = VIDEO_PALETTE_YUV422; |
129 desired_depth = 16; | 129 desired_depth = 16; |
130 } else if (ap->pix_fmt == PIX_FMT_BGR24) { | 130 } else if (ap->pix_fmt == PIX_FMT_BGR24) { |
131 desired_palette = VIDEO_PALETTE_RGB24; | 131 desired_palette = VIDEO_PALETTE_RGB24; |
132 desired_depth = 24; | 132 desired_depth = 24; |
258 frame_size = (width * height * 3) / 2; | 258 frame_size = (width * height * 3) / 2; |
259 st->codec->pix_fmt = PIX_FMT_YUV420P; | 259 st->codec->pix_fmt = PIX_FMT_YUV420P; |
260 break; | 260 break; |
261 case VIDEO_PALETTE_YUV422: | 261 case VIDEO_PALETTE_YUV422: |
262 frame_size = width * height * 2; | 262 frame_size = width * height * 2; |
263 st->codec->pix_fmt = PIX_FMT_YUV422; | 263 st->codec->pix_fmt = PIX_FMT_YUYV422; |
264 break; | 264 break; |
265 case VIDEO_PALETTE_RGB24: | 265 case VIDEO_PALETTE_RGB24: |
266 frame_size = width * height * 3; | 266 frame_size = width * height * 3; |
267 st->codec->pix_fmt = PIX_FMT_BGR24; /* NOTE: v4l uses BGR24, not RGB24 ! */ | 267 st->codec->pix_fmt = PIX_FMT_BGR24; /* NOTE: v4l uses BGR24, not RGB24 ! */ |
268 break; | 268 break; |