@@ -47,6 +47,7 @@ typedef struct H263DecContext {
int pb_frame; ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
int long_vectors; ///< use horrible H.263v1 long vector mode
int ehc_mode;
+ int custom_pcf;
/* divx specific, used to workaround (many) bugs in divx5 */
int divx_packed;
@@ -1184,7 +1184,7 @@ int ff_h263_decode_picture_header(H263DecContext *h)
/* OPPTYPE */
format = get_bits(&s->gb, 3);
ff_dlog(s->avctx, "ufep=1, format: %d\n", format);
- s->custom_pcf= get_bits1(&s->gb);
+ h->custom_pcf = get_bits1(&s->gb);
s->umvplus = get_bits1(&s->gb); /* Unrestricted Motion Vector */
if (get_bits1(&s->gb) != 0) {
av_log(s->avctx, AV_LOG_ERROR, "Syntax-based Arithmetic Coding (SAC) not supported\n");
@@ -1267,7 +1267,7 @@ int ff_h263_decode_picture_header(H263DecContext *h)
s->width = width;
s->height = height;
- if(s->custom_pcf){
+ if (h->custom_pcf) {
int gcd;
s->avctx->framerate.num = 1800000;
s->avctx->framerate.den = 1000 + get_bits1(&s->gb);
@@ -1284,9 +1284,8 @@ int ff_h263_decode_picture_header(H263DecContext *h)
}
}
- if(s->custom_pcf){
+ if (h->custom_pcf)
skip_bits(&s->gb, 2); //extended Temporal reference
- }
if (ufep) {
if (s->umvplus) {
@@ -1326,7 +1325,7 @@ int ff_h263_decode_picture_header(H263DecContext *h)
if (h->pb_frame) {
skip_bits(&s->gb, 3); /* Temporal reference for B-pictures */
- if (s->custom_pcf)
+ if (h->custom_pcf)
skip_bits(&s->gb, 2); //extended Temporal reference
skip_bits(&s->gb, 2); /* Quantization information for B-pictures */
}
@@ -309,7 +309,6 @@ typedef struct MPVContext {
int alt_inter_vlc; ///< alternative inter vlc
int modified_quant;
int loop_filter;
- int custom_pcf;
/* MPEG-4 specific */
int studio_profile;
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/h263dec.h | 1 + libavcodec/ituh263dec.c | 9 ++++----- libavcodec/mpegvideo.h | 1 - 3 files changed, 5 insertions(+), 6 deletions(-)