[FFmpeg-devel] [PATCH] imgconvert: remove useless PixFmtInfo.nb_channels field

Michael Niedermayer michaelni at gmx.at
Tue Jul 19 22:51:51 CEST 2011


On Tue, Jul 19, 2011 at 02:23:53PM +0200, Stefano Sabatini wrote:
> ---
>  libavcodec/imgconvert.c |   65 +++++-----------------------------------------
>  1 files changed, 7 insertions(+), 58 deletions(-)
> 
[...]
> @@ -579,13 +528,13 @@ static int avg_bits_per_pixel(enum PixelFormat pix_fmt)
>              bits = 12;
>              break;
>          default:
> -            bits = pf->depth * pf->nb_channels;
> +            bits = av_get_bits_per_pixel(desc);
>              break;
>          }
>          break;
>      case FF_PIXEL_PLANAR:
>          if (desc->log2_chroma_w == 0 && desc->log2_chroma_h == 0) {
> -            bits = pf->depth * pf->nb_channels;
> +            bits = av_get_bits_per_pixel(desc);
>          } else {
>              bits = pf->depth + ((2 * pf->depth) >>
>                                  (desc->log2_chroma_w + desc->log2_chroma_h));

ok if these 2 stay the same in value

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110719/ce59ce12/attachment.asc>


More information about the ffmpeg-devel mailing list