mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/tta: fix minor code style issues
This commit is contained in:
parent
8f7850a22e
commit
082133fc07
@ -211,7 +211,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
|
||||
av_log(avctx, AV_LOG_DEBUG, "data_length: %d frame_length: %d last: %d total: %d\n",
|
||||
s->data_length, s->frame_length, s->last_frame_length, total_frames);
|
||||
|
||||
if(s->frame_length >= UINT_MAX / (s->channels * sizeof(int32_t))){
|
||||
if (s->frame_length >= UINT_MAX / (s->channels * sizeof(int32_t))) {
|
||||
av_log(avctx, AV_LOG_ERROR, "frame_length too large\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@ -306,14 +306,14 @@ static int tta_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
rice->sum1 += value - (rice->sum1 >> 4);
|
||||
if (rice->k1 > 0 && rice->sum1 < ff_tta_shift_16[rice->k1])
|
||||
rice->k1--;
|
||||
else if(rice->sum1 > ff_tta_shift_16[rice->k1 + 1])
|
||||
else if (rice->sum1 > ff_tta_shift_16[rice->k1 + 1])
|
||||
rice->k1++;
|
||||
value += ff_tta_shift_1[rice->k0];
|
||||
default:
|
||||
rice->sum0 += value - (rice->sum0 >> 4);
|
||||
if (rice->k0 > 0 && rice->sum0 < ff_tta_shift_16[rice->k0])
|
||||
rice->k0--;
|
||||
else if(rice->sum0 > ff_tta_shift_16[rice->k0 + 1])
|
||||
else if (rice->sum0 > ff_tta_shift_16[rice->k0 + 1])
|
||||
rice->k0++;
|
||||
}
|
||||
|
||||
@ -399,7 +399,8 @@ error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static av_cold int tta_decode_close(AVCodecContext *avctx) {
|
||||
static av_cold int tta_decode_close(AVCodecContext *avctx)
|
||||
{
|
||||
TTAContext *s = avctx->priv_data;
|
||||
|
||||
if (s->bps < 3)
|
||||
|
@ -47,7 +47,8 @@ void ff_tta_rice_init(TTARice *c, uint32_t k0, uint32_t k1)
|
||||
c->sum1 = ff_tta_shift_16[k1];
|
||||
}
|
||||
|
||||
void ff_tta_filter_init(TTAFilter *c, int32_t shift) {
|
||||
void ff_tta_filter_init(TTAFilter *c, int32_t shift)
|
||||
{
|
||||
memset(c, 0, sizeof(TTAFilter));
|
||||
c->shift = shift;
|
||||
c->round = ff_tta_shift_1[shift-1];
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
static void tta_filter_process_c(int32_t *qmi, int32_t *dx, int32_t *dl,
|
||||
int32_t *error, int32_t *in, int32_t shift,
|
||||
int32_t round) {
|
||||
int32_t round)
|
||||
{
|
||||
uint32_t *qm = qmi;
|
||||
|
||||
if (*error < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user