You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/mpegvideo: Remove h263_plus
It is only used to indicate to ff_h263_show_pict_info() that we are decoding H.263+; pass this information via a function parameter instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -89,8 +89,6 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
|
|||||||
skip_bits1(&s->gb); /* deblocking flag */
|
skip_bits1(&s->gb); /* deblocking flag */
|
||||||
s->chroma_qscale = s->qscale = get_bits(&s->gb, 5);
|
s->chroma_qscale = s->qscale = get_bits(&s->gb, 5);
|
||||||
|
|
||||||
s->h263_plus = 0;
|
|
||||||
|
|
||||||
s->h263_long_vectors = 0;
|
s->h263_long_vectors = 0;
|
||||||
|
|
||||||
/* PEI */
|
/* PEI */
|
||||||
|
@@ -55,7 +55,7 @@ int ff_h263_decode_mba(MpegEncContext *s);
|
|||||||
/**
|
/**
|
||||||
* Print picture info if FF_DEBUG_PICT_INFO is set.
|
* Print picture info if FF_DEBUG_PICT_INFO is set.
|
||||||
*/
|
*/
|
||||||
void ff_h263_show_pict_info(MpegEncContext *s);
|
void ff_h263_show_pict_info(MpegEncContext *s, int h263_plus);
|
||||||
|
|
||||||
int ff_intel_h263_decode_picture_header(MpegEncContext *s);
|
int ff_intel_h263_decode_picture_header(MpegEncContext *s);
|
||||||
int ff_h263_decode_mb(MpegEncContext *s,
|
int ff_h263_decode_mb(MpegEncContext *s,
|
||||||
|
@@ -57,7 +57,6 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
|
|||||||
av_log(s->avctx, AV_LOG_ERROR, "Intel H.263 free format not supported\n");
|
av_log(s->avctx, AV_LOG_ERROR, "Intel H.263 free format not supported\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
s->h263_plus = 0;
|
|
||||||
|
|
||||||
s->pict_type = AV_PICTURE_TYPE_I + get_bits1(&s->gb);
|
s->pict_type = AV_PICTURE_TYPE_I + get_bits1(&s->gb);
|
||||||
|
|
||||||
@@ -122,7 +121,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
|
|||||||
|
|
||||||
s->gob_index = H263_GOB_HEIGHT(s->height);
|
s->gob_index = H263_GOB_HEIGHT(s->height);
|
||||||
|
|
||||||
ff_h263_show_pict_info(s);
|
ff_h263_show_pict_info(s, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -77,7 +77,8 @@ static const int16_t h263_mb_type_b_map[15]= {
|
|||||||
MB_TYPE_INTRA4x4 | MB_TYPE_CBP | MB_TYPE_QUANT,
|
MB_TYPE_INTRA4x4 | MB_TYPE_CBP | MB_TYPE_QUANT,
|
||||||
};
|
};
|
||||||
|
|
||||||
void ff_h263_show_pict_info(MpegEncContext *s){
|
void ff_h263_show_pict_info(MpegEncContext *s, int h263_plus)
|
||||||
|
{
|
||||||
if(s->avctx->debug&FF_DEBUG_PICT_INFO){
|
if(s->avctx->debug&FF_DEBUG_PICT_INFO){
|
||||||
av_log(s->avctx, AV_LOG_DEBUG, "qp:%d %c size:%d rnd:%d%s%s%s%s%s%s%s%s%s %d/%d\n",
|
av_log(s->avctx, AV_LOG_DEBUG, "qp:%d %c size:%d rnd:%d%s%s%s%s%s%s%s%s%s %d/%d\n",
|
||||||
s->qscale, av_get_picture_type_char(s->pict_type),
|
s->qscale, av_get_picture_type_char(s->pict_type),
|
||||||
@@ -85,7 +86,7 @@ void ff_h263_show_pict_info(MpegEncContext *s){
|
|||||||
s->obmc ? " AP" : "",
|
s->obmc ? " AP" : "",
|
||||||
s->umvplus ? " UMV" : "",
|
s->umvplus ? " UMV" : "",
|
||||||
s->h263_long_vectors ? " LONG" : "",
|
s->h263_long_vectors ? " LONG" : "",
|
||||||
s->h263_plus ? " +" : "",
|
h263_plus ? " +" : "",
|
||||||
s->h263_aic ? " AIC" : "",
|
s->h263_aic ? " AIC" : "",
|
||||||
s->alt_inter_vlc ? " AIV" : "",
|
s->alt_inter_vlc ? " AIV" : "",
|
||||||
s->modified_quant ? " MQ" : "",
|
s->modified_quant ? " MQ" : "",
|
||||||
@@ -1089,6 +1090,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
|
|||||||
{
|
{
|
||||||
int format, width, height, i, ret;
|
int format, width, height, i, ret;
|
||||||
uint32_t startcode;
|
uint32_t startcode;
|
||||||
|
int h263_plus;
|
||||||
|
|
||||||
align_get_bits(&s->gb);
|
align_get_bits(&s->gb);
|
||||||
|
|
||||||
@@ -1137,7 +1139,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (format != 7 && format != 6) {
|
if (format != 7 && format != 6) {
|
||||||
s->h263_plus = 0;
|
h263_plus = 0;
|
||||||
/* H.263v1 */
|
/* H.263v1 */
|
||||||
width = ff_h263_format[format][0];
|
width = ff_h263_format[format][0];
|
||||||
height = ff_h263_format[format][1];
|
height = ff_h263_format[format][1];
|
||||||
@@ -1166,7 +1168,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
|
|||||||
int ufep;
|
int ufep;
|
||||||
|
|
||||||
/* H.263v2 */
|
/* H.263v2 */
|
||||||
s->h263_plus = 1;
|
h263_plus = 1;
|
||||||
ufep = get_bits(&s->gb, 3); /* Update Full Extended PTYPE */
|
ufep = get_bits(&s->gb, 3); /* Update Full Extended PTYPE */
|
||||||
|
|
||||||
/* ufep other than 0 and 1 are reserved */
|
/* ufep other than 0 and 1 are reserved */
|
||||||
@@ -1366,7 +1368,8 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
|
|||||||
s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
|
s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
ff_h263_show_pict_info(s);
|
ff_h263_show_pict_info(s, h263_plus);
|
||||||
|
|
||||||
if (s->pict_type == AV_PICTURE_TYPE_I && s->codec_tag == AV_RL32("ZYGO") && get_bits_left(&s->gb) >= 85 + 13*3*16 + 50){
|
if (s->pict_type == AV_PICTURE_TYPE_I && s->codec_tag == AV_RL32("ZYGO") && get_bits_left(&s->gb) >= 85 + 13*3*16 + 50){
|
||||||
int i,j;
|
int i,j;
|
||||||
for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
|
for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
|
||||||
|
@@ -90,7 +90,6 @@ typedef struct MpegEncContext {
|
|||||||
int pb_frame; ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
|
int pb_frame; ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
|
||||||
|
|
||||||
/* the following codec id fields are deprecated in favor of codec_id */
|
/* the following codec id fields are deprecated in favor of codec_id */
|
||||||
int h263_plus; ///< H.263+ headers
|
|
||||||
int h263_flv; ///< use flv H.263 header
|
int h263_flv; ///< use flv H.263 header
|
||||||
|
|
||||||
enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
|
enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
|
||||||
|
Reference in New Issue
Block a user