Commit c29ee42f authored by romansh's avatar romansh

Introducing DV_MAX_BPM macro instead of a hardcoded value for the

highest number of blocks per macroblock



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14840 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d66462c0
...@@ -360,8 +360,8 @@ static inline void dv_decode_video_segment(DVVideoContext *s, ...@@ -360,8 +360,8 @@ static inline void dv_decode_video_segment(DVVideoContext *s,
const uint8_t *buf_ptr; const uint8_t *buf_ptr;
PutBitContext pb, vs_pb; PutBitContext pb, vs_pb;
GetBitContext gb; GetBitContext gb;
BlockInfo mb_data[5 * 6], *mb, *mb1; BlockInfo mb_data[5 * DV_MAX_BPM], *mb, *mb1;
DECLARE_ALIGNED_16(DCTELEM, sblock[5*6][64]); DECLARE_ALIGNED_16(DCTELEM, sblock[5*DV_MAX_BPM][64]);
DECLARE_ALIGNED_8(uint8_t, mb_bit_buffer[80 + 4]); /* allow some slack */ DECLARE_ALIGNED_8(uint8_t, mb_bit_buffer[80 + 4]); /* allow some slack */
DECLARE_ALIGNED_8(uint8_t, vs_bit_buffer[5 * 80 + 4]); /* allow some slack */ DECLARE_ALIGNED_8(uint8_t, vs_bit_buffer[5 * 80 + 4]); /* allow some slack */
const int log2_blocksize= 3-s->avctx->lowres; const int log2_blocksize= 3-s->avctx->lowres;
......
...@@ -2638,6 +2638,9 @@ enum dv_pack_type { ...@@ -2638,6 +2638,9 @@ enum dv_pack_type {
/* largest possible DV frame, in bytes (PAL 50Mbps) */ /* largest possible DV frame, in bytes (PAL 50Mbps) */
#define DV_MAX_FRAME_SIZE 288000 #define DV_MAX_FRAME_SIZE 288000
/* maximum number of blocks per macroblock in any DV format */
#define DV_MAX_BPM 8
static inline const DVprofile* dv_frame_profile(const uint8_t* frame) static inline const DVprofile* dv_frame_profile(const uint8_t* frame)
{ {
if ((frame[3] & 0x80) == 0) { /* DSF flag */ if ((frame[3] & 0x80) == 0) { /* DSF flag */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment