# HG changeset patch # User stefano # Date 1259195599 0 # Node ID ac49ab818d4db6fa537ff7d18c24608b9947fd68 # Parent a21b640dba502dbcae447439b4ee4125dd134703 Use av_pix_fmt_descriptors in avcodec_get_chroma_sub_sample(), rather than the PixFmtInfo x_chroma_shift and y_chroma_shift fields. diff -r a21b640dba50 -r ac49ab818d4d imgconvert.c --- a/imgconvert.c Wed Nov 25 23:52:20 2009 +0000 +++ b/imgconvert.c Thu Nov 26 00:33:19 2009 +0000 @@ -532,8 +532,8 @@ void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift) { - *h_shift = pix_fmt_info[pix_fmt].x_chroma_shift; - *v_shift = pix_fmt_info[pix_fmt].y_chroma_shift; + *h_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_w; + *v_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_h; } const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt)