~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-security

« back to all changes in this revision

Viewing changes to libswscale/yuv2rgb_vis.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
 
82
82
 
 
83
// FIXME: must be changed to set alpha to 255 instead of 0
83
84
static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
84
85
                           int srcSliceH, uint8_t* dst[], int dstStride[]){
85
86
  int y, out1, out2, out3, out4, out5, out6;
131
132
  return srcSliceH;
132
133
}
133
134
 
 
135
// FIXME: must be changed to set alpha to 255 instead of 0
134
136
static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
135
137
                           int srcSliceH, uint8_t* dst[], int dstStride[]){
136
138
  int y, out1, out2, out3, out4, out5, out6;
182
184
  return srcSliceH;
183
185
}
184
186
 
185
 
SwsFunc yuv2rgb_init_vis(SwsContext *c) {
 
187
SwsFunc sws_yuv2rgb_init_vis(SwsContext *c) {
186
188
    c->sparc_coeffs[5]=c->yCoeff;
187
189
    c->sparc_coeffs[6]=c->vgCoeff;
188
190
    c->sparc_coeffs[7]=c->vrCoeff;
196
198
    c->sparc_coeffs[4]=(((int16_t)c->vOffset*(int16_t)c->vrCoeff>>11) & 0xffff) * 0x0001000100010001ULL;
197
199
 
198
200
    if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV422P && (c->dstW & 7)==0) {
199
 
        av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV422P -> RGB32\n");
 
201
        av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV422P -> RGB32 (WARNING: alpha value is wrong)\n");
200
202
        return vis_422P_ARGB32;
201
203
    }
202
204
    else if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV420P && (c->dstW & 7)==0) {
203
 
        av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV420P -> RGB32\n");
 
205
        av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV420P -> RGB32 (WARNING: alpha value is wrong)\n");
204
206
        return vis_420P_ARGB32;
205
207
    }
206
208
    return NULL;