Browse Source

Revert "pnmenc: use bits_per_raw_sample"

This reverts commit 1506ea947d.

Revert requested by carl as well as author in "Re: [FFmpeg-devel] [PATCH]Fix pnm encoding with bpc set"
tags/n2.4
Michael Niedermayer 11 years ago
parent
commit
a2841d92c3
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      libavcodec/pnmenc.c

+ 0
- 2
libavcodec/pnmenc.c View File

@@ -84,8 +84,6 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bytestream += strlen(bytestream); bytestream += strlen(bytestream);
if (avctx->pix_fmt != AV_PIX_FMT_MONOWHITE) { if (avctx->pix_fmt != AV_PIX_FMT_MONOWHITE) {
int maxdepth = (1 << (av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1)) - 1; int maxdepth = (1 << (av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1)) - 1;
if( avctx->bits_per_raw_sample )
maxdepth = (1 << avctx->bits_per_raw_sample) - 1;
snprintf(bytestream, bytestream_end - bytestream, snprintf(bytestream, bytestream_end - bytestream,
"%d\n", maxdepth); "%d\n", maxdepth);
bytestream += strlen(bytestream); bytestream += strlen(bytestream);


Loading…
Cancel
Save