1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  vorbisdec: remove some pointless comments
  avprobe: add const to AVCodec pointer
  libavformat: add const to AVCodec pointers
  pthread: add const to AVCodec pointers

Conflicts:
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-08-19 14:55:58 +02:00
commit c9fe864472
4 changed files with 18 additions and 18 deletions

View File

@ -1722,7 +1722,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
{ {
AVStream *stream = fmt_ctx->streams[stream_idx]; AVStream *stream = fmt_ctx->streams[stream_idx];
AVCodecContext *dec_ctx; AVCodecContext *dec_ctx;
AVCodec *dec; const AVCodec *dec;
char val_str[128]; char val_str[128];
const char *s; const char *s;
AVRational sar, dar; AVRational sar, dar;

View File

@ -364,7 +364,7 @@ static attribute_align_arg void *frame_worker_thread(void *arg)
PerThreadContext *p = arg; PerThreadContext *p = arg;
FrameThreadContext *fctx = p->parent; FrameThreadContext *fctx = p->parent;
AVCodecContext *avctx = p->avctx; AVCodecContext *avctx = p->avctx;
AVCodec *codec = avctx->codec; const AVCodec *codec = avctx->codec;
pthread_mutex_lock(&p->mutex); pthread_mutex_lock(&p->mutex);
while (1) { while (1) {
@ -528,7 +528,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
{ {
FrameThreadContext *fctx = p->parent; FrameThreadContext *fctx = p->parent;
PerThreadContext *prev_thread = fctx->prev_thread; PerThreadContext *prev_thread = fctx->prev_thread;
AVCodec *codec = p->avctx->codec; const AVCodec *codec = p->avctx->codec;
uint8_t *buf = p->avpkt.data; uint8_t *buf = p->avpkt.data;
if (!avpkt->size && !(codec->capabilities & CODEC_CAP_DELAY)) return 0; if (!avpkt->size && !(codec->capabilities & CODEC_CAP_DELAY)) return 0;
@ -736,7 +736,7 @@ static void park_frame_worker_threads(FrameThreadContext *fctx, int thread_count
static void frame_thread_free(AVCodecContext *avctx, int thread_count) static void frame_thread_free(AVCodecContext *avctx, int thread_count)
{ {
FrameThreadContext *fctx = avctx->thread_opaque; FrameThreadContext *fctx = avctx->thread_opaque;
AVCodec *codec = avctx->codec; const AVCodec *codec = avctx->codec;
int i; int i;
park_frame_worker_threads(fctx, thread_count); park_frame_worker_threads(fctx, thread_count);
@ -794,7 +794,7 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
static int frame_thread_init(AVCodecContext *avctx) static int frame_thread_init(AVCodecContext *avctx)
{ {
int thread_count = avctx->thread_count; int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec; const AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx; AVCodecContext *src = avctx;
FrameThreadContext *fctx; FrameThreadContext *fctx;
int i, err = 0; int i, err = 0;

View File

@ -1366,14 +1366,14 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
for (k = 0; k < step; ++k) { for (k = 0; k < step; ++k) {
coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * dim; coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * dim;
for (l = 0; l < dim; ++l) for (l = 0; l < dim; ++l)
vec[voffs + k + l * step] += codebook.codevectors[coffs + l]; // FPMATH vec[voffs + k + l * step] += codebook.codevectors[coffs + l];
} }
} else if (vr_type == 1) { } else if (vr_type == 1) {
voffs = voffset + j * vlen; voffs = voffset + j * vlen;
for (k = 0; k < step; ++k) { for (k = 0; k < step; ++k) {
coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * dim; coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * dim;
for (l = 0; l < dim; ++l, ++voffs) { for (l = 0; l < dim; ++l, ++voffs) {
vec[voffs]+=codebook.codevectors[coffs+l]; // FPMATH vec[voffs]+=codebook.codevectors[coffs+l];
av_dlog(NULL, " pass %d offs: %d curr: %f change: %f cv offs.: %d \n", av_dlog(NULL, " pass %d offs: %d curr: %f change: %f cv offs.: %d \n",
pass, voffs, vec[voffs], codebook.codevectors[coffs+l], coffs); pass, voffs, vec[voffs], codebook.codevectors[coffs+l], coffs);
@ -1385,23 +1385,23 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
if (dim == 2) { if (dim == 2) {
for (k = 0; k < step; ++k) { for (k = 0; k < step; ++k) {
coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * 2; coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * 2;
vec[voffs + k ] += codebook.codevectors[coffs ]; // FPMATH vec[voffs + k ] += codebook.codevectors[coffs ];
vec[voffs + k + vlen] += codebook.codevectors[coffs + 1]; // FPMATH vec[voffs + k + vlen] += codebook.codevectors[coffs + 1];
} }
} else if (dim == 4) { } else if (dim == 4) {
for (k = 0; k < step; ++k, voffs += 2) { for (k = 0; k < step; ++k, voffs += 2) {
coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * 4; coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * 4;
vec[voffs ] += codebook.codevectors[coffs ]; // FPMATH vec[voffs ] += codebook.codevectors[coffs ];
vec[voffs + 1 ] += codebook.codevectors[coffs + 2]; // FPMATH vec[voffs + 1 ] += codebook.codevectors[coffs + 2];
vec[voffs + vlen ] += codebook.codevectors[coffs + 1]; // FPMATH vec[voffs + vlen ] += codebook.codevectors[coffs + 1];
vec[voffs + vlen + 1] += codebook.codevectors[coffs + 3]; // FPMATH vec[voffs + vlen + 1] += codebook.codevectors[coffs + 3];
} }
} else } else
for (k = 0; k < step; ++k) { for (k = 0; k < step; ++k) {
coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * dim; coffs = get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * dim;
for (l = 0; l < dim; l += 2, voffs++) { for (l = 0; l < dim; l += 2, voffs++) {
vec[voffs ] += codebook.codevectors[coffs + l ]; // FPMATH vec[voffs ] += codebook.codevectors[coffs + l ];
vec[voffs + vlen] += codebook.codevectors[coffs + l + 1]; // FPMATH vec[voffs + vlen] += codebook.codevectors[coffs + l + 1];
av_dlog(NULL, " pass %d offs: %d curr: %f change: %f cv offs.: %d+%d \n", av_dlog(NULL, " pass %d offs: %d curr: %f change: %f cv offs.: %d+%d \n",
pass, voffset / ch + (voffs % ch) * vlen, pass, voffset / ch + (voffs % ch) * vlen,
@ -1621,7 +1621,7 @@ static int vorbis_parse_audio_packet(vorbis_context *vc)
mdct->imdct_half(mdct, ch_res_ptr, ch_floor_ptr); mdct->imdct_half(mdct, ch_res_ptr, ch_floor_ptr);
} }
// Overlap/add, save data for next overlapping FPMATH // Overlap/add, save data for next overlapping
retlen = (blocksize + vc->blocksize[previous_window]) / 4; retlen = (blocksize + vc->blocksize[previous_window]) / 4;
for (j = 0; j < vc->audio_channels; j++) { for (j = 0; j < vc->audio_channels; j++) {

View File

@ -2328,7 +2328,7 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
/* returns 1 or 0 if or if not decoded data was returned, or a negative error */ /* returns 1 or 0 if or if not decoded data was returned, or a negative error */
static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **options) static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **options)
{ {
AVCodec *codec; const AVCodec *codec;
int got_picture = 1, ret = 0; int got_picture = 1, ret = 0;
AVFrame picture; AVFrame picture;
AVSubtitle subtitle; AVSubtitle subtitle;
@ -2508,7 +2508,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
av_log(ic, AV_LOG_DEBUG, "File position before avformat_find_stream_info() is %"PRId64"\n", avio_tell(ic->pb)); av_log(ic, AV_LOG_DEBUG, "File position before avformat_find_stream_info() is %"PRId64"\n", avio_tell(ic->pb));
for(i=0;i<ic->nb_streams;i++) { for(i=0;i<ic->nb_streams;i++) {
AVCodec *codec; const AVCodec *codec;
AVDictionary *thread_opt = NULL; AVDictionary *thread_opt = NULL;
st = ic->streams[i]; st = ic->streams[i];