You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/mpegvideo_enc: Reindent after the previous commit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -3832,32 +3832,32 @@ static int encode_picture(MpegEncContext *s, const AVPacket *pkt)
|
|||||||
s->qscale= 3; //reduce clipping problems
|
s->qscale= 3; //reduce clipping problems
|
||||||
|
|
||||||
if (s->out_format == FMT_MJPEG) {
|
if (s->out_format == FMT_MJPEG) {
|
||||||
const uint16_t * luma_matrix = ff_mpeg1_default_intra_matrix;
|
|
||||||
const uint16_t *chroma_matrix = ff_mpeg1_default_intra_matrix;
|
|
||||||
|
|
||||||
ret = ff_check_codec_matrices(s->avctx, FF_MATRIX_TYPE_INTRA | FF_MATRIX_TYPE_CHROMA_INTRA, (7 + s->qscale) / s->qscale, 65535);
|
ret = ff_check_codec_matrices(s->avctx, FF_MATRIX_TYPE_INTRA | FF_MATRIX_TYPE_CHROMA_INTRA, (7 + s->qscale) / s->qscale, 65535);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (s->codec_id != AV_CODEC_ID_AMV) {
|
if (s->codec_id != AV_CODEC_ID_AMV) {
|
||||||
if (s->avctx->intra_matrix) {
|
const uint16_t * luma_matrix = ff_mpeg1_default_intra_matrix;
|
||||||
chroma_matrix =
|
const uint16_t *chroma_matrix = ff_mpeg1_default_intra_matrix;
|
||||||
luma_matrix = s->avctx->intra_matrix;
|
|
||||||
}
|
|
||||||
if (s->avctx->chroma_intra_matrix)
|
|
||||||
chroma_matrix = s->avctx->chroma_intra_matrix;
|
|
||||||
|
|
||||||
/* for mjpeg, we do include qscale in the matrix */
|
if (s->avctx->intra_matrix) {
|
||||||
for(i=1;i<64;i++){
|
chroma_matrix =
|
||||||
int j = s->idsp.idct_permutation[i];
|
luma_matrix = s->avctx->intra_matrix;
|
||||||
|
}
|
||||||
|
if (s->avctx->chroma_intra_matrix)
|
||||||
|
chroma_matrix = s->avctx->chroma_intra_matrix;
|
||||||
|
|
||||||
s->chroma_intra_matrix[j] = av_clip_uint8((chroma_matrix[i] * s->qscale) >> 3);
|
/* for mjpeg, we do include qscale in the matrix */
|
||||||
s-> intra_matrix[j] = av_clip_uint8(( luma_matrix[i] * s->qscale) >> 3);
|
for (int i = 1; i < 64; i++) {
|
||||||
}
|
int j = s->idsp.idct_permutation[i];
|
||||||
s->y_dc_scale_table=
|
|
||||||
s->c_dc_scale_table = ff_mpeg12_dc_scale_table[s->intra_dc_precision];
|
s->chroma_intra_matrix[j] = av_clip_uint8((chroma_matrix[i] * s->qscale) >> 3);
|
||||||
s->chroma_intra_matrix[0] =
|
s-> intra_matrix[j] = av_clip_uint8(( luma_matrix[i] * s->qscale) >> 3);
|
||||||
s->intra_matrix[0] = ff_mpeg12_dc_scale_table[s->intra_dc_precision][8];
|
}
|
||||||
|
s->y_dc_scale_table =
|
||||||
|
s->c_dc_scale_table = ff_mpeg12_dc_scale_table[s->intra_dc_precision];
|
||||||
|
s->chroma_intra_matrix[0] =
|
||||||
|
s->intra_matrix[0] = ff_mpeg12_dc_scale_table[s->intra_dc_precision][8];
|
||||||
} else {
|
} else {
|
||||||
static const uint8_t y[32] = {13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13};
|
static const uint8_t y[32] = {13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13};
|
||||||
static const uint8_t c[32] = {14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14};
|
static const uint8_t c[32] = {14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14};
|
||||||
@@ -3872,11 +3872,11 @@ static int encode_picture(MpegEncContext *s, const AVPacket *pkt)
|
|||||||
s->intra_matrix[0] = 13;
|
s->intra_matrix[0] = 13;
|
||||||
s->chroma_intra_matrix[0] = 14;
|
s->chroma_intra_matrix[0] = 14;
|
||||||
}
|
}
|
||||||
ff_convert_matrix(s, s->q_intra_matrix, s->q_intra_matrix16,
|
ff_convert_matrix(s, s->q_intra_matrix, s->q_intra_matrix16,
|
||||||
s->intra_matrix, s->intra_quant_bias, 8, 8, 1);
|
s->intra_matrix, s->intra_quant_bias, 8, 8, 1);
|
||||||
ff_convert_matrix(s, s->q_chroma_intra_matrix, s->q_chroma_intra_matrix16,
|
ff_convert_matrix(s, s->q_chroma_intra_matrix, s->q_chroma_intra_matrix16,
|
||||||
s->chroma_intra_matrix, s->intra_quant_bias, 8, 8, 1);
|
s->chroma_intra_matrix, s->intra_quant_bias, 8, 8, 1);
|
||||||
s->qscale = 8;
|
s->qscale = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->pict_type == AV_PICTURE_TYPE_I) {
|
if (s->pict_type == AV_PICTURE_TYPE_I) {
|
||||||
|
Reference in New Issue
Block a user