Projects
Multimedia
avidemux3
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 23
View file
avidemux3.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sat Dec 05 12:23:17 UTC 2015 - joerg.lorenzen@ki.tng.de + +- update internal ffmpeg to version 2.8.3 + +------------------------------------------------------------------- Fri Nov 20 07:00:02 UTC 2015 - olaf@aepfle.de - Set group permissions for included ffmpeg libs
View file
avidemux3.spec
Changed
@@ -16,7 +16,7 @@ # -%define ffmpeg_version 2.8.1 +%define ffmpeg_version 2.8.3 Name: avidemux3 Summary: Graphical video editing and transcoding tool
View file
ffmpeg-2.8.1.tar.bz2/Changelog -> ffmpeg-2.8.3.tar.bz2/Changelog
Changed
@@ -1,6 +1,87 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 2.8.3 +- avcodec/cabac: Check initial cabac decoder state +- avcodec/cabac_functions: Fix "left shift of negative value -31767" +- avcodec/h264_slice: Limit max_contexts when slice_context_count is initialized +- rtmpcrypt: Do the xtea decryption in little endian mode +- avformat/matroskadec: Check subtitle stream before dereferencing +- avcodec/pngdec: Replace assert by request for sample for unsupported TRNS cases +- avformat/utils: Do not init parser if probing is unfinished +- avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions +- avcodec/jpeg2000: Use av_image_check_size() in ff_jpeg2000_init_component() +- avcodec/wmaprodec: Check for overread in decode_packet() +- avcodec/smacker: Check that the data size is a multiple of a sample vector +- avcodec/takdec: Skip last p2 sample (which is unused) +- avcodec/dxtory: Fix input size check in dxtory_decode_v1_410() +- avcodec/dxtory: Fix input size check in dxtory_decode_v1_420() +- avcodec/error_resilience: avoid accessing previous or next frames tables beyond height +- avcodec/dpx: Move need_align to act per line +- avcodec/flashsv: Check size before updating it +- avcodec/ivi: Check image dimensions +- avcodec/utils: Better check for channels in av_get_audio_frame_duration() +- avcodec/jpeg2000dec: Check for duplicate SIZ marker +- aacsbr: don't call sbr_dequant twice without intermediate read_sbr_data +- hqx: correct type and size check of info_offset +- mxfdec: check edit_rate also for physical_track +- avcodec/jpeg2000: Change coord to 32bit to support larger than 32k width or height +- avcodec/jpeg2000dec: Check SIZ dimensions to be within the supported range +- avcodec/jpeg2000: Check comp coords to be within the supported size +- mpegvideo: clear overread in clear_context +- avcodec/avrndec: Use the AVFrame format instead of the context +- dds: disable palette flag for compressed images +- dds: validate compressed source buffer size +- dds: validate source buffer size before copying +- dvdsubdec: validate offset2 similar to offset1 +- brstm: reject negative sample rate +- aacps: avoid division by zero in stereo_processing +- softfloat: assert when the argument of av_sqrt_sf is negative + +version 2.8.2 +- various fixes in the aac_fixed decoder +- various fixes in softfloat +- swresample/resample: increase precision for compensation +- lavf/mov: add support for sidx fragment indexes +- avformat/mxfenc: Only store user comment related tags when needed +- tests/fate/avformat: Fix fate-lavf +- doc/ffmpeg: Clarify that the sdp_file option requires an rtp output. +- ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format. +- apng: use correct size for output buffer +- jvdec: avoid unsigned overflow in comparison +- avcodec/jpeg2000dec: Clip all tile coordinates +- avcodec/microdvddec: Check for string end in 'P' case +- avcodec/dirac_parser: Fix undefined memcpy() use +- avformat/xmv: Discard remainder of packet on error +- avformat/xmv: factor return check out of if/else +- avcodec/mpeg12dec: Do not call show_bits() with invalid bits +- avcodec/faxcompr: Add missing runs check in decode_uncompressed() +- libavutil/channel_layout: Check strtol*() for failure +- avformat/mpegts: Only start probing data streams within probe_packets +- avcodec/hevc_ps: Check chroma_format_idc +- avcodec/ffv1dec: Check for 0 quant tables +- avcodec/mjpegdec: Reinitialize IDCT on BPP changes +- avcodec/mjpegdec: Check index in ljpeg_decode_yuv_scan() before using it +- avutil/file_open: avoid file handle inheritance on Windows +- avcodec/h264_slice: Disable slice threads if there are multiple access units in a packet +- avformat/hls: update cookies on setcookie response +- opusdec: Don't run vector_fmul_scalar on zero length arrays +- avcodec/opusdec: Fix extra samples read index +- avcodec/ffv1: Initialize vlc_state on allocation +- avcodec/ffv1dec: update progress in case of broken pointer chains +- avcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header decoding fails for other reasons +- rtsp: Allow $ as interleaved packet indicator before a complete response header +- videodsp: don't overread edges in vfix3 emu_edge. +- avformat/mp3dec: improve junk skipping heuristic +- concatdec: fix file_start_time calculation regression +- avcodec: loongson optimize h264dsp idct and loop filter with mmi +- avcodec/jpeg2000dec: Clear properties in jpeg2000_dec_cleanup() too +- avformat/hls: add support for EXT-X-MAP +- avformat/hls: fix segment selection regression on track changes of live streams +- configure: Require libkvazaar < 0.7. +- avcodec/vp8: Do not use num_coeff_partitions in thread/buffer setup + + version 2.8.1: - swscale: fix ticket #4881 - doc: fix spelling errors @@ -31,7 +112,7 @@ - dnxhddec: decode and use interlace mb flag - swscale: fix ticket #4877 - avcodec/rangecoder: Check e -- avcodec/ffv1: seperate slice_count from max_slice_count +- avcodec/ffv1: separate slice_count from max_slice_count - swscale: fix ticket 4850 - cmdutils: Filter dst/srcw/h - avutil/log: fix zero length gnu_printf format string warning
View file
ffmpeg-2.8.1.tar.bz2/RELEASE -> ffmpeg-2.8.3.tar.bz2/RELEASE
Changed
@@ -1,1 +1,1 @@ -2.8.1 +2.8.3
View file
ffmpeg-2.8.1.tar.bz2/VERSION -> ffmpeg-2.8.3.tar.bz2/VERSION
Changed
@@ -1,1 +1,1 @@ -2.8.1 +2.8.3
View file
ffmpeg-2.8.1.tar.bz2/configure -> ffmpeg-2.8.3.tar.bz2/configure
Changed
@@ -5240,7 +5240,7 @@ check_lib "${gsm_hdr}" gsm_create -lgsm && break; done || die "ERROR: libgsm not found"; } enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc -enabled libkvazaar && require_pkg_config kvazaar kvazaar.h kvz_api_get +enabled libkvazaar && require_pkg_config "kvazaar < 0.7.0" kvazaar.h kvz_api_get enabled libmfx && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit enabled libmodplug && require_pkg_config libmodplug libmodplug/modplug.h ModPlug_Load enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
View file
ffmpeg-2.8.1.tar.bz2/doc/Doxyfile -> ffmpeg-2.8.3.tar.bz2/doc/Doxyfile
Changed
@@ -31,7 +31,7 @@ # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.8.1 +PROJECT_NUMBER = 2.8.3 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55
View file
ffmpeg-2.8.1.tar.bz2/doc/ffmpeg.texi -> ffmpeg-2.8.3.tar.bz2/doc/ffmpeg.texi
Changed
@@ -1205,9 +1205,9 @@ specified to @command{ffserver} but can be to @command{ffmpeg}. @item -sdp_file @var{file} (@emph{global}) -Print sdp information to @var{file}. +Print sdp information for an output stream to @var{file}. This allows dumping sdp information when at least one output isn't an -rtp stream. +rtp stream. (Requires at least one of the output formats to be rtp). @item -discard (@emph{input}) Allows discarding specific streams or frames of streams at the demuxer.
View file
ffmpeg-2.8.1.tar.bz2/doc/muxers.texi -> ffmpeg-2.8.3.tar.bz2/doc/muxers.texi
Changed
@@ -839,6 +839,21 @@ -y out.ts @end example +@section mxf, mxf_d10 + +MXF muxer. + +@subsection Options + +The muxer options are: + +@table @option +@item store_user_comments @var{bool} +Set if user comments should be stored if available or never. +IRT D-10 does not allow user comments. The default is thus to write them for +mxf but not for mxf_d10 +@end table + @section null Null muxer.
View file
ffmpeg-2.8.1.tar.bz2/ffmpeg.c -> ffmpeg-2.8.3.tar.bz2/ffmpeg.c
Changed
@@ -2447,6 +2447,9 @@ } } + if (!j) + goto fail; + av_sdp_create(avc, j, sdp, sizeof(sdp)); if (!sdp_filename) { @@ -2462,6 +2465,7 @@ } } +fail: av_freep(&avc); }
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/aacdec_template.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/aacdec_template.c
Changed
@@ -2889,6 +2889,11 @@ spectral_to_sample(ac, samples); + if (!ac->frame->data[0] && samples) { + av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); + return AVERROR_INVALIDDATA; + } + ac->frame->nb_samples = samples; ac->frame->sample_rate = avctx->sample_rate; *got_frame_ptr = 1;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/aacps.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/aacps.c
Changed
@@ -940,7 +940,7 @@ LOCAL_ALIGNED_16(INTFLOAT, h_step, [2], [4]); int start = ps->border_position[e]; int stop = ps->border_position[e+1]; - INTFLOAT width = Q30(1.f) / (stop - start); + INTFLOAT width = Q30(1.f) / ((stop - start) ? (stop - start) : 1); #if USE_FIXED width <<= 1; #endif
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/aacsbr_fixed.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/aacsbr_fixed.c
Changed
@@ -169,6 +169,10 @@ else temp1.mant = 0x20000000; temp1.exp = (temp1.exp >> 1) + 1; + if (temp1.exp > 66) { // temp1 > 1E20 + av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n"); + temp1 = FLOAT_1; + } temp2.exp = (pan_offset - sbr->data[1].env_facs[e][k].mant) * alpha; if (temp2.exp & 1) @@ -188,6 +192,10 @@ temp1.exp = NOISE_FLOOR_OFFSET - \ sbr->data[0].noise_facs[e][k].mant + 2; temp1.mant = 0x20000000; + if (temp1.exp > 66) { // temp1 > 1E20 + av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n"); + temp1 = FLOAT_1; + } temp2.exp = 12 - sbr->data[1].noise_facs[e][k].mant + 1; temp2.mant = 0x20000000; fac = av_div_sf(temp1, av_add_sf(FLOAT_1, temp2)); @@ -208,7 +216,10 @@ else temp1.mant = 0x20000000; temp1.exp = (temp1.exp >> 1) + 1; - + if (temp1.exp > 66) { // temp1 > 1E20 + av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n"); + temp1 = FLOAT_1; + } sbr->data[ch].env_facs[e][k] = temp1; } for (e = 1; e <= sbr->data[ch].bs_num_noise; e++) @@ -397,7 +408,8 @@ int delta = !((e == e_a[1]) || (e == e_a[0])); for (k = 0; k < sbr->n_lim; k++) { SoftFloat gain_boost, gain_max; - SoftFloat sum[2] = { { 0, 0}, { 0, 0 } }; + SoftFloat sum[2]; + sum[0] = sum[1] = FLOAT_0; for (m = sbr->f_tablelim[k] - sbr->kx[1]; m < sbr->f_tablelim[k + 1] - sbr->kx[1]; m++) { const SoftFloat temp = av_div_sf(sbr->e_origmapped[e][m], av_add_sf(FLOAT_1, sbr->q_mapped[e][m]));
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/aacsbr_template.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/aacsbr_template.c
Changed
@@ -70,6 +70,7 @@ /** Places SBR in pure upsampling mode. */ static void sbr_turnoff(SpectralBandReplication *sbr) { sbr->start = 0; + sbr->ready_for_dequant = 0; // Init defults used in pure upsampling mode sbr->kx[1] = 32; //Typo in spec, kx' inits to 32 sbr->m[1] = 0; @@ -177,6 +178,7 @@ SpectrumParameters old_spectrum_params; sbr->start = 1; + sbr->ready_for_dequant = 0; // Save last spectrum parameters variables to compare to new ones memcpy(&old_spectrum_params, &sbr->spectrum_params, sizeof(SpectrumParameters)); @@ -1032,6 +1034,7 @@ unsigned int cnt = get_bits_count(gb); sbr->id_aac = id_aac; + sbr->ready_for_dequant = 1; if (id_aac == TYPE_SCE || id_aac == TYPE_CCE) { if (read_sbr_single_channel_element(ac, sbr, gb)) { @@ -1412,7 +1415,7 @@ for (p = 0; p < sbr->n[ch_data->bs_freq_res[e + 1]]; p++) { #if USE_FIXED - SoftFloat sum = { 0, 0 }; + SoftFloat sum = FLOAT_0; const SoftFloat den = av_int2sf(0x20000000 / (env_size * (table[p + 1] - table[p])), 29); for (k = table[p]; k < table[p + 1]; k++) { sum = av_add_sf(sum, sbr->dsp.sum_square(X_high[k] + ilb, iub - ilb)); @@ -1449,6 +1452,12 @@ sbr_turnoff(sbr); } + if (sbr->start && !sbr->ready_for_dequant) { + av_log(ac->avctx, AV_LOG_ERROR, + "No quantized data read for sbr_dequant.\n"); + sbr_turnoff(sbr); + } + if (!sbr->kx_and_m_pushed) { sbr->kx[0] = sbr->kx[1]; sbr->m[0] = sbr->m[1]; @@ -1458,6 +1467,7 @@ if (sbr->start) { sbr_dequant(sbr, id_aac); + sbr->ready_for_dequant = 0; } for (ch = 0; ch < nch; ch++) { /* decode channel */
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/avrndec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/avrndec.c
Changed
@@ -113,7 +113,7 @@ int shift = p->height - avctx->height; int subsample_h, subsample_v; - av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v); + av_pix_fmt_get_chroma_sub_sample(p->format, &subsample_h, &subsample_v); p->data[0] += p->linesize[0] * shift; if (p->data[2]) {
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/cabac.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/cabac.c
Changed
@@ -51,7 +51,7 @@ * * @param buf_size size of buf in bits */ -void ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size){ +int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size){ c->bytestream_start= c->bytestream= buf; c->bytestream_end= buf + buf_size; @@ -64,6 +64,9 @@ #endif c->low+= ((*c->bytestream++)<<2) + 2; c->range= 0x1FE; + if ((c->range<<(CABAC_BITS+1)) < c->low) + return AVERROR_INVALIDDATA; + return 0; } void ff_init_cabac_states(void)
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/cabac.h -> ffmpeg-2.8.3.tar.bz2/libavcodec/cabac.h
Changed
@@ -56,7 +56,7 @@ }CABACContext; void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size); -void ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size); +int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size); void ff_init_cabac_states(void); #endif /* AVCODEC_CABAC_H */
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/cabac_functions.h -> ffmpeg-2.8.3.tar.bz2/libavcodec/cabac_functions.h
Changed
@@ -74,7 +74,8 @@ #ifndef get_cabac_inline static void refill2(CABACContext *c){ - int i, x; + int i; + unsigned x; x= c->low ^ (c->low-1); i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS-1)]; @@ -190,7 +191,8 @@ #endif if ((int) (c->bytestream_end - ptr) < n) return NULL; - ff_init_cabac_decoder(c, ptr + n, c->bytestream_end - ptr - n); + if (ff_init_cabac_decoder(c, ptr + n, c->bytestream_end - ptr - n) < 0) + return NULL; return ptr; }
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/dds.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/dds.c
Changed
@@ -141,6 +141,12 @@ normal_map = flags & DDPF_NORMALMAP; fourcc = bytestream2_get_le32(gbc); + if (ctx->compressed && ctx->paletted) { + av_log(avctx, AV_LOG_WARNING, + "Disabling invalid palette flag for compressed dds.\n"); + ctx->paletted = 0; + } + bpp = bytestream2_get_le32(gbc); // rgbbitcount r = bytestream2_get_le32(gbc); // rbitmask g = bytestream2_get_le32(gbc); // gbitmask @@ -642,9 +648,18 @@ return ret; if (ctx->compressed) { + int size = (avctx->coded_height / TEXTURE_BLOCK_H) * + (avctx->coded_width / TEXTURE_BLOCK_W) * ctx->tex_ratio; ctx->slice_count = av_clip(avctx->thread_count, 1, avctx->coded_height / TEXTURE_BLOCK_H); + if (bytestream2_get_bytes_left(gbc) < size) { + av_log(avctx, AV_LOG_ERROR, + "Compressed Buffer is too small (%d < %d).\n", + bytestream2_get_bytes_left(gbc), size); + return AVERROR_INVALIDDATA; + } + /* Use the decompress function on the texture, one block per thread. */ ctx->tex_data = gbc->buffer; avctx->execute2(avctx, decompress_texture_thread, frame, NULL, ctx->slice_count); @@ -666,6 +681,12 @@ frame->palette_has_changed = 1; } + if (bytestream2_get_bytes_left(gbc) < frame->height * linesize) { + av_log(avctx, AV_LOG_ERROR, "Buffer is too small (%d < %d).\n", + bytestream2_get_bytes_left(gbc), frame->height * linesize); + return AVERROR_INVALIDDATA; + } + av_image_copy_plane(frame->data[0], frame->linesize[0], gbc->buffer, linesize, linesize, frame->height);
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/dirac_parser.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/dirac_parser.c
Changed
@@ -123,7 +123,7 @@ DiracParseContext *pc = s->priv_data; if (pc->overread_index) { - memcpy(pc->buffer, pc->buffer + pc->overread_index, + memmove(pc->buffer, pc->buffer + pc->overread_index, pc->index - pc->overread_index); pc->index -= pc->overread_index; pc->overread_index = 0;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/dpx.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/dpx.c
Changed
@@ -348,11 +348,11 @@ // For 12 bit, ignore alpha if (elements == 4) buf += 2; - // Jump to next aligned position - buf += need_align; } for (i = 0; i < 3; i++) ptr[i] += p->linesize[i]; + // Jump to next aligned position + buf += need_align; } break; case 16:
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/dvdsubdec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/dvdsubdec.c
Changed
@@ -346,7 +346,7 @@ } } the_end: - if (offset1 >= 0) { + if (offset1 >= 0 && offset2 >= 0) { int w, h; uint8_t *bitmap;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/dxtory.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/dxtory.c
Changed
@@ -65,7 +65,7 @@ uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V; int ret; - if (src_size < avctx->width * avctx->height * 9LL / 8) { + if (src_size < FFALIGN(avctx->width, 4) * FFALIGN(avctx->height, 4) * 9LL / 8) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); return AVERROR_INVALIDDATA; } @@ -108,7 +108,7 @@ uint8_t *Y1, *Y2, *U, *V; int ret; - if (src_size < avctx->width * avctx->height * 3LL / 2) { + if (src_size < FFALIGN(avctx->width, 2) * FFALIGN(avctx->height, 2) * 3LL / 2) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); return AVERROR_INVALIDDATA; }
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/error_resilience.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/error_resilience.c
Changed
@@ -381,14 +381,19 @@ #define MV_UNCHANGED 1 const int mb_stride = s->mb_stride; const int mb_width = s->mb_width; - const int mb_height = s->mb_height; + int mb_height = s->mb_height; int i, depth, num_avail; int mb_x, mb_y, mot_step, mot_stride; + if (s->last_pic.f && s->last_pic.f->data[0]) + mb_height = FFMIN(mb_height, (s->last_pic.f->height+15)>>4); + if (s->next_pic.f && s->next_pic.f->data[0]) + mb_height = FFMIN(mb_height, (s->next_pic.f->height+15)>>4); + set_mv_strides(s, &mot_step, &mot_stride); num_avail = 0; - for (i = 0; i < s->mb_num; i++) { + for (i = 0; i < mb_width * mb_height; i++) { const int mb_xy = s->mb_index2xy[i]; int f = 0; int error = s->error_status_table[mb_xy]; @@ -413,7 +418,7 @@ if ((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) || num_avail <= mb_width / 2) { - for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + for (mb_y = 0; mb_y < mb_height; mb_y++) { for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int mb_xy = mb_x + mb_y * s->mb_stride; int mv_dir = (s->last_pic.f && s->last_pic.f->data[0]) ? MV_DIR_FORWARD : MV_DIR_BACKWARD; @@ -442,7 +447,7 @@ int score_sum = 0; changed = 0; - for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + for (mb_y = 0; mb_y < mb_height; mb_y++) { for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int mb_xy = mb_x + mb_y * s->mb_stride; int mv_predictor[8][2] = { { 0 } }; @@ -675,7 +680,7 @@ if (none_left) return; - for (i = 0; i < s->mb_num; i++) { + for (i = 0; i < mb_width * mb_height; i++) { int mb_xy = s->mb_index2xy[i]; if (fixed[mb_xy]) fixed[mb_xy] = MV_FROZEN;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/faxcompr.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/faxcompr.c
Changed
@@ -189,6 +189,10 @@ *mode = !*mode; if (newmode != *mode) { //FIXME CHECK *(*runs)++ = 0; + if (*runs >= runend) { + av_log(avctx, AV_LOG_ERROR, "uncompressed run overrun\n"); + return AVERROR_INVALIDDATA; + } *mode = newmode; } return 0;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/ffv1.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/ffv1.c
Changed
@@ -66,7 +66,7 @@ av_cold int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs) { - int j; + int j, i; fs->plane_count = f->plane_count; fs->transparency = f->transparency; @@ -80,10 +80,15 @@ if (!p->state) return AVERROR(ENOMEM); } else { - if (!p->vlc_state) - p->vlc_state = av_malloc_array(p->context_count, sizeof(VlcState)); - if (!p->vlc_state) - return AVERROR(ENOMEM); + if (!p->vlc_state) { + p->vlc_state = av_mallocz_array(p->context_count, sizeof(VlcState)); + if (!p->vlc_state) + return AVERROR(ENOMEM); + for (i = 0; i < p->context_count; i++) { + p->vlc_state[i].error_sum = 4; + p->vlc_state[i].count = 1; + } + } } }
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/ffv1dec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/ffv1dec.c
Changed
@@ -408,6 +408,7 @@ if (ff_ffv1_init_slice_state(f, fs) < 0) return AVERROR(ENOMEM); if (decode_slice_header(f, fs) < 0) { + fs->slice_x = fs->slice_y = fs->slice_height = fs->slice_width = 0; fs->slice_damaged = 1; return AVERROR_INVALIDDATA; } @@ -568,7 +569,7 @@ } f->quant_table_count = get_symbol(c, state, 0); - if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES) + if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count) return AVERROR_INVALIDDATA; for (i = 0; i < f->quant_table_count; i++) { @@ -939,6 +940,7 @@ else v = buf_p - c->bytestream_start; if (buf_p - c->bytestream_start < v) { av_log(avctx, AV_LOG_ERROR, "Slice pointer chain broken\n"); + ff_thread_report_progress(&f->picture, INT_MAX, 0); return AVERROR_INVALIDDATA; } buf_p -= v;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/flashsv.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/flashsv.c
Changed
@@ -413,6 +413,10 @@ } if (has_diff) { + if (size < 3) { + av_log(avctx, AV_LOG_ERROR, "size too small for diff\n"); + return AVERROR_INVALIDDATA; + } if (!s->keyframe) { av_log(avctx, AV_LOG_ERROR, "Inter frame without keyframe\n"); @@ -440,6 +444,10 @@ int row = get_bits(&gb, 8); av_log(avctx, AV_LOG_DEBUG, "%dx%d zlibprime_curr %dx%d\n", i, j, col, row); + if (size < 3) { + av_log(avctx, AV_LOG_ERROR, "size too small for zlibprime_curr\n"); + return AVERROR_INVALIDDATA; + } size -= 2; avpriv_request_sample(avctx, "zlibprime_curr"); return AVERROR_PATCHWELCOME;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/h264_cabac.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/h264_cabac.c
Changed
@@ -2026,6 +2026,7 @@ const int mb_size = ff_h264_mb_sizes[h->sps.chroma_format_idc] * h->sps.bit_depth_luma >> 3; const uint8_t *ptr; + int ret; // We assume these blocks are very rare so we do not optimize it. // FIXME The two following lines get the bitstream position in the cabac @@ -2042,7 +2043,9 @@ sl->intra_pcm_ptr = ptr; ptr += mb_size; - ff_init_cabac_decoder(&sl->cabac, ptr, sl->cabac.bytestream_end - ptr); + ret = ff_init_cabac_decoder(&sl->cabac, ptr, sl->cabac.bytestream_end - ptr); + if (ret < 0) + return ret; // All blocks are present h->cbp_table[mb_xy] = 0xf7ef;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/h264_slice.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/h264_slice.c
Changed
@@ -1097,6 +1097,7 @@ nb_slices = max_slices; } h->slice_context_count = nb_slices; + h->max_contexts = FFMIN(h->max_contexts, nb_slices); if (!HAVE_THREADS || !(h->avctx->active_thread_type & FF_THREAD_SLICE)) { ret = ff_h264_slice_context_init(h, &h->slice_ctx[0]); @@ -1177,6 +1178,15 @@ av_log(h->avctx, AV_LOG_ERROR, "Too many fields\n"); return AVERROR_INVALIDDATA; } + if (h->max_contexts > 1) { + if (!h->single_decode_warning) { + av_log(h->avctx, AV_LOG_WARNING, "Cannot decode multiple access units as slice threads\n"); + h->single_decode_warning = 1; + } + h->max_contexts = 1; + return SLICE_SINGLETHREAD; + } + if (h->cur_pic_ptr && FIELD_PICTURE(h) && h->first_field) { ret = ff_h264_field_end(h, h->slice_ctx, 1); h->current_slice = 0; @@ -2362,9 +2372,11 @@ align_get_bits(&sl->gb); /* init cabac */ - ff_init_cabac_decoder(&sl->cabac, + ret = ff_init_cabac_decoder(&sl->cabac, sl->gb.buffer + get_bits_count(&sl->gb) / 8, (get_bits_left(&sl->gb) + 7) / 8); + if (ret < 0) + return ret; ff_h264_init_cabac_states(h, sl);
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/hevc_ps.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/hevc_ps.c
Changed
@@ -834,6 +834,10 @@ } sps->chroma_format_idc = get_ue_golomb_long(gb); + if (sps->chroma_format_idc > 3U) { + av_log(avctx, AV_LOG_ERROR, "chroma_format_idc %d is invalid\n", sps->chroma_format_idc); + return AVERROR_INVALIDDATA; + } if (sps->chroma_format_idc == 3) sps->separate_colour_plane_flag = get_bits1(gb);
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/hqx.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/hqx.c
Changed
@@ -417,8 +417,8 @@ info_tag = AV_RL32(src); if (info_tag == MKTAG('I', 'N', 'F', 'O')) { - int info_offset = AV_RL32(src + 4); - if (info_offset > UINT32_MAX - 8 || info_offset + 8 > avpkt->size) { + unsigned info_offset = AV_RL32(src + 4); + if (info_offset > INT_MAX || info_offset + 8 > avpkt->size) { av_log(avctx, AV_LOG_ERROR, "Invalid INFO header offset: 0x%08"PRIX32" is too large.\n", info_offset);
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/ivi.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/ivi.c
Changed
@@ -30,6 +30,7 @@ #define BITSTREAM_READER_LE #include "libavutil/attributes.h" +#include "libavutil/imgutils.h" #include "libavutil/timer.h" #include "avcodec.h" #include "get_bits.h" @@ -310,7 +311,7 @@ ivi_free_buffers(planes); - if (cfg->pic_width < 1 || cfg->pic_height < 1 || + if (av_image_check_size(cfg->pic_width, cfg->pic_height, 0, NULL) < 0 || cfg->luma_bands < 1 || cfg->chroma_bands < 1) return AVERROR_INVALIDDATA;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/jpeg2000.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/jpeg2000.c
Changed
@@ -28,6 +28,7 @@ #include "libavutil/attributes.h" #include "libavutil/avassert.h" #include "libavutil/common.h" +#include "libavutil/imgutils.h" #include "libavutil/mem.h" #include "avcodec.h" #include "jpeg2000.h" @@ -210,9 +211,17 @@ codsty->nreslevels2decode - 1, codsty->transform)) return ret; - // component size comp->coord is uint16_t so ir cannot overflow + + if (av_image_check_size(comp->coord[0][1] - comp->coord[0][0], + comp->coord[1][1] - comp->coord[1][0], 0, avctx)) + return AVERROR_INVALIDDATA; csize = (comp->coord[0][1] - comp->coord[0][0]) * (comp->coord[1][1] - comp->coord[1][0]); + if (comp->coord[0][1] - comp->coord[0][0] > 32768 || + comp->coord[1][1] - comp->coord[1][0] > 32768) { + av_log(avctx, AV_LOG_ERROR, "component size too large\n"); + return AVERROR_PATCHWELCOME; + } if (codsty->transform == FF_DWT97) { csize += AV_INPUT_BUFFER_PADDING_SIZE / sizeof(*comp->f_data); @@ -450,7 +459,7 @@ return AVERROR(ENOMEM); for (cblkno = 0; cblkno < nb_codeblocks; cblkno++) { Jpeg2000Cblk *cblk = prec->cblk + cblkno; - uint16_t Cx0, Cy0; + int Cx0, Cy0; /* Compute coordinates of codeblocks */ /* Compute Cx0*/
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/jpeg2000.h -> ffmpeg-2.8.3.tar.bz2/libavcodec/jpeg2000.h
Changed
@@ -174,21 +174,21 @@ int nb_terminationsinc; int data_start[JPEG2000_MAX_PASSES]; Jpeg2000Pass passes[JPEG2000_MAX_PASSES]; - uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} } Jpeg2000Cblk; // code block typedef struct Jpeg2000Prec { - uint16_t nb_codeblocks_width; - uint16_t nb_codeblocks_height; + int nb_codeblocks_width; + int nb_codeblocks_height; Jpeg2000TgtNode *zerobits; Jpeg2000TgtNode *cblkincl; Jpeg2000Cblk *cblk; int decoded_layers; - uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} } Jpeg2000Prec; // precinct typedef struct Jpeg2000Band { - uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} uint16_t log2_cblk_width, log2_cblk_height; int i_stepsize; // quantization stepsize float f_stepsize; // quantization stepsize @@ -197,8 +197,8 @@ typedef struct Jpeg2000ResLevel { uint8_t nbands; - uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} - uint16_t num_precincts_x, num_precincts_y; // number of precincts in x/y direction + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + int num_precincts_x, num_precincts_y; // number of precincts in x/y direction uint8_t log2_prec_width, log2_prec_height; // exponent of precinct size Jpeg2000Band *band; } Jpeg2000ResLevel; // resolution level @@ -208,8 +208,8 @@ DWTContext dwt; float *f_data; int *i_data; - uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -- can be reduced with lowres option - uint16_t coord_o[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -- original values from jpeg2000 headers + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -- can be reduced with lowres option + int coord_o[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -- original values from jpeg2000 headers } Jpeg2000Component; /* misc tools */
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/jpeg2000dec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/jpeg2000dec.c
Changed
@@ -30,6 +30,7 @@ #include "libavutil/attributes.h" #include "libavutil/avassert.h" #include "libavutil/common.h" +#include "libavutil/imgutils.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "avcodec.h" @@ -279,6 +280,10 @@ avpriv_request_sample(s->avctx, "Support for image offsets"); return AVERROR_PATCHWELCOME; } + if (av_image_check_size(s->width, s->height, 0, s->avctx)) { + avpriv_request_sample(s->avctx, "Large Dimensions"); + return AVERROR_PATCHWELCOME; + } if (ncomponents <= 0) { av_log(s->avctx, AV_LOG_ERROR, "Invalid number of components: %d\n", @@ -826,10 +831,10 @@ if (!tile->comp) return AVERROR(ENOMEM); - tile->coord[0][0] = FFMAX(tilex * s->tile_width + s->tile_offset_x, s->image_offset_x); - tile->coord[0][1] = FFMIN((tilex + 1) * s->tile_width + s->tile_offset_x, s->width); - tile->coord[1][0] = FFMAX(tiley * s->tile_height + s->tile_offset_y, s->image_offset_y); - tile->coord[1][1] = FFMIN((tiley + 1) * s->tile_height + s->tile_offset_y, s->height); + tile->coord[0][0] = av_clip(tilex * (int64_t)s->tile_width + s->tile_offset_x, s->image_offset_x, s->width); + tile->coord[0][1] = av_clip((tilex + 1) * (int64_t)s->tile_width + s->tile_offset_x, s->image_offset_x, s->width); + tile->coord[1][0] = av_clip(tiley * (int64_t)s->tile_height + s->tile_offset_y, s->image_offset_y, s->height); + tile->coord[1][1] = av_clip((tiley + 1) * (int64_t)s->tile_height + s->tile_offset_y, s->image_offset_y, s->height); for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; @@ -1809,8 +1814,10 @@ av_freep(&s->tile); memset(s->codsty, 0, sizeof(s->codsty)); memset(s->qntsty, 0, sizeof(s->qntsty)); + memset(s->properties, 0, sizeof(s->properties)); memset(&s->poc , 0, sizeof(s->poc)); s->numXtiles = s->numYtiles = 0; + s->ncomponents = 0; } static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) @@ -1868,6 +1875,10 @@ switch (marker) { case JPEG2000_SIZ: + if (s->ncomponents) { + av_log(s->avctx, AV_LOG_ERROR, "Duplicate SIZ\n"); + return AVERROR_INVALIDDATA; + } ret = get_siz(s); if (!s->tile) s->numXtiles = s->numYtiles = 0;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/jpeg2000dwt.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/jpeg2000dwt.c
Changed
@@ -534,7 +534,7 @@ data[i] = (data[i] + ((1<<I_PRESHIFT)>>1)) >> I_PRESHIFT; } -int ff_jpeg2000_dwt_init(DWTContext *s, uint16_t border[2][2], +int ff_jpeg2000_dwt_init(DWTContext *s, int border[2][2], int decomp_levels, int type) { int i, j, lev = decomp_levels, maxlen, @@ -623,7 +623,7 @@ #define MAX_W 256 -static int test_dwt(int *array, int *ref, uint16_t border[2][2], int decomp_levels, int type, int max_diff) { +static int test_dwt(int *array, int *ref, int border[2][2], int decomp_levels, int type, int max_diff) { int ret, j; DWTContext s1={{{0}}}, *s= &s1; int64_t err2 = 0; @@ -662,7 +662,7 @@ return 0; } -static int test_dwtf(float *array, float *ref, uint16_t border[2][2], int decomp_levels, float max_diff) { +static int test_dwtf(float *array, float *ref, int border[2][2], int decomp_levels, float max_diff) { int ret, j; DWTContext s1={{{0}}}, *s= &s1; double err2 = 0; @@ -708,7 +708,7 @@ int main(void) { AVLFG prng; int i,j; - uint16_t border[2][2]; + int border[2][2]; int ret, decomp_levels; av_lfg_init(&prng, 1);
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/jpeg2000dwt.h -> ffmpeg-2.8.3.tar.bz2/libavcodec/jpeg2000dwt.h
Changed
@@ -42,7 +42,7 @@ typedef struct DWTContext { /// line lengths { horizontal, vertical } in consecutive decomposition levels - uint16_t linelen[FF_DWT_MAX_DECLVLS][2]; + int linelen[FF_DWT_MAX_DECLVLS][2]; uint8_t mod[FF_DWT_MAX_DECLVLS][2]; ///< coordinates (x0, y0) of decomp. levels mod 2 uint8_t ndeclevels; ///< number of decomposition levels uint8_t type; ///< 0 for 9/7; 1 for 5/3 @@ -57,7 +57,7 @@ * @param decomp_levels number of decomposition levels * @param type 0 for DWT 9/7; 1 for DWT 5/3 */ -int ff_jpeg2000_dwt_init(DWTContext *s, uint16_t border[2][2], +int ff_jpeg2000_dwt_init(DWTContext *s, int border[2][2], int decomp_levels, int type); int ff_dwt_encode(DWTContext *s, void *t);
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/microdvddec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/microdvddec.c
Changed
@@ -164,6 +164,8 @@ /* Position */ case 'P': + if (!*s) + break; tag.persistent = MICRODVD_PERSISTENT_ON; tag.data1 = (*s++ == '1'); if (*s != '}')
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/mips/h264dsp_init_mips.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/mips/h264dsp_init_mips.c
Changed
@@ -82,11 +82,33 @@ #endif // #if HAVE_MSA #if HAVE_MMI -static av_cold void h264dsp_init_mmi(H264DSPContext * c, - const int bit_depth, - const int chroma_format_idc) +static av_cold void h264dsp_init_mmi(H264DSPContext * c, const int bit_depth, + const int chroma_format_idc) { if (bit_depth == 8) { + c->h264_add_pixels4_clear = ff_h264_add_pixels4_8_mmi; + c->h264_idct_add = ff_h264_idct_add_8_mmi; + c->h264_idct8_add = ff_h264_idct8_add_8_mmi; + c->h264_idct_dc_add = ff_h264_idct_dc_add_8_mmi; + c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmi; + c->h264_idct_add16 = ff_h264_idct_add16_8_mmi; + c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmi; + c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmi; + + if (chroma_format_idc <= 1) + c->h264_idct_add8 = ff_h264_idct_add8_8_mmi; + else + c->h264_idct_add8 = ff_h264_idct_add8_422_8_mmi; + + c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_8_mmi; + + if (chroma_format_idc <= 1) + c->h264_chroma_dc_dequant_idct = + ff_h264_chroma_dc_dequant_idct_8_mmi; + else + c->h264_chroma_dc_dequant_idct = + ff_h264_chroma422_dc_dequant_idct_8_mmi; + c->weight_h264_pixels_tab[0] = ff_h264_weight_pixels16_8_mmi; c->weight_h264_pixels_tab[1] = ff_h264_weight_pixels8_8_mmi; c->weight_h264_pixels_tab[2] = ff_h264_weight_pixels4_8_mmi; @@ -94,6 +116,21 @@ c->biweight_h264_pixels_tab[0] = ff_h264_biweight_pixels16_8_mmi; c->biweight_h264_pixels_tab[1] = ff_h264_biweight_pixels8_8_mmi; c->biweight_h264_pixels_tab[2] = ff_h264_biweight_pixels4_8_mmi; + + c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_mmi; + c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmi; + + if (chroma_format_idc <= 1) { + c->h264_h_loop_filter_chroma = + ff_deblock_h_chroma_8_mmi; + c->h264_h_loop_filter_chroma_intra = + ff_deblock_h_chroma_intra_8_mmi; + } + + c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_mmi; + c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmi; + c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_mmi; + c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmi; } } #endif /* HAVE_MMI */
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/mips/h264dsp_mips.h -> ffmpeg-2.8.3.tar.bz2/libavcodec/mips/h264dsp_mips.h
Changed
@@ -319,6 +319,26 @@ void ff_vp8_pred16x16_127_dc_8_msa(uint8_t *src, ptrdiff_t stride); void ff_vp8_pred16x16_129_dc_8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_add_pixels4_8_mmi(uint8_t *_dst, int16_t *_src, int stride); +void ff_h264_idct_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct8_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct_add16_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct_add16intra_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct8_add4_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct_add8_8_mmi(uint8_t **dest, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct_add8_422_8_mmi(uint8_t **dest, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, int16_t *input, + int qmul); +void ff_h264_chroma_dc_dequant_idct_8_mmi(int16_t *block, int qmul); +void ff_h264_chroma422_dc_dequant_idct_8_mmi(int16_t *block, int qmul); + void ff_h264_weight_pixels16_8_mmi(uint8_t *block, int stride, int height, int log2_denom, int weight, int offset); void ff_h264_biweight_pixels16_8_mmi(uint8_t *dst, uint8_t *src, @@ -335,6 +355,27 @@ int stride, int height, int log2_denom, int weightd, int weights, int offset); +void ff_deblock_v_chroma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_v_chroma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_h_chroma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_h_chroma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_v_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_v_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_h_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_h_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_v8_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_v8_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); + void ff_put_h264_qpel16_mc00_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t dst_stride); void ff_put_h264_qpel16_mc10_mmi(uint8_t *dst, const uint8_t *src,
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/mips/h264dsp_mmi.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/mips/h264dsp_mmi.c
Changed
@@ -4,6 +4,7 @@ * Copyright (c) 2015 Loongson Technology Corporation Limited * Copyright (c) 2015 Zhou Xiaoyong <zhouxiaoyong@loongson.cn> * Zhang Shuangshuang <zhangshuangshuang@ict.ac.cn> + * Heiher <r@hev.cc> * * This file is part of FFmpeg. * @@ -25,6 +26,1011 @@ #include "libavcodec/bit_depth_template.c" #include "h264dsp_mips.h" +void ff_h264_add_pixels4_8_mmi(uint8_t *dst, int16_t *src, int stride) +{ + __asm__ volatile ( + "xor $f0, $f0, $f0 \r\n" + "ldc1 $f2, 0(%[src]) \r\n" + "ldc1 $f4, 8(%[src]) \r\n" + "ldc1 $f6, 16(%[src]) \r\n" + "ldc1 $f8, 24(%[src]) \r\n" + "lwc1 $f10, 0(%[dst0]) \r\n" + "lwc1 $f12, 0(%[dst1]) \r\n" + "lwc1 $f14, 0(%[dst2]) \r\n" + "lwc1 $f16, 0(%[dst3]) \r\n" + "punpcklbh $f10, $f10, $f0 \r\n" + "punpcklbh $f12, $f12, $f0 \r\n" + "punpcklbh $f14, $f14, $f0 \r\n" + "punpcklbh $f16, $f16, $f0 \r\n" + "paddh $f2, $f2, $f10 \r\n" + "paddh $f4, $f4, $f12 \r\n" + "paddh $f6, $f6, $f14 \r\n" + "paddh $f8, $f8, $f16 \r\n" + "packushb $f2, $f2, $f0 \r\n" + "packushb $f4, $f4, $f0 \r\n" + "packushb $f6, $f6, $f0 \r\n" + "packushb $f8, $f8, $f0 \r\n" + "swc1 $f2, 0(%[dst0]) \r\n" + "swc1 $f4, 0(%[dst1]) \r\n" + "swc1 $f6, 0(%[dst2]) \r\n" + "swc1 $f8, 0(%[dst3]) \r\n" + ::[dst0]"r"(dst),[dst1]"r"(dst+stride),[dst2]"r"(dst+2*stride), + [dst3]"r"(dst+3*stride),[src]"r"(src) + : "$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14","$f16" + ); + + memset(src, 0, 32); +} + +void ff_h264_idct_add_8_mmi(uint8_t *dst, int16_t *block, int stride) +{ + __asm__ volatile ( + "dli $8, 1 \r\n" + "ldc1 $f0, 0(%[block]) \r\n" + "dmtc1 $8, $f16 \r\n" + "ldc1 $f2, 8(%[block]) \r\n" + "dli $8, 6 \r\n" + "ldc1 $f4, 16(%[block]) \r\n" + "dmtc1 $8, $f18 \r\n" + "psrah $f8, $f2, $f16 \r\n" + "ldc1 $f6, 24(%[block]) \r\n" + "psrah $f10, $f6, $f16 \r\n" + "psubh $f8, $f8, $f6 \r\n" + "paddh $f10, $f10, $f2 \r\n" + "paddh $f20, $f4, $f0 \r\n" + "psubh $f0, $f0, $f4 \r\n" + "paddh $f22, $f10, $f20 \r\n" + "psubh $f4, $f20, $f10 \r\n" + "paddh $f20, $f8, $f0 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "punpckhhw $f2, $f22, $f20 \r\n" + "punpcklhw $f10, $f22, $f20 \r\n" + "punpckhhw $f8, $f0, $f4 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhwd $f4, $f10, $f0 \r\n" + "punpcklwd $f10, $f10, $f0 \r\n" + "punpcklwd $f20, $f2, $f8 \r\n" + "punpckhwd $f0, $f2, $f8 \r\n" + "paddh $f10, $f10, %[ff_pw_32] \r\n" + "psrah $f8, $f4, $f16 \r\n" + "psrah $f6, $f0, $f16 \r\n" + "psubh $f8, $f8, $f0 \r\n" + "paddh $f6, $f6, $f4 \r\n" + "paddh $f2, $f20, $f10 \r\n" + "psubh $f10, $f10, $f20 \r\n" + "paddh $f20, $f6, $f2 \r\n" + "psubh $f2, $f2, $f6 \r\n" + "paddh $f22, $f8, $f10 \r\n" + "xor $f14, $f14, $f14 \r\n" + "psubh $f10, $f10, $f8 \r\n" + "sdc1 $f14, 0(%[block]) \r\n" + "sdc1 $f14, 8(%[block]) \r\n" + "sdc1 $f14, 16(%[block]) \r\n" + "sdc1 $f14, 24(%[block]) \r\n" + "lwc1 $f4, 0(%[dst]) \r\n" + "psrah $f6, $f20, $f18 \r\n" + "gslwxc1 $f0, 0(%[dst], %[stride]) \r\n" + "psrah $f8, $f22, $f18 \r\n" + "punpcklbh $f4, $f4, $f14 \r\n" + "punpcklbh $f0, $f0, $f14 \r\n" + "paddh $f4, $f4, $f6 \r\n" + "paddh $f0, $f0, $f8 \r\n" + "packushb $f4, $f4, $f14 \r\n" + "packushb $f0, $f0, $f14 \r\n" + "swc1 $f4, 0(%[dst]) \r\n" + "gsswxc1 $f0, 0(%[dst], %[stride]) \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "lwc1 $f4, 0(%[dst]) \r\n" + "psrah $f10, $f10, $f18 \r\n" + "gslwxc1 $f0, 0(%[dst], %[stride]) \r\n" + "psrah $f2, $f2, $f18 \r\n" + "punpcklbh $f4, $f4, $f14 \r\n" + "punpcklbh $f0, $f0, $f14 \r\n" + "paddh $f4, $f4, $f10 \r\n" + "paddh $f0, $f0, $f2 \r\n" + "packushb $f4, $f4, $f14 \r\n" + "swc1 $f4, 0(%[dst]) \r\n" + "packushb $f0, $f0, $f14 \r\n" + "gsswxc1 $f0, 0(%[dst], %[stride]) \r\n" + ::[dst]"r"(dst),[block]"r"(block),[stride]"r"((uint64_t)stride), + [ff_pw_32]"f"(ff_pw_32) + : "$8","$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14","$f16", + "$f18","$f20","$f22" + ); + + memset(block, 0, 32); +} + +void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) +{ + __asm__ volatile ( + "lhu $10, 0x0(%[block]) \r\n" + "daddiu $29, $29, -0x20 \r\n" + "daddiu $10, $10, 0x20 \r\n" + "ldc1 $f2, 0x10(%[block]) \r\n" + "sh $10, 0x0(%[block]) \r\n" + "ldc1 $f4, 0x20(%[block]) \r\n" + "dli $10, 0x1 \r\n" + "ldc1 $f6, 0x30(%[block]) \r\n" + "dmtc1 $10, $f16 \r\n" + "ldc1 $f10, 0x50(%[block]) \r\n" + "ldc1 $f12, 0x60(%[block]) \r\n" + "ldc1 $f14, 0x70(%[block]) \r\n" + "mov.d $f0, $f2 \r\n" + "psrah $f2, $f2, $f16 \r\n" + "psrah $f8, $f10, $f16 \r\n" + "paddh $f2, $f2, $f0 \r\n" + "paddh $f8, $f8, $f10 \r\n" + "paddh $f2, $f2, $f10 \r\n" + "paddh $f8, $f8, $f14 \r\n" + "paddh $f2, $f2, $f6 \r\n" + "psubh $f8, $f8, $f0 \r\n" + "psubh $f0, $f0, $f6 \r\n" + "psubh $f10, $f10, $f6 \r\n" + "psrah $f6, $f6, $f16 \r\n" + "paddh $f0, $f0, $f14 \r\n" + "psubh $f10, $f10, $f14 \r\n" + "psrah $f14, $f14, $f16 \r\n" + "psubh $f0, $f0, $f6 \r\n" + "dli $10, 0x2 \r\n" + "psubh $f10, $f10, $f14 \r\n" + "dmtc1 $10, $f18 \r\n" + "mov.d $f14, $f2 \r\n" + "psrah $f2, $f2, $f18 \r\n" + "psrah $f6, $f8, $f18 \r\n" + "paddh $f6, $f6, $f0 \r\n" + "psrah $f0, $f0, $f18 \r\n" + "paddh $f2, $f2, $f10 \r\n" + "psrah $f10, $f10, $f18 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "psubh $f14, $f14, $f10 \r\n" + "mov.d $f10, $f12 \r\n" + "psrah $f12, $f12, $f16 \r\n" + "psrah $f8, $f4, $f16 \r\n" + "paddh $f12, $f12, $f4 \r\n" + "psubh $f8, $f8, $f10 \r\n" + "ldc1 $f4, 0x0(%[block]) \r\n" + "ldc1 $f10, 0x40(%[block]) \r\n" + "paddh $f10, $f10, $f4 \r\n" + "paddh $f4, $f4, $f4 \r\n" + "paddh $f12, $f12, $f10 \r\n" + "psubh $f4, $f4, $f10 \r\n" + "paddh $f10, $f10, $f10 \r\n" + "paddh $f8, $f8, $f4 \r\n" + "psubh $f10, $f10, $f12 \r\n" + "paddh $f4, $f4, $f4 \r\n" + "paddh $f14, $f14, $f12 \r\n" + "psubh $f4, $f4, $f8 \r\n" + "paddh $f12, $f12, $f12 \r\n" + "paddh $f0, $f0, $f8 \r\n" + "psubh $f12, $f12, $f14 \r\n" + "paddh $f8, $f8, $f8 \r\n" + "paddh $f6, $f6, $f4 \r\n" + "psubh $f8, $f8, $f0 \r\n" + "paddh $f4, $f4, $f4 \r\n" + "paddh $f2, $f2, $f10 \r\n" + "psubh $f4, $f4, $f6 \r\n" + "paddh $f10, $f10, $f10 \r\n" + "sdc1 $f12, 0x0(%[block]) \r\n" + "psubh $f10, $f10, $f2 \r\n" + "punpckhhw $f12, $f14, $f0 \r\n" + "punpcklhw $f14, $f14, $f0 \r\n" + "punpckhhw $f0, $f6, $f2 \r\n" + "punpcklhw $f6, $f6, $f2 \r\n" + "punpckhwd $f2, $f14, $f6 \r\n" + "punpcklwd $f14, $f14, $f6 \r\n" + "punpckhwd $f6, $f12, $f0 \r\n" + "punpcklwd $f12, $f12, $f0 \r\n" + "ldc1 $f0, 0x0(%[block]) \r\n" + "sdc1 $f14, 0x0($29) \r\n" + "sdc1 $f2, 0x10($29) \r\n" + "dmfc1 $8, $f12 \r\n" + "dmfc1 $11, $f6 \r\n" + "punpckhhw $f6, $f10, $f4 \r\n" + "punpcklhw $f10, $f10, $f4 \r\n" + "punpckhhw $f4, $f8, $f0 \r\n" + "punpcklhw $f8, $f8, $f0 \r\n" + "punpckhwd $f0, $f10, $f8 \r\n" + "punpcklwd $f10, $f10, $f8 \r\n" + "punpckhwd $f8, $f6, $f4 \r\n" + "punpcklwd $f6, $f6, $f4 \r\n" + "sdc1 $f10, 0x8($29) \r\n" + "sdc1 $f0, 0x18($29) \r\n" + "dmfc1 $9, $f6 \r\n" + "dmfc1 $12, $f8 \r\n" + "ldc1 $f2, 0x18(%[block]) \r\n" + "ldc1 $f12, 0x28(%[block]) \r\n" + "ldc1 $f4, 0x38(%[block]) \r\n" + "ldc1 $f0, 0x58(%[block]) \r\n" + "ldc1 $f6, 0x68(%[block]) \r\n" + "ldc1 $f8, 0x78(%[block]) \r\n" + "mov.d $f14, $f2 \r\n" + "psrah $f10, $f0, $f16 \r\n" + "psrah $f2, $f2, $f16 \r\n" + "paddh $f10, $f10, $f0 \r\n" + "paddh $f2, $f2, $f14 \r\n" + "paddh $f10, $f10, $f8 \r\n" + "paddh $f2, $f2, $f0 \r\n" + "psubh $f10, $f10, $f14 \r\n" + "paddh $f2, $f2, $f4 \r\n" + "psubh $f14, $f14, $f4 \r\n" + "psubh $f0, $f0, $f4 \r\n" + "psrah $f4, $f4, $f16 \r\n" + "paddh $f14, $f14, $f8 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "psrah $f8, $f8, $f16 \r\n" + "psubh $f14, $f14, $f4 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "mov.d $f8, $f2 \r\n" + "psrah $f4, $f10, $f18 \r\n" + "psrah $f2, $f2, $f18 \r\n" + "paddh $f4, $f4, $f14 \r\n" + "psrah $f14, $f14, $f18 \r\n" + "paddh $f2, $f2, $f0 \r\n" + "psrah $f0, $f0, $f18 \r\n" + "psubh $f14, $f14, $f10 \r\n" + "psubh $f8, $f8, $f0 \r\n" + "mov.d $f0, $f6 \r\n" + "psrah $f6, $f6, $f16 \r\n" + "psrah $f10, $f12, $f16 \r\n" + "paddh $f6, $f6, $f12 \r\n" + "psubh $f10, $f10, $f0 \r\n" + "ldc1 $f12, 0x8(%[block]) \r\n" + "ldc1 $f0, 0x48(%[block]) \r\n" + "paddh $f0, $f0, $f12 \r\n" + "paddh $f12, $f12, $f12 \r\n" + "paddh $f6, $f6, $f0 \r\n" + "psubh $f12, $f12, $f0 \r\n" + "paddh $f0, $f0, $f0 \r\n" + "paddh $f10, $f10, $f12 \r\n" + "psubh $f0, $f0, $f6 \r\n" + "paddh $f12, $f12, $f12 \r\n" + "paddh $f8, $f8, $f6 \r\n" + "psubh $f12, $f12, $f10 \r\n" + "paddh $f6, $f6, $f6 \r\n" + "paddh $f14, $f14, $f10 \r\n" + "psubh $f6, $f6, $f8 \r\n" + "paddh $f10, $f10, $f10 \r\n" + "paddh $f4, $f4, $f12 \r\n" + "psubh $f10, $f10, $f14 \r\n" + "paddh $f12, $f12, $f12 \r\n" + "paddh $f2, $f2, $f0 \r\n" + "psubh $f12, $f12, $f4 \r\n" + "paddh $f0, $f0, $f0 \r\n" + "sdc1 $f6, 0x8(%[block]) \r\n" + "psubh $f0, $f0, $f2 \r\n" + "punpckhhw $f6, $f8, $f14 \r\n" + "punpcklhw $f8, $f8, $f14 \r\n" + "punpckhhw $f14, $f4, $f2 \r\n" + "punpcklhw $f4, $f4, $f2 \r\n" + "punpckhwd $f2, $f8, $f4 \r\n" + "punpcklwd $f8, $f8, $f4 \r\n" + "punpckhwd $f4, $f6, $f14 \r\n" + "punpcklwd $f6, $f6, $f14 \r\n" + "ldc1 $f14, 0x8(%[block]) \r\n" + "dmfc1 $13, $f8 \r\n" + "dmfc1 $15, $f2 \r\n" + "mov.d $f24, $f6 \r\n" + "mov.d $f28, $f4 \r\n" + "punpckhhw $f4, $f0, $f12 \r\n" + "punpcklhw $f0, $f0, $f12 \r\n" + "punpckhhw $f12, $f10, $f14 \r\n" + "punpcklhw $f10, $f10, $f14 \r\n" + "punpckhwd $f14, $f0, $f10 \r\n" + "punpcklwd $f0, $f0, $f10 \r\n" + "punpckhwd $f10, $f4, $f12 \r\n" + "punpcklwd $f4, $f4, $f12 \r\n" + "dmfc1 $14, $f0 \r\n" + "mov.d $f22, $f14 \r\n" + "mov.d $f26, $f4 \r\n" + "mov.d $f30, $f10 \r\n" + "daddiu $10, %[dst], 0x4 \r\n" + "dmtc1 $15, $f14 \r\n" + "dmtc1 $11, $f12 \r\n" + "ldc1 $f2, 0x10($29) \r\n" + "dmtc1 $8, $f6 \r\n" + "mov.d $f8, $f2 \r\n" + "psrah $f2, $f2, $f16 \r\n" + "psrah $f0, $f14, $f16 \r\n" + "paddh $f2, $f2, $f8 \r\n" + "paddh $f0, $f0, $f14 \r\n" + "paddh $f2, $f2, $f14 \r\n" + "paddh $f0, $f0, $f28 \r\n" + "paddh $f2, $f2, $f12 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "psubh $f8, $f8, $f12 \r\n" + "psubh $f14, $f14, $f12 \r\n" + "psrah $f12, $f12, $f16 \r\n" + "paddh $f8, $f8, $f28 \r\n" + "psubh $f14, $f14, $f28 \r\n" + "psrah $f10, $f28, $f16 \r\n" + "psubh $f8, $f8, $f12 \r\n" + "psubh $f14, $f14, $f10 \r\n" + "mov.d $f10, $f2 \r\n" + "psrah $f2, $f2, $f18 \r\n" + "psrah $f12, $f0, $f18 \r\n" + "paddh $f2, $f2, $f14 \r\n" + "paddh $f12, $f12, $f8 \r\n" + "psrah $f8, $f8, $f18 \r\n" + "psrah $f14, $f14, $f18 \r\n" + "psubh $f8, $f8, $f0 \r\n" + "psubh $f10, $f10, $f14 \r\n" + "mov.d $f14, $f24 \r\n" + "psrah $f4, $f24, $f16 \r\n" + "psrah $f0, $f6, $f16 \r\n" + "paddh $f4, $f4, $f6 \r\n" + "psubh $f0, $f0, $f14 \r\n" + "ldc1 $f6, 0x0($29) \r\n" + "dmtc1 $13, $f14 \r\n" + "paddh $f14, $f14, $f6 \r\n" + "paddh $f6, $f6, $f6 \r\n" + "paddh $f4, $f4, $f14 \r\n" + "psubh $f6, $f6, $f14 \r\n" + "paddh $f14, $f14, $f14 \r\n" + "paddh $f0, $f0, $f6 \r\n" + "psubh $f14, $f14, $f4 \r\n" + "paddh $f6, $f6, $f6 \r\n" + "paddh $f10, $f10, $f4 \r\n" + "psubh $f6, $f6, $f0 \r\n" + "paddh $f4, $f4, $f4 \r\n" + "paddh $f8, $f8, $f0 \r\n" + "psubh $f4, $f4, $f10 \r\n" + "paddh $f0, $f0, $f0 \r\n" + "paddh $f12, $f12, $f6 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "paddh $f6, $f6, $f6 \r\n" + "paddh $f2, $f2, $f14 \r\n" + "psubh $f6, $f6, $f12 \r\n" + "paddh $f14, $f14, $f14 \r\n" + "sdc1 $f6, 0x0($29) \r\n" + "psubh $f14, $f14, $f2 \r\n" + "sdc1 $f0, 0x10($29) \r\n" + "dmfc1 $8, $f4 \r\n" + "xor $f4, $f4, $f4 \r\n" + "sdc1 $f4, 0x0(%[block]) \r\n" + "sdc1 $f4, 0x8(%[block]) \r\n" + "sdc1 $f4, 0x10(%[block]) \r\n" + "sdc1 $f4, 0x18(%[block]) \r\n" + "sdc1 $f4, 0x20(%[block]) \r\n" + "sdc1 $f4, 0x28(%[block]) \r\n" + "sdc1 $f4, 0x30(%[block]) \r\n" + "sdc1 $f4, 0x38(%[block]) \r\n" + "sdc1 $f4, 0x40(%[block]) \r\n" + "sdc1 $f4, 0x48(%[block]) \r\n" + "sdc1 $f4, 0x50(%[block]) \r\n" + "sdc1 $f4, 0x58(%[block]) \r\n" + "sdc1 $f4, 0x60(%[block]) \r\n" + "sdc1 $f4, 0x68(%[block]) \r\n" + "sdc1 $f4, 0x70(%[block]) \r\n" + "sdc1 $f4, 0x78(%[block]) \r\n" + "dli $11, 0x6 \r\n" + "lwc1 $f6, 0x0(%[dst]) \r\n" + "dmtc1 $11, $f20 \r\n" + "gslwxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "psrah $f10, $f10, $f20 \r\n" + "psrah $f8, $f8, $f20 \r\n" + "punpcklbh $f6, $f6, $f4 \r\n" + "punpcklbh $f0, $f0, $f4 \r\n" + "paddh $f6, $f6, $f10 \r\n" + "paddh $f0, $f0, $f8 \r\n" + "packushb $f6, $f6, $f4 \r\n" + "packushb $f0, $f0, $f4 \r\n" + "swc1 $f6, 0x0(%[dst]) \r\n" + "gsswxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "lwc1 $f6, 0x0(%[dst]) \r\n" + "gslwxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "psrah $f12, $f12, $f20 \r\n" + "psrah $f2, $f2, $f20 \r\n" + "punpcklbh $f6, $f6, $f4 \r\n" + "punpcklbh $f0, $f0, $f4 \r\n" + "paddh $f6, $f6, $f12 \r\n" + "paddh $f0, $f0, $f2 \r\n" + "packushb $f6, $f6, $f4 \r\n" + "packushb $f0, $f0, $f4 \r\n" + "swc1 $f6, 0x0(%[dst]) \r\n" + "gsswxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "ldc1 $f10, 0x0($29) \r\n" + "ldc1 $f8, 0x10($29) \r\n" + "dmtc1 $8, $f12 \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "lwc1 $f6, 0x0(%[dst]) \r\n" + "gslwxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "psrah $f14, $f14, $f20 \r\n" + "psrah $f10, $f10, $f20 \r\n" + "punpcklbh $f6, $f6, $f4 \r\n" + "punpcklbh $f0, $f0, $f4 \r\n" + "paddh $f6, $f6, $f14 \r\n" + "paddh $f0, $f0, $f10 \r\n" + "packushb $f6, $f6, $f4 \r\n" + "packushb $f0, $f0, $f4 \r\n" + "swc1 $f6, 0x0(%[dst]) \r\n" + "gsswxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "daddu %[dst], %[dst], %[stride] \r\n" + "lwc1 $f6, 0x0(%[dst]) \r\n" + "gslwxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "psrah $f8, $f8, $f20 \r\n" + "psrah $f12, $f12, $f20 \r\n" + "punpcklbh $f6, $f6, $f4 \r\n" + "punpcklbh $f0, $f0, $f4 \r\n" + "paddh $f6, $f6, $f8 \r\n" + "paddh $f0, $f0, $f12 \r\n" + "packushb $f6, $f6, $f4 \r\n" + "packushb $f0, $f0, $f4 \r\n" + "swc1 $f6, 0x0(%[dst]) \r\n" + "gsswxc1 $f0, 0x0(%[dst], %[stride]) \r\n" + "dmtc1 $12, $f2 \r\n" + "dmtc1 $9, $f12 \r\n" + "ldc1 $f8, 0x18($29) \r\n" + "mov.d $f10, $f8 \r\n" + "psrah $f8, $f8, $f16 \r\n" + "psrah $f14, $f22, $f16 \r\n" + "paddh $f14, $f14, $f22 \r\n" + "paddh $f8, $f8, $f10 \r\n" + "paddh $f14, $f14, $f30 \r\n" + "paddh $f8, $f8, $f22 \r\n" + "psubh $f14, $f14, $f10 \r\n" + "paddh $f8, $f8, $f2 \r\n" + "psubh $f10, $f10, $f2 \r\n" + "psubh $f6, $f22, $f2 \r\n" + "psrah $f2, $f2, $f16 \r\n" + "paddh $f10, $f10, $f30 \r\n" + "psubh $f6, $f6, $f30 \r\n" + "psrah $f4, $f30, $f16 \r\n" + "psubh $f10, $f10, $f2 \r\n" + "psubh $f6, $f6, $f4 \r\n" + "mov.d $f4, $f8 \r\n" + "psrah $f8, $f8, $f18 \r\n" + "psrah $f2, $f14, $f18 \r\n" + "paddh $f8, $f8, $f6 \r\n" + "paddh $f2, $f2, $f10 \r\n" + "psrah $f10, $f10, $f18 \r\n" + "psrah $f6, $f6, $f18 \r\n" + "psubh $f10, $f10, $f14 \r\n" + "psubh $f4, $f4, $f6 \r\n" + "mov.d $f6, $f26 \r\n" + "psrah $f0, $f26, $f16 \r\n" + "psrah $f14, $f12, $f16 \r\n" + "paddh $f0, $f0, $f12 \r\n" + "psubh $f14, $f14, $f6 \r\n" + "ldc1 $f12, 0x8($29) \r\n" + "dmtc1 $14, $f6 \r\n" + "paddh $f6, $f6, $f12 \r\n" + "paddh $f12, $f12, $f12 \r\n" + "paddh $f0, $f0, $f6 \r\n" + "psubh $f12, $f12, $f6 \r\n" + "paddh $f6, $f6, $f6 \r\n" + "paddh $f14, $f14, $f12 \r\n" + "psubh $f6, $f6, $f0 \r\n" + "paddh $f12, $f12, $f12 \r\n" + "paddh $f4, $f4, $f0 \r\n" + "psubh $f12, $f12, $f14 \r\n" + "paddh $f0, $f0, $f0 \r\n" + "paddh $f10, $f10, $f14 \r\n" + "psubh $f0, $f0, $f4 \r\n" + "paddh $f14, $f14, $f14 \r\n" + "paddh $f2, $f2, $f12 \r\n" + "psubh $f14, $f14, $f10 \r\n" + "paddh $f12, $f12, $f12 \r\n" + "paddh $f8, $f8, $f6 \r\n" + "psubh $f12, $f12, $f2 \r\n" + "paddh $f6, $f6, $f6 \r\n" + "sdc1 $f12, 0x8($29) \r\n" + "psubh $f6, $f6, $f8 \r\n" + "sdc1 $f14, 0x18($29) \r\n" + "dmfc1 $9, $f0 \r\n" + "xor $f0, $f0, $f0 \r\n" + "lwc1 $f12, 0x0($10) \r\n" + "gslwxc1 $f14, 0x0($10, %[stride]) \r\n" + "psrah $f4, $f4, $f20 \r\n" + "psrah $f10, $f10, $f20 \r\n" + "punpcklbh $f12, $f12, $f0 \r\n" + "punpcklbh $f14, $f14, $f0 \r\n" + "paddh $f12, $f12, $f4 \r\n" + "paddh $f14, $f14, $f10 \r\n" + "packushb $f12, $f12, $f0 \r\n" + "packushb $f14, $f14, $f0 \r\n" + "swc1 $f12, 0x0($10) \r\n" + "gsswxc1 $f14, 0x0($10, %[stride]) \r\n" + "daddu $10, $10, %[stride] \r\n" + "daddu $10, $10, %[stride] \r\n" + "lwc1 $f12, 0x0($10) \r\n" + "gslwxc1 $f14, 0x0($10, %[stride]) \r\n" + "psrah $f2, $f2, $f20 \r\n" + "psrah $f8, $f8, $f20 \r\n" + "punpcklbh $f12, $f12, $f0 \r\n" + "punpcklbh $f14, $f14, $f0 \r\n" + "paddh $f12, $f12, $f2 \r\n" + "paddh $f14, $f14, $f8 \r\n" + "packushb $f12, $f12, $f0 \r\n" + "packushb $f14, $f14, $f0 \r\n" + "swc1 $f12, 0x0($10) \r\n" + "gsswxc1 $f14, 0x0($10, %[stride]) \r\n" + "ldc1 $f4, 0x8($29) \r\n" + "ldc1 $f10, 0x18($29) \r\n" + "daddu $10, $10, %[stride] \r\n" + "dmtc1 $9, $f2 \r\n" + "daddu $10, $10, %[stride] \r\n" + "lwc1 $f12, 0x0($10) \r\n" + "gslwxc1 $f14, 0x0($10, %[stride]) \r\n" + "psrah $f6, $f6, $f20 \r\n" + "psrah $f4, $f4, $f20 \r\n" + "punpcklbh $f12, $f12, $f0 \r\n" + "punpcklbh $f14, $f14, $f0 \r\n" + "paddh $f12, $f12, $f6 \r\n" + "paddh $f14, $f14, $f4 \r\n" + "packushb $f12, $f12, $f0 \r\n" + "packushb $f14, $f14, $f0 \r\n" + "swc1 $f12, 0x0($10) \r\n" + "gsswxc1 $f14, 0x0($10, %[stride]) \r\n" + "daddu $10, $10, %[stride] \r\n" + "daddu $10, $10, %[stride] \r\n" + "lwc1 $f12, 0x0($10) \r\n" + "gslwxc1 $f14, 0x0($10, %[stride]) \r\n" + "psrah $f10, $f10, $f20 \r\n" + "psrah $f2, $f2, $f20 \r\n" + "punpcklbh $f12, $f12, $f0 \r\n" + "punpcklbh $f14, $f14, $f0 \r\n" + "paddh $f12, $f12, $f10 \r\n" + "paddh $f14, $f14, $f2 \r\n" + "packushb $f12, $f12, $f0 \r\n" + "packushb $f14, $f14, $f0 \r\n" + "swc1 $f12, 0x0($10) \r\n" + "gsswxc1 $f14, 0x0($10, %[stride]) \r\n" + "daddiu $29, $29, 0x20 \r\n" + ::[dst]"r"(dst),[block]"r"(block),[stride]"r"((uint64_t)stride) + :"$8","$9","$10","$11","$12","$13","$14","$15","$29","$f0","$f2","$f4", + "$f8","$f10","$f12","$f14","$f16","$f18","$f20","$f22","$f24","$f26", + "$f28","$f30" + ); + + memset(block, 0, 128); +} + +void ff_h264_idct_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride) +{ + __asm__ volatile ( + "lh $8, 0x0(%[block]) \r\n" + "sd $0, 0x0(%[block]) \r\n" + "daddiu $8, $8, 0x20 \r\n" + "daddu $10, %[stride], %[stride] \r\n" + "dsra $8, $8, 0x6 \r\n" + "xor $f2, $f2, $f2 \r\n" + "mtc1 $8, $f0 \r\n" + "pshufh $f0, $f0, $f2 \r\n" + "daddu $8, $10, %[stride] \r\n" + "psubh $f2, $f2, $f0 \r\n" + "packushb $f0, $f0, $f0 \r\n" + "packushb $f2, $f2, $f2 \r\n" + "lwc1 $f4, 0x0(%[dst]) \r\n" + "gslwxc1 $f6, 0x0(%[dst], %[stride]) \r\n" + "gslwxc1 $f8, 0x0(%[dst], $10) \r\n" + "gslwxc1 $f10, 0x0(%[dst], $8) \r\n" + "paddusb $f4, $f4, $f0 \r\n" + "paddusb $f6, $f6, $f0 \r\n" + "paddusb $f8, $f8, $f0 \r\n" + "paddusb $f10, $f10, $f0 \r\n" + "psubusb $f4, $f4, $f2 \r\n" + "psubusb $f6, $f6, $f2 \r\n" + "psubusb $f8, $f8, $f2 \r\n" + "psubusb $f10, $f10, $f2 \r\n" + "swc1 $f4, 0x0(%[dst]) \r\n" + "gsswxc1 $f6, 0x0(%[dst], %[stride]) \r\n" + "gsswxc1 $f8, 0x0(%[dst], $10) \r\n" + "gsswxc1 $f10, 0x0(%[dst], $8) \r\n" + ::[dst]"r"(dst),[block]"r"(block),[stride]"r"((uint64_t)stride) + : "$8","$10","$f0","$f2","$f4","$f6","$f8","$f10" + ); +} + +void ff_h264_idct8_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride) +{ + __asm__ volatile ( + "lh $8, 0x0(%[block]) \r\n" + "sd $0, 0x0(%[block]) \r\n" + "daddiu $8, $8, 0x20 \r\n" + "daddu $10, %[stride], %[stride] \r\n" + "dsra $8, $8, 0x6 \r\n" + "xor $f2, $f2, $f2 \r\n" + "mtc1 $8, $f0 \r\n" + "pshufh $f0, $f0, $f2 \r\n" + "daddu $8, $10, %[stride] \r\n" + "psubh $f2, $f2, $f0 \r\n" + "packushb $f0, $f0, $f0 \r\n" + "packushb $f2, $f2, $f2 \r\n" + "ldc1 $f4, 0x0(%[dst]) \r\n" + "gsldxc1 $f6, 0x0(%[dst], %[stride]) \r\n" + "gsldxc1 $f8, 0x0(%[dst], $10) \r\n" + "gsldxc1 $f10, 0x0(%[dst], $8) \r\n" + "paddusb $f4, $f4, $f0 \r\n" + "paddusb $f6, $f6, $f0 \r\n" + "paddusb $f8, $f8, $f0 \r\n" + "paddusb $f10, $f10, $f0 \r\n" + "psubusb $f4, $f4, $f2 \r\n" + "psubusb $f6, $f6, $f2 \r\n" + "psubusb $f8, $f8, $f2 \r\n" + "psubusb $f10, $f10, $f2 \r\n" + "sdc1 $f4, 0x0(%[dst]) \r\n" + "gssdxc1 $f6, 0x0(%[dst], %[stride]) \r\n" + "gssdxc1 $f8, 0x0(%[dst], $10) \r\n" + "daddu $9, $10, $10 \r\n" + "gssdxc1 $f10, 0x0(%[dst], $8) \r\n" + "daddu %[dst], %[dst], $9 \r\n" + "ldc1 $f4, 0x0(%[dst]) \r\n" + "gsldxc1 $f6, 0x0(%[dst], %[stride]) \r\n" + "gsldxc1 $f8, 0x0(%[dst], $10) \r\n" + "gsldxc1 $f10, 0x0(%[dst], $8) \r\n" + "paddusb $f4, $f4, $f0 \r\n" + "paddusb $f6, $f6, $f0 \r\n" + "paddusb $f8, $f8, $f0 \r\n" + "paddusb $f10, $f10, $f0 \r\n" + "psubusb $f4, $f4, $f2 \r\n" + "psubusb $f6, $f6, $f2 \r\n" + "psubusb $f8, $f8, $f2 \r\n" + "psubusb $f10, $f10, $f2 \r\n" + "sdc1 $f4, 0x0(%[dst]) \r\n" + "gssdxc1 $f6, 0x0(%[dst], %[stride]) \r\n" + "gssdxc1 $f8, 0x0(%[dst], $10) \r\n" + "gssdxc1 $f10, 0x0(%[dst], $8) \r\n" + ::[dst]"r"(dst),[block]"r"(block),[stride]"r"((uint64_t)stride) + : "$8","$9","$10","$f0","$f2","$f4","$f6","$f8","$f10" + ); +} + +void ff_h264_idct_add16_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]) +{ + int i; + for(i=0; i<16; i++){ + int nnz = nnzc[ scan8[i] ]; + if(nnz){ + if(nnz==1 && ((int16_t*)block)[i*16]) + ff_h264_idct_dc_add_8_mmi(dst + block_offset[i], block + i*16, + stride); + else + ff_h264_idct_add_8_mmi(dst + block_offset[i], block + i*16, + stride); + } + } +} + +void ff_h264_idct_add16intra_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]) +{ + int i; + for(i=0; i<16; i++){ + if(nnzc[ scan8[i] ]) + ff_h264_idct_add_8_mmi(dst + block_offset[i], block + i*16, stride); + else if(((int16_t*)block)[i*16]) + ff_h264_idct_dc_add_8_mmi(dst + block_offset[i], block + i*16, + stride); + } +} + +void ff_h264_idct8_add4_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]) +{ + int i; + for(i=0; i<16; i+=4){ + int nnz = nnzc[ scan8[i] ]; + if(nnz){ + if(nnz==1 && ((int16_t*)block)[i*16]) + ff_h264_idct8_dc_add_8_mmi(dst + block_offset[i], + block + i*16, stride); + else + ff_h264_idct8_add_8_mmi(dst + block_offset[i], block + i*16, + stride); + } + } +} + +void ff_h264_idct_add8_8_mmi(uint8_t **dest, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]) +{ + int i, j; + for(j=1; j<3; j++){ + for(i=j*16; i<j*16+4; i++){ + if(nnzc[ scan8[i] ]) + ff_h264_idct_add_8_mmi(dest[j-1] + block_offset[i], + block + i*16, stride); + else if(((int16_t*)block)[i*16]) + ff_h264_idct_dc_add_8_mmi(dest[j-1] + block_offset[i], + block + i*16, stride); + } + } +} + +void ff_h264_idct_add8_422_8_mmi(uint8_t **dest, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]) +{ + int i, j; + + for(j=1; j<3; j++){ + for(i=j*16; i<j*16+4; i++){ + if(nnzc[ scan8[i] ]) + ff_h264_idct_add_8_mmi(dest[j-1] + block_offset[i], + block + i*16, stride); + else if(((int16_t*)block)[i*16]) + ff_h264_idct_dc_add_8_mmi(dest[j-1] + block_offset[i], + block + i*16, stride); + } + } + + for(j=1; j<3; j++){ + for(i=j*16+4; i<j*16+8; i++){ + if(nnzc[ scan8[i+4] ]) + ff_h264_idct_add_8_mmi(dest[j-1] + block_offset[i+4], + block + i*16, stride); + else if(((int16_t*)block)[i*16]) + ff_h264_idct_dc_add_8_mmi(dest[j-1] + block_offset[i+4], + block + i*16, stride); + } + } +} + +void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, int16_t *input, + int qmul) +{ + __asm__ volatile ( + ".set noreorder \r\n" + "dli $10, 0x8 \r\n" + "ldc1 $f6, 0x18(%[input]) \r\n" + "dmtc1 $10, $f16 \r\n" + "ldc1 $f4, 0x10(%[input]) \r\n" + "dli $10, 0x20 \r\n" + "ldc1 $f2, 0x8(%[input]) \r\n" + "dmtc1 $10, $f18 \r\n" + "ldc1 $f0, 0x0(%[input]) \r\n" + "mov.d $f8, $f6 \r\n" + "paddh $f6, $f6, $f4 \r\n" + "psubh $f4, $f4, $f8 \r\n" + "mov.d $f8, $f2 \r\n" + "paddh $f2, $f2, $f0 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "mov.d $f8, $f6 \r\n" + "paddh $f6, $f6, $f2 \r\n" + "psubh $f2, $f2, $f8 \r\n" + "mov.d $f8, $f4 \r\n" + "paddh $f4, $f4, $f0 \r\n" + "psubh $f0, $f0, $f8 \r\n" + "mov.d $f8, $f6 \r\n" + "punpcklhw $f6, $f6, $f2 \r\n" + "punpckhhw $f8, $f8, $f2 \r\n" + "punpckhhw $f2, $f0, $f4 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhwd $f4, $f6, $f0 \r\n" + "punpcklwd $f6, $f6, $f0 \r\n" + "mov.d $f0, $f8 \r\n" + "punpcklwd $f8, $f8, $f2 \r\n" + "punpckhwd $f0, $f0, $f2 \r\n" + "mov.d $f2, $f0 \r\n" + "paddh $f0, $f0, $f8 \r\n" + "psubh $f8, $f8, $f2 \r\n" + "mov.d $f2, $f4 \r\n" + "paddh $f4, $f4, $f6 \r\n" + "psubh $f6, $f6, $f2 \r\n" + "mov.d $f2, $f0 \r\n" + "paddh $f0, $f0, $f4 \r\n" + "psubh $f4, $f4, $f2 \r\n" + "mov.d $f2, $f8 \r\n" + "daddiu $10, %[qmul], -0x7fff \r\n" + "paddh $f8, $f8, $f6 \r\n" + "bgtz $10, 1f \r\n" + "psubh $f6, $f6, $f2 \r\n" + "ori $10, $0, 0x80 \r\n" + "dsll $10, $10, 0x10 \r\n" + "punpckhhw $f2, $f0, %[ff_pw_1] \r\n" + "daddu %[qmul], %[qmul], $10 \r\n" + "punpcklhw $f0, $f0, %[ff_pw_1] \r\n" + "punpckhhw $f10, $f4, %[ff_pw_1] \r\n" + "punpcklhw $f4, $f4, %[ff_pw_1] \r\n" + "mtc1 %[qmul], $f14 \r\n" + "punpcklwd $f14, $f14, $f14 \r\n" + "pmaddhw $f0, $f0, $f14 \r\n" + "pmaddhw $f4, $f4, $f14 \r\n" + "pmaddhw $f2, $f2, $f14 \r\n" + "pmaddhw $f10, $f10, $f14 \r\n" + "psraw $f0, $f0, $f16 \r\n" + "psraw $f4, $f4, $f16 \r\n" + "psraw $f2, $f2, $f16 \r\n" + "psraw $f10, $f10, $f16 \r\n" + "packsswh $f0, $f0, $f2 \r\n" + "packsswh $f4, $f4, $f10 \r\n" + "mfc1 $9, $f0 \r\n" + "dsrl $f0, $f0, $f18 \r\n" + "mfc1 %[input], $f0 \r\n" + "sh $9, 0x0(%[output]) \r\n" + "sh %[input], 0x80(%[output]) \r\n" + "dsrl $9, $9, 0x10 \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "sh $9, 0x20(%[output]) \r\n" + "sh %[input], 0xa0(%[output]) \r\n" + "mfc1 $9, $f4 \r\n" + "dsrl $f4, $f4, $f18 \r\n" + "mfc1 %[input], $f4 \r\n" + "sh $9, 0x40(%[output]) \r\n" + "sh %[input], 0xc0(%[output]) \r\n" + "dsrl $9, $9, 0x10 \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "sh $9, 0x60(%[output]) \r\n" + "sh %[input], 0xe0(%[output]) \r\n" + "punpckhhw $f2, $f6, %[ff_pw_1] \r\n" + "punpcklhw $f6, $f6, %[ff_pw_1] \r\n" + "punpckhhw $f10, $f8, %[ff_pw_1] \r\n" + "punpcklhw $f8, $f8, %[ff_pw_1] \r\n" + "mtc1 %[qmul], $f14 \r\n" + "punpcklwd $f14, $f14, $f14 \r\n" + "pmaddhw $f6, $f6, $f14 \r\n" + "pmaddhw $f8, $f8, $f14 \r\n" + "pmaddhw $f2, $f2, $f14 \r\n" + "pmaddhw $f10, $f10, $f14 \r\n" + "psraw $f6, $f6, $f16 \r\n" + "psraw $f8, $f8, $f16 \r\n" + "psraw $f2, $f2, $f16 \r\n" + "psraw $f10, $f10, $f16 \r\n" + "packsswh $f6, $f6, $f2 \r\n" + "packsswh $f8, $f8, $f10 \r\n" + "mfc1 $9, $f6 \r\n" + "dsrl $f6, $f6, $f18 \r\n" + "mfc1 %[input], $f6 \r\n" + "sh $9, 0x100(%[output]) \r\n" + "sh %[input], 0x180(%[output]) \r\n" + "dsrl $9, $9, 0x10 \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "sh $9, 0x120(%[output]) \r\n" + "sh %[input], 0x1a0(%[output]) \r\n" + "mfc1 $9, $f8 \r\n" + "dsrl $f8, $f8, $f18 \r\n" + "mfc1 %[input], $f8 \r\n" + "sh $9, 0x140(%[output]) \r\n" + "sh %[input], 0x1c0(%[output]) \r\n" + "dsrl $9, $9, 0x10 \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "sh $9, 0x160(%[output]) \r\n" + "jr $31 \r\n" + "sh %[input], 0x1e0(%[output]) \r\n" + "1: \r\n" + "ori $10, $0, 0x1f \r\n" + "clz $9, %[qmul] \r\n" + "ori %[input], $0, 0x7 \r\n" + "dsubu $9, $10, $9 \r\n" + "ori $10, $0, 0x80 \r\n" + "dsll $10, $10, 0x10 \r\n" + "daddu %[qmul], %[qmul], $10 \r\n" + "dsubu $10, $9, %[input] \r\n" + "movn $9, %[input], $10 \r\n" + "daddiu %[input], %[input], 0x1 \r\n" + "andi $10, $9, 0xff \r\n" + "dsrlv %[qmul], %[qmul], $10 \r\n" + "dsubu %[input], %[input], $9 \r\n" + "mtc1 %[input], $f12 \r\n" + "punpckhhw $f2, $f0, %[ff_pw_1] \r\n" + "punpcklhw $f0, $f0, %[ff_pw_1] \r\n" + "punpckhhw $f10, $f4, %[ff_pw_1] \r\n" + "punpcklhw $f4, $f4, %[ff_pw_1] \r\n" + "mtc1 %[qmul], $f14 \r\n" + "punpcklwd $f14, $f14, $f14 \r\n" + "pmaddhw $f0, $f0, $f14 \r\n" + "pmaddhw $f4, $f4, $f14 \r\n" + "pmaddhw $f2, $f2, $f14 \r\n" + "pmaddhw $f10, $f10, $f14 \r\n" + "psraw $f0, $f0, $f12 \r\n" + "psraw $f4, $f4, $f12 \r\n" + "psraw $f2, $f2, $f12 \r\n" + "psraw $f10, $f10, $f12 \r\n" + "packsswh $f0, $f0, $f2 \r\n" + "packsswh $f4, $f4, $f10 \r\n" + "mfc1 $9, $f0 \r\n" + "dsrl $f0, $f0, $f18 \r\n" + "sh $9, 0x0(%[output]) \r\n" + "mfc1 %[input], $f0 \r\n" + "dsrl $9, $9, 0x10 \r\n" + "sh %[input], 0x80(%[output]) \r\n" + "sh $9, 0x20(%[output]) \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "mfc1 $9, $f4 \r\n" + "sh %[input], 0xa0(%[output]) \r\n" + "dsrl $f4, $f4, $f18 \r\n" + "sh $9, 0x40(%[output]) \r\n" + "mfc1 %[input], $f4 \r\n" + "dsrl $9, $9, 0x10 \r\n" + "sh %[input], 0xc0(%[output]) \r\n" + "sh $9, 0x60(%[output]) \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "sh %[input], 0xe0(%[output]) \r\n" + "punpckhhw $f2, $f6, %[ff_pw_1] \r\n" + "punpcklhw $f6, $f6, %[ff_pw_1] \r\n" + "punpckhhw $f10, $f8, %[ff_pw_1] \r\n" + "punpcklhw $f8, $f8, %[ff_pw_1] \r\n" + "mtc1 %[qmul], $f14 \r\n" + "punpcklwd $f14, $f14, $f14 \r\n" + "pmaddhw $f6, $f6, $f14 \r\n" + "pmaddhw $f8, $f8, $f14 \r\n" + "pmaddhw $f2, $f2, $f14 \r\n" + "pmaddhw $f10, $f10, $f14 \r\n" + "psraw $f6, $f6, $f12 \r\n" + "psraw $f8, $f8, $f12 \r\n" + "psraw $f2, $f2, $f12 \r\n" + "psraw $f10, $f10, $f12 \r\n" + "packsswh $f6, $f6, $f2 \r\n" + "packsswh $f8, $f8, $f10 \r\n" + "mfc1 $9, $f6 \r\n" + "dsrl $f6, $f6, $f18 \r\n" + "mfc1 %[input], $f6 \r\n" + "sh $9, 0x100(%[output]) \r\n" + "sh %[input], 0x180(%[output]) \r\n" + "dsrl $9, $9, 0x10 \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "sh $9, 0x120(%[output]) \r\n" + "sh %[input], 0x1a0(%[output]) \r\n" + "mfc1 $9, $f8 \r\n" + "dsrl $f8, $f8, $f18 \r\n" + "mfc1 %[input], $f8 \r\n" + "sh $9, 0x140(%[output]) \r\n" + "sh %[input], 0x1c0(%[output]) \r\n" + "dsrl $9, $9, 0x10 \r\n" + "dsrl %[input], %[input], 0x10 \r\n" + "sh $9, 0x160(%[output]) \r\n" + "sh %[input], 0x1e0(%[output]) \r\n" + ".set reorder \r\n" + ::[output]"r"(output),[input]"r"(input),[qmul]"r"((uint64_t)qmul), + [ff_pw_1]"f"(ff_pw_1) + : "$9","$10","$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14","$f16", + "$f18" + ); +} + +void ff_h264_chroma422_dc_dequant_idct_8_mmi(int16_t *block, int qmul) +{ + int temp[8]; + int t[8]; + + temp[0] = block[0] + block[16]; + temp[1] = block[0] - block[16]; + temp[2] = block[32] + block[48]; + temp[3] = block[32] - block[48]; + temp[4] = block[64] + block[80]; + temp[5] = block[64] - block[80]; + temp[6] = block[96] + block[112]; + temp[7] = block[96] - block[112]; + + t[0] = temp[0] + temp[4] + temp[2] + temp[6]; + t[1] = temp[0] - temp[4] + temp[2] - temp[6]; + t[2] = temp[0] - temp[4] - temp[2] + temp[6]; + t[3] = temp[0] + temp[4] - temp[2] - temp[6]; + t[4] = temp[1] + temp[5] + temp[3] + temp[7]; + t[5] = temp[1] - temp[5] + temp[3] - temp[7]; + t[6] = temp[1] - temp[5] - temp[3] + temp[7]; + t[7] = temp[1] + temp[5] - temp[3] - temp[7]; + + block[ 0]= (t[0]*qmul + 128) >> 8; + block[ 32]= (t[1]*qmul + 128) >> 8; + block[ 64]= (t[2]*qmul + 128) >> 8; + block[ 96]= (t[3]*qmul + 128) >> 8; + block[ 16]= (t[4]*qmul + 128) >> 8; + block[ 48]= (t[5]*qmul + 128) >> 8; + block[ 80]= (t[6]*qmul + 128) >> 8; + block[112]= (t[7]*qmul + 128) >> 8; +} + +void ff_h264_chroma_dc_dequant_idct_8_mmi(int16_t *block, int qmul) +{ + int a,b,c,d; + + d = block[0] - block[16]; + a = block[0] + block[16]; + b = block[32] - block[48]; + c = block[32] + block[48]; + block[0] = ((a+c)*qmul) >> 7; + block[16]= ((d+b)*qmul) >> 7; + block[32]= ((a-c)*qmul) >> 7; + block[48]= ((d-b)*qmul) >> 7; +} + void ff_h264_weight_pixels16_8_mmi(uint8_t *block, int stride, int height, int log2_denom, int weight, int offset) { @@ -276,3 +1282,1219 @@ ); } } + +static void inline chroma_inter_body_mmi(uint8_t *pix, int stride, + int alpha, int beta, int8_t *tc0) +{ + __asm__ volatile ( + "xor $f16, $f16, $f16 \r\n" + "mtc1 %[alpha], $f8 \r\n" + "mtc1 %[beta], $f10 \r\n" + "pshufh $f8, $f8, $f16 \r\n" + "pshufh $f10, $f10, $f16 \r\n" + "packushb $f8, $f8, $f8 \r\n" + "packushb $f10, $f10, $f10 \r\n" + "psubusb $f12, $f4, $f2 \r\n" + "psubusb $f14, $f2, $f4 \r\n" + "or $f14, $f14, $f12 \r\n" + "psubusb $f14, $f14, $f8 \r\n" + "psubusb $f12, $f2, $f0 \r\n" + "psubusb $f8, $f0, $f2 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "psubusb $f12, $f4, $f6 \r\n" + "psubusb $f8, $f6, $f4 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "xor $f12, $f12, $f12 \r\n" + "pcmpeqb $f14, $f14, $f12 \r\n" + "lwc1 $f12, 0x0(%[tc0]) \r\n" + "punpcklbh $f12, $f12, $f12 \r\n" + "and $f14, $f14, $f12 \r\n" + "pcmpeqb $f8, $f8, $f8 \r\n" + "xor $f10, $f2, $f4 \r\n" + "xor $f6, $f6, $f8 \r\n" + "and $f10, $f10, %[ff_pb_1] \r\n" + "pavgb $f6, $f6, $f0 \r\n" + "xor $f8, $f8, $f2 \r\n" + "pavgb $f6, $f6, %[ff_pb_3] \r\n" + "pavgb $f8, $f8, $f4 \r\n" + "pavgb $f6, $f6, $f10 \r\n" + "paddusb $f6, $f6, $f8 \r\n" + "psubusb $f12, %[ff_pb_A1], $f6 \r\n" + "psubusb $f6, $f6, %[ff_pb_A1] \r\n" + "pminub $f12, $f12, $f14 \r\n" + "pminub $f6, $f6, $f14 \r\n" + "psubusb $f2, $f2, $f12 \r\n" + "psubusb $f4, $f4, $f6 \r\n" + "paddusb $f2, $f2, $f6 \r\n" + "paddusb $f4, $f4, $f12 \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride), + [alpha]"r"((int64_t)alpha),[beta]"r"((int64_t)beta),[tc0]"r"(tc0), + [ff_pb_1]"f"(ff_pb_1),[ff_pb_3]"f"(ff_pb_3),[ff_pb_A1]"f"(ff_pb_A1) + : "$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14","$f16" + ); +} + +static void inline chroma_intra_body_mmi(uint8_t *pix, int stride, + int alpha, int beta) +{ + __asm__ volatile ( + "xor $f16, $f16, $f16 \r\n" + "mtc1 %[alpha], $f8 \r\n" + "mtc1 %[beta], $f10 \r\n" + "pshufh $f8, $f8, $f16 \r\n" + "pshufh $f10, $f10, $f16 \r\n" + "packushb $f8, $f8, $f8 \r\n" + "packushb $f10, $f10, $f10 \r\n" + "psubusb $f12, $f4, $f2 \r\n" + "psubusb $f14, $f2, $f4 \r\n" + "or $f14, $f14, $f12 \r\n" + "psubusb $f14, $f14, $f8 \r\n" + "psubusb $f12, $f2, $f0 \r\n" + "psubusb $f8, $f0, $f2 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "psubusb $f12, $f4, $f6 \r\n" + "psubusb $f8, $f6, $f4 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "xor $f12, $f12, $f12 \r\n" + "pcmpeqb $f14, $f14, $f12 \r\n" + "mov.d $f10, $f2 \r\n" + "mov.d $f12, $f4 \r\n" + "xor $f8, $f2, $f6 \r\n" + "and $f8, $f8, %[ff_pb_1] \r\n" + "pavgb $f2, $f2, $f6 \r\n" + "psubusb $f2, $f2, $f8 \r\n" + "pavgb $f2, $f2, $f0 \r\n" + "xor $f8, $f4, $f0 \r\n" + "and $f8, $f8, %[ff_pb_1] \r\n" + "pavgb $f4, $f4, $f0 \r\n" + "psubusb $f4, $f4, $f8 \r\n" + "pavgb $f4, $f4, $f6 \r\n" + "psubb $f2, $f2, $f10 \r\n" + "psubb $f4, $f4, $f12 \r\n" + "and $f2, $f2, $f14 \r\n" + "and $f4, $f4, $f14 \r\n" + "paddb $f2, $f2, $f10 \r\n" + "paddb $f4, $f4, $f12 \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride), + [alpha]"r"((int64_t)alpha),[beta]"r"((int64_t)beta), + [ff_pb_1]"f"(ff_pb_1) + : "$f0","$f2","$f4","$f8","$f10","$f12","$f14","$f16" + ); +} + +void ff_deblock_v8_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0) +{ + __asm__ volatile ( + "daddu $8, %[stride], %[stride] \r\n" + "xor $f16, $f16, $f16 \r\n" + "daddu $9, %[stride], $8 \r\n" + "daddiu %[alpha], %[alpha], -0x1 \r\n" + "dsubu $9, $0, $9 \r\n" + "daddiu %[beta], %[beta], -0x1 \r\n" + "daddu $9, $9, %[pix] \r\n" + "ldc1 $f4, 0x0(%[pix]) \r\n" + "gsldxc1 $f0, 0x0($9, %[stride]) \r\n" + "gsldxc1 $f2, 0x0($9, $8) \r\n" + "gsldxc1 $f6, 0x0(%[pix], %[stride]) \r\n" + "mtc1 %[alpha], $f8 \r\n" + "mtc1 %[beta], $f10 \r\n" + "pshufh $f8, $f8, $f16 \r\n" + "pshufh $f10, $f10, $f16 \r\n" + "packushb $f8, $f8, $f8 \r\n" + "packushb $f10, $f10, $f10 \r\n" + "psubusb $f12, $f4, $f2 \r\n" + "psubusb $f14, $f2, $f4 \r\n" + "or $f14, $f14, $f12 \r\n" + "psubusb $f12, $f2, $f0 \r\n" + "psubusb $f14, $f14, $f8 \r\n" + "psubusb $f8, $f0, $f2 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f12, $f4, $f6 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "psubusb $f8, $f6, $f4 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "pcmpeqb $f14, $f14, $f16 \r\n" + "pcmpeqb $f6, $f6, $f6 \r\n" + "gslwlc1 $f8, 0x3(%[tc0]) \r\n" + "gslwrc1 $f8, 0x0(%[tc0]) \r\n" + "punpcklbh $f8, $f8, $f8 \r\n" + "punpcklbh $f18, $f8, $f8 \r\n" + "pcmpgtb $f8, $f18, $f6 \r\n" + "ldc1 $f6, 0x0($9) \r\n" + "and $f20, $f8, $f14 \r\n" + "psubusb $f14, $f6, $f2 \r\n" + "psubusb $f12, $f2, $f6 \r\n" + "psubusb $f14, $f14, $f10 \r\n" + "psubusb $f12, $f12, $f10 \r\n" + "pcmpeqb $f12, $f12, $f14 \r\n" + "and $f12, $f12, $f20 \r\n" + "and $f8, $f20, $f18 \r\n" + "psubb $f14, $f8, $f12 \r\n" + "and $f12, $f12, $f8 \r\n" + "pavgb $f8, $f2, $f4 \r\n" + "ldc1 $f22, 0x0($9) \r\n" + "pavgb $f6, $f6, $f8 \r\n" + "xor $f8, $f8, $f22 \r\n" + "and $f8, $f8, %[ff_pb_1] \r\n" + "psubusb $f6, $f6, $f8 \r\n" + "psubusb $f8, $f0, $f12 \r\n" + "paddusb $f12, $f12, $f0 \r\n" + "pmaxub $f6, $f6, $f8 \r\n" + "pminub $f6, $f6, $f12 \r\n" + "gssdxc1 $f6, 0x0($9, %[stride]) \r\n" + "gsldxc1 $f8, 0x0(%[pix], $8) \r\n" + "psubusb $f6, $f8, $f4 \r\n" + "psubusb $f12, $f4, $f8 \r\n" + "psubusb $f6, $f6, $f10 \r\n" + "psubusb $f12, $f12, $f10 \r\n" + "pcmpeqb $f12, $f12, $f6 \r\n" + "and $f12, $f12, $f20 \r\n" + "psubb $f14, $f14, $f12 \r\n" + "and $f10, $f18, $f12 \r\n" + "gsldxc1 $f6, 0x0(%[pix], %[stride]) \r\n" + "pavgb $f12, $f2, $f4 \r\n" + "gsldxc1 $f22, 0x0(%[pix], $8) \r\n" + "pavgb $f8, $f8, $f12 \r\n" + "xor $f12, $f12, $f22 \r\n" + "and $f12, $f12, %[ff_pb_1] \r\n" + "psubusb $f8, $f8, $f12 \r\n" + "psubusb $f12, $f6, $f10 \r\n" + "paddusb $f10, $f10, $f6 \r\n" + "pmaxub $f8, $f8, $f12 \r\n" + "pminub $f8, $f8, $f10 \r\n" + "gssdxc1 $f8, 0x0(%[pix], %[stride]) \r\n" + "xor $f10, $f2, $f4 \r\n" + "pcmpeqb $f8, $f8, $f8 \r\n" + "and $f10, $f10, %[ff_pb_1] \r\n" + "xor $f6, $f6, $f8 \r\n" + "xor $f8, $f8, $f2 \r\n" + "pavgb $f6, $f6, $f0 \r\n" + "pavgb $f6, $f6, %[ff_pb_3] \r\n" + "pavgb $f8, $f8, $f4 \r\n" + "pavgb $f6, $f6, $f10 \r\n" + "paddusb $f6, $f6, $f8 \r\n" + "psubusb $f12, %[ff_pb_A1], $f6 \r\n" + "psubusb $f6, $f6, %[ff_pb_A1] \r\n" + "pminub $f12, $f12, $f14 \r\n" + "pminub $f6, $f6, $f14 \r\n" + "psubusb $f2, $f2, $f12 \r\n" + "psubusb $f4, $f4, $f6 \r\n" + "paddusb $f2, $f2, $f6 \r\n" + "paddusb $f4, $f4, $f12 \r\n" + "gssdxc1 $f2, 0x0($9, $8) \r\n" + "sdc1 $f4, 0x0(%[pix]) \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride), + [alpha]"r"((int64_t)alpha),[beta]"r"((int64_t)beta),[tc0]"r"(tc0), + [ff_pb_1]"f"(ff_pb_1),[ff_pb_3]"f"(ff_pb_3),[ff_pb_A1]"f"(ff_pb_A1) + : "$8","$9","$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14","$f16", + "$f18","$f20","$f22" + ); +} + +void ff_deblock_v8_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta) +{ + uint64_t stack[0xa]; + + __asm__ volatile ( + "ori $8, $0, 0x1 \r\n" + "xor $f30, $f30, $f30 \r\n" + "dmtc1 $8, $f16 \r\n" + "dsll $8, %[stride], 2 \r\n" + "daddu $10, %[stride], %[stride] \r\n" + "daddiu %[alpha], %[alpha], -0x1 \r\n" + "dsll $f20, $f16, $f16 \r\n" + "bltz %[alpha], 1f \r\n" + "daddu $9, $10, %[stride] \r\n" + "daddiu %[beta], %[beta], -0x1 \r\n" + "bltz %[beta], 1f \r\n" + "dsubu $8, $0, $8 \r\n" + "daddu $8, $8, %[pix] \r\n" + "ldc1 $f4, 0x0(%[pix]) \r\n" + "gsldxc1 $f0, 0x0($8, $10) \r\n" + "gsldxc1 $f2, 0x0($8, $9) \r\n" + "gsldxc1 $f6, 0x0(%[pix], %[stride]) \r\n" + "mtc1 %[alpha], $f8 \r\n" + "mtc1 %[beta], $f10 \r\n" + "pshufh $f8, $f8, $f30 \r\n" + "pshufh $f10, $f10, $f30 \r\n" + "packushb $f8, $f8, $f8 \r\n" + "psubusb $f12, $f4, $f2 \r\n" + "psubusb $f14, $f2, $f4 \r\n" + "packushb $f10, $f10, $f10 \r\n" + "or $f14, $f14, $f12 \r\n" + "sdc1 $f8, 0x10+%[stack] \r\n" + "psubusb $f14, $f14, $f8 \r\n" + "psubusb $f12, $f2, $f0 \r\n" + "psubusb $f8, $f0, $f2 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "psubusb $f12, $f4, $f6 \r\n" + "psubusb $f8, $f6, $f4 \r\n" + "or $f8, $f8, $f12 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "or $f14, $f14, $f8 \r\n" + "xor $f12, $f12, $f12 \r\n" + "ldc1 $f8, 0x10+%[stack] \r\n" + "pcmpeqb $f14, $f14, $f12 \r\n" + "sdc1 $f14, 0x20+%[stack] \r\n" + "pavgb $f8, $f8, $f30 \r\n" + "psubusb $f14, $f4, $f2 \r\n" + "pavgb $f8, $f8, %[ff_pb_1] \r\n" + "psubusb $f12, $f2, $f4 \r\n" + "psubusb $f14, $f14, $f8 \r\n" + "psubusb $f12, $f12, $f8 \r\n" + "ldc1 $f28, 0x20+%[stack] \r\n" + "pcmpeqb $f12, $f12, $f14 \r\n" + "and $f12, $f12, $f28 \r\n" + "gsldxc1 $f28, 0x0($8, %[stride]) \r\n" + "psubusb $f14, $f28, $f2 \r\n" + "psubusb $f8, $f2, $f28 \r\n" + "psubusb $f14, $f14, $f10 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "pcmpeqb $f8, $f8, $f14 \r\n" + "and $f8, $f8, $f12 \r\n" + "gsldxc1 $f26, 0x0(%[pix], $10) \r\n" + "sdc1 $f8, 0x30+%[stack] \r\n" + "psubusb $f14, $f26, $f4 \r\n" + "psubusb $f8, $f4, $f26 \r\n" + "psubusb $f14, $f14, $f10 \r\n" + "psubusb $f8, $f8, $f10 \r\n" + "pcmpeqb $f8, $f8, $f14 \r\n" + "and $f8, $f8, $f12 \r\n" + "sdc1 $f8, 0x40+%[stack] \r\n" + "pavgb $f8, $f28, $f0 \r\n" + "pavgb $f10, $f2, $f4 \r\n" + "pavgb $f8, $f8, $f10 \r\n" + "sdc1 $f10, 0x10+%[stack] \r\n" + "paddb $f12, $f28, $f0 \r\n" + "paddb $f14, $f2, $f4 \r\n" + "paddb $f12, $f12, $f14 \r\n" + "mov.d $f14, $f12 \r\n" + "sdc1 $f12, 0x0+%[stack] \r\n" + "psrlh $f12, $f12, $f16 \r\n" + "pavgb $f12, $f12, $f30 \r\n" + "xor $f12, $f12, $f8 \r\n" + "and $f12, $f12, %[ff_pb_1] \r\n" + "psubb $f8, $f8, $f12 \r\n" + "pavgb $f10, $f28, $f6 \r\n" + "psubb $f12, $f28, $f6 \r\n" + "paddb $f14, $f14, $f14 \r\n" + "psubb $f14, $f14, $f12 \r\n" + "and $f12, $f12, %[ff_pb_1] \r\n" + "psubb $f10, $f10, $f12 \r\n" + "ldc1 $f24, 0x10+%[stack] \r\n" + "pavgb $f10, $f10, $f0 \r\n" + "psrlh $f14, $f14, $f20 \r\n" + "pavgb $f10, $f10, $f24 \r\n" + "pavgb $f14, $f14, $f30 \r\n" + "xor $f14, $f14, $f10 \r\n" + "and $f14, $f14, %[ff_pb_1] \r\n" + "psubb $f10, $f10, $f14 \r\n" + "xor $f14, $f2, $f6 \r\n" + "pavgb $f12, $f2, $f6 \r\n" + "and $f14, $f14, %[ff_pb_1] \r\n" + "psubb $f12, $f12, $f14 \r\n" + "ldc1 $f24, 0x30+%[stack] \r\n" + "pavgb $f12, $f12, $f0 \r\n" + "ldc1 $f22, 0x20+%[stack] \r\n" + "xor $f10, $f10, $f12 \r\n" + "xor $f12, $f12, $f2 \r\n" + "and $f10, $f10, $f24 \r\n" + "and $f12, $f12, $f22 \r\n" + "xor $f10, $f10, $f12 \r\n" + "xor $f10, $f10, $f2 \r\n" + "gssdxc1 $f10, 0x0($8, $9) \r\n" + "ldc1 $f10, 0x0($8) \r\n" + "paddb $f12, $f28, $f10 \r\n" + "pavgb $f10, $f10, $f28 \r\n" + "ldc1 $f22, 0x0+%[stack] \r\n" + "pavgb $f10, $f10, $f8 \r\n" + "paddb $f12, $f12, $f12 \r\n" + "paddb $f12, $f12, $f22 \r\n" + "psrlh $f12, $f12, $f20 \r\n" + "pavgb $f12, $f12, $f30 \r\n" + "xor $f12, $f12, $f10 \r\n" + "and $f12, $f12, %[ff_pb_1] \r\n" + "ldc1 $f22, 0x30+%[stack] \r\n" + "psubb $f10, $f10, $f12 \r\n" + "xor $f8, $f8, $f0 \r\n" + "xor $f10, $f10, $f28 \r\n" + "and $f8, $f8, $f22 \r\n" + "and $f10, $f10, $f22 \r\n" + "xor $f8, $f8, $f0 \r\n" + "xor $f10, $f10, $f28 \r\n" + "gssdxc1 $f8, 0x0($8, $10) \r\n" + "gssdxc1 $f10, 0x0($8, %[stride]) \r\n" + "pavgb $f8, $f26, $f6 \r\n" + "pavgb $f10, $f4, $f2 \r\n" + "pavgb $f8, $f8, $f10 \r\n" + "sdc1 $f10, 0x10+%[stack] \r\n" + "paddb $f12, $f26, $f6 \r\n" + "paddb $f14, $f4, $f2 \r\n" + "paddb $f12, $f12, $f14 \r\n" + "mov.d $f14, $f12 \r\n" + "sdc1 $f12, 0x0+%[stack] \r\n" + "psrlh $f12, $f12, $f16 \r\n" + "pavgb $f12, $f12, $f30 \r\n" + "xor $f12, $f12, $f8 \r\n" + "and $f12, $f12, %[ff_pb_1] \r\n" + "psubb $f8, $f8, $f12 \r\n" + "pavgb $f10, $f26, $f0 \r\n" + "paddb $f14, $f14, $f14 \r\n" + "psubb $f12, $f26, $f0 \r\n" + "psubb $f14, $f14, $f12 \r\n" + "and $f12, $f12, %[ff_pb_1] \r\n" + "psubb $f10, $f10, $f12 \r\n" + "ldc1 $f22, 0x10+%[stack] \r\n" + "pavgb $f10, $f10, $f6 \r\n" + "pavgb $f10, $f10, $f22 \r\n" + "psrlh $f14, $f14, $f20 \r\n" + "pavgb $f14, $f14, $f30 \r\n" + "xor $f14, $f14, $f10 \r\n" + "and $f14, $f14, %[ff_pb_1] \r\n" + "psubb $f10, $f10, $f14 \r\n" + "xor $f14, $f4, $f0 \r\n" + "pavgb $f12, $f4, $f0 \r\n" + "and $f14, $f14, %[ff_pb_1] \r\n" + "ldc1 $f22, 0x40+%[stack] \r\n" + "psubb $f12, $f12, $f14 \r\n" + "ldc1 $f24, 0x20+%[stack] \r\n" + "pavgb $f12, $f12, $f6 \r\n" + "xor $f10, $f10, $f12 \r\n" + "xor $f12, $f12, $f4 \r\n" + "and $f10, $f10, $f22 \r\n" + "and $f12, $f12, $f24 \r\n" + "xor $f10, $f10, $f12 \r\n" + "xor $f10, $f10, $f4 \r\n" + "sdc1 $f10, 0x0(%[pix]) \r\n" + "gsldxc1 $f10, 0x0(%[pix], $9) \r\n" + "paddb $f12, $f26, $f10 \r\n" + "pavgb $f10, $f10, $f26 \r\n" + "ldc1 $f22, 0x0+%[stack] \r\n" + "pavgb $f10, $f10, $f8 \r\n" + "paddb $f12, $f12, $f12 \r\n" + "paddb $f12, $f12, $f22 \r\n" + "psrlh $f12, $f12, $f20 \r\n" + "pavgb $f12, $f12, $f30 \r\n" + "xor $f12, $f12, $f10 \r\n" + "and $f12, $f12, %[ff_pb_1] \r\n" + "ldc1 $f22, 0x40+%[stack] \r\n" + "psubb $f10, $f10, $f12 \r\n" + "xor $f8, $f8, $f6 \r\n" + "xor $f10, $f10, $f26 \r\n" + "and $f8, $f8, $f22 \r\n" + "and $f10, $f10, $f22 \r\n" + "xor $f8, $f8, $f6 \r\n" + "xor $f10, $f10, $f26 \r\n" + "gssdxc1 $f8, 0x0(%[pix], %[stride]) \r\n" + "gssdxc1 $f10, 0x0(%[pix], $10) \r\n" + "1: \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride), + [alpha]"r"((int64_t)alpha),[beta]"r"((int64_t)beta), + [stack]"m"(stack[0]),[ff_pb_1]"f"(ff_pb_1) + : "$8","$9","$10","$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14", + "$f16","$f18","$f20","$f22","$f24","$f26","$f28","$f30" + ); +} + +void ff_deblock_v_chroma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0) +{ + __asm__ volatile ( + "daddiu %[alpha], %[alpha], -0x1 \r\n" + "daddiu %[beta], %[beta], -0x1 \r\n" + "or $16, $0, %[pix] \r\n" + "dsubu $16, $16, %[stride] \r\n" + "dsubu $16, $16, %[stride] \r\n" + "ldc1 $f0, 0x0($16) \r\n" + "gsldxc1 $f2, 0x0($16, %[stride]) \r\n" + "ldc1 $f4, 0x0(%[pix]) \r\n" + "gsldxc1 $f6, 0x0(%[pix], %[stride]) \r\n" + : [pix]"+r"(pix),[stride]"+r"(stride),[alpha]"+r"(alpha), + [beta]"+r"(beta) + : [tc0]"r"(tc0) + : "$16","$f2","$f4" + ); + + chroma_inter_body_mmi(pix, stride, alpha, beta, tc0); + + __asm__ volatile ( + "gssdxc1 $f2, 0x0($16, %[stride]) \r\n" + "sdc1 $f4, 0x0(%[pix]) \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride) + : "$16","$f2","$f4" + ); +} + +void ff_deblock_v_chroma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta) +{ + __asm__ volatile ( + "daddiu %[alpha], %[alpha], -0x1 \r\n" + "daddiu %[beta], %[beta], -0x1 \r\n" + "or $16, $0, %[pix] \r\n" + "dsubu $16, $16, %[stride] \r\n" + "dsubu $16, $16, %[stride] \r\n" + "ldc1 $f0, 0x0($16) \r\n" + "gsldxc1 $f2, 0x0($16, %[stride]) \r\n" + "ldc1 $f4, 0x0(%[pix]) \r\n" + "gsldxc1 $f6, 0x0(%[pix], %[stride]) \r\n" + : [pix]"+r"(pix),[stride]"+r"(stride),[alpha]"+r"(alpha), + [beta]"+r"(beta) + ::"$16","$f0","$f2","$f4","$f6" + ); + + chroma_intra_body_mmi(pix, stride, alpha, beta); + + __asm__ volatile ( + "gssdxc1 $f2, 0x0($16, %[stride]) \r\n" + "sdc1 $f4, 0x0(%[pix]) \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride) + : "$16","$f2","$f4" + ); +} + +void ff_deblock_h_chroma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0) +{ + __asm__ volatile ( + "daddiu %[alpha], %[alpha], -0x1 \r\n" + "daddiu %[beta], %[beta], -0x1 \r\n" + "daddu $16, %[stride], %[stride] \r\n" + "daddiu %[pix], %[pix], -0x2 \r\n" + "daddu $17, $16, %[stride] \r\n" + "daddu $19, $16, $16 \r\n" + "or $18, $0, %[pix] \r\n" + "daddu %[pix], %[pix], $17 \r\n" + "gslwlc1 $f0, 0x3($18) \r\n" + "daddu $12, $18, %[stride] \r\n" + "gslwrc1 $f0, 0x0($18) \r\n" + "gslwlc1 $f4, 0x3($12) \r\n" + "daddu $13, $18, $16 \r\n" + "gslwrc1 $f4, 0x0($12) \r\n" + "gslwlc1 $f2, 0x3($13) \r\n" + "gslwrc1 $f2, 0x0($13) \r\n" + "gslwlc1 $f6, 0x3(%[pix]) \r\n" + "gslwrc1 $f6, 0x0(%[pix]) \r\n" + "punpcklbh $f0, $f0, $f4 \r\n" + "punpcklbh $f2, $f2, $f6 \r\n" + "daddu $12, %[pix], %[stride] \r\n" + "punpckhhw $f4, $f0, $f2 \r\n" + "punpcklhw $f0, $f0, $f2 \r\n" + "gslwlc1 $f8, 0x3($12) \r\n" + "daddu $13, %[pix], $16 \r\n" + "gslwrc1 $f8, 0x0($12) \r\n" + "gslwlc1 $f12, 0x3($13) \r\n" + "daddu $12, %[pix], $17 \r\n" + "gslwrc1 $f12, 0x0($13) \r\n" + "gslwlc1 $f10, 0x3($12) \r\n" + "daddu $13, %[pix], $19 \r\n" + "gslwrc1 $f10, 0x0($12) \r\n" + "gslwlc1 $f14, 0x3($13) \r\n" + "gslwrc1 $f14, 0x0($13) \r\n" + "punpcklbh $f8, $f8, $f12 \r\n" + "punpcklbh $f10, $f10, $f14 \r\n" + "mov.d $f12, $f8 \r\n" + "punpcklhw $f8, $f8, $f10 \r\n" + "punpckhhw $f12, $f12, $f10 \r\n" + "punpckhwd $f2, $f0, $f8 \r\n" + "punpckhwd $f6, $f4, $f12 \r\n" + "punpcklwd $f0, $f0, $f8 \r\n" + "punpcklwd $f4, $f4, $f12 \r\n" + "mov.d $f20, $f0 \r\n" + "mov.d $f22, $f6 \r\n" + : [pix]"+r"(pix),[stride]"+r"(stride),[alpha]"+r"(alpha), + [beta]"+r"(beta) + ::"$12","$13","$16","$17","$18","$19","$f0","$f2","$f4","$f6","$f8", + "$f10","$f12","$f14","$f20","$f22" + ); + + chroma_inter_body_mmi(pix, stride, alpha, beta, tc0); + + __asm__ volatile ( + "punpckhwd $f8, $f20, $f20 \r\n" + "punpckhwd $f10, $f2, $f2 \r\n" + "punpckhwd $f12, $f4, $f4 \r\n" + "punpcklbh $f0, $f20, $f2 \r\n" + "punpcklbh $f4, $f4, $f22 \r\n" + "punpcklhw $f2, $f0, $f4 \r\n" + "punpckhhw $f0, $f0, $f4 \r\n" + "gsswlc1 $f2, 0x3($18) \r\n" + "gsswrc1 $f2, 0x0($18) \r\n" + "daddu $12, $18, %[stride] \r\n" + "punpckhwd $f2, $f2, $f2 \r\n" + "gsswlc1 $f2, 0x3($12) \r\n" + "daddu $13, $18, $16 \r\n" + "gsswrc1 $f2, 0x0($12) \r\n" + "gsswlc1 $f0, 0x3($13) \r\n" + "gsswrc1 $f0, 0x0($13) \r\n" + "punpckhwd $f0, $f0, $f0 \r\n" + "punpckhwd $f6, $f22, $f22 \r\n" + "gsswlc1 $f0, 0x3(%[pix]) \r\n" + "gsswrc1 $f0, 0x0(%[pix]) \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "punpcklbh $f12, $f12, $f6 \r\n" + "daddu $12, %[pix], %[stride] \r\n" + "punpcklhw $f10, $f8, $f12 \r\n" + "punpckhhw $f8, $f8, $f12 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "punpckhwd $f10, $f10, $f10 \r\n" + "daddu $12, %[pix], $16 \r\n" + "daddu $13, %[pix], $17 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "gsswlc1 $f8, 0x3($13) \r\n" + "daddu $12, %[pix], $19 \r\n" + "punpckhwd $f20, $f8, $f8 \r\n" + "gsswrc1 $f8, 0x0($13) \r\n" + "gsswlc1 $f20, 0x3($12) \r\n" + "gsswrc1 $f20, 0x0($12) \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride) + : "$12","$13","$16","$17","$18","$19","$f0","$f2","$f4","$f6","$f8", + "$f10","$f12","$f20" + ); +} + +void ff_deblock_h_chroma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta) +{ + __asm__ volatile ( + "daddiu %[alpha], %[alpha], -0x1 \r\n" + "daddiu %[beta], %[beta], -0x1 \r\n" + "daddu $16, %[stride], %[stride] \r\n" + "daddiu %[pix], %[pix], -0x2 \r\n" + "daddu $17, $16, %[stride] \r\n" + "daddu $19, $16, $16 \r\n" + "or $18, $0, %[pix] \r\n" + "daddu %[pix], %[pix], $17 \r\n" + "gslwlc1 $f0, 0x3($18) \r\n" + "daddu $12, $18, %[stride] \r\n" + "gslwrc1 $f0, 0x0($18) \r\n" + "gslwlc1 $f4, 0x3($12) \r\n" + "daddu $13, $18, $16 \r\n" + "gslwrc1 $f4, 0x0($12) \r\n" + "gslwlc1 $f2, 0x3($13) \r\n" + "gslwrc1 $f2, 0x0($13) \r\n" + "gslwlc1 $f6, 0x3(%[pix]) \r\n" + "gslwrc1 $f6, 0x0(%[pix]) \r\n" + "punpcklbh $f0, $f0, $f4 \r\n" + "punpcklbh $f2, $f2, $f6 \r\n" + "daddu $12, %[pix], %[stride] \r\n" + "punpckhhw $f4, $f0, $f2 \r\n" + "punpcklhw $f0, $f0, $f2 \r\n" + "gslwlc1 $f8, 0x3($12) \r\n" + "daddu $13, %[pix], $16 \r\n" + "gslwrc1 $f8, 0x0($12) \r\n" + "gslwlc1 $f12, 0x3($13) \r\n" + "daddu $12, %[pix], $17 \r\n" + "gslwrc1 $f12, 0x0($13) \r\n" + "gslwlc1 $f10, 0x3($12) \r\n" + "daddu $13, %[pix], $19 \r\n" + "gslwrc1 $f10, 0x0($12) \r\n" + "gslwlc1 $f14, 0x3($13) \r\n" + "gslwrc1 $f14, 0x0($13) \r\n" + "punpcklbh $f8, $f8, $f12 \r\n" + "punpcklbh $f10, $f10, $f14 \r\n" + "mov.d $f12, $f8 \r\n" + "punpcklhw $f8, $f8, $f10 \r\n" + "punpckhhw $f12, $f12, $f10 \r\n" + "punpckhwd $f2, $f0, $f8 \r\n" + "punpckhwd $f6, $f4, $f12 \r\n" + "punpcklwd $f0, $f0, $f8 \r\n" + "punpcklwd $f4, $f4, $f12 \r\n" + : [pix]"+r"(pix),[stride]"+r"(stride),[alpha]"+r"(alpha), + [beta]"+r"(beta) + ::"$12","$13","$16","$17","$18","$19","$f0","$f2","$f4","$f6","$f8", + "$f10","$f12","$f14","$f20","$f22" + ); + + chroma_intra_body_mmi(pix, stride, alpha, beta); + + __asm__ volatile ( + "punpckhwd $f8, $f0, $f0 \r\n" + "punpckhwd $f10, $f2, $f2 \r\n" + "punpckhwd $f12, $f4, $f4 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpcklhw $f2, $f0, $f4 \r\n" + "punpckhhw $f0, $f0, $f4 \r\n" + "gsswlc1 $f2, 0x3($18) \r\n" + "gsswrc1 $f2, 0x0($18) \r\n" + "daddu $12, $18, %[stride] \r\n" + "punpckhwd $f2, $f2, $f2 \r\n" + "gsswlc1 $f2, 0x3($12) \r\n" + "daddu $13, $18, $16 \r\n" + "gsswrc1 $f2, 0x0($12) \r\n" + "gsswlc1 $f0, 0x3($13) \r\n" + "gsswrc1 $f0, 0x0($13) \r\n" + "punpckhwd $f0, $f0, $f0 \r\n" + "punpckhwd $f6, $f6, $f6 \r\n" + "gsswlc1 $f0, 0x3(%[pix]) \r\n" + "gsswrc1 $f0, 0x0(%[pix]) \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "punpcklbh $f12, $f12, $f6 \r\n" + "daddu $12, %[pix], %[stride] \r\n" + "punpcklhw $f10, $f8, $f12 \r\n" + "punpckhhw $f8, $f8, $f12 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "punpckhwd $f10, $f10, $f10 \r\n" + "daddu $12, %[pix], $16 \r\n" + "daddu $13, %[pix], $17 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "gsswlc1 $f8, 0x3($13) \r\n" + "daddu $12, %[pix], $19 \r\n" + "punpckhwd $f20, $f8, $f8 \r\n" + "gsswrc1 $f8, 0x0($13) \r\n" + "gsswlc1 $f20, 0x3($12) \r\n" + "gsswrc1 $f20, 0x0($12) \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride) + : "$12","$13","$16","$17","$18","$19","$f0","$f2","$f4","$f6","$f8", + "$f10","$f12","$f20" + ); +} + +void ff_deblock_v_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0) +{ + if ((tc0[0] & tc0[1]) >= 0) + ff_deblock_v8_luma_8_mmi(pix + 0, stride, alpha, beta, tc0); + if ((tc0[2] & tc0[3]) >= 0) + ff_deblock_v8_luma_8_mmi(pix + 8, stride, alpha, beta, tc0 + 2); +} + +void ff_deblock_v_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta) +{ + ff_deblock_v8_luma_intra_8_mmi(pix + 0, stride, alpha, beta); + ff_deblock_v8_luma_intra_8_mmi(pix + 8, stride, alpha, beta); +} + +void ff_deblock_h_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0) +{ + uint64_t stack[0xd]; + + __asm__ volatile ( + "daddu $15, %[stride], %[stride] \r\n" + "daddiu $8, %[pix], -0x4 \r\n" + "daddu $9, %[stride], $15 \r\n" + "gsldlc1 $f0, 0x7($8) \r\n" + "gsldrc1 $f0, 0x0($8) \r\n" + "daddu $12, $8, %[stride] \r\n" + "daddu $10, $8, $9 \r\n" + "gsldlc1 $f2, 0x7($12) \r\n" + "daddu $11, $8, $15 \r\n" + "gsldrc1 $f2, 0x0($12) \r\n" + "gsldlc1 $f4, 0x7($11) \r\n" + "gsldrc1 $f4, 0x0($11) \r\n" + "gsldlc1 $f6, 0x7($10) \r\n" + "daddu $12, $10, %[stride] \r\n" + "gsldrc1 $f6, 0x0($10) \r\n" + "gsldlc1 $f8, 0x7($12) \r\n" + "daddu $11, $10, $15 \r\n" + "gsldrc1 $f8, 0x0($12) \r\n" + "gsldlc1 $f10, 0x7($11) \r\n" + "daddu $12, $10, $9 \r\n" + "gsldrc1 $f10, 0x0($11) \r\n" + "gsldlc1 $f12, 0x7($12) \r\n" + "gsldrc1 $f12, 0x0($12) \r\n" + "daddu $14, $15, $15 \r\n" + "punpckhbh $f14, $f0, $f2 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpckhbh $f2, $f4, $f6 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpckhbh $f6, $f8, $f10 \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "daddu $12, $10, $14 \r\n" + "sdc1 $f2, 0x10+%[stack] \r\n" + "gsldlc1 $f16, 0x7($12) \r\n" + "gsldrc1 $f16, 0x0($12) \r\n" + "daddu $13, $14, $14 \r\n" + "punpckhbh $f10, $f12, $f16 \r\n" + "punpcklbh $f12, $f12, $f16 \r\n" + "punpckhhw $f2, $f0, $f4 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhhw $f4, $f8, $f12 \r\n" + "punpcklhw $f8, $f8, $f12 \r\n" + "ldc1 $f16, 0x10+%[stack] \r\n" + "punpckhwd $f0, $f0, $f8 \r\n" + "sdc1 $f0, 0x0+%[stack] \r\n" + "punpckhhw $f12, $f14, $f16 \r\n" + "punpcklhw $f14, $f14, $f16 \r\n" + "punpckhhw $f0, $f6, $f10 \r\n" + "punpcklhw $f6, $f6, $f10 \r\n" + "punpcklwd $f12, $f12, $f0 \r\n" + "punpckhwd $f10, $f14, $f6 \r\n" + "punpcklwd $f14, $f14, $f6 \r\n" + "punpckhwd $f6, $f2, $f4 \r\n" + "punpcklwd $f2, $f2, $f4 \r\n" + "sdc1 $f2, 0x10+%[stack] \r\n" + "sdc1 $f6, 0x20+%[stack] \r\n" + "sdc1 $f14, 0x30+%[stack] \r\n" + "sdc1 $f10, 0x40+%[stack] \r\n" + "sdc1 $f12, 0x50+%[stack] \r\n" + "daddu $8, $8, $13 \r\n" + "daddu $10, $10, $13 \r\n" + "gsldlc1 $f0, 0x7($8) \r\n" + "daddu $12, $8, %[stride] \r\n" + "gsldrc1 $f0, 0x0($8) \r\n" + "gsldlc1 $f2, 0x7($12) \r\n" + "daddu $11, $8, $15 \r\n" + "gsldrc1 $f2, 0x0($12) \r\n" + "gsldlc1 $f4, 0x7($11) \r\n" + "gsldrc1 $f4, 0x0($11) \r\n" + "gsldlc1 $f6, 0x7($10) \r\n" + "daddu $12, $10, %[stride] \r\n" + "gsldrc1 $f6, 0x0($10) \r\n" + "gsldlc1 $f8, 0x7($12) \r\n" + "daddu $11, $10, $15 \r\n" + "gsldrc1 $f8, 0x0($12) \r\n" + "gsldlc1 $f10, 0x7($11) \r\n" + "daddu $12, $10, $9 \r\n" + "gsldrc1 $f10, 0x0($11) \r\n" + "gsldlc1 $f12, 0x7($12) \r\n" + "gsldrc1 $f12, 0x0($12) \r\n" + "punpckhbh $f14, $f0, $f2 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpckhbh $f2, $f4, $f6 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpckhbh $f6, $f8, $f10 \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "daddu $12, $10, $14 \r\n" + "sdc1 $f2, 0x18+%[stack] \r\n" + "gsldlc1 $f16, 0x7($12) \r\n" + "gsldrc1 $f16, 0x0($12) \r\n" + "punpckhhw $f2, $f0, $f4 \r\n" + "punpckhbh $f10, $f12, $f16 \r\n" + "punpcklbh $f12, $f12, $f16 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhhw $f4, $f8, $f12 \r\n" + "punpcklhw $f8, $f8, $f12 \r\n" + "punpckhwd $f0, $f0, $f8 \r\n" + "ldc1 $f16, 0x18+%[stack] \r\n" + "sdc1 $f0, 0x8+%[stack] \r\n" + "punpckhhw $f12, $f14, $f16 \r\n" + "punpcklhw $f14, $f14, $f16 \r\n" + "punpckhhw $f0, $f6, $f10 \r\n" + "punpcklhw $f6, $f6, $f10 \r\n" + "punpckhwd $f10, $f14, $f6 \r\n" + "punpcklwd $f14, $f14, $f6 \r\n" + "punpckhwd $f6, $f2, $f4 \r\n" + "punpcklwd $f2, $f2, $f4 \r\n" + "punpcklwd $f12, $f12, $f0 \r\n" + "sdc1 $f2, 0x18+%[stack] \r\n" + "sdc1 $f6, 0x28+%[stack] \r\n" + "sdc1 $f14, 0x38+%[stack] \r\n" + "sdc1 $f10, 0x48+%[stack] \r\n" + "sdc1 $f12, 0x58+%[stack] \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride),[stack]"m"(stack[0]) + : "$8","$9","$10","$11","$12","$13","$14","$15","$f0","$f2","$f4", + "$f6","$f8","$f10","$f12","$f14","$f16" + ); + + ff_deblock_v_luma_8_mmi((uint8_t *) &stack[6], 0x10, alpha, beta, tc0); + + __asm__ volatile ( + "daddu $15, %[stride], %[stride] \r\n" + "daddiu $8, %[pix], -0x2 \r\n" + "daddu $14, $15, $15 \r\n" + "daddu $9, $15, %[stride] \r\n" + "daddu $13, $14, $14 \r\n" + "daddu $10, $8, $9 \r\n" + "ldc1 $f0, 0x10+%[stack] \r\n" + "ldc1 $f2, 0x20+%[stack] \r\n" + "ldc1 $f4, 0x30+%[stack] \r\n" + "ldc1 $f6, 0x40+%[stack] \r\n" + "punpckhwd $f8, $f0, $f0 \r\n" + "punpckhwd $f10, $f2, $f2 \r\n" + "punpckhwd $f12, $f4, $f4 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpcklhw $f2, $f0, $f4 \r\n" + "punpckhhw $f0, $f0, $f4 \r\n" + "gsswlc1 $f2, 0x3($8) \r\n" + "gsswrc1 $f2, 0x0($8) \r\n" + "daddu $12, $8, %[stride] \r\n" + "punpckhwd $f2, $f2, $f2 \r\n" + "daddu $11, $8, $15 \r\n" + "gsswlc1 $f2, 0x3($12) \r\n" + "gsswrc1 $f2, 0x0($12) \r\n" + "gsswlc1 $f0, 0x3($11) \r\n" + "gsswrc1 $f0, 0x0($11) \r\n" + "punpckhwd $f0, $f0, $f0 \r\n" + "punpckhwd $f6, $f6, $f6 \r\n" + "gsswlc1 $f0, 0x3($10) \r\n" + "gsswrc1 $f0, 0x0($10) \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "punpcklbh $f12, $f12, $f6 \r\n" + "punpcklhw $f10, $f8, $f12 \r\n" + "daddu $12, $10, %[stride] \r\n" + "punpckhhw $f8, $f8, $f12 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "daddu $12, $10, $15 \r\n" + "punpckhwd $f10, $f10, $f10 \r\n" + "daddu $11, $10, $9 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "gsswlc1 $f8, 0x3($11) \r\n" + "gsswrc1 $f8, 0x0($11) \r\n" + "daddu $12, $10, $14 \r\n" + "punpckhwd $f8, $f8, $f8 \r\n" + "daddu $8, $8, $13 \r\n" + "gsswlc1 $f8, 0x3($12) \r\n" + "gsswrc1 $f8, 0x0($12) \r\n" + "daddu $10, $10, $13 \r\n" + "ldc1 $f0, 0x18+%[stack] \r\n" + "ldc1 $f2, 0x28+%[stack] \r\n" + "ldc1 $f4, 0x38+%[stack] \r\n" + "ldc1 $f6, 0x48+%[stack] \r\n" + "daddu $15, %[stride], %[stride] \r\n" + "punpckhwd $f8, $f0, $f0 \r\n" + "daddu $14, $15, $15 \r\n" + "punpckhwd $f10, $f2, $f2 \r\n" + "punpckhwd $f12, $f4, $f4 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "daddu $12, $8, %[stride] \r\n" + "punpcklhw $f2, $f0, $f4 \r\n" + "punpckhhw $f0, $f0, $f4 \r\n" + "gsswlc1 $f2, 0x3($8) \r\n" + "gsswrc1 $f2, 0x0($8) \r\n" + "punpckhwd $f2, $f2, $f2 \r\n" + "daddu $11, $8, $15 \r\n" + "gsswlc1 $f2, 0x3($12) \r\n" + "gsswrc1 $f2, 0x0($12) \r\n" + "gsswlc1 $f0, 0x3($11) \r\n" + "gsswrc1 $f0, 0x0($11) \r\n" + "punpckhwd $f0, $f0, $f0 \r\n" + "punpckhwd $f6, $f6, $f6 \r\n" + "gsswlc1 $f0, 0x3($10) \r\n" + "gsswrc1 $f0, 0x0($10) \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "punpcklbh $f12, $f12, $f6 \r\n" + "daddu $12, $10, %[stride] \r\n" + "punpcklhw $f10, $f8, $f12 \r\n" + "punpckhhw $f8, $f8, $f12 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "daddu $12, $10, $15 \r\n" + "punpckhwd $f10, $f10, $f10 \r\n" + "daddu $11, $10, $9 \r\n" + "gsswlc1 $f10, 0x3($12) \r\n" + "gsswrc1 $f10, 0x0($12) \r\n" + "gsswlc1 $f8, 0x3($11) \r\n" + "gsswrc1 $f8, 0x0($11) \r\n" + "daddu $12, $10, $14 \r\n" + "punpckhwd $f8, $f8, $f8 \r\n" + "gsswlc1 $f8, 0x3($12) \r\n" + "gsswrc1 $f8, 0x0($12) \r\n" + ::[pix]"r"(pix),[stride]"r"((int64_t)stride),[stack]"m"(stack[0]) + : "$8","$9","$10","$11","$12","$13","$14","$15","$f0","$f2","$f4", + "$f6","$f8","$f10","$f12","$f14","$f16" + ); +} + +void ff_deblock_h_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta) +{ + uint64_t ptmp[0x11]; + uint64_t pdat[4]; + + __asm__ volatile ( + "daddu $12, %[stride], %[stride] \r\n" + "daddiu $10, %[pix], -0x4 \r\n" + "daddu $11, $12, %[stride] \r\n" + "daddu $13, $12, $12 \r\n" + "daddu $9, $10, $11 \r\n" + "daddu $8, $10, %[stride] \r\n" + "gsldlc1 $f0, 0x7($10) \r\n" + "gsldrc1 $f0, 0x0($10) \r\n" + "daddu $14, $10, $12 \r\n" + "gsldlc1 $f2, 0x7($8) \r\n" + "gsldrc1 $f2, 0x0($8) \r\n" + "gsldlc1 $f4, 0x7($14) \r\n" + "gsldrc1 $f4, 0x0($14) \r\n" + "daddu $8, $9, %[stride] \r\n" + "gsldlc1 $f6, 0x7($9) \r\n" + "gsldrc1 $f6, 0x0($9) \r\n" + "daddu $14, $9, $12 \r\n" + "gsldlc1 $f8, 0x7($8) \r\n" + "gsldrc1 $f8, 0x0($8) \r\n" + "daddu $8, $9, $11 \r\n" + "gsldlc1 $f10, 0x7($14) \r\n" + "gsldrc1 $f10, 0x0($14) \r\n" + "gsldlc1 $f12, 0x7($8) \r\n" + "gsldrc1 $f12, 0x0($8) \r\n" + "daddu $8, $9, $13 \r\n" + "punpckhbh $f14, $f0, $f2 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpckhbh $f2, $f4, $f6 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpckhbh $f6, $f8, $f10 \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "gsldlc1 $f16, 0x7($8) \r\n" + "gsldrc1 $f16, 0x0($8) \r\n" + "punpckhbh $f10, $f12, $f16 \r\n" + "punpcklbh $f12, $f12, $f16 \r\n" + "sdc1 $f6, 0x0+%[ptmp] \r\n" + "punpckhhw $f6, $f0, $f4 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhhw $f4, $f8, $f12 \r\n" + "punpcklhw $f8, $f8, $f12 \r\n" + "punpckhhw $f12, $f14, $f2 \r\n" + "punpcklhw $f14, $f14, $f2 \r\n" + "sdc1 $f4, 0x20+%[ptmp] \r\n" + "ldc1 $f4, 0x0+%[ptmp] \r\n" + "punpckhhw $f2, $f4, $f10 \r\n" + "punpcklhw $f4, $f4, $f10 \r\n" + "punpckhwd $f10, $f0, $f8 \r\n" + "punpcklwd $f0, $f0, $f8 \r\n" + "punpckhwd $f8, $f14, $f4 \r\n" + "punpcklwd $f14, $f14, $f4 \r\n" + "sdc1 $f0, 0x0+%[ptmp] \r\n" + "sdc1 $f10, 0x10+%[ptmp] \r\n" + "sdc1 $f14, 0x40+%[ptmp] \r\n" + "sdc1 $f8, 0x50+%[ptmp] \r\n" + "ldc1 $f16, 0x20+%[ptmp] \r\n" + "punpckhwd $f0, $f6, $f16 \r\n" + "punpcklwd $f6, $f6, $f16 \r\n" + "punpckhwd $f10, $f12, $f2 \r\n" + "punpcklwd $f12, $f12, $f2 \r\n" + "daddu $8, $13, $13 \r\n" + "sdc1 $f6, 0x20+%[ptmp] \r\n" + "sdc1 $f0, 0x30+%[ptmp] \r\n" + "sdc1 $f12, 0x60+%[ptmp] \r\n" + "sdc1 $f10, 0x70+%[ptmp] \r\n" + "daddu $10, $10, $8 \r\n" + "daddu $9, $9, $8 \r\n" + "daddu $8, $10, %[stride] \r\n" + "gsldlc1 $f0, 0x7($10) \r\n" + "gsldrc1 $f0, 0x0($10) \r\n" + "daddu $14, $10, $12 \r\n" + "gsldlc1 $f2, 0x7($8) \r\n" + "gsldrc1 $f2, 0x0($8) \r\n" + "gsldlc1 $f4, 0x7($14) \r\n" + "gsldrc1 $f4, 0x0($14) \r\n" + "daddu $8, $9, %[stride] \r\n" + "gsldlc1 $f6, 0x7($9) \r\n" + "gsldrc1 $f6, 0x0($9) \r\n" + "daddu $14, $9, $12 \r\n" + "gsldlc1 $f8, 0x7($8) \r\n" + "gsldrc1 $f8, 0x0($8) \r\n" + "daddu $8, $9, $11 \r\n" + "gsldlc1 $f10, 0x7($14) \r\n" + "gsldrc1 $f10, 0x0($14) \r\n" + "gsldlc1 $f12, 0x7($8) \r\n" + "gsldrc1 $f12, 0x0($8) \r\n" + "daddu $8, $9, $13 \r\n" + "punpckhbh $f14, $f0, $f2 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpckhbh $f2, $f4, $f6 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpckhbh $f6, $f8, $f10 \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "gsldlc1 $f16, 0x7($8) \r\n" + "gsldrc1 $f16, 0x0($8) \r\n" + "punpckhbh $f10, $f12, $f16 \r\n" + "punpcklbh $f12, $f12, $f16 \r\n" + "sdc1 $f6, 0x8+%[ptmp] \r\n" + "punpckhhw $f6, $f0, $f4 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhhw $f4, $f8, $f12 \r\n" + "punpcklhw $f8, $f8, $f12 \r\n" + "punpckhhw $f12, $f14, $f2 \r\n" + "punpcklhw $f14, $f14, $f2 \r\n" + "sdc1 $f4, 0x28+%[ptmp] \r\n" + "ldc1 $f4, 0x8+%[ptmp] \r\n" + "punpckhhw $f2, $f4, $f10 \r\n" + "punpcklhw $f4, $f4, $f10 \r\n" + "punpckhwd $f10, $f0, $f8 \r\n" + "punpcklwd $f0, $f0, $f8 \r\n" + "punpckhwd $f8, $f14, $f4 \r\n" + "punpcklwd $f14, $f14, $f4 \r\n" + "sdc1 $f0, 0x8+%[ptmp] \r\n" + "sdc1 $f10, 0x18+%[ptmp] \r\n" + "sdc1 $f14, 0x48+%[ptmp] \r\n" + "sdc1 $f8, 0x58+%[ptmp] \r\n" + "ldc1 $f16, 0x28+%[ptmp] \r\n" + "punpckhwd $f0, $f6, $f16 \r\n" + "punpcklwd $f6, $f6, $f16 \r\n" + "punpckhwd $f10, $f12, $f2 \r\n" + "punpcklwd $f12, $f12, $f2 \r\n" + "sdc1 $f6, 0x28+%[ptmp] \r\n" + "sdc1 $f0, 0x38+%[ptmp] \r\n" + "sdc1 $f12, 0x68+%[ptmp] \r\n" + "sdc1 $f10, 0x78+%[ptmp] \r\n" + "sd $10, 0x00+%[pdat] \r\n" + "sd $11, 0x08+%[pdat] \r\n" + "sd $12, 0x10+%[pdat] \r\n" + "sd $13, 0x18+%[pdat] \r\n" + ::[pix]"r"(pix),[stride]"r"((uint64_t)stride),[ptmp]"m"(ptmp[0]), + [pdat]"m"(pdat[0]) + : "$8","$9","$10","$11","$12","$13","$14","$f0","$f2","$f4","$f6", + "$f8","$f10","$f12","$f14","$f16" + ); + + ff_deblock_v_luma_intra_8_mmi((uint8_t *) &ptmp[8], 0x10, alpha, beta); + + __asm__ volatile ( + "ld $10, 0x00+%[pdat] \r\n" + "ld $11, 0x08+%[pdat] \r\n" + "ld $12, 0x10+%[pdat] \r\n" + "ld $13, 0x18+%[pdat] \r\n" + "daddu $9, $10, $11 \r\n" + "ldc1 $f0, 0x8+%[ptmp] \r\n" + "ldc1 $f2, 0x18+%[ptmp] \r\n" + "ldc1 $f4, 0x28+%[ptmp] \r\n" + "ldc1 $f6, 0x38+%[ptmp] \r\n" + "ldc1 $f8, 0x48+%[ptmp] \r\n" + "ldc1 $f10, 0x58+%[ptmp] \r\n" + "ldc1 $f12, 0x68+%[ptmp] \r\n" + "punpckhbh $f14, $f0, $f2 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpckhbh $f2, $f4, $f6 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpckhbh $f6, $f8, $f10 \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "ldc1 $f16, 0x78+%[ptmp] \r\n" + "punpckhbh $f10, $f12, $f16 \r\n" + "punpcklbh $f12, $f12, $f16 \r\n" + "gssdlc1 $f6, 0x7($10) \r\n" + "gssdrc1 $f6, 0x0($10) \r\n" + "daddu $8, $10, $12 \r\n" + "punpckhhw $f6, $f0, $f4 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhhw $f4, $f8, $f12 \r\n" + "punpcklhw $f8, $f8, $f12 \r\n" + "punpckhhw $f12, $f14, $f2 \r\n" + "punpcklhw $f14, $f14, $f2 \r\n" + "gssdlc1 $f4, 0x7($8) \r\n" + "gssdrc1 $f4, 0x0($8) \r\n" + "gsldlc1 $f4, 0x7($10) \r\n" + "gsldrc1 $f4, 0x0($10) \r\n" + "punpckhhw $f2, $f4, $f10 \r\n" + "punpcklhw $f4, $f4, $f10 \r\n" + "punpckhwd $f10, $f0, $f8 \r\n" + "punpcklwd $f0, $f0, $f8 \r\n" + "punpckhwd $f8, $f14, $f4 \r\n" + "punpcklwd $f14, $f14, $f4 \r\n" + "daddu $8, $10, %[stride] \r\n" + "gssdlc1 $f0, 0x7($10) \r\n" + "gssdrc1 $f0, 0x0($10) \r\n" + "daddu $14, $9, %[stride] \r\n" + "gssdlc1 $f10, 0x7($8) \r\n" + "gssdrc1 $f10, 0x0($8) \r\n" + "daddu $8, $9, $12 \r\n" + "gssdlc1 $f14, 0x7($14) \r\n" + "gssdrc1 $f14, 0x0($14) \r\n" + "daddu $14, $10, $12 \r\n" + "gssdlc1 $f8, 0x7($8) \r\n" + "gssdrc1 $f8, 0x0($8) \r\n" + "gsldlc1 $f16, 0x7($14) \r\n" + "gsldrc1 $f16, 0x0($14) \r\n" + "daddu $8, $10, $12 \r\n" + "punpckhwd $f0, $f6, $f16 \r\n" + "punpcklwd $f6, $f6, $f16 \r\n" + "punpckhwd $f10, $f12, $f2 \r\n" + "punpcklwd $f12, $f12, $f2 \r\n" + "gssdlc1 $f6, 0x7($8) \r\n" + "gssdrc1 $f6, 0x0($8) \r\n" + "daddu $8, $9, $11 \r\n" + "gssdlc1 $f0, 0x7($9) \r\n" + "gssdrc1 $f0, 0x0($9) \r\n" + "daddu $14, $9, $13 \r\n" + "gssdlc1 $f12, 0x7($8) \r\n" + "gssdrc1 $f12, 0x0($8) \r\n" + "daddu $8, $13, $13 \r\n" + "gssdlc1 $f10, 0x7($14) \r\n" + "gssdrc1 $f10, 0x0($14) \r\n" + "dsubu $10, $10, $8 \r\n" + "dsubu $9, $9, $8 \r\n" + "ldc1 $f0, 0x0+%[ptmp] \r\n" + "ldc1 $f2, 0x10+%[ptmp] \r\n" + "ldc1 $f4, 0x20+%[ptmp] \r\n" + "ldc1 $f6, 0x30+%[ptmp] \r\n" + "ldc1 $f8, 0x40+%[ptmp] \r\n" + "ldc1 $f10, 0x50+%[ptmp] \r\n" + "ldc1 $f12, 0x60+%[ptmp] \r\n" + "punpckhbh $f14, $f0, $f2 \r\n" + "punpcklbh $f0, $f0, $f2 \r\n" + "punpckhbh $f2, $f4, $f6 \r\n" + "punpcklbh $f4, $f4, $f6 \r\n" + "punpckhbh $f6, $f8, $f10 \r\n" + "punpcklbh $f8, $f8, $f10 \r\n" + "ldc1 $f16, 0x70+%[ptmp] \r\n" + "punpckhbh $f10, $f12, $f16 \r\n" + "punpcklbh $f12, $f12, $f16 \r\n" + "gssdlc1 $f6, 0x7($10) \r\n" + "gssdrc1 $f6, 0x0($10) \r\n" + "daddu $8, $10, $12 \r\n" + "punpckhhw $f6, $f0, $f4 \r\n" + "punpcklhw $f0, $f0, $f4 \r\n" + "punpckhhw $f4, $f8, $f12 \r\n" + "punpcklhw $f8, $f8, $f12 \r\n" + "punpckhhw $f12, $f14, $f2 \r\n" + "punpcklhw $f14, $f14, $f2 \r\n" + "gssdlc1 $f4, 0x7($8) \r\n" + "gssdrc1 $f4, 0x0($8) \r\n" + "gsldlc1 $f4, 0x7($10) \r\n" + "gsldrc1 $f4, 0x0($10) \r\n" + "punpckhhw $f2, $f4, $f10 \r\n" + "punpcklhw $f4, $f4, $f10 \r\n" + "punpckhwd $f10, $f0, $f8 \r\n" + "punpcklwd $f0, $f0, $f8 \r\n" + "punpckhwd $f8, $f14, $f4 \r\n" + "punpcklwd $f14, $f14, $f4 \r\n" + "daddu $8, $10, %[stride] \r\n" + "gssdlc1 $f0, 0x7($10) \r\n" + "gssdrc1 $f0, 0x0($10) \r\n" + "daddu $14, $9, %[stride] \r\n" + "gssdlc1 $f10, 0x7($8) \r\n" + "gssdrc1 $f10, 0x0($8) \r\n" + "daddu $8, $9, $12 \r\n" + "gssdlc1 $f14, 0x7($14) \r\n" + "gssdrc1 $f14, 0x0($14) \r\n" + "daddu $14, $10, $12 \r\n" + "gssdlc1 $f8, 0x7($8) \r\n" + "gssdrc1 $f8, 0x0($8) \r\n" + "gsldlc1 $f16, 0x7($14) \r\n" + "gsldrc1 $f16, 0x0($14) \r\n" + "daddu $8, $10, $12 \r\n" + "punpckhwd $f0, $f6, $f16 \r\n" + "punpcklwd $f6, $f6, $f16 \r\n" + "punpckhwd $f10, $f12, $f2 \r\n" + "punpcklwd $f12, $f12, $f2 \r\n" + "gssdlc1 $f6, 0x7($8) \r\n" + "gssdrc1 $f6, 0x0($8) \r\n" + "daddu $8, $9, $11 \r\n" + "gssdlc1 $f0, 0x7($9) \r\n" + "gssdrc1 $f0, 0x0($9) \r\n" + "daddu $14, $9, $13 \r\n" + "gssdlc1 $f12, 0x7($8) \r\n" + "gssdrc1 $f12, 0x0($8) \r\n" + "gssdlc1 $f10, 0x7($14) \r\n" + "gssdrc1 $f10, 0x0($14) \r\n" + ::[pix]"r"(pix),[stride]"r"((uint64_t)stride),[ptmp]"m"(ptmp[0]), + [pdat]"m"(pdat[0]) + : "$8","$9","$10","$11","$12","$13","$14","$f0","$f2","$f4","$f6", + "$f8","$f10","$f12","$f14","$f16" + ); +}
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/mjpegdec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/mjpegdec.c
Changed
@@ -98,6 +98,15 @@ av_log(s->avctx, AV_LOG_INFO, "AVID: len:%d %d\n", len, len > 14 ? buf[12] : -1); } +static void init_idct(AVCodecContext *avctx) +{ + MJpegDecodeContext *s = avctx->priv_data; + + ff_idctdsp_init(&s->idsp, avctx); + ff_init_scantable(s->idsp.idct_permutation, &s->scantable, + ff_zigzag_direct); +} + av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) { MJpegDecodeContext *s = avctx->priv_data; @@ -112,9 +121,7 @@ s->avctx = avctx; ff_blockdsp_init(&s->bdsp, avctx); ff_hpeldsp_init(&s->hdsp, avctx->flags); - ff_idctdsp_init(&s->idsp, avctx); - ff_init_scantable(s->idsp.idct_permutation, &s->scantable, - ff_zigzag_direct); + init_idct(avctx); s->buffer_size = 0; s->buffer = NULL; s->start_code = -1; @@ -267,7 +274,6 @@ /* XXX: verify len field validity */ len = get_bits(&s->gb, 16); - s->avctx->bits_per_raw_sample = bits = get_bits(&s->gb, 8); if (bits > 16 || bits < 1) { @@ -275,6 +281,11 @@ return AVERROR_INVALIDDATA; } + if (s->avctx->bits_per_raw_sample != bits) { + av_log(s->avctx, AV_LOG_INFO, "Changeing bps to %d\n", bits); + s->avctx->bits_per_raw_sample = bits; + init_idct(s->avctx); + } if (s->pegasus_rct) bits = 9; if (bits == 9 && !s->pegasus_rct) @@ -1093,7 +1104,10 @@ dc = mjpeg_decode_dc(s, s->dc_index[i]); if(dc == 0xFFFFF) return -1; - if(bits<=8){ + if ( h * mb_x + x >= s->width + || v * mb_y + y >= s->height) { + // Nothing to do + } else if (bits<=8) { ptr = s->picture_ptr->data[c] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap if(y==0 && toprow){ if(x==0 && leftcol){ @@ -1161,7 +1175,10 @@ dc = mjpeg_decode_dc(s, s->dc_index[i]); if(dc == 0xFFFFF) return -1; - if(bits<=8){ + if ( h * mb_x + x >= s->width + || v * mb_y + y >= s->height) { + // Nothing to do + } else if (bits<=8) { ptr = s->picture_ptr->data[c] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/mpeg12dec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/mpeg12dec.c
Changed
@@ -1953,7 +1953,7 @@ (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) || ((avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) && left > 8)) { av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", - left, show_bits(&s->gb, FFMIN(left, 23))); + left, left>0 ? show_bits(&s->gb, FFMIN(left, 23)) : 0); return AVERROR_INVALIDDATA; } else goto eos;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/mpegvideo.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/mpegvideo.c
Changed
@@ -815,6 +815,7 @@ s->parse_context.buffer = NULL; s->parse_context.buffer_size = 0; + s->parse_context.overread = 0; s->bitstream_buffer = NULL; s->allocated_bitstream_buffer_size = 0; s->picture = NULL;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/opusdec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/opusdec.c
Changed
@@ -565,8 +565,8 @@ if (buffer_samples) { float *buf[2] = { c->out[2 * i + 0] ? c->out[2 * i + 0] : (float*)frame->extended_data[0], c->out[2 * i + 1] ? c->out[2 * i + 1] : (float*)frame->extended_data[0] }; - buf[0] += buffer_samples; - buf[1] += buffer_samples; + buf[0] += decoded_samples; + buf[1] += decoded_samples; ret = av_audio_fifo_write(c->sync_buffers[i], (void**)buf, buffer_samples); if (ret < 0) return ret; @@ -585,7 +585,7 @@ memset(frame->extended_data[i], 0, frame->linesize[0]); } - if (c->gain_i) { + if (c->gain_i && decoded_samples > 0) { c->fdsp->vector_fmul_scalar((float*)frame->extended_data[i], (float*)frame->extended_data[i], c->gain, FFALIGN(decoded_samples, 8));
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/pngdec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/pngdec.c
Changed
@@ -663,7 +663,10 @@ break; default: - av_assert0(0); + avpriv_request_sample(avctx, "bit depth %d " + "and color type %d with TRNS", + s->bit_depth, s->color_type); + return AVERROR_INVALIDDATA; } s->bpp += byte_depth; @@ -1012,7 +1015,7 @@ for (x = s->x_offset; x < s->x_offset + s->cur_w; ++x, foreground += s->bpp, background += s->bpp) { size_t b; uint8_t foreground_alpha, background_alpha, output_alpha; - uint8_t output[4]; + uint8_t output[10]; // Since we might be blending alpha onto alpha, we use the following equations: // output_alpha = foreground_alpha + (1 - foreground_alpha) * background_alpha @@ -1052,6 +1055,8 @@ output_alpha = foreground_alpha + FAST_DIV255((255 - foreground_alpha) * background_alpha); + av_assert0(s->bpp <= 10); + for (b = 0; b < s->bpp - 1; ++b) { if (output_alpha == 0) { output[b] = 0;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/sbr.h -> ffmpeg-2.8.3.tar.bz2/libavcodec/sbr.h
Changed
@@ -137,6 +137,7 @@ struct SpectralBandReplication { int sample_rate; int start; + int ready_for_dequant; int id_aac; int reset; SpectrumParameters spectrum_params;
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/smacker.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/smacker.c
Changed
@@ -670,6 +670,10 @@ /* get output buffer */ frame->nb_samples = unp_size / (avctx->channels * (bits + 1)); + if (unp_size % (avctx->channels * (bits + 1))) { + av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size); + return AVERROR(EINVAL); + } if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; samples = (int16_t *)frame->data[0];
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/takdec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/takdec.c
Changed
@@ -632,7 +632,7 @@ for (; length2 > 0; length2 -= tmp) { tmp = FFMIN(length2, x); - for (i = 0; i < tmp; i++) + for (i = 0; i < tmp - (tmp == length2); i++) s->residues[filter_order + i] = *p2++ >> dshift; for (i = 0; i < tmp; i++) { @@ -656,7 +656,7 @@ *p1++ = v; } - memcpy(s->residues, &s->residues[tmp], 2 * filter_order); + memmove(s->residues, &s->residues[tmp], 2 * filter_order); } emms_c();
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/utils.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/utils.c
Changed
@@ -3490,7 +3490,7 @@ return frame_bytes * 8 / bps; } - if (ch > 0) { + if (ch > 0 && ch < INT_MAX/16) { /* calc from frame_bytes and channels */ switch (id) { case AV_CODEC_ID_ADPCM_AFC:
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/vp8.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/vp8.c
Changed
@@ -164,7 +164,7 @@ s->mb_height = (s->avctx->coded_height + 15) / 16; s->mb_layout = is_vp7 || avctx->active_thread_type == FF_THREAD_SLICE && - FFMIN(s->num_coeff_partitions, avctx->thread_count) > 1; + avctx->thread_count > 1; if (!s->mb_layout) { // Frame threading and one thread s->macroblocks_base = av_mallocz((s->mb_width + s->mb_height * 2 + 1) * sizeof(*s->macroblocks));
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/wmaprodec.c -> ffmpeg-2.8.3.tar.bz2/libavcodec/wmaprodec.c
Changed
@@ -1623,6 +1623,11 @@ s->packet_done = 1; } + if (remaining_bits(s, gb) < 0) { + av_log(avctx, AV_LOG_ERROR, "Overread %d\n", -remaining_bits(s, gb)); + s->packet_loss = 1; + } + if (s->packet_done && !s->packet_loss && remaining_bits(s, gb) > 0) { /** save the rest of the data so that it can be decoded
View file
ffmpeg-2.8.1.tar.bz2/libavcodec/x86/videodsp.asm -> ffmpeg-2.8.3.tar.bz2/libavcodec/x86/videodsp.asm
Changed
@@ -194,8 +194,12 @@ %elif (%2-%%off) == 2 mov valw, [srcq+%2-2] %elifidn %1, body - mov vald, [srcq+%2-3] -%else + mov valb, [srcq+%2-1] + sal vald, 16 + mov valw, [srcq+%2-3] +%elifidn %1, bottom + movd mm %+ %%mmx_idx, [srcq+%2-4] +%else ; top movd mm %+ %%mmx_idx, [srcq+%2-3] %endif %endif ; (%2-%%off) >= 1 @@ -251,12 +255,15 @@ mov [dstq+%2-2], valw %elifidn %1, body mov [dstq+%2-3], valw - shr vald, 16 + sar vald, 16 mov [dstq+%2-1], valb %else movd vald, mm %+ %%mmx_idx +%ifidn %1, bottom + sar vald, 8 +%endif mov [dstq+%2-3], valw - shr vald, 16 + sar vald, 16 mov [dstq+%2-1], valb %endif %endif ; (%2-%%off) >= 1
View file
ffmpeg-2.8.1.tar.bz2/libavformat/brstm.c -> ffmpeg-2.8.3.tar.bz2/libavformat/brstm.c
Changed
@@ -205,7 +205,7 @@ avio_skip(s->pb, 1); // padding st->codec->sample_rate = bfstm ? read32(s) : read16(s); - if (!st->codec->sample_rate) + if (st->codec->sample_rate <= 0) return AVERROR_INVALIDDATA; if (!bfstm)
View file
ffmpeg-2.8.1.tar.bz2/libavformat/concatdec.c -> ffmpeg-2.8.3.tar.bz2/libavformat/concatdec.c
Changed
@@ -314,7 +314,7 @@ file->start_time = !fileno ? 0 : cat->files[fileno - 1].start_time + cat->files[fileno - 1].duration; - file->file_start_time = (avf->start_time == AV_NOPTS_VALUE) ? 0 : avf->start_time; + file->file_start_time = (cat->avf->start_time == AV_NOPTS_VALUE) ? 0 : cat->avf->start_time; file->file_inpoint = (file->inpoint == AV_NOPTS_VALUE) ? file->file_start_time : file->inpoint; if ((ret = match_streams(avf)) < 0) return ret;
View file
ffmpeg-2.8.1.tar.bz2/libavformat/hls.c -> ffmpeg-2.8.3.tar.bz2/libavformat/hls.c
Changed
@@ -73,6 +73,8 @@ char *key; enum KeyType key_type; uint8_t iv[16]; + /* associated Media Initialization Section, treated as a segment */ + struct segment *init_section; }; struct rendition; @@ -110,6 +112,13 @@ int64_t cur_seg_offset; int64_t last_load_time; + /* Currently active Media Initialization Section */ + struct segment *cur_init_section; + uint8_t *init_sec_buf; + unsigned int init_sec_buf_size; + unsigned int init_sec_data_len; + unsigned int init_sec_buf_read_offset; + char key_url[MAX_URL_SIZE]; uint8_t key[16]; @@ -135,6 +144,11 @@ * multiple (playlist-less) renditions associated with them. */ int n_renditions; struct rendition **renditions; + + /* Media Initialization Sections (EXT-X-MAP) associated with this + * playlist, if any. */ + int n_init_sections; + struct segment **init_sections; }; /* @@ -205,16 +219,29 @@ pls->n_segments = 0; } +static void free_init_section_list(struct playlist *pls) +{ + int i; + for (i = 0; i < pls->n_init_sections; i++) { + av_freep(&pls->init_sections[i]->url); + av_freep(&pls->init_sections[i]); + } + av_freep(&pls->init_sections); + pls->n_init_sections = 0; +} + static void free_playlist_list(HLSContext *c) { int i; for (i = 0; i < c->n_playlists; i++) { struct playlist *pls = c->playlists[i]; free_segment_list(pls); + free_init_section_list(pls); av_freep(&pls->renditions); av_freep(&pls->id3_buf); av_dict_free(&pls->id3_initial); ff_id3v2_free_extra_meta(&pls->id3_deferred_extra); + av_freep(&pls->init_sec_buf); av_free_packet(&pls->pkt); av_freep(&pls->pb.buffer); if (pls->input) @@ -352,6 +379,60 @@ } } +struct init_section_info { + char uri[MAX_URL_SIZE]; + char byterange[32]; +}; + +static struct segment *new_init_section(struct playlist *pls, + struct init_section_info *info, + const char *url_base) +{ + struct segment *sec; + char *ptr; + char tmp_str[MAX_URL_SIZE]; + + if (!info->uri[0]) + return NULL; + + sec = av_mallocz(sizeof(*sec)); + if (!sec) + return NULL; + + ff_make_absolute_url(tmp_str, sizeof(tmp_str), url_base, info->uri); + sec->url = av_strdup(tmp_str); + if (!sec->url) { + av_free(sec); + return NULL; + } + + if (info->byterange[0]) { + sec->size = atoi(info->byterange); + ptr = strchr(info->byterange, '@'); + if (ptr) + sec->url_offset = atoi(ptr+1); + } else { + /* the entire file is the init section */ + sec->size = -1; + } + + dynarray_add(&pls->init_sections, &pls->n_init_sections, sec); + + return sec; +} + +static void handle_init_section_args(struct init_section_info *info, const char *key, + int key_len, char **dest, int *dest_len) +{ + if (!strncmp(key, "URI=", key_len)) { + *dest = info->uri; + *dest_len = sizeof(info->uri); + } else if (!strncmp(key, "BYTERANGE=", key_len)) { + *dest = info->byterange; + *dest_len = sizeof(info->byterange); + } +} + struct rendition_info { char type[16]; char uri[MAX_URL_SIZE]; @@ -525,6 +606,14 @@ return ret; } +static void update_options(char **dest, const char *name, void *src) +{ + av_freep(dest); + av_opt_get(src, name, 0, (uint8_t**)dest); + if (*dest && !strlen(*dest)) + av_freep(dest); +} + static int open_url(HLSContext *c, URLContext **uc, const char *url, AVDictionary *opts) { AVDictionary *tmp = NULL; @@ -534,6 +623,12 @@ av_dict_copy(&tmp, opts, 0); ret = ffurl_open(uc, url, AVIO_FLAG_READ, c->interrupt_callback, &tmp); + if( ret >= 0) { + // update cookies on http response with setcookies. + URLContext *u = *uc; + update_options(&c->cookies, "cookies", u->priv_data); + av_dict_set(&opts, "cookies", c->cookies, 0); + } av_dict_free(&tmp); @@ -557,6 +652,7 @@ uint8_t *new_url = NULL; struct variant_info variant_info; char tmp_str[MAX_URL_SIZE]; + struct segment *cur_init_section = NULL; if (!in) { #if 1 @@ -642,6 +738,14 @@ pls->type = PLS_TYPE_EVENT; else if (!strcmp(ptr, "VOD")) pls->type = PLS_TYPE_VOD; + } else if (av_strstart(line, "#EXT-X-MAP:", &ptr)) { + struct init_section_info info = {{0}}; + ret = ensure_playlist(c, &pls, url); + if (ret < 0) + goto fail; + ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_init_section_args, + &info); + cur_init_section = new_init_section(pls, &info, url); } else if (av_strstart(line, "#EXT-X-ENDLIST", &ptr)) { if (pls) pls->finished = 1; @@ -720,6 +824,8 @@ seg->url_offset = 0; seg_offset = 0; } + + seg->init_section = cur_init_section; } } } @@ -733,17 +839,22 @@ return ret; } +static struct segment *current_segment(struct playlist *pls) +{ + return pls->segments[pls->cur_seq_no - pls->start_seq_no]; +} + enum ReadFromURLMode { READ_NORMAL, READ_COMPLETE, }; /* read from URLContext, limiting read to current segment */ -static int read_from_url(struct playlist *pls, uint8_t *buf, int buf_size, +static int read_from_url(struct playlist *pls, struct segment *seg, + uint8_t *buf, int buf_size, enum ReadFromURLMode mode) { int ret; - struct segment *seg = pls->segments[pls->cur_seq_no - pls->start_seq_no]; /* limit read if the segment was only a part of a file */ if (seg->size >= 0) @@ -866,12 +977,13 @@ int bytes; int id3_buf_pos = 0; int fill_buf = 0; + struct segment *seg = current_segment(pls); /* gather all the id3 tags */ while (1) { /* see if we can retrieve enough data for ID3 header */ if (*len < ID3v2_HEADER_SIZE && buf_size >= ID3v2_HEADER_SIZE) { - bytes = read_from_url(pls, buf + *len, ID3v2_HEADER_SIZE - *len, READ_COMPLETE); + bytes = read_from_url(pls, seg, buf + *len, ID3v2_HEADER_SIZE - *len, READ_COMPLETE); if (bytes > 0) { if (bytes == ID3v2_HEADER_SIZE - *len) @@ -892,7 +1004,6 @@ break; if (ff_id3v2_match(buf, ID3v2_DEFAULT_MAGIC)) { - struct segment *seg = pls->segments[pls->cur_seq_no - pls->start_seq_no]; int64_t maxsize = seg->size >= 0 ? seg->size : 1024*1024; int taglen = ff_id3v2_tag_len(buf); int tag_got_bytes = FFMIN(taglen, *len); @@ -924,7 +1035,7 @@ if (remaining > 0) { /* read the rest of the tag in */ - if (read_from_url(pls, pls->id3_buf + id3_buf_pos, remaining, READ_COMPLETE) != remaining) + if (read_from_url(pls, seg, pls->id3_buf + id3_buf_pos, remaining, READ_COMPLETE) != remaining) break; id3_buf_pos += remaining; av_log(pls->ctx, AV_LOG_DEBUG, "Stripped additional %d HLS ID3 bytes\n", remaining); @@ -938,7 +1049,7 @@ /* re-fill buffer for the caller unless EOF */ if (*len >= 0 && (fill_buf || *len == 0)) { - bytes = read_from_url(pls, buf + *len, buf_size - *len, READ_NORMAL); + bytes = read_from_url(pls, seg, buf + *len, buf_size - *len, READ_NORMAL); /* ignore error if we already had some data */ if (bytes >= 0) @@ -958,20 +1069,10 @@ pls->is_id3_timestamped = (pls->id3_mpegts_timestamp != AV_NOPTS_VALUE); } -static void update_options(char **dest, const char *name, void *src) -{ - av_freep(dest); - av_opt_get(src, name, 0, (uint8_t**)dest); - if (*dest && !strlen(*dest)) - av_freep(dest); -} - -static int open_input(HLSContext *c, struct playlist *pls) +static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg) { AVDictionary *opts = NULL; - AVDictionary *opts2 = NULL; int ret; - struct segment *seg = pls->segments[pls->cur_seq_no - pls->start_seq_no]; // broker prior HTTP options that should be consistent across requests av_dict_set(&opts, "user-agent", c->user_agent, 0); @@ -979,9 +1080,6 @@ av_dict_set(&opts, "headers", c->headers, 0); av_dict_set(&opts, "seekable", "0", 0); - // Same opts for key request (ffurl_open mutilates the opts so it cannot be used twice) - av_dict_copy(&opts2, opts, 0); - if (seg->size >= 0) { /* try to restrict the HTTP request to the part we want * (if this is in fact a HTTP request) */ @@ -999,14 +1097,12 @@ char iv[33], key[33], url[MAX_URL_SIZE]; if (strcmp(seg->key, pls->key_url)) { URLContext *uc; - if (open_url(pls->parent->priv_data, &uc, seg->key, opts2) == 0) { + if (open_url(pls->parent->priv_data, &uc, seg->key, opts) == 0) { if (ffurl_read_complete(uc, pls->key, sizeof(pls->key)) != sizeof(pls->key)) { av_log(NULL, AV_LOG_ERROR, "Unable to read key file %s\n", seg->key); } - update_options(&c->cookies, "cookies", uc->priv_data); - av_dict_set(&opts, "cookies", c->cookies, 0); ffurl_close(uc); } else { av_log(NULL, AV_LOG_ERROR, "Unable to open key file %s\n", @@ -1055,11 +1151,70 @@ cleanup: av_dict_free(&opts); - av_dict_free(&opts2); pls->cur_seg_offset = 0; return ret; } +static int update_init_section(struct playlist *pls, struct segment *seg) +{ + static const int max_init_section_size = 1024*1024; + HLSContext *c = pls->parent->priv_data; + int64_t sec_size; + int64_t urlsize; + int ret; + + if (seg->init_section == pls->cur_init_section) + return 0; + + pls->cur_init_section = NULL; + + if (!seg->init_section) + return 0; + + /* this will clobber playlist URLContext stuff, so this should be + * called between segments only */ + ret = open_input(c, pls, seg->init_section); + if (ret < 0) { + av_log(pls->parent, AV_LOG_WARNING, + "Failed to open an initialization section in playlist %d\n", + pls->index); + return ret; + } + + if (seg->init_section->size >= 0) + sec_size = seg->init_section->size; + else if ((urlsize = ffurl_size(pls->input)) >= 0) + sec_size = urlsize; + else + sec_size = max_init_section_size; + + av_log(pls->parent, AV_LOG_DEBUG, + "Downloading an initialization section of size %"PRId64"\n", + sec_size); + + sec_size = FFMIN(sec_size, max_init_section_size); + + av_fast_malloc(&pls->init_sec_buf, &pls->init_sec_buf_size, sec_size); + + ret = read_from_url(pls, seg->init_section, pls->init_sec_buf, + pls->init_sec_buf_size, READ_COMPLETE); + ffurl_close(pls->input); + pls->input = NULL; + + if (ret < 0) + return ret; + + pls->cur_init_section = seg->init_section; + pls->init_sec_data_len = ret; + pls->init_sec_buf_read_offset = 0; + + /* spec says audio elementary streams do not have media initialization + * sections, so there should be no ID3 timestamps */ + pls->is_id3_timestamped = 0; + + return 0; +} + static int64_t default_reload_interval(struct playlist *pls) { return pls->n_segments > 0 ? @@ -1080,6 +1235,7 @@ if (!v->input) { int64_t reload_interval; + struct segment *seg; /* Check that the playlist is still needed before opening a new * segment. */ @@ -1133,7 +1289,14 @@ goto reload; } - ret = open_input(c, v); + seg = current_segment(v); + + /* load/update Media Initialization Section, if any */ + ret = update_init_section(v, seg); + if (ret) + return ret; + + ret = open_input(c, v, seg); if (ret < 0) { if (ff_check_interrupt(c->interrupt_callback)) return AVERROR_EXIT; @@ -1145,7 +1308,15 @@ just_opened = 1; } - ret = read_from_url(v, buf, buf_size, READ_NORMAL); + if (v->init_sec_buf_read_offset < v->init_sec_data_len) { + /* Push init section out first before first actual segment */ + int copy_size = FFMIN(v->init_sec_data_len - v->init_sec_buf_read_offset, buf_size); + memcpy(buf, v->init_sec_buf, copy_size); + v->init_sec_buf_read_offset += copy_size; + return copy_size; + } + + ret = read_from_url(v, current_segment(v), buf, buf_size, READ_NORMAL); if (ret > 0) { if (just_opened && v->is_id3_timestamped != 0) { /* Intercept ID3 tags here, elementary audio streams are required @@ -1613,6 +1784,7 @@ int ret, i, minplaylist = -1; recheck_discard_flags(s, c->first_packet); + c->first_packet = 0; for (i = 0; i < c->n_playlists; i++) { struct playlist *pls = c->playlists[i];
View file
ffmpeg-2.8.1.tar.bz2/libavformat/isom.h -> ffmpeg-2.8.3.tar.bz2/libavformat/isom.h
Changed
@@ -103,6 +103,7 @@ typedef struct MOVFragmentIndexItem { int64_t moof_offset; int64_t time; + int headers_read; } MOVFragmentIndexItem; typedef struct MOVFragmentIndex { @@ -197,6 +198,7 @@ int has_looked_for_mfra; MOVFragmentIndex** fragment_index_data; unsigned fragment_index_count; + int fragment_index_complete; int atom_depth; unsigned int aax_mode; ///< 'aax' file has been detected uint8_t file_key[20];
View file
ffmpeg-2.8.1.tar.bz2/libavformat/jvdec.c -> ffmpeg-2.8.3.tar.bz2/libavformat/jvdec.c
Changed
@@ -54,7 +54,7 @@ static int read_probe(AVProbeData *pd) { - if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) <= pd->buf_size - 4 && + if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) + 4 <= pd->buf_size && !memcmp(pd->buf + 4, MAGIC, strlen(MAGIC))) return AVPROBE_SCORE_MAX; return 0;
View file
ffmpeg-2.8.1.tar.bz2/libavformat/matroskadec.c -> ffmpeg-2.8.3.tar.bz2/libavformat/matroskadec.c
Changed
@@ -3088,6 +3088,7 @@ tracks[i].audio.buf_timecode = AV_NOPTS_VALUE; tracks[i].end_timecode = 0; if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE && + tracks[i].stream && tracks[i].stream->discard != AVDISCARD_ALL) { index_sub = av_index_search_timestamp( tracks[i].stream, st->index_entries[index].timestamp,
View file
ffmpeg-2.8.1.tar.bz2/libavformat/mov.c -> ffmpeg-2.8.3.tar.bz2/libavformat/mov.c
Changed
@@ -3294,7 +3294,7 @@ MOVFragment *frag = &c->fragment; MOVTrackExt *trex = NULL; MOVFragmentIndex* index = NULL; - int flags, track_id, i; + int flags, track_id, i, found = 0; avio_r8(pb); /* version */ flags = avio_rb24(pb); @@ -3312,15 +3312,6 @@ av_log(c->fc, AV_LOG_ERROR, "could not find corresponding trex\n"); return AVERROR_INVALIDDATA; } - for (i = 0; i < c->fragment_index_count; i++) { - MOVFragmentIndex* candidate = c->fragment_index_data[i]; - if (candidate->track_id == frag->track_id) { - av_log(c->fc, AV_LOG_DEBUG, - "found fragment index for track %u\n", frag->track_id); - index = candidate; - break; - } - } frag->base_data_offset = flags & MOV_TFHD_BASE_DATA_OFFSET ? avio_rb64(pb) : flags & MOV_TFHD_DEFAULT_BASE_IS_MOOF ? @@ -3334,24 +3325,33 @@ frag->flags = flags & MOV_TFHD_DEFAULT_FLAGS ? avio_rb32(pb) : trex->flags; frag->time = AV_NOPTS_VALUE; - if (index) { - int i, found = 0; - for (i = index->current_item; i < index->item_count; i++) { - if (frag->implicit_offset == index->items[i].moof_offset) { - av_log(c->fc, AV_LOG_DEBUG, "found fragment index entry " - "for track %u and moof_offset %"PRId64"\n", - frag->track_id, index->items[i].moof_offset); - frag->time = index->items[i].time; - index->current_item = i + 1; - found = 1; + for (i = 0; i < c->fragment_index_count; i++) { + int j; + MOVFragmentIndex* candidate = c->fragment_index_data[i]; + if (candidate->track_id == frag->track_id) { + av_log(c->fc, AV_LOG_DEBUG, + "found fragment index for track %u\n", frag->track_id); + index = candidate; + for (j = index->current_item; j < index->item_count; j++) { + if (frag->implicit_offset == index->items[j].moof_offset) { + av_log(c->fc, AV_LOG_DEBUG, "found fragment index entry " + "for track %u and moof_offset %"PRId64"\n", + frag->track_id, index->items[j].moof_offset); + frag->time = index->items[j].time; + index->current_item = j + 1; + found = 1; + break; + } } - } - if (!found) { - av_log(c->fc, AV_LOG_WARNING, "track %u has a fragment index " - "but it doesn't have an (in-order) entry for moof_offset " - "%"PRId64"\n", frag->track_id, frag->implicit_offset); + if (found) + break; } } + if (index && !found) { + av_log(c->fc, AV_LOG_DEBUG, "track %u has a fragment index but " + "it doesn't have an (in-order) entry for moof_offset " + "%"PRId64"\n", frag->track_id, frag->implicit_offset); + } av_log(c->fc, AV_LOG_TRACE, "frag flags 0x%x\n", frag->flags); return 0; } @@ -3541,7 +3541,106 @@ return AVERROR_EOF; frag->implicit_offset = offset; - st->duration = sc->track_end = dts + sc->time_offset; + + sc->track_end = dts + sc->time_offset; + if (st->duration < sc->track_end) + st->duration = sc->track_end; + + return 0; +} + +static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ + int64_t offset = avio_tell(pb) + atom.size, pts; + uint8_t version; + unsigned i, track_id; + AVStream *st = NULL; + MOVStreamContext *sc; + MOVFragmentIndex *index = NULL; + MOVFragmentIndex **tmp; + AVRational timescale; + + version = avio_r8(pb); + if (version > 1) { + avpriv_request_sample(c->fc, "sidx version %u", version); + return AVERROR_PATCHWELCOME; + } + + avio_rb24(pb); // flags + + track_id = avio_rb32(pb); // Reference ID + for (i = 0; i < c->fc->nb_streams; i++) { + if (c->fc->streams[i]->id == track_id) { + st = c->fc->streams[i]; + break; + } + } + if (!st) { + av_log(c->fc, AV_LOG_ERROR, "could not find corresponding track id %d\n", track_id); + return AVERROR_INVALIDDATA; + } + + sc = st->priv_data; + + timescale = av_make_q(1, avio_rb32(pb)); + + if (version == 0) { + pts = avio_rb32(pb); + offset += avio_rb32(pb); + } else { + pts = avio_rb64(pb); + offset += avio_rb64(pb); + } + + avio_rb16(pb); // reserved + + index = av_mallocz(sizeof(MOVFragmentIndex)); + if (!index) + return AVERROR(ENOMEM); + + index->track_id = track_id; + + index->item_count = avio_rb16(pb); + index->items = av_mallocz_array(index->item_count, sizeof(MOVFragmentIndexItem)); + + if (!index->items) { + av_freep(&index); + return AVERROR(ENOMEM); + } + + for (i = 0; i < index->item_count; i++) { + uint32_t size = avio_rb32(pb); + uint32_t duration = avio_rb32(pb); + if (size & 0x80000000) { + avpriv_request_sample(c->fc, "sidx reference_type 1"); + av_freep(&index->items); + av_freep(&index); + return AVERROR_PATCHWELCOME; + } + avio_rb32(pb); // sap_flags + index->items[i].moof_offset = offset; + index->items[i].time = av_rescale_q(pts, st->time_base, timescale); + offset += size; + pts += duration; + } + + st->duration = sc->track_end = pts; + + tmp = av_realloc_array(c->fragment_index_data, + c->fragment_index_count + 1, + sizeof(MOVFragmentIndex*)); + if (!tmp) { + av_freep(&index->items); + av_freep(&index); + return AVERROR(ENOMEM); + } + + c->fragment_index_data = tmp; + c->fragment_index_data[c->fragment_index_count++] = index; + + if (offset == avio_size(pb)) + c->fragment_index_complete = 1; + return 0; } @@ -3799,6 +3898,7 @@ { MKTAG('a','l','a','c'), mov_read_alac }, /* alac specific atom */ { MKTAG('a','v','c','C'), mov_read_glbl }, { MKTAG('p','a','s','p'), mov_read_pasp }, +{ MKTAG('s','i','d','x'), mov_read_sidx }, { MKTAG('s','t','b','l'), mov_read_default }, { MKTAG('s','t','c','o'), mov_read_stco }, { MKTAG('s','t','p','s'), mov_read_stps }, @@ -3922,9 +4022,9 @@ return err; } if (c->found_moov && c->found_mdat && - ((!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX) || + ((!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX || c->fragment_index_complete) || start_pos + a.size == avio_size(pb))) { - if (!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX) + if (!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX || c->fragment_index_complete) c->next_root_atom = start_pos + a.size; c->atom_depth --; return 0; @@ -4529,6 +4629,52 @@ return 1; } +static int mov_switch_root(AVFormatContext *s, int64_t target) +{ + MOVContext *mov = s->priv_data; + int i, j; + int already_read = 0; + + if (avio_seek(s->pb, target, SEEK_SET) != target) { + av_log(mov->fc, AV_LOG_ERROR, "root atom offset 0x%"PRIx64": partial file\n", target); + return AVERROR_INVALIDDATA; + } + + mov->next_root_atom = 0; + + for (i = 0; i < mov->fragment_index_count; i++) { + MOVFragmentIndex *index = mov->fragment_index_data[i]; + int found = 0; + for (j = 0; j < index->item_count; j++) { + MOVFragmentIndexItem *item = &index->items[j]; + if (found) { + mov->next_root_atom = item->moof_offset; + break; // Advance to next index in outer loop + } else if (item->moof_offset == target) { + index->current_item = FFMIN(j, index->current_item); + if (item->headers_read) + already_read = 1; + item->headers_read = 1; + found = 1; + } + } + if (!found) + index->current_item = 0; + } + + if (already_read) + return 0; + + mov->found_mdat = 0; + + if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 || + avio_feof(s->pb)) + return AVERROR_EOF; + av_log(s, AV_LOG_TRACE, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb)); + + return 1; +} + static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) { MOVContext *mov = s->priv_data; @@ -4539,19 +4685,11 @@ mov->fc = s; retry: sample = mov_find_next_sample(s, &st); - if (!sample) { - mov->found_mdat = 0; + if (!sample || (mov->next_root_atom && sample->pos > mov->next_root_atom)) { if (!mov->next_root_atom) return AVERROR_EOF; - if (avio_seek(s->pb, mov->next_root_atom, SEEK_SET) != mov->next_root_atom) { - av_log(mov->fc, AV_LOG_ERROR, "next root atom offset 0x%"PRIx64": partial file\n", mov->next_root_atom); - return AVERROR_INVALIDDATA; - } - mov->next_root_atom = 0; - if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 || - avio_feof(s->pb)) - return AVERROR_EOF; - av_log(s, AV_LOG_TRACE, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb)); + if ((ret = mov_switch_root(s, mov->next_root_atom)) < 0) + return ret; goto retry; } sc = st->priv_data; @@ -4629,12 +4767,41 @@ return 0; } +static int mov_seek_fragment(AVFormatContext *s, AVStream *st, int64_t timestamp) +{ + MOVContext *mov = s->priv_data; + int i, j; + + if (!mov->fragment_index_complete) + return 0; + + for (i = 0; i < mov->fragment_index_count; i++) { + if (mov->fragment_index_data[i]->track_id == st->id) { + MOVFragmentIndex *index = index = mov->fragment_index_data[i]; + for (j = index->item_count - 1; j >= 0; j--) { + if (index->items[j].time <= timestamp) { + if (index->items[j].headers_read) + return 0; + + return mov_switch_root(s, index->items[j].moof_offset); + } + } + } + } + + return 0; +} + static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, int flags) { MOVStreamContext *sc = st->priv_data; int sample, time_sample; int i; + int ret = mov_seek_fragment(s, st, timestamp); + if (ret < 0) + return ret; + sample = av_index_search_timestamp(st, timestamp, flags); av_log(s, AV_LOG_TRACE, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample); if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
View file
ffmpeg-2.8.1.tar.bz2/libavformat/mp3dec.c -> ffmpeg-2.8.3.tar.bz2/libavformat/mp3dec.c
Changed
@@ -42,6 +42,9 @@ #define XING_TOC_COUNT 100 +#define SAME_HEADER_MASK \ + (0xffe00000 | (3 << 17) | (3 << 10) | (3 << 19)) + typedef struct { AVClass *class; int64_t filesize; @@ -54,7 +57,7 @@ int is_cbr; } MP3DecContext; -static int check(AVIOContext *pb, int64_t pos); +static int check(AVIOContext *pb, int64_t pos, uint32_t *header); /* mp3 read */ @@ -374,12 +377,21 @@ off = avio_tell(s->pb); for (i = 0; i < 64 * 1024; i++) { + uint32_t header, header2; + int frame_size; if (!(i&1023)) ffio_ensure_seekback(s->pb, i + 1024 + 4); - if (check(s->pb, off + i) >= 0) { - av_log(s, AV_LOG_INFO, "Skipping %d bytes of junk at %"PRId64".\n", i, off); - avio_seek(s->pb, off + i, SEEK_SET); - break; + frame_size = check(s->pb, off + i, &header); + if (frame_size > 0) { + avio_seek(s->pb, off, SEEK_SET); + ffio_ensure_seekback(s->pb, i + 1024 + frame_size + 4); + if (check(s->pb, off + i + frame_size, &header2) >= 0 && + (header & SAME_HEADER_MASK) == (header2 & SAME_HEADER_MASK)) + { + av_log(s, AV_LOG_INFO, "Skipping %d bytes of junk at %"PRId64".\n", i, off); + avio_seek(s->pb, off + i, SEEK_SET); + break; + } } avio_seek(s->pb, off, SEEK_SET); } @@ -420,7 +432,7 @@ #define SEEK_WINDOW 4096 -static int check(AVIOContext *pb, int64_t pos) +static int check(AVIOContext *pb, int64_t pos, uint32_t *ret_header) { int64_t ret = avio_seek(pb, pos, SEEK_SET); unsigned header; @@ -434,6 +446,8 @@ if (avpriv_mpegaudio_decode_header(&sd, header) == 1) return -1; + if (ret_header) + *ret_header = header; return sd.frame_size; } @@ -461,7 +475,7 @@ continue; for(j=0; j<MIN_VALID; j++) { - ret = check(s->pb, pos); + ret = check(s->pb, pos, NULL); if(ret < 0) break; if ((target_pos - pos)*dir <= 0 && abs(MIN_VALID/2-j) < score) {
View file
ffmpeg-2.8.1.tar.bz2/libavformat/mpegts.c -> ffmpeg-2.8.3.tar.bz2/libavformat/mpegts.c
Changed
@@ -841,6 +841,7 @@ if ((st->codec->codec_id == AV_CODEC_ID_NONE || (st->request_probe > 0 && st->request_probe < AVPROBE_SCORE_STREAM_RETRY / 5)) && !avcodec_is_open(st->codec) && + st->probe_packets > 0 && stream_type == STREAM_TYPE_PRIVATE_DATA) { st->codec->codec_type = AVMEDIA_TYPE_DATA; st->codec->codec_id = AV_CODEC_ID_BIN_DATA;
View file
ffmpeg-2.8.1.tar.bz2/libavformat/mxfdec.c -> ffmpeg-2.8.3.tar.bz2/libavformat/mxfdec.c
Changed
@@ -1776,6 +1776,16 @@ continue; } + if (physical_track->edit_rate.num <= 0 || + physical_track->edit_rate.den <= 0) { + av_log(mxf->fc, AV_LOG_WARNING, + "Invalid edit rate (%d/%d) found on structural" + " component #%d, defaulting to 25/1\n", + physical_track->edit_rate.num, + physical_track->edit_rate.den, i); + physical_track->edit_rate = (AVRational){25, 1}; + } + for (k = 0; k < physical_track->sequence->structural_components_count; k++) { if (!(mxf_tc = mxf_resolve_timecode_component(mxf, &physical_track->sequence->structural_components_refs[k]))) continue;
View file
ffmpeg-2.8.1.tar.bz2/libavformat/mxfenc.c -> ffmpeg-2.8.3.tar.bz2/libavformat/mxfenc.c
Changed
@@ -19,7 +19,8 @@ * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * signal_standard, color_siting and klv_fill_key version fixes sponsored by NOA GmbH + * signal_standard, color_siting, store_user_comments and klv_fill_key version + * fixes sponsored by NOA GmbH */ /* @@ -321,6 +322,7 @@ int signal_standard; uint32_t tagged_value_count; AVRational audio_edit_rate; + int store_user_comments; } MXFContext; static const uint8_t uuid_base[] = { 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff,0x29,0xbd }; @@ -378,7 +380,6 @@ { 0x4404, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x07,0x02,0x01,0x10,0x02,0x05,0x00,0x00}}, /* Package Modified Date */ { 0x4402, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x01,0x03,0x03,0x02,0x01,0x00,0x00,0x00}}, /* Package Name */ { 0x4403, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x06,0x01,0x01,0x04,0x06,0x05,0x00,0x00}}, /* Tracks Strong reference array */ - { 0x4406, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x02,0x01,0x02,0x0C,0x00,0x00,0x00}}, /* User Comments */ { 0x4701, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x06,0x01,0x01,0x04,0x02,0x03,0x00,0x00}}, /* Descriptor */ // Track { 0x4801, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x01,0x07,0x01,0x01,0x00,0x00,0x00,0x00}}, /* Track ID */ @@ -398,9 +399,6 @@ { 0x1501, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x07,0x02,0x01,0x03,0x01,0x05,0x00,0x00}}, /* Start Time Code */ { 0x1502, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x04,0x01,0x01,0x02,0x06,0x00,0x00}}, /* Rounded Time Code Base */ { 0x1503, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x04,0x01,0x01,0x05,0x00,0x00,0x00}}, /* Drop Frame */ - // Tagged Value - { 0x5001, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x02,0x01,0x02,0x09,0x01,0x00,0x00}}, /* Name */ - { 0x5003, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x02,0x01,0x02,0x0A,0x01,0x00,0x00}}, /* Value */ // File Descriptor { 0x3F01, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x06,0x01,0x01,0x04,0x06,0x0B,0x00,0x00}}, /* Sub Descriptors reference array */ { 0x3006, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x06,0x01,0x01,0x03,0x05,0x00,0x00,0x00}}, /* Linked Track ID */ @@ -446,6 +444,12 @@ { 0x3D0A, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x02,0x01,0x00,0x00,0x00}}, /* Block Align */ }; +static const MXFLocalTagPair mxf_user_comments_local_tag[] = { + { 0x4406, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x02,0x01,0x02,0x0C,0x00,0x00,0x00}}, /* User Comments */ + { 0x5001, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x02,0x01,0x02,0x09,0x01,0x00,0x00}}, /* Name */ + { 0x5003, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x02,0x01,0x02,0x0A,0x01,0x00,0x00}}, /* Value */ +}; + static void mxf_write_uuid(AVIOContext *pb, enum MXFMetadataSetType type, int value) { avio_write(pb, uuid_base, 12); @@ -523,10 +527,12 @@ static void mxf_write_primer_pack(AVFormatContext *s) { + MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; int local_tag_number, i = 0; local_tag_number = FF_ARRAY_ELEMS(mxf_local_tag_batch); + local_tag_number += mxf->store_user_comments * FF_ARRAY_ELEMS(mxf_user_comments_local_tag); avio_write(pb, primer_pack_key, 16); klv_encode_ber_length(pb, local_tag_number * 18 + 8); @@ -534,10 +540,15 @@ avio_wb32(pb, local_tag_number); // local_tag num avio_wb32(pb, 18); // item size, always 18 according to the specs - for (i = 0; i < local_tag_number; i++) { + for (i = 0; i < FF_ARRAY_ELEMS(mxf_local_tag_batch); i++) { avio_wb16(pb, mxf_local_tag_batch[i].local_tag); avio_write(pb, mxf_local_tag_batch[i].uid, 16); } + if (mxf->store_user_comments) + for (i = 0; i < FF_ARRAY_ELEMS(mxf_user_comments_local_tag); i++) { + avio_wb16(pb, mxf_user_comments_local_tag[i].local_tag); + avio_write(pb, mxf_user_comments_local_tag[i].uid, 16); + } } static void mxf_write_local_tag(AVIOContext *pb, int size, int tag) @@ -1251,14 +1262,15 @@ int user_comment_count = 0; if (type == MaterialPackage) { - user_comment_count = mxf_write_user_comments(s, s->metadata); + if (mxf->store_user_comments) + user_comment_count = mxf_write_user_comments(s, s->metadata); mxf_write_metadata_key(pb, 0x013600); PRINT_KEY(s, "Material Package key", pb->buf_ptr - 16); - klv_encode_ber_length(pb, 104 + name_size + (16*track_count) + (16*user_comment_count)); + klv_encode_ber_length(pb, 92 + name_size + (16*track_count) + (16*user_comment_count) + 12*mxf->store_user_comments); } else { mxf_write_metadata_key(pb, 0x013700); PRINT_KEY(s, "Source Package key", pb->buf_ptr - 16); - klv_encode_ber_length(pb, 124 + name_size + (16*track_count)); // 20 bytes length for descriptor reference + klv_encode_ber_length(pb, 112 + name_size + (16*track_count) + 12*mxf->store_user_comments); // 20 bytes length for descriptor reference } // write uid @@ -1293,10 +1305,12 @@ mxf_write_uuid(pb, type == MaterialPackage ? Track : Track + TypeBottom, i); // write user comment refs - mxf_write_local_tag(pb, user_comment_count*16 + 8, 0x4406); - mxf_write_refs_count(pb, user_comment_count); - for (i = 0; i < user_comment_count; i++) - mxf_write_uuid(pb, TaggedValue, mxf->tagged_value_count - user_comment_count + i); + if (mxf->store_user_comments) { + mxf_write_local_tag(pb, user_comment_count*16 + 8, 0x4406); + mxf_write_refs_count(pb, user_comment_count); + for (i = 0; i < user_comment_count; i++) + mxf_write_uuid(pb, TaggedValue, mxf->tagged_value_count - user_comment_count + i); + } // write multiple descriptor reference if (type == SourcePackage) { @@ -2036,6 +2050,9 @@ return -1; } + if (!av_dict_get(s->metadata, "comment_", NULL, AV_DICT_IGNORE_SUFFIX)) + mxf->store_user_comments = 0; + for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; MXFStreamContext *sc = av_mallocz(sizeof(*sc)); @@ -2654,6 +2671,8 @@ static const AVOption mxf_options[] = { MXF_COMMON_OPTIONS + { "store_user_comments", "", + offsetof(MXFContext, store_user_comments), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; @@ -2668,6 +2687,8 @@ { "d10_channelcount", "Force/set channelcount in generic sound essence descriptor", offsetof(MXFContext, channel_count), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 8, AV_OPT_FLAG_ENCODING_PARAM}, MXF_COMMON_OPTIONS + { "store_user_comments", "", + offsetof(MXFContext, store_user_comments), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, };
View file
ffmpeg-2.8.1.tar.bz2/libavformat/rtmpcrypt.c -> ffmpeg-2.8.3.tar.bz2/libavformat/rtmpcrypt.c
Changed
@@ -184,9 +184,14 @@ static void rtmpe8_sig(const uint8_t *in, uint8_t *out, int key_id) { struct AVXTEA ctx; + uint8_t tmpbuf[8]; av_xtea_init(&ctx, rtmpe8_keys[key_id]); - av_xtea_crypt(&ctx, out, in, 1, NULL, 0); + AV_WB32(tmpbuf, AV_RL32(in)); + AV_WB32(tmpbuf + 4, AV_RL32(in + 4)); + av_xtea_crypt(&ctx, tmpbuf, tmpbuf, 1, NULL, 0); + AV_WL32(out, AV_RB32(tmpbuf)); + AV_WL32(out + 4, AV_RB32(tmpbuf + 4)); } static void rtmpe9_sig(const uint8_t *in, uint8_t *out, int key_id)
View file
ffmpeg-2.8.1.tar.bz2/libavformat/rtsp.c -> ffmpeg-2.8.3.tar.bz2/libavformat/rtsp.c
Changed
@@ -1136,7 +1136,6 @@ unsigned char ch; const char *p; int ret, content_length, line_count = 0, request = 0; - int first_line = 1; unsigned char *content = NULL; start: @@ -1156,7 +1155,7 @@ return AVERROR_EOF; if (ch == '\n') break; - if (ch == '$' && first_line && q == buf) { + if (ch == '$' && q == buf) { if (return_on_interleaved_data) { return 1; } else @@ -1167,7 +1166,6 @@ } } *q = '\0'; - first_line = 0; av_log(s, AV_LOG_TRACE, "line='%s'\n", buf);
View file
ffmpeg-2.8.1.tar.bz2/libavformat/utils.c -> ffmpeg-2.8.3.tar.bz2/libavformat/utils.c
Changed
@@ -3139,7 +3139,7 @@ st->codec->time_base = st->time_base; } // only for the split stuff - if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE)) { + if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE) && st->request_probe <= 0) { st->parser = av_parser_init(st->codec->codec_id); if (st->parser) { if (st->need_parsing == AVSTREAM_PARSE_HEADERS) {
View file
ffmpeg-2.8.1.tar.bz2/libavformat/xmv.c -> ffmpeg-2.8.3.tar.bz2/libavformat/xmv.c
Changed
@@ -549,16 +549,17 @@ /* Fetch a video frame */ result = xmv_fetch_video_packet(s, pkt); - if (result) - return result; - } else { /* Fetch an audio frame */ result = xmv_fetch_audio_packet(s, pkt, xmv->current_stream - 1); - if (result) - return result; } + if (result) { + xmv->current_stream = 0; + xmv->video.current_frame = xmv->video.frame_count; + return result; + } + /* Increase our counters */ if (++xmv->current_stream >= xmv->stream_count) {
View file
ffmpeg-2.8.1.tar.bz2/libavutil/channel_layout.c -> ffmpeg-2.8.3.tar.bz2/libavutil/channel_layout.c
Changed
@@ -126,6 +126,8 @@ strlen(channel_names[i].name) == name_len && !memcmp(channel_names[i].name, name, name_len)) return (int64_t)1 << i; + + errno = 0; i = strtol(name, &end, 10); #if FF_API_GET_CHANNEL_LAYOUT_COMPAT @@ -144,14 +146,15 @@ } } else { #endif - if ((end + 1 - name == name_len && *end == 'c')) + if (!errno && (end + 1 - name == name_len && *end == 'c')) return av_get_default_channel_layout(i); #if FF_API_GET_CHANNEL_LAYOUT_COMPAT } #endif + errno = 0; layout = strtoll(name, &end, 0); - if (end - name == name_len) + if (!errno && end - name == name_len) return FFMAX(layout, 0); return 0; }
View file
ffmpeg-2.8.1.tar.bz2/libavutil/common.h -> ffmpeg-2.8.3.tar.bz2/libavutil/common.h
Changed
@@ -76,6 +76,17 @@ */ #define FFNABS(a) ((a) <= 0 ? (a) : (-(a))) +/** + * Comparator. + * For two numerical expressions x and y, gives 1 if x > y, -1 if x < y, and 0 + * if x == y. This is useful for instance in a qsort comparator callback. + * Furthermore, compilers are able to optimize this to branchless code, and + * there is no risk of overflow with signed types. + * As with many macros, this evaluates its argument multiple times, it thus + * must not have a side-effect. + */ +#define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y))) + #define FFMAX(a,b) ((a) > (b) ? (a) : (b)) #define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c) #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
View file
ffmpeg-2.8.1.tar.bz2/libavutil/file_open.c -> ffmpeg-2.8.3.tar.bz2/libavutil/file_open.c
Changed
@@ -77,6 +77,9 @@ #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif +#ifdef O_NOINHERIT + flags |= O_NOINHERIT; +#endif fd = open(filename, flags, mode); #if HAVE_FCNTL
View file
ffmpeg-2.8.1.tar.bz2/libavutil/softfloat.c -> ffmpeg-2.8.3.tar.bz2/libavutil/softfloat.c
Changed
@@ -97,6 +97,48 @@ sf1 = av_int2sf(0xE0000001, 0); printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp); + + sf1 = (SoftFloat){ 0x20000000, MIN_EXP }; + sf1 = av_mul_sf(sf1, sf1); + printf("test5 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp); + + sf1 = (SoftFloat){ 0x20000000, MIN_EXP }; + sf2 = (SoftFloat){ 0x20000000, MAX_EXP }; + i = av_cmp_sf(sf1, sf2); + j = av_cmp_sf(sf2, sf1); + sf1 = av_div_sf(sf1, sf2); + printf("test6 softfloat: %.10lf (0x%08x %d) %d %d\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp, i, j); + + for(i= -50; i<50; i++) { + sf1= av_int2sf(i, 0); + for(j= -50; j<50; j++) { + int c; + sf2= av_int2sf(j, 0); + c = av_cmp_sf(sf1, sf2); + if (FFDIFFSIGN(i,j) != c && (FFDIFFSIGN(i,j)^c)<0) { + printf("av_cmp_sf failed at %d %d as %X\n", i, j, c); + } + c = av_gt_sf(sf1, sf2); + if ((i>j) != c) { + printf("av_gt_sf failed at %d %d as %X\n", i, j, c); + } + } + sf1 = av_int2sf(1, i); + for(j = -50; j < 50; j++) { + int c; + sf2 = av_int2sf(1, j); + c = av_cmp_sf(sf2, sf1); + if (FFDIFFSIGN(i,j) != c && (FFDIFFSIGN(i,j)^c) < 0) { + printf("av_cmp_sf failed2 at %d %d as %X\n", i, j, c); + } + c = av_gt_sf(sf1, sf2); + if ((i<j) != c) { + printf("av_gt_sf failed2 at %d %d as %X\n", i, j, c); + } + } + } + + for(i= 0; i<4*36; i++){ int s, c; double errs, errc;
View file
ffmpeg-2.8.1.tar.bz2/libavutil/softfloat.h -> ffmpeg-2.8.3.tar.bz2/libavutil/softfloat.h
Changed
@@ -36,7 +36,7 @@ int32_t exp; }SoftFloat; -static const SoftFloat FLOAT_0 = { 0, 0}; +static const SoftFloat FLOAT_0 = { 0, MIN_EXP}; static const SoftFloat FLOAT_05 = { 0x20000000, 0}; static const SoftFloat FLOAT_1 = { 0x20000000, 1}; static const SoftFloat FLOAT_EPSILON = { 0x29F16B12, -16}; @@ -90,7 +90,7 @@ } /** - * @return Will not be more denormalized than a+b. So if either input is + * @return Will not be more denormalized than a*b. So if either input is * normalized, then the output will not be worse then the other input. * If both are normalized, then the output will be normalized. */ @@ -98,7 +98,10 @@ a.exp += b.exp; av_assert2((int32_t)((a.mant * (int64_t)b.mant) >> ONE_BITS) == (a.mant * (int64_t)b.mant) >> ONE_BITS); a.mant = (a.mant * (int64_t)b.mant) >> ONE_BITS; - return av_normalize1_sf((SoftFloat){a.mant, a.exp - 1}); + a = av_normalize1_sf((SoftFloat){a.mant, a.exp - 1}); + if (!a.mant || a.exp < MIN_EXP) + return FLOAT_0; + return a; } /** @@ -108,20 +111,27 @@ static inline av_const SoftFloat av_div_sf(SoftFloat a, SoftFloat b){ a.exp -= b.exp; a.mant = ((int64_t)a.mant<<(ONE_BITS+1)) / b.mant; - return av_normalize1_sf(a); + a = av_normalize1_sf(a); + if (!a.mant || a.exp < MIN_EXP) + return FLOAT_0; + return a; } static inline av_const int av_cmp_sf(SoftFloat a, SoftFloat b){ int t= a.exp - b.exp; - if(t<0) return (a.mant >> (-t)) - b.mant ; - else return a.mant - (b.mant >> t); + if (t <-31) return - b.mant ; + else if (t < 0) return (a.mant >> (-t)) - b.mant ; + else if (t < 32) return a.mant - (b.mant >> t); + else return a.mant ; } static inline av_const int av_gt_sf(SoftFloat a, SoftFloat b) { int t= a.exp - b.exp; - if(t<0) return (a.mant >> (-t)) > b.mant ; - else return a.mant > (b.mant >> t); + if (t <-31) return 0 > b.mant ; + else if (t < 0) return (a.mant >> (-t)) > b.mant ; + else if (t < 32) return a.mant > (b.mant >> t); + else return a.mant > 0 ; } static inline av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b){ @@ -143,7 +153,12 @@ * @returns a SoftFloat with value v * 2^frac_bits */ static inline av_const SoftFloat av_int2sf(int v, int frac_bits){ - return av_normalize_sf((SoftFloat){v, ONE_BITS + 1 - frac_bits}); + int exp_offset = 0; + if(v == INT_MIN){ + exp_offset = 1; + v>>=1; + } + return av_normalize_sf(av_normalize1_sf((SoftFloat){v, ONE_BITS + 1 - frac_bits + exp_offset})); } /** @@ -163,7 +178,9 @@ int tabIndex, rem; if (val.mant == 0) - val.exp = 0; + val.exp = MIN_EXP; + else if (val.mant < 0) + abort(); else { tabIndex = (val.mant - 0x20000000) >> 20;
View file
ffmpeg-2.8.1.tar.bz2/libswresample/resample.c -> ffmpeg-2.8.3.tar.bz2/libswresample/resample.c
Changed
@@ -231,6 +231,10 @@ c->compensation_distance= 0; if(!av_reduce(&c->src_incr, &c->dst_incr, out_rate, in_rate * (int64_t)phase_count, INT32_MAX/2)) goto error; + while (c->dst_incr < (1<<20) && c->src_incr < (1<<20)) { + c->dst_incr *= 2; + c->src_incr *= 2; + } c->ideal_dst_incr = c->dst_incr; c->dst_incr_div = c->dst_incr / c->src_incr; c->dst_incr_mod = c->dst_incr % c->src_incr;
View file
ffmpeg-2.8.1.tar.bz2/tests/fate/avformat.mak -> ffmpeg-2.8.3.tar.bz2/tests/fate/avformat.mak
Changed
@@ -61,6 +61,7 @@ $(FATE_LAVF): $(AREF) $(VREF) $(FATE_LAVF): CMD = lavftest +$(FATE_LAVF): CMP = FATE_AVCONV += $(FATE_LAVF) fate-lavf: $(FATE_LAVF)
View file
ffmpeg-2.8.1.tar.bz2/tests/fate/libswresample.mak -> ffmpeg-2.8.3.tar.bz2/tests/fate/libswresample.mak
Changed
@@ -366,16 +366,16 @@ fate-swr-resample_async-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav endef -fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 4031.48 +fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 4020.62 fate-swr-resample_async-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20310 -fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 11185.34 +fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 11186.69 fate-swr-resample_async-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20344 -fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 4031.59 +fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 4020.73 fate-swr-resample_async-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20310 -fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 11185.65 +fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 11187.01 fate-swr-resample_async-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20344 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
View file
ffmpeg-2.8.1.tar.bz2/tests/ref/lavf/mxf -> ffmpeg-2.8.3.tar.bz2/tests/ref/lavf/mxf
Changed
@@ -1,9 +1,9 @@ -030961ae56ab1c264390fd5ef0a95069 *./tests/data/lavf/lavf.mxf -525881 ./tests/data/lavf/lavf.mxf +6d00bf68ec95d0aac959defccdb0190e *./tests/data/lavf/lavf.mxf +525369 ./tests/data/lavf/lavf.mxf ./tests/data/lavf/lavf.mxf CRC=0xdbfff6f1 -b90dc91dee50a24c8b20a08a063f501a *./tests/data/lavf/lavf.mxf -561209 ./tests/data/lavf/lavf.mxf +0bbdd13de78db8ab9314f083b7da0f30 *./tests/data/lavf/lavf.mxf +560697 ./tests/data/lavf/lavf.mxf ./tests/data/lavf/lavf.mxf CRC=0x11a6178e -a0cfffed795686127061feae8cde07d1 *./tests/data/lavf/lavf.mxf -525881 ./tests/data/lavf/lavf.mxf +462f95f19b3e0fd119a204a96eb6f424 *./tests/data/lavf/lavf.mxf +525369 ./tests/data/lavf/lavf.mxf ./tests/data/lavf/lavf.mxf CRC=0xdbfff6f1
View file
ffmpeg-2.8.1.tar.bz2/tests/ref/lavf/mxf_d10 -> ffmpeg-2.8.3.tar.bz2/tests/ref/lavf/mxf_d10
Changed
@@ -1,3 +1,3 @@ -9b5bad981e08fa3eaeb9de818762218c *./tests/data/lavf/lavf.mxf_d10 +73c0cb416548c33d0651c59519a8f7e2 *./tests/data/lavf/lavf.mxf_d10 5330989 ./tests/data/lavf/lavf.mxf_d10 ./tests/data/lavf/lavf.mxf_d10 CRC=0x6c74d488
View file
ffmpeg-2.8.1.tar.bz2/tests/ref/lavf/mxf_opatom -> ffmpeg-2.8.3.tar.bz2/tests/ref/lavf/mxf_opatom
Changed
@@ -1,3 +1,3 @@ -6cab8f702746ca7184c608b4c06a224b *./tests/data/lavf/lavf.mxf_opatom +2205907020248f73876eaad745d2f5b5 *./tests/data/lavf/lavf.mxf_opatom 4717113 ./tests/data/lavf/lavf.mxf_opatom ./tests/data/lavf/lavf.mxf_opatom CRC=0xbdd696b9
View file
ffmpeg-2.8.1.tar.bz2/tests/ref/lavf/mxf_opatom_audio -> ffmpeg-2.8.3.tar.bz2/tests/ref/lavf/mxf_opatom_audio
Changed
@@ -1,3 +1,3 @@ -6c6064f154688e455ec494d425b525f5 *./tests/data/lavf/lavf.mxf_opatom_audio -102457 ./tests/data/lavf/lavf.mxf_opatom_audio +d4ad5a0faf410a9d9e99b3328143e89d *./tests/data/lavf/lavf.mxf_opatom_audio +101945 ./tests/data/lavf/lavf.mxf_opatom_audio ./tests/data/lavf/lavf.mxf_opatom_audio CRC=0xd155c6ff
View file
ffmpeg-2.8.1.tar.bz2/tests/ref/seek/lavf-mxf -> ffmpeg-2.8.3.tar.bz2/tests/ref/seek/lavf-mxf
Changed
@@ -1,48 +1,48 @@ -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret: 0 st: 0 flags:0 ts: 0.800000 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret: 0 st: 0 flags:1 ts:-0.320000 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret:-1 st: 1 flags:0 ts: 2.576667 ret: 0 st: 1 flags:1 ts: 1.470833 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret: 0 st:-1 flags:0 ts: 0.365002 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211968 size: 24786 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786 ret: 0 st:-1 flags:1 ts:-0.740831 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret:-1 st: 0 flags:0 ts: 2.160000 ret: 0 st: 0 flags:1 ts: 1.040000 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret: 0 st: 1 flags:0 ts:-0.058333 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret: 0 st: 1 flags:1 ts: 2.835833 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret:-1 st:-1 flags:0 ts: 1.730004 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211968 size: 24786 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786 ret: 0 st: 0 flags:0 ts:-0.480000 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret: 0 st: 0 flags:1 ts: 2.400000 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret:-1 st: 1 flags:0 ts: 1.306667 ret: 0 st: 1 flags:1 ts: 0.200833 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret: 0 st:-1 flags:0 ts:-0.904994 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret: 0 st:-1 flags:1 ts: 1.989173 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret: 0 st: 0 flags:0 ts: 0.880000 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret: 0 st: 0 flags:1 ts:-0.240000 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801 ret:-1 st: 1 flags:0 ts: 2.671667 ret: 0 st: 1 flags:1 ts: 1.565833 -ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711 +ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211968 size: 24786 +ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6656 size: 24801 +ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
View file
ffmpeg-2.8.1.tar.bz2/tests/ref/seek/lavf-mxf_opatom_audio -> ffmpeg-2.8.3.tar.bz2/tests/ref/seek/lavf-mxf_opatom_audio
Changed
@@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st: 0 flags:0 ts: 0.788333 -ret: 0 st: 0 flags:1 dts: 0.788333 pts: 0.788333 pos: 80825 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.788333 pts: 0.788333 pos: 80313 size: 3840 ret: 0 st: 0 flags:1 ts:-0.317500 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos: 40185 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos: 39673 size: 3840 ret: 0 st: 0 flags:1 ts:-0.740833 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st: 0 flags:0 ts:-0.058333 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st: 0 flags:1 ts: 2.835833 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624167 pts: 0.624167 pos: 65065 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.624167 pts: 0.624167 pos: 64553 size: 3840 ret: 0 st: 0 flags:0 ts:-0.481667 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st: 0 flags:1 ts: 2.412500 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200833 pts: 0.200833 pos: 24425 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.200833 pts: 0.200833 pos: 23913 size: 3840 ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st: 0 flags:1 ts: 1.989167 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 89945 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 89433 size: 3840 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840 ret: 0 st: 0 flags:0 ts: 2.671667 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st: 0 flags:1 ts: 1.565833 -ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size: 2 +ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 49305 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 48793 size: 3840 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size: 3840 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.