History

avcodec/adpcm_ima_amv: document header format

Zane van Iperen committed 6 years ago

Commit 8903cb31 parent 50d3a751 file · +10 −0Browse files

Unified · Split

libavcodec/adpcm.c+10−0
@@ -1690,6 +1690,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 1689 unmodified lines
16901690 case AV_CODEC_ID_ADPCM_IMA_AMV:
16911691 av_assert0(avctx->channels == 1);
16921692
1693+ /*
1694+ * Header format:
1695+ * int16_t predictor;
1696+ * uint8_t step_index;
1697+ * uint8_t reserved;
1698+ * uint32_t frame_size;
1699+ *
1700+ * Some implementations have step_index as 16-bits, but others
1701+ * only use the lower 8 and store garbage in the upper 8.
1702+ */
16931703 c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
16941704 c->status[0].step_index = bytestream2_get_byteu(&gb);
16951705 bytestream2_skipu(&gb, 5);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t