Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 985c0a3bc2a20c1537eea53c58da41ab7bf3a6b4 Mon Sep 17 00:00:00 2001
- From: Mashiat Sarker <shahriman_ams@yahoo.com>
- Date: Sun, 26 Jun 2011 21:20:27 +0600
- Subject: [PATCH] Field picture detection and header parsing 01
- ---
- libavcodec/vc1.c | 173 +++++++++++++++++++++++++++++++++-----------------
- libavcodec/vc1.h | 10 +++
- libavcodec/vc1data.c | 48 ++++++++++++++
- libavcodec/vc1data.h | 10 +++
- libavcodec/vc1dec.c | 13 ++++
- 5 files changed, 195 insertions(+), 59 deletions(-)
- diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
- index 0884428..dc9859c 100644
- --- a/libavcodec/vc1.c
- +++ b/libavcodec/vc1.c
- @@ -116,7 +116,7 @@ static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v)
- int width, height, stride;
- width = v->s.mb_width;
- - height = v->s.mb_height;
- + height = v->s.mb_height >> (v->fcm == 2);
- stride = v->s.mb_stride;
- invert = get_bits1(gb);
- imode = get_vlc2(gb, ff_vc1_imode_vlc.table, VC1_IMODE_VLC_BITS, 1);
- @@ -797,6 +797,13 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- int mbmodetab, imvtab, icbptab, twomvbptab, fourmvbptab; /* useful only for debugging */
- v->p_frame_skipped = 0;
- + if (v->second_field) {
- + v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
- + if (v->fptype & 4)
- + v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_BI : AV_PICTURE_TYPE_B;
- + av_log(s->avctx, AV_LOG_DEBUG, "Field 2: AV_PICTURE_TYPE_* = %d\n", v->s.pict_type);
- + goto parse_common_field_info;
- + }
- if(v->interlace){
- v->fcm = decode012(gb);
- @@ -806,30 +813,39 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- }
- }
- - switch(get_unary(gb, 0, 4)) {
- - case 0:
- - v->s.pict_type = AV_PICTURE_TYPE_P;
- - av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_P\n");
- - break;
- - case 1:
- - v->s.pict_type = AV_PICTURE_TYPE_B;
- - av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_B\n");
- - break;
- - case 2:
- - v->s.pict_type = AV_PICTURE_TYPE_I;
- - av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_I\n");
- - break;
- - case 3:
- - v->s.pict_type = AV_PICTURE_TYPE_BI;
- - av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_BI\n");
- - break;
- - case 4:
- - v->s.pict_type = AV_PICTURE_TYPE_P; // skipped pic
- - v->p_frame_skipped = 1;
- - av_log(v->s.avctx, AV_LOG_DEBUG, "Skipped Picture\n");
- - return 0;
- + if (v->fcm == 2) {
- + v->s.linesize <<= 1;
- + v->s.uvlinesize <<= 1;
- + v->fptype = get_bits(gb, 3);
- + av_log(s->avctx, AV_LOG_DEBUG, "FPTYPE: %d\n", v->fptype);
- + v->s.pict_type = (v->fptype & 2) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
- + if (v->fptype & 4) // B-picture
- + v->s.pict_type = (v->fptype & 2) ? AV_PICTURE_TYPE_BI : AV_PICTURE_TYPE_B;
- + } else {
- + switch(get_unary(gb, 0, 4)) {
- + case 0:
- + v->s.pict_type = AV_PICTURE_TYPE_P;
- + av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_P\n");
- + break;
- + case 1:
- + v->s.pict_type = AV_PICTURE_TYPE_B;
- + av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_B\n");
- + break;
- + case 2:
- + v->s.pict_type = AV_PICTURE_TYPE_I;
- + av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_I\n");
- + break;
- + case 3:
- + v->s.pict_type = AV_PICTURE_TYPE_BI;
- + av_log(v->s.avctx, AV_LOG_DEBUG, "AV_PICTURE_TYPE_BI\n");
- + break;
- + case 4:
- + v->s.pict_type = AV_PICTURE_TYPE_P; // skipped pic
- + v->p_frame_skipped = 1;
- + av_log(v->s.avctx, AV_LOG_DEBUG, "Skipped Picture\n");
- + return 0;
- + }
- }
- -
- if(v->tfcntrflag)
- skip_bits(gb, 8);
- if(v->broadcast) {
- @@ -847,6 +863,22 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- v->rnd = get_bits1(gb);
- if(v->interlace)
- v->uvsamp = get_bits1(gb);
- + if (v->fcm == 2) {
- + if (!v->refdist_flag) v->refdist = 0;
- + else {
- + if ((v->s.pict_type != AV_PICTURE_TYPE_B)
- + && (v->s.pict_type != AV_PICTURE_TYPE_BI)) {
- + v->refdist = get_bits(gb, 2);
- + if (val == 3) v->refdist += get_unary(gb, 0, 16);
- + av_log(s->avctx, AV_LOG_DEBUG, "REFDIST: %d\n", v->refdist);
- + } else {
- + v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
- + v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index];
- + av_log(s->avctx, AV_LOG_DEBUG, "BFRACTION: %d\n", v->bfraction);
- + }
- + }
- + goto parse_common_field_info;
- + }
- if(v->finterpflag) v->interpfrm = get_bits1(gb);
- if(v->s.pict_type == AV_PICTURE_TYPE_B) {
- v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
- @@ -855,6 +887,8 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- v->s.pict_type = AV_PICTURE_TYPE_BI; /* XXX: should not happen here */
- }
- }
- +
- + parse_common_field_info:
- pqindex = get_bits(gb, 5);
- if(!pqindex) return -1;
- v->pqindex = pqindex;
- @@ -890,7 +924,7 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- if (status < 0) return -1;
- av_log(v->s.avctx, AV_LOG_DEBUG, "FIELDTX plane encoding: "
- "Imode: %i, Invert: %i\n", status>>1, status&1);
- - }
- + }
- status = bitplane_decoding(v->acpred_plane, &v->acpred_is_raw, v);
- if (status < 0) return -1;
- av_log(v->s.avctx, AV_LOG_DEBUG, "ACPRED plane encoding: "
- @@ -907,13 +941,14 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- }
- break;
- case AV_PICTURE_TYPE_P:
- + if (v->fcm == 2)
- + if (v->numref = get_bits1(gb)) v->reffield = get_bits1(gb);
- if (v->extended_mv) v->mvrange = get_unary(gb, 0, 3);
- else v->mvrange = 0;
- if (v->interlace) {
- if (v->extended_dmv) v->dmvrange = get_unary(gb, 0, 3);
- else v->dmvrange = 0;
- - switch (v->fcm) {
- - case 1: // interlaced frame picture
- + if (v->fcm == 1) { // interlaced frame picture
- v->fourmvswitch = get_bits1(gb);
- av_log(v->s.avctx, AV_LOG_DEBUG, "4MVSWITCH: %d\n", v->fourmvswitch);
- v->intcomp = get_bits1(gb);
- @@ -932,10 +967,6 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- imvtab = get_bits(gb, 2);
- av_log(v->s.avctx, AV_LOG_DEBUG, "MVTAB: %d\n", imvtab);
- v->imv_vlc = &ff_vc1_1ref_mvdata_vlc[imvtab];
- - break;
- - case 2: // interlaced field picture
- - // ... later
- - break;
- }
- // interlaced p-picture cbpcy range is [1, 63]
- icbptab = get_bits(gb, 3);
- @@ -951,42 +982,48 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- v->fourmvbp_vlc = &ff_vc1_4mv_block_pattern_vlc[fourmvbptab];
- }
- }
- - if (!v->interlace || (v->fcm == 1)) {
- - v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13
- - v->k_y = v->mvrange + 8; //k_y can be 8 9 10 11
- - v->range_x = 1 << (v->k_x - 1);
- - v->range_y = 1 << (v->k_y - 1);
- - }
- + v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13
- + v->k_y = v->mvrange + 8; //k_y can be 8 9 10 11
- + v->range_x = 1 << (v->k_x - 1);
- + v->range_y = 1 << (v->k_y - 1);
- //choose one of the three tables to decode TTMB
- if (v->pq < 5) v->tt_index = 0;
- else if(v->pq < 13) v->tt_index = 1;
- else v->tt_index = 2;
- //
- - if (!v->interlace) {
- + if (v->fcm != 1) {
- lowquant = (v->pq > 12) ? 0 : 1;
- v->mv_mode = ff_vc1_mv_pmode_table[lowquant][get_unary(gb, 1, 4)];
- if (v->mv_mode == MV_PMODE_INTENSITY_COMP) {
- int scale, shift, i;
- v->mv_mode2 = ff_vc1_mv_pmode_table2[lowquant][get_unary(gb, 1, 3)];
- + if (v->fcm == 2) v->intcompfield = decode210(gb);
- v->lumscale = get_bits(gb, 6);
- v->lumshift = get_bits(gb, 6);
- /* fill lookup tables for intensity compensation */
- - if(!v->lumscale) {
- - scale = -64;
- - shift = (255 - v->lumshift * 2) << 6;
- - if(v->lumshift > 31)
- - shift += 128 << 6;
- - } else {
- - scale = v->lumscale + 32;
- - if(v->lumshift > 31)
- - shift = (v->lumshift - 64) << 6;
- - else
- - shift = v->lumshift << 6;
- - }
- - for(i = 0; i < 256; i++) {
- - v->luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6);
- - v->lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6);
- + #define INIT_LUT(_lumscale, _lumshift, _luty, _lutuv) \
- + if(!_lumscale) { \
- + scale = -64; \
- + shift = (255 - _lumshift * 2) << 6; \
- + if(_lumshift > 31) \
- + shift += 128 << 6; \
- + } else { \
- + scale = _lumscale + 32; \
- + if(_lumshift > 31) \
- + shift = (_lumshift - 64) << 6; \
- + else \
- + shift = _lumshift << 6; \
- + } \
- + for(i = 0; i < 256; i++) { \
- + _luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6); \
- + _lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); \
- }
- + INIT_LUT(v->lumscale, v->lumshift, v->luty, v->lutuv);
- + if ((v->fcm == 2) && !v->intcompfield) {
- + v->lumscale2 = get_bits(gb, 6);
- + v->lumshift2 = get_bits(gb, 6);
- + INIT_LUT(v->lumscale2, v->lumshift2, v->luty2, v->lutuv2);
- + }
- v->use_ic = 1;
- }
- if(v->mv_mode == MV_PMODE_1MV_HPEL || v->mv_mode == MV_PMODE_1MV_HPEL_BILIN)
- @@ -999,7 +1036,8 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- } else
- v->s.quarter_sample = 1;
- v->s.mspel = !(v->mv_mode == MV_PMODE_1MV_HPEL_BILIN || (v->mv_mode == MV_PMODE_INTENSITY_COMP && v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN));
- -
- + }
- + if (!v->fcm) { // progressive
- if ((v->mv_mode == MV_PMODE_INTENSITY_COMP &&
- v->mv_mode2 == MV_PMODE_MIXED_MV)
- || v->mv_mode == MV_PMODE_MIXED_MV)
- @@ -1020,11 +1058,28 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
- /* Hopefully this is correct for P frames */
- v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
- v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
- - } else {
- - if (v->fcm == 1) {
- - v->s.quarter_sample = 1;
- - v->s.mspel = 1;
- - }
- + } else if (v->fcm == 1) { // frame interlaced
- + v->s.quarter_sample = 1;
- + v->s.mspel = 1;
- + } else { // field interlaced
- + mbmodetab = get_bits(gb, 3);
- + av_log(v->s.avctx, AV_LOG_DEBUG, "MBMODETAB: %d\n", mbmodetab);
- + imvtab = get_bits(gb, 2 + v->numref);
- + av_log(v->s.avctx, AV_LOG_DEBUG, "IMVTAB: %d\n", imvtab);
- + if (!numref)
- + v->imv_vlc = &ff_vc1_1ref_mvdata_vlc[imvtab];
- + else
- + v->imv_vlc = &ff_vc1_2ref_mvdata_vlc[imvtab];
- + icbptab = get_bits(gb, 3);
- + v->cbpcy_vlc = &ff_vc1_icbpcy_vlc[icbptab];
- + if ((v->mv_mode == MV_PMODE_INTENSITY_COMP &&
- + v->mv_mode2 == MV_PMODE_MIXED_MV) || v->mv_mode == MV_PMODE_MIXED_MV) {
- + fourmvbptab = get_bits(gb, 2);
- + v->fourmvbp_vlc = &ff_vc1_4mv_block_pattern_vlc[fourmvbptab];
- + v->mbmode_vlc = &ff_vc1_if_mmv_mbmode_vlc[mbmodetab];
- + } else {
- + v->mbmode_vlc = &ff_vc1_if_1mv_mbmode_vlc[mbmodetab];
- + }
- }
- if (v->dquant)
- {
- diff --git a/libavcodec/vc1.h b/libavcodec/vc1.h
- index 1b34f63..717b590 100644
- --- a/libavcodec/vc1.h
- +++ b/libavcodec/vc1.h
- @@ -325,6 +325,7 @@ typedef struct VC1Context{
- int intcomp;
- uint8_t lumscale2; ///< for interlaced field P picture
- uint8_t lumshift2;
- + uint8_t luty2[256], lutuv2[256]; // lookup tables used for intensity compensation
- VLC* mbmode_vlc;
- VLC* imv_vlc;
- VLC* twomvbp_vlc;
- @@ -336,6 +337,15 @@ typedef struct VC1Context{
- int8_t zzi_8x8[64];
- uint8_t *blk_mv_type_base, *blk_mv_type; ///< 0: frame MV, 1: field MV
- int frame_num; // keeps count of frame (debugging)
- + int fptype;
- + int second_field;
- + int refdist; ///< distance of the current picture from reference
- + int numref; ///< number of past field pictures used as reference
- + // 0 corresponds to 1 and 1 corresponds to 2 references
- + int reffield; ///< if numref = 0 (1 reference) then reffield decides which
- + // field to use among the two fields from previous frame
- + int intcompfield; ///< which of the two fields to be intensity compensated
- + // 0: both fields, 1: bottom field, 2: top field
- /** Frame decoding info for sprite modes */
- //@{
- diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c
- index 1f43127..2ca8162 100644
- --- a/libavcodec/vc1data.c
- +++ b/libavcodec/vc1data.c
- @@ -132,6 +132,10 @@ VLC ff_vc1_subblkpat_vlc[3];
- VLC ff_vc1_intfr_4mv_mbmode_vlc[4];
- #define VC1_INTFR_NON4MV_MBMODE_VLC_BITS 6
- VLC ff_vc1_intfr_non4mv_mbmode_vlc[4];
- +#define VC1_IF_MMV_MBMODE_VLC_BITS 5
- +VLC ff_vc1_if_mmv_mbmode_vlc[8];
- +#define VC1_IF_1MV_MBMODE_VLC_BITS 5
- +VLC ff_vc1_if_1mv_mbmode_vlc[8];
- #define VC1_1REF_MVDATA_VLC_BITS 9
- VLC ff_vc1_1ref_mvdata_vlc[4];
- #define VC1_2REF_MVDATA_VLC_BITS 9
- @@ -356,6 +360,50 @@ const uint8_t ff_vc1_intfr_non4mv_mbmode_bits[4][9] = {
- { 4, 8, 1, 3, 7, 5, 6, 2, 8}
- };
- +/* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */
- +/* mixed-MV */
- +const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8] = {
- + { 16, 17, 3, 3, 0, 5, 9, 2 },
- + { 8, 9, 3, 6, 7, 0, 5, 2 },
- + { 16, 17, 5, 3, 0, 3, 9, 2 },
- + { 56, 57, 15, 4, 5, 6, 29, 0 },
- + { 52, 53, 27, 14, 15, 2, 12, 0 },
- + { 56, 57, 29, 5, 6, 0, 15, 4 },
- + { 16, 17, 6, 7, 0, 1, 9, 5 },
- + { 56, 57, 0, 5, 6, 29, 4, 15 }
- +};
- +const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8] = {
- + { 6, 6, 2, 3, 2, 4, 5, 2 },
- + { 5, 5, 3, 3, 3, 2, 4, 2 },
- + { 6, 6, 4, 3, 2, 2, 5, 2 },
- + { 6, 6, 4, 3, 3, 3, 5, 1 },
- + { 6, 6, 5, 4, 4, 2, 4, 1 },
- + { 6, 6, 5, 3, 3, 1, 4, 3 },
- + { 5, 5, 3, 3, 2, 2, 4, 3 },
- + { 6, 6, 1, 3, 3, 5, 3, 4 }
- +};
- +/* 1MV */
- +const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6] = {
- + { 0, 1, 1, 1, 1, 1 },
- + { 0, 1, 1, 1, 1, 1 },
- + { 16, 17, 3, 0, 9, 5 },
- + { 20, 21, 3, 11, 0, 4 },
- + { 4, 5, 2, 3, 3, 0 },
- + { 4, 5, 3, 2, 0, 3 },
- + { 0, 1, 1, 1, 1, 1 },
- + { 16, 17, 9, 5, 3, 0 }
- +};
- +const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6] = {
- + { 5, 5, 1, 3, 2, 4 },
- + { 5, 5, 1, 2, 3, 4 },
- + { 5, 5, 2, 1, 4, 3 },
- + { 5, 5, 2, 4, 1, 3 },
- + { 4, 4, 2, 3, 2, 2 },
- + { 4, 4, 3, 2, 2, 2 },
- + { 5, 5, 3, 4, 1, 2 },
- + { 5, 5, 4, 3, 2, 1 }
- +};
- +
- /* Interlaced frame/field picture MVDATA VLC tables */
- /* 1-reference tables */
- diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h
- index 3cbe133..37656e8 100644
- --- a/libavcodec/vc1data.h
- +++ b/libavcodec/vc1data.h
- @@ -80,6 +80,10 @@ extern VLC ff_vc1_subblkpat_vlc[3];
- extern VLC ff_vc1_intfr_4mv_mbmode_vlc[4];
- #define VC1_INTFR_NON4MV_MBMODE_VLC_BITS 6
- extern VLC ff_vc1_intfr_non4mv_mbmode_vlc[4];
- +#define VC1_IF_MMV_MBMODE_VLC_BITS 5
- +extern VLC ff_vc1_if_mmv_mbmode_vlc[8];
- +#define VC1_IF_1MV_MBMODE_VLC_BITS 5
- +extern VLC ff_vc1_if_1mv_mbmode_vlc[8];
- #define VC1_1REF_MVDATA_VLC_BITS 9
- extern VLC ff_vc1_1ref_mvdata_vlc[4];
- #define VC1_2REF_MVDATA_VLC_BITS 9
- @@ -170,6 +174,12 @@ extern const uint8_t ff_vc1_intfr_4mv_mbmode_bits[4][15];
- extern const uint8_t ff_vc1_intfr_non4mv_mbmode_codes[4][9];
- extern const uint8_t ff_vc1_intfr_non4mv_mbmode_bits[4][9];
- +/* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */
- +extern const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8];
- +extern const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8];
- +extern const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6];
- +extern const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6];
- +
- /* Interlaced frame/field picture MVDATA VLC tables */
- /* 1-reference tables */
- extern const uint32_t ff_vc1_1ref_mvdata_codes[4][72];
- diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
- index 28b0c49..36e36d8 100644
- --- a/libavcodec/vc1dec.c
- +++ b/libavcodec/vc1dec.c
- @@ -4237,6 +4237,8 @@ static int vc1_decode_frame(AVCodecContext *avctx,
- MpegEncContext *s = &v->s;
- AVFrame *pict = data;
- uint8_t *buf2 = NULL;
- + uint8_t *buf_field2 = NULL;
- + int buf_field2_size, field_mode = 0;
- const uint8_t *buf_start = buf;
- struct {
- uint8_t *buf;
- @@ -4293,6 +4295,10 @@ static int vc1_decode_frame(AVCodecContext *avctx,
- buf_start = start;
- buf_size2 = vc1_unescape_buffer(start + 4, size, buf2);
- break;
- + case VC1_CODE_FIELD:
- + buf_field2_size = vc1_unescape_buffer(start + 4, size, buf_field2);
- + field_mode = 1;
- + break;
- case VC1_CODE_ENTRYPOINT: /* it should be before frame data */
- buf_size2 = vc1_unescape_buffer(start + 4, size, buf2);
- init_get_bits(&s->gb, buf2, buf_size2*8);
- @@ -4407,6 +4413,13 @@ static int vc1_decode_frame(AVCodecContext *avctx,
- vc1_decode_blocks(v);
- if (i != n_slices) s->gb = slices[i].gb;
- }
- + if (field_mode) {
- + v->second_field = 1;
- + init_get_bits(&s->gb, buf_field2, buf_field2_size*8);
- + if(vc1_parse_frame_header_adv(v, &s->gb) == -1) goto err;
- + vc1_decode_blocks(v);
- + v->second_field = 0;
- + }
- //av_log(s->avctx, AV_LOG_INFO, "Consumed %i/%i bits\n", get_bits_count(&s->gb), s->gb.size_in_bits);
- // if(get_bits_count(&s->gb) > buf_size * 8)
- // return -1;
- --
- 1.7.4.1
Add Comment
Please, Sign In to add comment