Mercurial > libavcodec.hg
comparison imgconvert.c @ 10573:ac49ab818d4d libavcodec
Use av_pix_fmt_descriptors in avcodec_get_chroma_sub_sample(), rather
than the PixFmtInfo x_chroma_shift and y_chroma_shift fields.
author | stefano |
---|---|
date | Thu, 26 Nov 2009 00:33:19 +0000 |
parents | a21b640dba50 |
children | db54dba1f21c |
comparison
equal
deleted
inserted
replaced
10572:a21b640dba50 | 10573:ac49ab818d4d |
---|---|
530 }, | 530 }, |
531 }; | 531 }; |
532 | 532 |
533 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift) | 533 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift) |
534 { | 534 { |
535 *h_shift = pix_fmt_info[pix_fmt].x_chroma_shift; | 535 *h_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_w; |
536 *v_shift = pix_fmt_info[pix_fmt].y_chroma_shift; | 536 *v_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_h; |
537 } | 537 } |
538 | 538 |
539 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt) | 539 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt) |
540 { | 540 { |
541 if (pix_fmt < 0 || pix_fmt >= PIX_FMT_NB) | 541 if (pix_fmt < 0 || pix_fmt >= PIX_FMT_NB) |