47 #ifndef __WEED_COMPAT_H__
48 #define __WEED_COMPAT_H__
56 #ifdef NEED_FOURCC_COMPAT
58 #ifndef __WEED_PALETTES_H__
62 int fourccp_to_weedp(
unsigned int fourcc,
int bpp,
int *interlaced,
int *sampling,
63 int *sspace,
int *clamping) {
77 if (interlaced!=NULL) *interlaced=0;
109 if (interlaced!=NULL) *interlaced=1;
204 #include <libavcodec/avcodec.h>
205 #include <libavutil/pixfmt.h>
207 typedef struct AVCodecTag {
213 #define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
217 #if (LIBAVCODEC_VERSION_MAJOR > 54)
218 #define CodecID AVCodecID
220 #define CODEC_ID_NONE AV_CODEC_ID_NONE
221 #define CODEC_ID_H264 AV_CODEC_ID_H264
222 #define CODEC_ID_H263 AV_CODEC_ID_H263
223 #define CODEC_ID_H263P AV_CODEC_ID_H263P
224 #define CODEC_ID_H263I AV_CODEC_ID_H263I
225 #define CODEC_ID_H261 AV_CODEC_ID_H261
226 #define CODEC_ID_MPEG4 AV_CODEC_ID_MPEG4
227 #define CODEC_ID_MSMPEG4V3 AV_CODEC_ID_MSMPEG4V3
228 #define CODEC_ID_MSMPEG4V2 AV_CODEC_ID_MSMPEG4V2
229 #define CODEC_ID_MSMPEG4V1 AV_CODEC_ID_MSMPEG4V1
230 #define CODEC_ID_WMV1 AV_CODEC_ID_WMV1
231 #define CODEC_ID_WMV2 AV_CODEC_ID_WMV2
232 #define CODEC_ID_DVVIDEO AV_CODEC_ID_DVVIDEO
233 #define CODEC_ID_MPEG1VIDEO AV_CODEC_ID_MPEG1VIDEO
234 #define CODEC_ID_MPEG2VIDEO AV_CODEC_ID_MPEG2VIDEO
235 #define CODEC_ID_MJPEG AV_CODEC_ID_MJPEG
236 #define CODEC_ID_LJPEG AV_CODEC_ID_LJPEG
237 #define CODEC_ID_JPEGLS AV_CODEC_ID_JPEGLS
238 #define CODEC_ID_HUFFYUV AV_CODEC_ID_HUFFYUV
239 #define CODEC_ID_FFVHUFF AV_CODEC_ID_FFVHUFF
240 #define CODEC_ID_CYUV AV_CODEC_ID_CYUV
241 #define CODEC_ID_RAWVIDEO AV_CODEC_ID_RAWVIDEO
242 #define CODEC_ID_INDEO2 AV_CODEC_ID_INDEO2
243 #define CODEC_ID_INDEO3 AV_CODEC_ID_INDEO3
244 #define CODEC_ID_INDEO4 AV_CODEC_ID_INDEO4
245 #define CODEC_ID_INDEO5 AV_CODEC_ID_INDEO5
246 #define CODEC_ID_VP3 AV_CODEC_ID_VP3
247 #define CODEC_ID_VP5 AV_CODEC_ID_VP5
248 #define CODEC_ID_VP6 AV_CODEC_ID_VP6
249 #define CODEC_ID_VP6F AV_CODEC_ID_VP6F
250 #define CODEC_ID_ASV1 AV_CODEC_ID_ASV1
251 #define CODEC_ID_ASV2 AV_CODEC_ID_ASV2
252 #define CODEC_ID_VCR1 AV_CODEC_ID_VCR1
253 #define CODEC_ID_FFV1 AV_CODEC_ID_FFV1
254 #define CODEC_ID_XAN_WC4 AV_CODEC_ID_XAN_WC4
255 #define CODEC_ID_MIMIC AV_CODEC_ID_MIMIC
256 #define CODEC_ID_MSRLE AV_CODEC_ID_MSRLE
257 #define CODEC_ID_MSVIDEO1 AV_CODEC_ID_MSVIDEO1
258 #define CODEC_ID_CINEPAK AV_CODEC_ID_CINEPAK
259 #define CODEC_ID_TRUEMOTION1 AV_CODEC_ID_TRUEMOTION1
260 #define CODEC_ID_TRUEMOTION2 AV_CODEC_ID_TRUEMOTION2
261 #define CODEC_ID_MSZH AV_CODEC_ID_MSZH
262 #define CODEC_ID_ZLIB AV_CODEC_ID_ZLIB
265 #define CODEC_ID_SNOW AV_CODEC_ID_SNOW
268 #define CODEC_ID_4XM AV_CODEC_ID_4XM
269 #define CODEC_ID_FLV1 AV_CODEC_ID_FLV1
270 #define CODEC_ID_FLASHSV AV_CODEC_ID_FLASHSV
271 #define CODEC_ID_SVQ1 AV_CODEC_ID_SVQ1
272 #define CODEC_ID_TSCC AV_CODEC_ID_TSCC
273 #define CODEC_ID_ULTI AV_CODEC_ID_ULTI
274 #define CODEC_ID_VIXL AV_CODEC_ID_VIXL
275 #define CODEC_ID_QPEG AV_CODEC_ID_QPEG
276 #define CODEC_ID_WMV3 AV_CODEC_ID_WMV3
277 #define CODEC_ID_VC1 AV_CODEC_ID_VC1
278 #define CODEC_ID_LOCO AV_CODEC_ID_LOCO
279 #define CODEC_ID_WNV1 AV_CODEC_ID_WNV1
280 #define CODEC_ID_AASC AV_CODEC_ID_AASC
281 #define CODEC_ID_FRAPS AV_CODEC_ID_FRAPS
282 #define CODEC_ID_THEORA AV_CODEC_ID_THEORA
283 #define CODEC_ID_CSCD AV_CODEC_ID_CSCD
284 #define CODEC_ID_ZMBV AV_CODEC_ID_ZMBV
285 #define CODEC_ID_KMVC AV_CODEC_ID_KMVC
286 #define CODEC_ID_CAVS AV_CODEC_ID_CAVS
287 #define CODEC_ID_JPEG2000 AV_CODEC_ID_JPEG2000
288 #define CODEC_ID_VMNC AV_CODEC_ID_VMNC
289 #define CODEC_ID_TARGA AV_CODEC_ID_TARGA
290 #define CODEC_ID_PNG AV_CODEC_ID_PNG
291 #define CODEC_ID_GIF AV_CODEC_ID_GIF
292 #define CODEC_ID_TIFF AV_CODEC_ID_TIFF
293 #define CODEC_ID_CLJR AV_CODEC_ID_CLJR
294 #define CODEC_ID_DIRAC AV_CODEC_ID_DIRAC
295 #define CODEC_ID_RPZA AV_CODEC_ID_RPZA
296 #define CODEC_ID_SP5X AV_CODEC_ID_SP5X
298 #define CODEC_ID_FLASHSV2 AV_CODEC_ID_FLASHSV2
299 #define CODEC_ID_TEXT AV_CODEC_ID_TEXT
300 #define CODEC_ID_SSA AV_CODEC_ID_SSA
301 #define CODEC_ID_SSA AV_CODEC_ID_SRT
302 #define CODEC_ID_VP8 AV_CODEC_ID_VP8
303 #define CODEC_ID_RV10 AV_CODEC_ID_RV10
304 #define CODEC_ID_RV20 AV_CODEC_ID_RV20
305 #define CODEC_ID_RV30 AV_CODEC_ID_RV30
306 #define CODEC_ID_RV40 AV_CODEC_ID_RV40
307 #define CODEC_ID_MP3 AV_CODEC_ID_MP3
308 #define CODEC_ID_MP3 AV_CODEC_ID_MP2
309 #define CODEC_ID_AAC AV_CODEC_ID_AAC
310 #define CODEC_ID_PCM_BLURAY AV_CODEC_ID_PCM_BLURAY
311 #define CODEC_ID_AC3 AV_CODEC_ID_AC3
312 #define CODEC_ID_VORBIS AV_CODEC_ID_VORBIS
313 #define CODEC_ID_EAC3 AV_CODEC_ID_EAC3
314 #define CODEC_ID_DTS AV_CODEC_ID_DTS
315 #define CODEC_ID_TRUEHD AV_CODEC_ID_TRUEHD
316 #define CODEC_ID_S302M AV_CODEC_ID_S302M
317 #define CODEC_ID_DVB_TELETEXT AV_CODEC_ID_DVB_TELETEXT
318 #define CODEC_ID_DVB_SUBTITLE AV_CODEC_ID_DVB_SUBTITLE
319 #define CODEC_ID_DVD_SUBTITLE AV_CODEC_ID_DVD_SUBTITLE
321 #define CODEC_ID_MOV_TEXT AV_CODEC_ID_MOV_TEXT
322 #define CODEC_ID_MP4ALS AV_CODEC_ID_MP4ALS
323 #define CODEC_ID_QCELP AV_CODEC_ID_QCELP
324 #define CODEC_ID_MPEG4SYSTEMS AV_CODEC_ID_MPEG4SYSTEMS
326 #define CODEC_ID_MPEG2TS AV_CODEC_ID_MPEG2TS
327 #define CODEC_ID_AAC_LATM AV_CODEC_ID_AAC_LATM
328 #define CODEC_ID_HDMV_PGS_SUBTITLE AV_CODEC_ID_HDMV_PGS_SUBTITLE
330 #define CODEC_ID_FLAC AV_CODEC_ID_FLAC
331 #define CODEC_ID_MLP AV_CODEC_ID_MLP
333 #define CODEC_ID_PCM_F32LE AV_CODEC_ID_PCM_F32LE
334 #define CODEC_ID_PCM_F64LE AV_CODEC_ID_PCM_F64LE
336 #define CODEC_ID_PCM_S16BE AV_CODEC_ID_PCM_S16BE
337 #define CODEC_ID_PCM_S24BE AV_CODEC_ID_PCM_S24BE
338 #define CODEC_ID_PCM_S32BE AV_CODEC_ID_PCM_S32BE
340 #define CODEC_ID_PCM_S16LE AV_CODEC_ID_PCM_S16LE
341 #define CODEC_ID_PCM_S24LE AV_CODEC_ID_PCM_S24LE
342 #define CODEC_ID_PCM_S32LE AV_CODEC_ID_PCM_S32LE
344 #define CODEC_ID_PCM_U8 AV_CODEC_ID_PCM_U8
346 #define CODEC_ID_PCM_QDM2 AV_CODEC_ID_QDM2
347 #define CODEC_ID_RA_144 AV_CODEC_ID_RA_144
348 #define CODEC_ID_RA_288 AV_CODEC_ID_RA_288
349 #define CODEC_ID_ATRAC3 AV_CODEC_ID_ATRAC3
350 #define CODEC_ID_COOK AV_CODEC_ID_COOK
351 #define CODEC_ID_SIPR AV_CODEC_ID_SIPR
352 #define CODEC_ID_TTA AV_CODEC_ID_TTA
353 #define CODEC_ID_WAVPACK AV_CODEC_ID_WAVPACK
355 #define CODEC_ID_TTF AV_CODEC_ID_TTF
359 const AVCodecTag codec_bmp_tags[] = {
360 { CODEC_ID_H264, MKTAG(
'H',
'2',
'6',
'4') },
361 { CODEC_ID_H264, MKTAG(
'h',
'2',
'6',
'4') },
362 { CODEC_ID_H264, MKTAG(
'X',
'2',
'6',
'4') },
363 { CODEC_ID_H264, MKTAG(
'x',
'2',
'6',
'4') },
364 { CODEC_ID_H264, MKTAG(
'a',
'v',
'c',
'1') },
365 { CODEC_ID_H264, MKTAG(
'V',
'S',
'S',
'H') },
366 { CODEC_ID_H263, MKTAG(
'H',
'2',
'6',
'3') },
367 { CODEC_ID_H263, MKTAG(
'X',
'2',
'6',
'3') },
368 { CODEC_ID_H263, MKTAG(
'T',
'2',
'6',
'3') },
369 { CODEC_ID_H263, MKTAG(
'L',
'2',
'6',
'3') },
370 { CODEC_ID_H263, MKTAG(
'V',
'X',
'1',
'K') },
371 { CODEC_ID_H263, MKTAG(
'Z',
'y',
'G',
'o') },
372 { CODEC_ID_H263P, MKTAG(
'H',
'2',
'6',
'3') },
373 { CODEC_ID_H263I, MKTAG(
'I',
'2',
'6',
'3') },
374 { CODEC_ID_H261, MKTAG(
'H',
'2',
'6',
'1') },
375 { CODEC_ID_H263P, MKTAG(
'U',
'2',
'6',
'3') },
376 { CODEC_ID_H263P, MKTAG(
'v',
'i',
'v',
'1') },
377 { CODEC_ID_MPEG4, MKTAG(
'F',
'M',
'P',
'4') },
378 { CODEC_ID_MPEG4, MKTAG(
'D',
'I',
'V',
'X') },
379 { CODEC_ID_MPEG4, MKTAG(
'D',
'X',
'5',
'0') },
380 { CODEC_ID_MPEG4, MKTAG(
'X',
'V',
'I',
'D') },
381 { CODEC_ID_MPEG4, MKTAG(
'M',
'P',
'4',
'S') },
382 { CODEC_ID_MPEG4, MKTAG(
'M',
'4',
'S',
'2') },
383 { CODEC_ID_MPEG4, MKTAG(4 , 0 , 0 , 0) },
384 { CODEC_ID_MPEG4, MKTAG(
'D',
'I',
'V',
'1') },
385 { CODEC_ID_MPEG4, MKTAG(
'B',
'L',
'Z',
'0') },
386 { CODEC_ID_MPEG4, MKTAG(
'm',
'p',
'4',
'v') },
387 { CODEC_ID_MPEG4, MKTAG(
'U',
'M',
'P',
'4') },
388 { CODEC_ID_MPEG4, MKTAG(
'W',
'V',
'1',
'F') },
389 { CODEC_ID_MPEG4, MKTAG(
'S',
'E',
'D',
'G') },
390 { CODEC_ID_MPEG4, MKTAG(
'R',
'M',
'P',
'4') },
391 { CODEC_ID_MPEG4, MKTAG(
'3',
'I',
'V',
'2') },
392 { CODEC_ID_MPEG4, MKTAG(
'F',
'F',
'D',
'S') },
393 { CODEC_ID_MPEG4, MKTAG(
'F',
'V',
'F',
'W') },
394 { CODEC_ID_MPEG4, MKTAG(
'D',
'C',
'O',
'D') },
395 { CODEC_ID_MPEG4, MKTAG(
'M',
'V',
'X',
'M') },
396 { CODEC_ID_MPEG4, MKTAG(
'P',
'M',
'4',
'V') },
397 { CODEC_ID_MPEG4, MKTAG(
'S',
'M',
'P',
'4') },
398 { CODEC_ID_MPEG4, MKTAG(
'D',
'X',
'G',
'M') },
399 { CODEC_ID_MPEG4, MKTAG(
'V',
'I',
'D',
'M') },
400 { CODEC_ID_MPEG4, MKTAG(
'M',
'4',
'T',
'3') },
401 { CODEC_ID_MPEG4, MKTAG(
'G',
'E',
'O',
'X') },
402 { CODEC_ID_MPEG4, MKTAG(
'H',
'D',
'X',
'4') },
403 { CODEC_ID_MPEG4, MKTAG(
'D',
'M',
'K',
'2') },
404 { CODEC_ID_MPEG4, MKTAG(
'D',
'I',
'G',
'I') },
405 { CODEC_ID_MPEG4, MKTAG(
'I',
'N',
'M',
'C') },
406 { CODEC_ID_MPEG4, MKTAG(
'E',
'P',
'H',
'V') },
407 { CODEC_ID_MPEG4, MKTAG(
'E',
'M',
'4',
'A') },
408 { CODEC_ID_MPEG4, MKTAG(
'M',
'4',
'C',
'C') },
409 { CODEC_ID_MPEG4, MKTAG(
'S',
'N',
'4',
'0') },
410 { CODEC_ID_MPEG4, MKTAG(
'V',
'S',
'P',
'X') },
411 { CODEC_ID_MPEG4, MKTAG(
'U',
'L',
'D',
'X') },
412 { CODEC_ID_MPEG4, MKTAG(
'G',
'E',
'O',
'V') },
413 { CODEC_ID_MPEG4, MKTAG(
'S',
'I',
'P',
'P') },
414 { CODEC_ID_MSMPEG4V3, MKTAG(
'D',
'I',
'V',
'3') },
415 { CODEC_ID_MSMPEG4V3, MKTAG(
'M',
'P',
'4',
'3') },
416 { CODEC_ID_MSMPEG4V3, MKTAG(
'M',
'P',
'G',
'3') },
417 { CODEC_ID_MSMPEG4V3, MKTAG(
'D',
'I',
'V',
'5') },
418 { CODEC_ID_MSMPEG4V3, MKTAG(
'D',
'I',
'V',
'6') },
419 { CODEC_ID_MSMPEG4V3, MKTAG(
'D',
'I',
'V',
'4') },
420 { CODEC_ID_MSMPEG4V3, MKTAG(
'D',
'V',
'X',
'3') },
421 { CODEC_ID_MSMPEG4V3, MKTAG(
'A',
'P',
'4',
'1') },
422 { CODEC_ID_MSMPEG4V3, MKTAG(
'C',
'O',
'L',
'1') },
423 { CODEC_ID_MSMPEG4V3, MKTAG(
'C',
'O',
'L',
'0') },
424 { CODEC_ID_MSMPEG4V2, MKTAG(
'M',
'P',
'4',
'2') },
425 { CODEC_ID_MSMPEG4V2, MKTAG(
'D',
'I',
'V',
'2') },
426 { CODEC_ID_MSMPEG4V1, MKTAG(
'M',
'P',
'G',
'4') },
427 { CODEC_ID_MSMPEG4V1, MKTAG(
'M',
'P',
'4',
'1') },
428 { CODEC_ID_WMV1, MKTAG(
'W',
'M',
'V',
'1') },
429 { CODEC_ID_WMV2, MKTAG(
'W',
'M',
'V',
'2') },
430 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
's',
'd') },
431 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
'h',
'd') },
432 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
'h',
'1') },
433 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
's',
'l') },
434 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
'2',
'5') },
435 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
'5',
'0') },
436 { CODEC_ID_DVVIDEO, MKTAG(
'c',
'd',
'v',
'c') },
437 { CODEC_ID_DVVIDEO, MKTAG(
'C',
'D',
'V',
'H') },
438 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
'c',
' ') },
439 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
'c',
's') },
440 { CODEC_ID_DVVIDEO, MKTAG(
'd',
'v',
'h',
'1') },
441 { CODEC_ID_MPEG1VIDEO, MKTAG(
'm',
'p',
'g',
'1') },
442 { CODEC_ID_MPEG1VIDEO, MKTAG(
'm',
'p',
'g',
'2') },
443 { CODEC_ID_MPEG2VIDEO, MKTAG(
'm',
'p',
'g',
'2') },
444 { CODEC_ID_MPEG2VIDEO, MKTAG(
'M',
'P',
'E',
'G') },
445 { CODEC_ID_MPEG1VIDEO, MKTAG(
'P',
'I',
'M',
'1') },
446 { CODEC_ID_MPEG2VIDEO, MKTAG(
'P',
'I',
'M',
'2') },
447 { CODEC_ID_MPEG1VIDEO, MKTAG(
'V',
'C',
'R',
'2') },
448 { CODEC_ID_MPEG1VIDEO, MKTAG(1 , 0 , 0 , 16) },
449 { CODEC_ID_MPEG2VIDEO, MKTAG(2 , 0 , 0 , 16) },
450 { CODEC_ID_MPEG4, MKTAG(4 , 0 , 0 , 16) },
451 { CODEC_ID_MPEG2VIDEO, MKTAG(
'D',
'V',
'R',
' ') },
452 { CODEC_ID_MPEG2VIDEO, MKTAG(
'M',
'M',
'E',
'S') },
453 { CODEC_ID_MPEG2VIDEO, MKTAG(
'L',
'M',
'P',
'2') },
454 { CODEC_ID_MPEG2VIDEO, MKTAG(
's',
'l',
'i',
'f') },
455 { CODEC_ID_MPEG2VIDEO, MKTAG(
'E',
'M',
'2',
'V') },
456 { CODEC_ID_MJPEG, MKTAG(
'M',
'J',
'P',
'G') },
457 { CODEC_ID_MJPEG, MKTAG(
'L',
'J',
'P',
'G') },
458 { CODEC_ID_MJPEG, MKTAG(
'd',
'm',
'b',
'1') },
459 { CODEC_ID_MJPEG, MKTAG(
'm',
'j',
'p',
'a') },
460 { CODEC_ID_LJPEG, MKTAG(
'L',
'J',
'P',
'G') },
461 { CODEC_ID_MJPEG, MKTAG(
'J',
'P',
'G',
'L') },
462 { CODEC_ID_JPEGLS, MKTAG(
'M',
'J',
'L',
'S') },
463 { CODEC_ID_MJPEG, MKTAG(
'M',
'J',
'L',
'S') },
464 { CODEC_ID_MJPEG, MKTAG(
'j',
'p',
'e',
'g') },
465 { CODEC_ID_MJPEG, MKTAG(
'I',
'J',
'P',
'G') },
466 { CODEC_ID_MJPEG, MKTAG(
'A',
'V',
'R',
'n') },
467 { CODEC_ID_MJPEG, MKTAG(
'A',
'C',
'D',
'V') },
468 { CODEC_ID_MJPEG, MKTAG(
'Q',
'I',
'V',
'G') },
469 { CODEC_ID_MJPEG, MKTAG(
'S',
'L',
'M',
'J') },
470 { CODEC_ID_MJPEG, MKTAG(
'C',
'J',
'P',
'G') },
471 { CODEC_ID_MJPEG, MKTAG(
'I',
'J',
'L',
'V') },
472 { CODEC_ID_MJPEG, MKTAG(
'M',
'V',
'J',
'P') },
473 { CODEC_ID_MJPEG, MKTAG(
'A',
'V',
'I',
'1') },
474 { CODEC_ID_MJPEG, MKTAG(
'A',
'V',
'I',
'2') },
475 { CODEC_ID_MJPEG, MKTAG(
'M',
'T',
'S',
'J') },
476 { CODEC_ID_MJPEG, MKTAG(
'Z',
'J',
'P',
'G') },
477 { CODEC_ID_HUFFYUV, MKTAG(
'H',
'F',
'Y',
'U') },
478 { CODEC_ID_FFVHUFF, MKTAG(
'F',
'F',
'V',
'H') },
479 { CODEC_ID_CYUV, MKTAG(
'C',
'Y',
'U',
'V') },
480 { CODEC_ID_RAWVIDEO, MKTAG(0 , 0 , 0 , 0) },
481 { CODEC_ID_RAWVIDEO, MKTAG(3 , 0 , 0 , 0) },
482 { CODEC_ID_RAWVIDEO, MKTAG(
'I',
'4',
'2',
'0') },
483 { CODEC_ID_RAWVIDEO, MKTAG(
'Y',
'U',
'Y',
'2') },
484 { CODEC_ID_RAWVIDEO, MKTAG(
'Y',
'4',
'2',
'2') },
485 { CODEC_ID_RAWVIDEO, MKTAG(
'V',
'4',
'2',
'2') },
486 { CODEC_ID_RAWVIDEO, MKTAG(
'Y',
'U',
'N',
'V') },
487 { CODEC_ID_RAWVIDEO, MKTAG(
'U',
'Y',
'N',
'V') },
488 { CODEC_ID_RAWVIDEO, MKTAG(
'U',
'Y',
'N',
'Y') },
489 { CODEC_ID_RAWVIDEO, MKTAG(
'u',
'y',
'v',
'1') },
490 { CODEC_ID_RAWVIDEO, MKTAG(
'2',
'V',
'u',
'1') },
491 { CODEC_ID_RAWVIDEO, MKTAG(
'2',
'v',
'u',
'y') },
492 { CODEC_ID_RAWVIDEO, MKTAG(
'P',
'4',
'2',
'2') },
493 { CODEC_ID_RAWVIDEO, MKTAG(
'Y',
'V',
'1',
'2') },
494 { CODEC_ID_RAWVIDEO, MKTAG(
'U',
'Y',
'V',
'Y') },
495 { CODEC_ID_RAWVIDEO, MKTAG(
'V',
'Y',
'U',
'Y') },
496 { CODEC_ID_RAWVIDEO, MKTAG(
'I',
'Y',
'U',
'V') },
497 { CODEC_ID_RAWVIDEO, MKTAG(
'Y',
'8',
'0',
'0') },
498 { CODEC_ID_RAWVIDEO, MKTAG(
'H',
'D',
'Y',
'C') },
499 { CODEC_ID_RAWVIDEO, MKTAG(
'Y',
'V',
'U',
'9') },
500 { CODEC_ID_RAWVIDEO, MKTAG(
'V',
'D',
'T',
'Z') },
501 { CODEC_ID_INDEO3, MKTAG(
'I',
'V',
'3',
'1') },
502 { CODEC_ID_INDEO3, MKTAG(
'I',
'V',
'3',
'2') },
503 { CODEC_ID_INDEO4, MKTAG(
'I',
'V',
'4',
'1') },
504 { CODEC_ID_INDEO5, MKTAG(
'I',
'V',
'5',
'0') },
505 { CODEC_ID_VP3, MKTAG(
'V',
'P',
'3',
'1') },
506 { CODEC_ID_VP3, MKTAG(
'V',
'P',
'3',
'0') },
507 { CODEC_ID_VP5, MKTAG(
'V',
'P',
'5',
'0') },
508 { CODEC_ID_VP6, MKTAG(
'V',
'P',
'6',
'0') },
509 { CODEC_ID_VP6, MKTAG(
'V',
'P',
'6',
'1') },
510 { CODEC_ID_VP6, MKTAG(
'V',
'P',
'6',
'2') },
511 { CODEC_ID_VP6F, MKTAG(
'V',
'P',
'6',
'F') },
512 { CODEC_ID_VP6F, MKTAG(
'F',
'L',
'V',
'4') },
513 { CODEC_ID_ASV1, MKTAG(
'A',
'S',
'V',
'1') },
514 { CODEC_ID_ASV2, MKTAG(
'A',
'S',
'V',
'2') },
515 { CODEC_ID_VCR1, MKTAG(
'V',
'C',
'R',
'1') },
516 { CODEC_ID_FFV1, MKTAG(
'F',
'F',
'V',
'1') },
517 { CODEC_ID_XAN_WC4, MKTAG(
'X',
'x',
'a',
'n') },
518 { CODEC_ID_MIMIC, MKTAG(
'L',
'M',
'2',
'0') },
519 { CODEC_ID_MSRLE, MKTAG(
'm',
'r',
'l',
'e') },
520 { CODEC_ID_MSRLE, MKTAG(1 , 0 , 0 , 0) },
521 { CODEC_ID_MSRLE, MKTAG(2 , 0 , 0 , 0) },
522 { CODEC_ID_MSVIDEO1, MKTAG(
'M',
'S',
'V',
'C') },
523 { CODEC_ID_MSVIDEO1, MKTAG(
'm',
's',
'v',
'c') },
524 { CODEC_ID_MSVIDEO1, MKTAG(
'C',
'R',
'A',
'M') },
525 { CODEC_ID_MSVIDEO1, MKTAG(
'c',
'r',
'a',
'm') },
526 { CODEC_ID_MSVIDEO1, MKTAG(
'W',
'H',
'A',
'M') },
527 { CODEC_ID_MSVIDEO1, MKTAG(
'w',
'h',
'a',
'm') },
528 { CODEC_ID_CINEPAK, MKTAG(
'c',
'v',
'i',
'd') },
529 { CODEC_ID_TRUEMOTION1, MKTAG(
'D',
'U',
'C',
'K') },
530 { CODEC_ID_TRUEMOTION1, MKTAG(
'P',
'V',
'E',
'Z') },
531 { CODEC_ID_MSZH, MKTAG(
'M',
'S',
'Z',
'H') },
532 { CODEC_ID_ZLIB, MKTAG(
'Z',
'L',
'I',
'B') },
534 { CODEC_ID_SNOW, MKTAG(
'S',
'N',
'O',
'W') },
536 { CODEC_ID_4XM, MKTAG(
'4',
'X',
'M',
'V') },
537 { CODEC_ID_FLV1, MKTAG(
'F',
'L',
'V',
'1') },
538 { CODEC_ID_FLASHSV, MKTAG(
'F',
'S',
'V',
'1') },
539 { CODEC_ID_SVQ1, MKTAG(
's',
'v',
'q',
'1') },
540 { CODEC_ID_TSCC, MKTAG(
't',
's',
'c',
'c') },
541 { CODEC_ID_ULTI, MKTAG(
'U',
'L',
'T',
'I') },
542 { CODEC_ID_VIXL, MKTAG(
'V',
'I',
'X',
'L') },
543 { CODEC_ID_QPEG, MKTAG(
'Q',
'P',
'E',
'G') },
544 { CODEC_ID_QPEG, MKTAG(
'Q',
'1',
'.',
'0') },
545 { CODEC_ID_QPEG, MKTAG(
'Q',
'1',
'.',
'1') },
546 { CODEC_ID_WMV3, MKTAG(
'W',
'M',
'V',
'3') },
547 { CODEC_ID_VC1, MKTAG(
'W',
'V',
'C',
'1') },
548 { CODEC_ID_VC1, MKTAG(
'W',
'M',
'V',
'A') },
549 { CODEC_ID_LOCO, MKTAG(
'L',
'O',
'C',
'O') },
550 { CODEC_ID_WNV1, MKTAG(
'W',
'N',
'V',
'1') },
551 { CODEC_ID_AASC, MKTAG(
'A',
'A',
'S',
'C') },
552 { CODEC_ID_INDEO2, MKTAG(
'R',
'T',
'2',
'1') },
553 { CODEC_ID_FRAPS, MKTAG(
'F',
'P',
'S',
'1') },
554 { CODEC_ID_THEORA, MKTAG(
't',
'h',
'e',
'o') },
555 { CODEC_ID_TRUEMOTION2, MKTAG(
'T',
'M',
'2',
'0') },
556 { CODEC_ID_CSCD, MKTAG(
'C',
'S',
'C',
'D') },
557 { CODEC_ID_ZMBV, MKTAG(
'Z',
'M',
'B',
'V') },
558 { CODEC_ID_KMVC, MKTAG(
'K',
'M',
'V',
'C') },
559 { CODEC_ID_CAVS, MKTAG(
'C',
'A',
'V',
'S') },
560 { CODEC_ID_JPEG2000, MKTAG(
'M',
'J',
'2',
'C') },
561 { CODEC_ID_VMNC, MKTAG(
'V',
'M',
'n',
'c') },
562 { CODEC_ID_TARGA, MKTAG(
't',
'g',
'a',
' ') },
563 { CODEC_ID_PNG, MKTAG(
'M',
'P',
'N',
'G') },
564 { CODEC_ID_PNG, MKTAG(
'P',
'N',
'G',
'1') },
565 { CODEC_ID_CLJR, MKTAG(
'c',
'l',
'j',
'r') },
566 { CODEC_ID_DIRAC, MKTAG(
'd',
'r',
'a',
'c') },
567 { CODEC_ID_RPZA, MKTAG(
'a',
'z',
'p',
'r') },
568 { CODEC_ID_RPZA, MKTAG(
'R',
'P',
'Z',
'A') },
569 { CODEC_ID_RPZA, MKTAG(
'r',
'p',
'z',
'a') },
570 { CODEC_ID_SP5X, MKTAG(
'S',
'P',
'5',
'4') },
575 #ifndef __WEED_PALETTES_H__
579 int avi_pix_fmt_to_weed_palette(
enum PixelFormat pix_fmt,
int *clamped) {
593 case PIX_FMT_YUV444P:
595 case PIX_FMT_YUV422P:
597 case PIX_FMT_YUV420P:
599 case PIX_FMT_YUYV422:
601 case PIX_FMT_UYVY422:
603 case PIX_FMT_UYYVYY411:
607 case PIX_FMT_MONOWHITE:
608 case PIX_FMT_MONOBLACK:
610 case PIX_FMT_YUVJ422P:
613 case PIX_FMT_YUVJ444P:
616 case PIX_FMT_YUVJ420P:
628 enum PixelFormat weed_palette_to_avi_pix_fmt(
int pal,
int *clamped) {
632 return PIX_FMT_RGB24;
634 return PIX_FMT_BGR24;
643 return PIX_FMT_YUVJ444P;
644 return PIX_FMT_YUV444P;
647 return PIX_FMT_YUVJ422P;
648 return PIX_FMT_YUV422P;
651 return PIX_FMT_YUVJ420P;
652 return PIX_FMT_YUV420P;
654 return PIX_FMT_YUYV422;
656 return PIX_FMT_UYVY422;
658 return PIX_FMT_UYYVYY411;
661 return PIX_FMT_GRAY8;
663 return PIX_FMT_MONOBLACK;
673 #endif // HAVE_AVUTIL
674 #endif // HAVE_AVCODEC
680 #endif // #ifndef __WEED_COMPAT_H__
#define WEED_PALETTE_YUV420P
Definition: weed-palettes.h:76
#define WEED_PALETTE_YUV888
Definition: weed-palettes.h:90
#define WEED_PALETTE_A8
Definition: weed-palettes.h:96
#define WEED_YUV_SUBSPACE_BT709
Definition: weed-palettes.h:115
#define WEED_PALETTE_YUV411
Definition: weed-palettes.h:88
#define WEED_PALETTE_A1
Definition: weed-palettes.h:95
#define WEED_PALETTE_YUV444P
Definition: weed-palettes.h:81
#define WEED_YUV_CLAMPING_CLAMPED
Definition: weed-palettes.h:109
#define WEED_PALETTE_UYVY
Definition: weed-palettes.h:87
#define WEED_PALETTE_END
Definition: weed-palettes.h:59
#define WEED_PALETTE_YUV422P
Definition: weed-palettes.h:74
#define WEED_PALETTE_BGRA32
Definition: weed-palettes.h:71
#define WEED_PALETTE_RGBA32
Definition: weed-palettes.h:65
#define WEED_YUV_CLAMPING_UNCLAMPED
Definition: weed-palettes.h:110
#define WEED_PALETTE_ARGB32
Definition: weed-palettes.h:67
#define WEED_PALETTE_BGR24
Definition: weed-palettes.h:63
#define WEED_YUV_SAMPLING_DEFAULT
Definition: weed-palettes.h:102
#define WEED_PALETTE_YUYV
Definition: weed-palettes.h:84
#define WEED_PALETTE_YVU420P
Definition: weed-palettes.h:78
#define WEED_PALETTE_YUVA4444P
Definition: weed-palettes.h:82
#define WEED_PALETTE_RGB24
Definition: weed-palettes.h:61
#define WEED_YUV_SUBSPACE_YCBCR
Definition: weed-palettes.h:114