Lines 32-37
Link Here
|
32 |
#include "libavutil/dict.h" |
32 |
#include "libavutil/dict.h" |
33 |
#include "libavutil/intreadwrite.h" |
33 |
#include "libavutil/intreadwrite.h" |
34 |
#include "libavutil/opt.h" |
34 |
#include "libavutil/opt.h" |
|
|
35 |
#include "libavutil/avutil.h" |
35 |
#include "mpbswap.h" |
36 |
#include "mpbswap.h" |
36 |
#include "fmt-conversion.h" |
37 |
#include "fmt-conversion.h" |
37 |
|
38 |
|
Lines 980-988
static mp_image_t *decode(sh_video_t *sh
Link Here
|
980 |
int x, y; |
981 |
int x, y; |
981 |
int w = ((avctx->width << lavc_param_lowres)+15) >> 4; |
982 |
int w = ((avctx->width << lavc_param_lowres)+15) >> 4; |
982 |
int h = ((avctx->height << lavc_param_lowres)+15) >> 4; |
983 |
int h = ((avctx->height << lavc_param_lowres)+15) >> 4; |
|
|
984 |
#if LIBAVUTIL_VERSION_MICRO >= 100 |
983 |
int qstride; |
985 |
int qstride; |
984 |
int dummy; |
986 |
int dummy; |
985 |
int8_t *q = av_frame_get_qp_table(pic, &qstride, &dummy); |
987 |
int8_t *q = av_frame_get_qp_table(pic, &qstride, &dummy); |
|
|
988 |
#else |
989 |
int8_t *q = pic->qscale_table; |
990 |
int qstride = pic->qstride; |
991 |
#endif |
986 |
for(y = 0; y < h; y++) { |
992 |
for(y = 0; y < h; y++) { |
987 |
for(x = 0; x < w; x++) |
993 |
for(x = 0; x < w; x++) |
988 |
quality += q[x]; |
994 |
quality += q[x]; |
Lines 1079-1085
static mp_image_t *decode(sh_video_t *sh
Link Here
|
1079 |
swap_palette(mpi->planes[1]); |
1085 |
swap_palette(mpi->planes[1]); |
1080 |
#endif |
1086 |
#endif |
1081 |
/* to comfirm with newer lavc style */ |
1087 |
/* to comfirm with newer lavc style */ |
|
|
1088 |
#if LIBAVUTIL_VERSION_MICRO >= 100 |
1082 |
mpi->qscale = av_frame_get_qp_table(pic, &mpi->qstride, &mpi->qscale_type); |
1089 |
mpi->qscale = av_frame_get_qp_table(pic, &mpi->qstride, &mpi->qscale_type); |
|
|
1090 |
#else |
1091 |
mpi->qscale =pic->qscale_table; |
1092 |
mpi->qstride=pic->qstride; |
1093 |
mpi->qscale_type= pic->qscale_type; |
1094 |
#endif |
1083 |
mpi->pict_type=pic->pict_type; |
1095 |
mpi->pict_type=pic->pict_type; |
1084 |
mpi->fields = MP_IMGFIELD_ORDERED; |
1096 |
mpi->fields = MP_IMGFIELD_ORDERED; |
1085 |
if(pic->interlaced_frame) mpi->fields |= MP_IMGFIELD_INTERLACED; |
1097 |
if(pic->interlaced_frame) mpi->fields |= MP_IMGFIELD_INTERLACED; |