mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"
This reverts commit da22ba7df4
.
Conflicts:
libavcodec/mpeg12.c
libavcodec/mpeg12.h
This commit is contained in:
parent
fe906830fd
commit
9c020810c1
@ -911,7 +911,7 @@ static int mpeg_decode_mb(Mpeg1Context *s1, DCTELEM block[12][64])
|
|||||||
s->mv[i][0][1]= s->last_mv[i][0][1]= s->last_mv[i][1][1] =
|
s->mv[i][0][1]= s->last_mv[i][0][1]= s->last_mv[i][1][1] =
|
||||||
mpeg_decode_motion(s, s->mpeg_f_code[i][1], s->last_mv[i][0][1]);
|
mpeg_decode_motion(s, s->mpeg_f_code[i][1], s->last_mv[i][0][1]);
|
||||||
/* full_pel: only for MPEG-1 */
|
/* full_pel: only for MPEG-1 */
|
||||||
if (s1->full_pel[i]) {
|
if (s->full_pel[i]) {
|
||||||
s->mv[i][0][0] <<= 1;
|
s->mv[i][0][0] <<= 1;
|
||||||
s->mv[i][0][1] <<= 1;
|
s->mv[i][0][1] <<= 1;
|
||||||
}
|
}
|
||||||
@ -1363,7 +1363,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx,
|
|||||||
|
|
||||||
vbv_delay = get_bits(&s->gb, 16);
|
vbv_delay = get_bits(&s->gb, 16);
|
||||||
if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
|
if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
|
||||||
s1->full_pel[0] = get_bits1(&s->gb);
|
s->full_pel[0] = get_bits1(&s->gb);
|
||||||
f_code = get_bits(&s->gb, 3);
|
f_code = get_bits(&s->gb, 3);
|
||||||
if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM))
|
if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM))
|
||||||
return -1;
|
return -1;
|
||||||
@ -1371,7 +1371,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx,
|
|||||||
s->mpeg_f_code[0][1] = f_code;
|
s->mpeg_f_code[0][1] = f_code;
|
||||||
}
|
}
|
||||||
if (s->pict_type == AV_PICTURE_TYPE_B) {
|
if (s->pict_type == AV_PICTURE_TYPE_B) {
|
||||||
s1->full_pel[1] = get_bits1(&s->gb);
|
s->full_pel[1] = get_bits1(&s->gb);
|
||||||
f_code = get_bits(&s->gb, 3);
|
f_code = get_bits(&s->gb, 3);
|
||||||
if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM))
|
if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM))
|
||||||
return -1;
|
return -1;
|
||||||
@ -1519,7 +1519,7 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1)
|
|||||||
{
|
{
|
||||||
MpegEncContext *s = &s1->mpeg_enc_ctx;
|
MpegEncContext *s = &s1->mpeg_enc_ctx;
|
||||||
|
|
||||||
s1->full_pel[0] = s1->full_pel[1] = 0;
|
s->full_pel[0] = s->full_pel[1] = 0;
|
||||||
s->mpeg_f_code[0][0] = get_bits(&s->gb, 4);
|
s->mpeg_f_code[0][0] = get_bits(&s->gb, 4);
|
||||||
s->mpeg_f_code[0][1] = get_bits(&s->gb, 4);
|
s->mpeg_f_code[0][1] = get_bits(&s->gb, 4);
|
||||||
s->mpeg_f_code[1][0] = get_bits(&s->gb, 4);
|
s->mpeg_f_code[1][0] = get_bits(&s->gb, 4);
|
||||||
|
@ -41,7 +41,6 @@ typedef struct Mpeg1Context {
|
|||||||
int save_width, save_height, save_progressive_seq;
|
int save_width, save_height, save_progressive_seq;
|
||||||
AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
|
AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
|
||||||
int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
|
int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
|
||||||
int full_pel[2];
|
|
||||||
int tmpgexs;
|
int tmpgexs;
|
||||||
} Mpeg1Context;
|
} Mpeg1Context;
|
||||||
|
|
||||||
|
@ -638,6 +638,7 @@ typedef struct MpegEncContext {
|
|||||||
int chroma_y_shift;
|
int chroma_y_shift;
|
||||||
|
|
||||||
int progressive_frame;
|
int progressive_frame;
|
||||||
|
int full_pel[2];
|
||||||
int interlaced_dct;
|
int interlaced_dct;
|
||||||
int first_slice;
|
int first_slice;
|
||||||
int first_field; ///< is 1 for the first field of a field picture 0 otherwise
|
int first_field; ///< is 1 for the first field of a field picture 0 otherwise
|
||||||
|
@ -212,8 +212,8 @@ void ff_vdpau_mpeg_picture_complete(Mpeg1Context *s1, const uint8_t *buf,
|
|||||||
render->info.mpeg.alternate_scan = s->alternate_scan;
|
render->info.mpeg.alternate_scan = s->alternate_scan;
|
||||||
render->info.mpeg.q_scale_type = s->q_scale_type;
|
render->info.mpeg.q_scale_type = s->q_scale_type;
|
||||||
render->info.mpeg.top_field_first = s->top_field_first;
|
render->info.mpeg.top_field_first = s->top_field_first;
|
||||||
render->info.mpeg.full_pel_forward_vector = s1->full_pel[0]; // MPEG-1 only. Set 0 for MPEG-2
|
render->info.mpeg.full_pel_forward_vector = s->full_pel[0]; // MPEG-1 only. Set 0 for MPEG-2
|
||||||
render->info.mpeg.full_pel_backward_vector = s1->full_pel[1]; // MPEG-1 only. Set 0 for MPEG-2
|
render->info.mpeg.full_pel_backward_vector = s->full_pel[1]; // MPEG-1 only. Set 0 for MPEG-2
|
||||||
render->info.mpeg.f_code[0][0] = s->mpeg_f_code[0][0]; // For MPEG-1 fill both horiz. & vert.
|
render->info.mpeg.f_code[0][0] = s->mpeg_f_code[0][0]; // For MPEG-1 fill both horiz. & vert.
|
||||||
render->info.mpeg.f_code[0][1] = s->mpeg_f_code[0][1];
|
render->info.mpeg.f_code[0][1] = s->mpeg_f_code[0][1];
|
||||||
render->info.mpeg.f_code[1][0] = s->mpeg_f_code[1][0];
|
render->info.mpeg.f_code[1][0] = s->mpeg_f_code[1][0];
|
||||||
|
Loading…
Reference in New Issue
Block a user