Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
7371b0ca6f | |||
c5cbda5079 | |||
8893f7d815 | |||
7c772ccd27 |
2
Doxyfile
2
Doxyfile
@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 0.8.1
|
||||
PROJECT_NUMBER = 0.7.3
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
|
6
ffmpeg.c
6
ffmpeg.c
@ -345,6 +345,7 @@ typedef struct AVInputFile {
|
||||
int eof_reached; /* true if eof reached */
|
||||
int ist_index; /* index of first stream in ist_table */
|
||||
int buffer_size; /* current total buffer size */
|
||||
int nb_streams;
|
||||
} AVInputFile;
|
||||
|
||||
#if HAVE_TERMIOS_H
|
||||
@ -2046,7 +2047,7 @@ static int transcode(AVFormatContext **output_files,
|
||||
int si = stream_maps[i].stream_index;
|
||||
|
||||
if (fi < 0 || fi > nb_input_files - 1 ||
|
||||
si < 0 || si > input_files[fi].ctx->nb_streams - 1) {
|
||||
si < 0 || si > input_files[fi].nb_streams - 1) {
|
||||
fprintf(stderr,"Could not find input stream #%d.%d\n", fi, si);
|
||||
ret = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
@ -2732,7 +2733,7 @@ static int transcode(AVFormatContext **output_files,
|
||||
}
|
||||
/* the following test is needed in case new streams appear
|
||||
dynamically in stream : we ignore them */
|
||||
if (pkt.stream_index >= input_files[file_index].ctx->nb_streams)
|
||||
if (pkt.stream_index >= input_files[file_index].nb_streams)
|
||||
goto discard_packet;
|
||||
ist_index = input_files[file_index].ist_index + pkt.stream_index;
|
||||
ist = &input_streams[ist_index];
|
||||
@ -3469,6 +3470,7 @@ static int opt_input_file(const char *opt, const char *filename)
|
||||
input_files = grow_array(input_files, sizeof(*input_files), &nb_input_files, nb_input_files + 1);
|
||||
input_files[nb_input_files - 1].ctx = ic;
|
||||
input_files[nb_input_files - 1].ist_index = nb_input_streams - ic->nb_streams;
|
||||
input_files[nb_input_files - 1].nb_streams = ic->nb_streams;
|
||||
|
||||
top_field_first = -1;
|
||||
video_channel = 0;
|
||||
|
@ -571,6 +571,22 @@ static inline int binkb_get_value(BinkContext *c, int bundle_num)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline DCTELEM dequant(DCTELEM in, uint32_t quant, int dc)
|
||||
{
|
||||
/* Note: multiplication is unsigned but we want signed shift
|
||||
* otherwise clipping breaks.
|
||||
* TODO: The official decoder does not use clipping at all
|
||||
* but instead uses the full 32-bit result.
|
||||
* However clipping at least gets rid of the case that a
|
||||
* half-black half-white intra block gets black and white swapped
|
||||
* and should cause at most minor differences (except for DC). */
|
||||
int32_t res = in * quant;
|
||||
res >>= 11;
|
||||
if (!dc)
|
||||
res = av_clip_int16(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read 8x8 block of DCT coefficients.
|
||||
*
|
||||
@ -669,10 +685,10 @@ static int read_dct_coeffs(GetBitContext *gb, DCTELEM block[64], const uint8_t *
|
||||
|
||||
quant = quant_matrices[quant_idx];
|
||||
|
||||
block[0] = (block[0] * quant[0]) >> 11;
|
||||
block[0] = dequant(block[0], quant[0], 1);
|
||||
for (i = 0; i < coef_count; i++) {
|
||||
int idx = coef_idx[i];
|
||||
block[scan[idx]] = (block[scan[idx]] * quant[idx]) >> 11;
|
||||
block[scan[idx]] = dequant(block[scan[idx]], quant[idx], 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -115,7 +115,8 @@ static inline int get_ue_code(GetBitContext *gb, int order) {
|
||||
static int decode_residual_block(AVSContext *h, GetBitContext *gb,
|
||||
const struct dec_2dvlc *r, int esc_golomb_order,
|
||||
int qp, uint8_t *dst, int stride) {
|
||||
int i, level_code, esc_code, level, run, mask;
|
||||
int i, esc_code, level, mask;
|
||||
unsigned int level_code, run;
|
||||
DCTELEM level_buf[65];
|
||||
uint8_t run_buf[65];
|
||||
DCTELEM *block = h->block;
|
||||
|
Reference in New Issue
Block a user