mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-30 08:35:41 +02:00
avcodec/cfhd: Replace a few literal numbers by named constants
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
60796d22f9
commit
2359656da2
@ -589,20 +589,20 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
s->planes = data == 2 ? 4 : av_pix_fmt_count_planes(s->coded_format);
|
s->planes = data == 2 ? 4 : av_pix_fmt_count_planes(s->coded_format);
|
||||||
} else if (tag == -85) {
|
} else if (tag == -DisplayHeight) {
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Cropped height %"PRIu16"\n", data);
|
av_log(avctx, AV_LOG_DEBUG, "Cropped height %"PRIu16"\n", data);
|
||||||
s->cropped_height = data;
|
s->cropped_height = data;
|
||||||
} else if (tag == -75) {
|
} else if (tag == -PeakOffsetLow) {
|
||||||
s->peak.offset &= ~0xffff;
|
s->peak.offset &= ~0xffff;
|
||||||
s->peak.offset |= (data & 0xffff);
|
s->peak.offset |= (data & 0xffff);
|
||||||
s->peak.base = gb;
|
s->peak.base = gb;
|
||||||
s->peak.level = 0;
|
s->peak.level = 0;
|
||||||
} else if (tag == -76) {
|
} else if (tag == -PeakOffsetHigh) {
|
||||||
s->peak.offset &= 0xffff;
|
s->peak.offset &= 0xffff;
|
||||||
s->peak.offset |= (data & 0xffffU)<<16;
|
s->peak.offset |= (data & 0xffffU)<<16;
|
||||||
s->peak.base = gb;
|
s->peak.base = gb;
|
||||||
s->peak.level = 0;
|
s->peak.level = 0;
|
||||||
} else if (tag == -74 && s->peak.offset) {
|
} else if (tag == -PeakLevel && s->peak.offset) {
|
||||||
s->peak.level = data;
|
s->peak.level = data;
|
||||||
bytestream2_seek(&s->peak.base, s->peak.offset - 4, SEEK_CUR);
|
bytestream2_seek(&s->peak.base, s->peak.offset - 4, SEEK_CUR);
|
||||||
} else
|
} else
|
||||||
|
@ -83,10 +83,14 @@ enum CFHDParam {
|
|||||||
Precision = 70,
|
Precision = 70,
|
||||||
InputFormat = 71,
|
InputFormat = 71,
|
||||||
BandCodingFlags = 72,
|
BandCodingFlags = 72,
|
||||||
|
PeakLevel = 74,
|
||||||
|
PeakOffsetLow = 75,
|
||||||
|
PeakOffsetHigh = 76,
|
||||||
Version = 79,
|
Version = 79,
|
||||||
BandSecondPass = 82,
|
BandSecondPass = 82,
|
||||||
PrescaleTable = 83,
|
PrescaleTable = 83,
|
||||||
EncodedFormat = 84,
|
EncodedFormat = 84,
|
||||||
|
DisplayHeight = 85,
|
||||||
ChannelWidth = 104,
|
ChannelWidth = 104,
|
||||||
ChannelHeight = 105,
|
ChannelHeight = 105,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user